/* @(#)lpierror.h	128.1 1/20/93 18:01:56 */
/************************************************************************\

 Copyright (C) 1990, 1991 Lotus Development Corporation.
 All rights reserved.

 Name:    lpierror.h
 Author:  David Rosenbaum
 Date:    18-Sep-90

 Description:  Contains the LPI errorcodes, 123r3 version.

 Change History:
-------------------------------------------------------------------------
 Date       Chg#  Pgmr  SPR#   Change
-------------------------------------------------------------------------
 05-Apr-91  0015  spl          Added error messages to support @function
                                 and macro registration.

 04-Apr-91  0014  dbt   917193 Fixed LPI_S_CAT_REG_INVAL_ARG (5050
                               to 5051) and subsequent error codes.

 18-Mar-91  0013  jdm   916912 Added LPI_S_NULL_LMHDL and LPI_S_NULL_LPTR.
 !
 20-Feb-91  0012  jdm   none   Added LPI_S_CANNOT_REGISTER_ALERT.

 27-Nov-90  0011  jrc   121493 Remove VCS stuff from C interface headers
  
 25-Sep-90  0010  rfs   none   Break up into distinct numerical regions
                               1. General (negative)
                               2. Spreadsheet specific (positive, > 5000)
                               3. For user use (unpopulated)
                               Did not change name of K_BREAK but it is
                               numerically with the generic break.
 
 25-Sep-90  0009  ram   none   LPI_S_BREAK is gone! rip.
 
 24-Sep-90  0008  ram   none   Temporarily put LPI_S_BREAK back in so the
                               build won't fail!
 
 24-Sep-90  0007  nao   none   Test
 
 24-Sep-90  0006  jsm   none   Added INVALID_WINDOW.
 
 24-Sep-90  0004  dgr   none   Changed NOT_INMEMORY and NOVISIBLE_SHEET per
                               Bill Fletcher's request
 
 24-Sep-90  0005  dgr   none   Added DISPLAY_DISABLED, NOT_DISABLED
 
 24-Sep-90  0003  dgr   none   Added LPI_S for signals, LPI_K for keys
 
 22-Sep-90  0002  dgr   none   Added stackoverflow, primitive failure errors
 
 19-Sep-90  0001  ram   none   Removed interpreter trap codes.
 
 18-Sep-90  0000  dgr   none   Creation
\************************************************************************/

#if !defined(LPIERROR_H)
#define LPIERROR_H

/*  generic error conditions */

/*  this first set is assigned particular values for Lotus internal use */

#define LPI_S_ARRAY_TOO_BIG          (-1)
#define LPI_S_BOUNDS_MISMATCH        (-2)
#define LPI_K_BREAK                  (-3)
#define LPI_S_CANNOT_CALL            (-4)
#define LPI_S_CANNOT_PRINT           (-5)
#define LPI_S_CONVERSION_ERROR       (-6)
#define LPI_S_DIVIDE_BY_ZERO         (-7)
#define LPI_S_ERR                    (-8)
#define LPI_S_NA                     (-9)
#define LPI_S_NEGATIVE               (-10)
#define LPI_S_NOT_FOUND_TRAP         (-11)
#define LPI_S_OUTOFBOUNDS            (-12)
#define LPI_S_OUTOFMEMORY            (-13)
#define LPI_S_OVERFLOW               (-14)
#define LPI_S_STRING_TOO_BIG         (-15)
#define LPI_S_TYPEERROR              (-16)
#define LPI_S_UNDERFLOW              (-17)
#define LPI_S_UNINITIALIZED_VARIABLE (-18)

#define LPI_S_NOT_IMPLEMENTED        (-25)
#define LPI_S_STACK_OVERFLOW         (-26)
#define LPI_S_PRIMITIVE_FAILURE      (-28)

/* other generic conditions */

#define LPI_S_ALREADY_EXISTS         (-101)
#define LPI_S_ALREADY_IN_MEMORY      (-102)
#define LPI_S_ALREADY_RESERVED       (-103)
#define LPI_S_APPERROR               (-104)
#define LPI_S_CLOSE_ERROR            (-105)
#define LPI_S_DELETE_ERROR           (-106)
#define LPI_S_DISK_ERROR             (-107)
#define LPI_S_END_OF_FILE            (-108)
#define LPI_S_FILE_IN_USE            (-109)
#define LPI_S_FILE_NOT_FOUND         (-110)
#define LPI_S_INVALID_ADT            (-111)
#define LPI_S_INVALID_ATFUNCTION     (-112)
#define LPI_S_INVALID_CHARACTER      (-113)
#define LPI_S_INVALID_EXTENSION      (-114)
#define LPI_S_INVALID_FILENAME       (-115)
#define LPI_S_INVALID_FORMULA        (-116)
#define LPI_S_INVALID_MACRO_COMMAND  (-117)
#define LPI_S_INVALID_NAME           (-118)
#define LPI_S_INVALID_NUMBER         (-119)
#define LPI_S_INVALID_PASSWORD       (-120)
#define LPI_S_INVALID_PATH           (-121)
#define LPI_S_INVALID_SIZE           (-122)
#define LPI_S_INVALID_STRING         (-123)
#define LPI_S_INVALID_TYPE           (-124)
#define LPI_S_INVALID_USE            (-125)
#define LPI_S_MACROERROR             (-126)
#define LPI_S_MENU_TOO_LONG          (-127)
#define LPI_S_NAME_NOT_FOUND         (-128)
#define LPI_S_NO_DRIVER_LOADED       (-129)
#define LPI_S_NO_INSTALLED_DEVICE    (-130)
#define LPI_S_NO_KEY                 (-131)
#define LPI_S_NOT_IN_MEMORY          (-132)
#define LPI_S_NOT_OPEN               (-133)
#define LPI_S_NOT_RESERVED           (-134)
#define LPI_S_OPEN_ERROR             (-135)
#define LPI_S_READ_ERROR             (-136)
#define LPI_S_SEEK_ERROR             (-137)
#define LPI_S_STRING_TOO_LONG        (-138)
#define LPI_S_SYSTEM_ERROR           (-139)
#define LPI_S_UNABLE_TO_RESERVE      (-140)
#define LPI_S_UNKNOWN_KEY            (-141)
#define LPI_S_WRITE_ERROR            (-142)
#define LPI_S_NULL_LMHDL             (-143)
#define LPI_S_NULL_LPTR              (-144)

/* non-character keycodes - generic */

#define LPI_K_ALT_A                  (-1000)
#define LPI_K_ALT_B                  (-1001)
#define LPI_K_ALT_C                  (-1002)
#define LPI_K_ALT_D                  (-1003)
#define LPI_K_ALT_E                  (-1004)
#define LPI_K_ALT_F                  (-1005)
#define LPI_K_ALT_F1                 (-1006)
#define LPI_K_ALT_F10                (-1007)
#define LPI_K_ALT_F2                 (-1008)
#define LPI_K_ALT_F3                 (-1009)
#define LPI_K_ALT_F4                 (-1010)
#define LPI_K_ALT_F5                 (-1011)
#define LPI_K_ALT_F6                 (-1012)
#define LPI_K_ALT_F7                 (-1013)
#define LPI_K_ALT_F8                 (-1014)
#define LPI_K_ALT_F9                 (-1015)
#define LPI_K_ALT_G                  (-1016)
#define LPI_K_ALT_H                  (-1017)
#define LPI_K_ALT_I                  (-1018)
#define LPI_K_ALT_J                  (-1019)
#define LPI_K_ALT_K                  (-1020)
#define LPI_K_ALT_L                  (-1021)
#define LPI_K_ALT_M                  (-1022)
#define LPI_K_ALT_N                  (-1023)
#define LPI_K_ALT_O                  (-1024)
#define LPI_K_ALT_P                  (-1025)
#define LPI_K_ALT_Q                  (-1026)
#define LPI_K_ALT_R                  (-1027)
#define LPI_K_ALT_S                  (-1028)
#define LPI_K_ALT_T                  (-1029)
#define LPI_K_ALT_U                  (-1030)
#define LPI_K_ALT_V                  (-1031)
#define LPI_K_ALT_W                  (-1032)
#define LPI_K_ALT_X                  (-1033)
#define LPI_K_ALT_Y                  (-1034)
#define LPI_K_ALT_Z                  (-1035)
#define LPI_K_BACKSPACE              (-1036)

#define LPI_K_CTRL_END               (-1038)
#define LPI_K_CTRL_F1                (-1039)
#define LPI_K_CTRL_F10               (-1040)
#define LPI_K_CTRL_F2                (-1041)
#define LPI_K_CTRL_F3                (-1042)
#define LPI_K_CTRL_F4                (-1043)
#define LPI_K_CTRL_F5                (-1044)
#define LPI_K_CTRL_F6                (-1045)
#define LPI_K_CTRL_F7                (-1046)
#define LPI_K_CTRL_F8                (-1047)
#define LPI_K_CTRL_F9                (-1048)
#define LPI_K_CTRL_HOME              (-1049)
#define LPI_K_CTRL_LEFT              (-1050)
#define LPI_K_CTRL_PGDN              (-1051)
#define LPI_K_CTRL_PGUP              (-1052)
#define LPI_K_CTRL_RIGHT             (-1053)
#define LPI_K_DELETE                 (-1054)
#define LPI_K_DOWN                   (-1055)
#define LPI_K_ENDKEY                 (-1056)
#define LPI_K_ENTER                  (-1057)
#define LPI_K_ESCAPE                 (-1058)
#define LPI_K_F1                     (-1059)
#define LPI_K_F10                    (-1060)
#define LPI_K_F2                     (-1061)
#define LPI_K_F3                     (-1062)
#define LPI_K_F4                     (-1063)
#define LPI_K_F5                     (-1064)
#define LPI_K_F6                     (-1065)
#define LPI_K_F7                     (-1066)
#define LPI_K_F8                     (-1067)
#define LPI_K_F9                     (-1068)
#define LPI_K_HOME                   (-1069)
#define LPI_K_INSERT                 (-1070)
#define LPI_K_LEFT                   (-1071)
#define LPI_K_PGDN                   (-1072)
#define LPI_K_PGUP                   (-1073)
#define LPI_K_RIGHT                  (-1074)
#define LPI_K_SHIFT_F1               (-1075)
#define LPI_K_SHIFT_F10              (-1076)
#define LPI_K_SHIFT_F2               (-1077)
#define LPI_K_SHIFT_F3               (-1078)
#define LPI_K_SHIFT_F4               (-1079)
#define LPI_K_SHIFT_F5               (-1080)
#define LPI_K_SHIFT_F6               (-1081)
#define LPI_K_SHIFT_F7               (-1082)
#define LPI_K_SHIFT_F8               (-1083)
#define LPI_K_SHIFT_F9               (-1084)
#define LPI_K_TAB                    (-1085)
#define LPI_K_UP                     (-1086)

/* error conditions specific to particular 123 functions */

#define LPI_S_ALREADY_GROUPED        5001
#define LPI_S_ATTRIB_CHANGE          5002
#define LPI_S_DIFFERENT_FILES        5003
#define LPI_S_DISPLAY_DISABLED       5004
#define LPI_S_FIELD_TOO_SMALL        5005
#define LPI_S_FILE_NOT_ACTIVE        5006
#define LPI_S_FILE_NOT_SEALED        5007
#define LPI_S_FILE_OPEN              5008
#define LPI_S_FILE_SEALED            5009
#define LPI_S_HIDDEN_COLUMN          5010
#define LPI_S_HIDDEN_SHEET           5011
#define LPI_S_INVALID_ADDRESS        5012
#define LPI_S_INVALID_CELL           5013
#define LPI_S_INVALID_COLUMN         5014
#define LPI_S_INVALID_NOTE           5015
#define LPI_S_INVALID_ORDER          5016
#define LPI_S_INVALID_PLACES         5017
#define LPI_S_INVALID_PREFIX         5018
#define LPI_S_INVALID_RANGE          5019
#define LPI_S_INVALID_ROW            5020
#define LPI_S_INVALID_SHEET          5021
#define LPI_S_INVALID_WIDTH          5022
#define LPI_S_INVALID_WINDOW         5023
#define LPI_S_INVALID_WINDOW_MODE    5024
#define LPI_S_INVALID_WORKFILE       5025
#define LPI_S_JOB_NOT_ACTIVE         5026
#define LPI_S_MANUAL_RESERVATION     5027
#define LPI_S_NO_PRINT_RANGE         5028
#define LPI_S_NOT_DISABLED           5029
#define LPI_S_NOT_GROUPED            5030
#define LPI_S_NO_UNTITLED_CELL       5031
#define LPI_S_NO_VISIBLE_COLUMNS     5032
#define LPI_S_NO_VISIBLE_SHEET       5033
#define LPI_S_NUMBER_NOT_FOUND       5034
#define LPI_S_OFFSHEET_RANGE         5035
#define LPI_S_ONLY_1_WINDOW          5036
#define LPI_S_PASSWORD_REQUIRED      5037
#define LPI_S_PRINT_ABORTED          5038
#define LPI_S_PROMPT_MISMATCH        5039
#define LPI_S_PROTECTED_CELL         5040
#define LPI_S_PROTECTED_SHEET        5041
#define LPI_S_RANGE_FULL             5042
#define LPI_S_REQUEST_REFUSED        5043
#define LPI_S_RESERVATION_SEALED     5044
#define LPI_S_SIZE_IN_KBYTES         5045
#define LPI_S_TOO_FEW_SHEETS         5046
#define LPI_S_TOO_MANY_PROMPTS       5047
#define LPI_S_TOO_MANY_SHEETS        5048
#define LPI_S_CANNOT_REGISTER_ALERT  5049
#define LPI_S_CANNOT_CLEAR_HANDLER   5050

/* CAT registration errors */
#define LPI_S_REG_INVAL_ARG          5051

/* @function and marco registration  argument access errors */
#define LPI_S_ARG_WRONG_TYPE         5052
#define LPI_S_ARG_NO_ARG             5053
#define LPI_S_REG_INVAL_USE          5054

#define LPI_LAST_DEFINED_ERROR       LPI_S_REG_INVAL_USE

#define LPI_S_UNKNOWN_ERROR          (LPI_LAST_DEFINED_ERROR+1)
#define LPI_LAST_ERROR               LPI_S_UNKNOWN_ERROR

#endif /* !defined(LPIERROR_H) */
