# # calcerr - error codes and messages # # Copyright (C) 1999-2006,2021 Ernest Bowen # # Calc is open software; you can redistribute it and/or modify it under # the terms of the version 2.1 of the GNU Lesser General Public License # as published by the Free Software Foundation. # # Calc is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General # Public License for more details. # # A copy of version 2.1 of the GNU Lesser General Public License is # distributed with calc under the filename COPYING-LGPL. You should have # received a copy with calc; if not, write to Free Software Foundation, Inc. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Under source code control: 1996/05/23 17:38:44 # File existed as early as: 1996 # # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ # This file is used to build calcerr.h include file. # # Lines should be of the form: # # SYMBOL meaning ###################################################################### # WARNING: The order of the lines below is critical! If you change # # the order, you will break code that depends on the return # # value of the errno() builtin function. # # # # If you need to add values to this table, ONLY add then # # to the bottom of the file! # ###################################################################### E_1OVER0 Division by zero E_0OVER0 Indeterminate (0/0) E_ADD Bad arguments for + E_SUB Bad arguments for binary - E_MUL Bad arguments for * E_DIV Bad arguments for / E_NEG Bad argument for unary - E_SQUARE Bad argument for squaring E_INV Bad argument for inverse E_INCV Bad argument for ++ E_DECV Bad argument for -- E_INT Bad argument for int E_FRAC Bad argument for frac E_CONJ Bad argument for conj E_APPR Bad first argument for appr E_APPR2 Bad second argument for appr E_APPR3 Bad third argument for appr E_ROUND Bad first argument for round E_ROUND2 Bad second argument for round E_ROUND3 Bad third argument for round E_BROUND Bad first argument for bround E_BROUND2 Bad second argument for bround E_BROUND3 Bad third argument for bround E_SQRT Bad first argument for sqrt E_SQRT2 Bad second argument for sqrt E_SQRT3 Bad third argument for sqrt E_ROOT Bad first argument for root E_ROOT2 Bad second argument for root E_ROOT3 Bad third argument for root E_NORM Bad argument for norm E_SHIFT Bad first argument for << or >> E_SHIFT2 Bad second argument for << or >> E_SCALE Bad first argument for scale E_SCALE2 Bad second argument for scale E_POWI Bad first argument for ^ E_POWI2 Bad second argument for ^ E_POWER Bad first argument for power E_POWER2 Bad second argument for power E_POWER3 Bad third argument for power E_QUO Bad first argument for quo or // E_QUO2 Bad second argument for quo or // E_QUO3 Bad third argument for quo E_MOD Bad first argument for mod or % E_MOD2 Bad second argument for mod or % E_MOD3 Bad third argument for mod E_SGN Bad argument for sgn E_ABS Bad first argument for abs E_ABS2 Bad second argument for abs E_EVAL Scan error in argument for eval E_STR Non-simple type for str E_EXP1 Non-real epsilon for exp E_EXP2 Bad first argument for exp E_FPUTC1 Non-file first argument for fputc E_FPUTC2 Bad second argument for fputc E_FPUTC3 File not open for writing for fputc E_FGETC1 Non-file first argument for fgetc E_FGETC2 File not open for reading for fgetc E_FOPEN1 Non-string arguments for fopen E_FOPEN2 Unrecognized mode for fopen E_FREOPEN1 Non-file first argument for freopen E_FREOPEN2 Non-string or unrecognized mode for freopen E_FREOPEN3 Non-string third argument for freopen E_FCLOSE1 Non-file argument for fclose E_FFLUSH Non-file argument for fflush E_FPUTS1 Non-file first argument for fputs E_FPUTS2 Non-string argument after first for fputs E_FPUTS3 File not open for writing for fputs E_FGETS1 Non-file argument for fgets E_FGETS2 File not open for reading for fgets E_FPUTSTR1 Non-file first argument for fputstr E_FPUTSTR2 Non-string argument after first for fputstr E_FPUTSTR3 File not open for writing for fputstr E_FGETSTR1 Non-file first argument for fgetstr E_FGETSTR2 File not open for reading for fgetstr E_FGETLINE1 Non-file argument for fgetline E_FGETLINE2 File not open for reading for fgetline E_FGETFIELD1 Non-file argument for fgetfield E_FGETFIELD2 File not open for reading for fgetfield E_REWIND1 Non-file argument for rewind E_FILES Non-integer argument for files E_PRINTF1 Non-string fmt argument for fprint E_PRINTF2 Stdout not open for writing to ??? E_FPRINTF1 Non-file first argument for fprintf E_FPRINTF2 Non-string second (fmt) argument for fprintf E_FPRINTF3 File not open for writing for fprintf E_STRPRINTF1 Non-string first (fmt) argument for strprintf E_STRPRINTF2 Error in attempting strprintf ??? E_FSCAN1 Non-file first argument for fscan E_FSCAN2 File not open for reading for fscan E_STRSCAN Non-string first argument for strscan E_FSCANF1 Non-file first argument for fscanf E_FSCANF2 Non-string second (fmt) argument for fscanf E_FSCANF3 Non-lvalue argument after second for fscanf E_FSCANF4 File not open for reading or other error for fscanf E_STRSCANF1 Non-string first argument for strscanf E_STRSCANF2 Non-string second (fmt) argument for strscanf E_STRSCANF3 Non-lvalue argument after second for strscanf E_STRSCANF4 Some error in attempting strscanf ??? E_SCANF1 Non-string first (fmt) argument for scanf E_SCANF2 Non-lvalue argument after first for scanf E_SCANF3 Some error in attempting scanf ??? E_FTELL1 Non-file argument for ftell E_FTELL2 File not open or other error for ftell E_FSEEK1 Non-file first argument for fseek E_FSEEK2 Non-integer or negative second argument for fseek E_FSEEK3 File not open or other error for fseek E_FSIZE1 Non-file argument for fsize E_FSIZE2 File not open or other error for fsize E_FEOF1 Non-file argument for feof E_FEOF2 File not open or other error for feof E_FERROR1 Non-file argument for ferror E_FERROR2 File not open or other error for ferror E_UNGETC1 Non-file argument for ungetc E_UNGETC2 File not open for reading for ungetc E_UNGETC3 Bad second argument or other error for ungetc E_BIGEXP Exponent too big in scanning E_ISATTY1 E_ISATTY1 is no longer used E_ISATTY2 E_ISATTY2 is no longer used E_ACCESS1 Non-string first argument for access E_ACCESS2 Bad second argument for access E_SEARCH1 Bad first argument for search E_SEARCH2 Bad second argument for search E_SEARCH3 Bad third argument for search E_SEARCH4 Bad fourth argument for search E_SEARCH5 Cannot find fsize or fpos for search E_SEARCH6 File not readable for search E_RSEARCH1 Bad first argument for rsearch E_RSEARCH2 Bad second argument for rsearch E_RSEARCH3 Bad third argument for rsearch E_RSEARCH4 Bad fourth argument for rsearch E_RSEARCH5 Cannot find fsize or fpos for rsearch E_RSEARCH6 File not readable for rsearch E_MANYOPEN Too many open files E_REWIND2 Attempt to rewind a file that is not open E_STRERROR1 Bad argument type for strerror E_STRERROR2 Index out of range for strerror E_COS1 Bad epsilon for cos E_COS2 Bad first argument for cos E_SIN1 Bad epsilon for sin E_SIN2 Bad first argument for sin E_EVAL2 Non-string argument for eval E_ARG1 Bad epsilon for arg E_ARG2 Bad first argument for arg E_POLAR1 Non-real argument for polar E_POLAR2 Bad epsilon for polar E_FCNT Non-integral argument for fcnt E_MATFILL1 Non-variable first argument for matfill E_MATFILL2 Non-matrix first argument-value for matfill E_MATDIM Non-matrix argument for matdim E_MATSUM Non-matrix argument for matsum E_ISIDENT E_ISIDENT is no longer used E_MATTRANS1 Non-matrix argument for mattrans E_MATTRANS2 Non-two-dimensional matrix for mattrans E_DET1 Non-matrix argument for det E_DET2 Matrix for det not of dimension 2 E_DET3 Non-square matrix for det E_MATMIN1 Non-matrix first argument for matmin E_MATMIN2 Non-positive-integer second argument for matmin E_MATMIN3 Second argument for matmin exceeds dimension E_MATMAX1 Non-matrix first argument for matmin E_MATMAX2 Second argument for matmax not positive integer E_MATMAX3 Second argument for matmax exceeds dimension E_CP1 Non-matrix argument for cp E_CP2 Non-one-dimensional matrix for cp E_CP3 Matrix size not 3 for cp E_DP1 Non-matrix argument for dp E_DP2 Non-one-dimensional matrix for dp E_DP3 Different-size matrices for dp E_STRLEN Non-string argument for strlen E_STRCAT Non-string argument for strcat E_SUBSTR1 Non-string first argument for strcat E_SUBSTR2 Non-non-negative integer second argument for strcat E_CHAR Bad argument for char E_ORD Non-string argument for ord E_INSERT1 Non-list-variable first argument for insert E_INSERT2 Non-integral second argument for insert E_PUSH Non-list-variable first argument for push E_APPEND Non-list-variable first argument for append E_DELETE1 Non-list-variable first argument for delete E_DELETE2 Non-integral second argument for delete E_POP Non-list-variable argument for pop E_REMOVE Non-list-variable argument for remove E_LN1 Bad epsilon argument for ln E_LN2 Non-numeric first argument for ln E_ERROR1 Non-integer argument for error E_ERROR2 Argument outside range for error E_EVAL3 Attempt to eval at maximum input depth E_EVAL4 Unable to open string for reading E_RM1 First argument for rm is not a non-empty string E_RM2 Unable to remove a file E_RDPERM Operation allowed because calc mode disallows read operations E_WRPERM Operation allowed because calc mode disallows write operations E_EXPERM Operation allowed because calc mode disallows exec operations E_MIN Unordered arguments for min E_MAX Unordered arguments for max E_LISTMIN Unordered items for minimum of list E_LISTMAX Unordered items for maximum of list E_SIZE Size undefined for argument type E_NO_C_ARG Calc must be run with a -C argument to use custom function E_NO_CUSTOM Calc was built with custom functions disabled E_UNK_CUSTOM Custom function unknown, try: show custom E_BLK1 Non-integral length for block E_BLK2 Negative or too-large length for block E_BLK3 Non-integral chunksize for block E_BLK4 Negative or too-large chunksize for block E_BLKFREE1 Named block does not exist for blkfree E_BLKFREE2 Non-integral id specification for blkfree E_BLKFREE3 Block with specified id does not exist E_BLKFREE4 Block already freed E_BLKFREE5 No-realloc protection prevents blkfree E_BLOCKS1 Non-integer argument for blocks E_BLOCKS2 Non-allocated index number for blocks E_COPY1 Non-integer or negative source index for copy E_COPY2 Source index too large for copy E_COPY3 E_COPY3 is no longer used E_COPY4 Non-integer or negative number for copy E_COPY5 Number too large for copy E_COPY6 Non-integer or negative destination index for copy E_COPY7 Destination index too large for copy E_COPY8 Freed block source for copy E_COPY9 Unsuitable source type for copy E_COPY10 Freed block destinction for copy E_COPY11 Unsuitable destination type for copy E_COPY12 Incompatible source and destination for copy E_COPY13 No-copy-from source variable E_COPY14 No-copy-to destination variable E_COPY15 No-copy-from source named block E_COPY16 No-copy-to destination named block E_COPY17 No-relocate destination for copy E_COPYF1 File not open for copy E_COPYF2 fseek or fsize failure for copy E_COPYF3 fwrite error for copy E_COPYF4 fread error for copy E_PROTECT1 Non-variable first argument for protect E_PROTECT2 Bad second argument for protect E_PROTECT3 Bad third argument for protect E_MATFILL3 No-copy-to destination for matfill E_MATFILL4 No-assign-from source for matfill E_MATTRACE1 Non-matrix argument for mattrace E_MATTRACE2 Non-two-dimensional argument for mattrace E_MATTRACE3 Non-square argument for mattrace E_TAN1 Bad epsilon for tan E_TAN2 Bad argument for tan E_COT1 Bad epsilon for cot E_COT2 Bad argument for cot E_SEC1 Bad epsilon for sec E_SEC2 Bad argument for sec E_CSC1 Bad epsilon for csc E_CSC2 Bad argument for csc E_SINH1 Bad epsilon for sinh E_SINH2 Bad argument for sinh E_COSH1 Bad epsilon for cosh E_COSH2 Bad argument for cosh E_TANH1 Bad epsilon for tanh E_TANH2 Bad argument for tanh E_COTH1 Bad epsilon for coth E_COTH2 Bad argument for coth E_SECH1 Bad epsilon for sech E_SECH2 Bad argument for sech E_CSCH1 Bad epsilon for csch E_CSCH2 Bad argument for csch E_ASIN1 Bad epsilon for asin E_ASIN2 Bad argument for asin E_ACOS1 Bad epsilon for acos E_ACOS2 Bad argument for acos E_ATAN1 Bad epsilon for atan E_ATAN2 Bad argument for atan E_ACOT1 Bad epsilon for acot E_ACOT2 Bad argument for acot E_ASEC1 Bad epsilon for asec E_ASEC2 Bad argument for asec E_ACSC1 Bad epsilon for acsc E_ACSC2 Bad argument for acsc E_ASINH1 Bad epsilon for asin E_ASINH2 Bad argument for asinh E_ACOSH1 Bad epsilon for acosh E_ACOSH2 Bad argument for acosh E_ATANH1 Bad epsilon for atanh E_ATANH2 Bad argument for atanh E_ACOTH1 Bad epsilon for acoth E_ACOTH2 Bad argument for acoth E_ASECH1 Bad epsilon for asech E_ASECH2 Bad argument for asech E_ACSCH1 Bad epsilon for acsch E_ACSCH2 Bad argument for acsch E_GD1 Bad epsilon for gd E_GD2 Bad argument for gd E_AGD1 Bad epsilon for agd E_AGD2 Bad argument for agd E_LOGINF Log of zero or infinity E_STRADD String addition failure E_STRMUL String multiplication failure E_STRNEG String reversal failure E_STRSUB String subtraction failure E_BIT1 Bad argument type for bit E_BIT2 Index too large for bit E_SETBIT1 Non-integer second argument for setbit E_SETBIT2 Out-of-range index for setbit E_SETBIT3 Non-string first argument for setbit E_OR Bad argument for or E_AND Bad argument for and E_STROR Allocation failure for string or E_STRAND Allocation failure for string and E_XOR Bad argument for xorvalue E_COMP Bad argument for comp E_STRDIFF Allocation failure for string diff E_STRCOMP Allocation failure for string comp E_SEG1 Bad first argument for segment E_SEG2 Bad second argument for segment E_SEG3 Bad third argument for segment E_STRSEG Failure for string segment E_HIGHBIT1 Bad argument type for highbit E_HIGHBIT2 Non-integer argument for highbit E_LOWBIT1 Bad argument type for lowbit E_LOWBIT2 Non-integer argument for lowbit E_CONTENT Bad argument type for unary hash op E_HASHOP Bad argument type for binary hash op E_HEAD1 Bad first argument for head E_HEAD2 Bad second argument for head E_STRHEAD Failure for strhead E_TAIL1 Bad first argument for tail E_TAIL2 Bad second argument for tail E_STRTAIL Failure for strtail E_STRSHIFT Failure for strshift E_STRCMP Non-string argument for strcmp E_STRNCMP Bad argument type for strncmp E_XOR1 Varying types of argument for xor E_XOR2 Bad argument type for xor E_STRCPY Bad argument type for strcpy E_STRNCPY Bad argument type for strncpy E_BACKSLASH Bad argument type for unary backslash E_SETMINUS Bad argument type for setminus E_INDICES1 Bad first argument type for indices E_INDICES2 Bad second argument for indices E_EXP3 Too-large re(argument) for exp E_SINH3 Too-large re(argument) for sinh E_COSH3 Too-large re(argument) for cosh E_SIN3 Too-large im(argument) for sin E_COS3 Too-large im(argument) for cos E_GD3 Infinite or too-large result for gd E_AGD3 Infinite or too-large result for agd E_POWER4 Too-large value for power E_ROOT4 Too-large value for root E_DGT1 Non-real first arg for digit E_DGT2 Non-integral second arg for digit E_DGT3 Bad third arg for digit E_PLCS1 Bad first argument for places E_PLCS2 Bad second argument for places E_DGTS1 Bad first argument for digits E_DGTS2 Bad second argument for digits E_ILOG Bad first argument for ilog E_ILOGB Bad second argument for ilog E_ILOG10 Bad argument for ilog10 E_ILOG2 Bad argument for ilog2 E_COMB1 Non-integer second arg for comb E_COMB2 Too-large second arg for comb E_CTLN Bad argument for catalan E_BERN Bad argument for bern E_EULER Bad argument for euler E_SLEEP Bad argument for sleep E_TTY calc_tty failure E_ASSIGN1 No-copy-to destination for octet assign E_ASSIGN2 No-copy-from source for octet assign E_ASSIGN3 No-change destination for octet assign E_ASSIGN4 Non-variable destination for assign E_ASSIGN5 No-assign-to destination for assign E_ASSIGN6 No-assign-from source for assign E_ASSIGN7 No-change destination for assign E_ASSIGN8 No-type-change destination for assign E_ASSIGN9 No-error-value destination for assign E_SWAP1 No-copy argument for octet swap E_SWAP2 No-assign-to-or-from argument for swap E_SWAP3 Non-lvalue argument for swap E_QUOMOD1 Non-lvalue argument 3 or 4 for quomod E_QUOMOD2 Non-real-number arg 1 or 2 or bad arg 5 for quomod E_QUOMOD3 No-assign-to argument 3 or 4 for quomod E_PREINC1 No-copy-to or no-change argument for octet preinc E_PREINC2 Non-variable argument for preinc E_PREINC3 No-assign-to or no-change argument for preinc E_PREDEC1 No-copy-to or no-change argument for octet predec E_PREDEC2 Non-variable argument for predec E_PREDEC3 No-assign-to or no-change argument for predec E_POSTINC1 No-copy-to or no-change argument for octet postinc E_POSTINC2 Non-variable argument for postinc E_POSTINC3 No-assign-to or no-change argument for postinc E_POSTDEC1 No-copy-to or no-change argument for octet postdec E_POSTDEC2 Non-variable argument for postdec E_POSTDEC3 No-assign-to or no-change argument for postdec E_INIT1 Error-type structure for initialization E_INIT2 No-copy-to structure for initialization E_INIT3 Too many initializer values E_INIT4 Attempt to initialize freed named block E_INIT5 Bad structure type for initialization E_INIT6 No-assign-to element for initialization E_INIT7 No-change element for initialization E_INIT8 No-type-change element for initialization E_INIT9 No-error-value element for initialization E_INIT10 No-assign-or-copy-from source for initialization E_LIST1 No-relocate for list insert E_LIST2 No-relocate for list delete E_LIST3 No-relocate for list push E_LIST4 No-relocate for list append E_LIST5 No-relocate for list pop E_LIST6 No-relocate for list remove E_MODIFY1 Non-variable first argument for modify E_MODIFY2 Non-string second argument for modify E_MODIFY3 No-change first argument for modify E_MODIFY4 Undefined function for modify E_MODIFY5 Unacceptable type first argument for modify E_FPATHOPEN1 Non-string arguments for fpathopen E_FPATHOPEN2 Unrecognized mode for fpathopen E_LOG1 Bad epsilon argument for log E_LOG2 Non-numeric first argument for log E_LOG3 Cannot calculate log for this value E_FGETFILE1 Non-file argument for fgetfile E_FGETFILE2 File argument for fgetfile not open for reading E_FGETFILE3 Unable to set file position in fgetfile E_ESTR Non-representable type for estr E_STRCASECMP Non-string argument for strcasecmp E_STRNCASECMP Bad argument type for strncasecmp E_ISUPPER Bad argument for isupper E_ISLOWER Bad argument for islower E_ISALNUM Bad argument for isalnum E_ISALPHA Bad argument for isalpha E_ISASCII Bad argument for isascii E_ISCNTRL Bad argument for iscntrl E_ISDIGIT Bad argument for isdigit E_ISGRAPH Bad argument for isgraph E_ISPRINT Bad argument for isprint E_ISPUNCT Bad argument for ispunct E_ISSPACE Bad argument for isspace E_ISXDIGIT Bad argument for isxdigit E_STRTOUPPER Bad argument type for strtoupper E_STRTOLOWER Bad argument type for strtolower E_TAN3 Invalid value for calculating the sin numerator for tan E_TAN4 Invalid value for calculating the cos denominator for tan E_COT3 Invalid value for calculating the sin numerator for cot E_COT4 Invalid value for calculating the cos denominator for cot E_SEC3 Invalid value for calculating the cos reciprocal for sec E_CSC3 Invalid value for calculating the sin reciprocal for csc E_TANH3 Invalid value for calculating the sinh numerator for tanh E_TANH4 Invalid value for calculating the cosh denominator for tanh E_COTH3 Invalid value for calculating the sinh numerator for coth E_COTH4 Invalid value for calculating the cosh denominator for coth E_SECH3 Invalid value for calculating the cosh reciprocal for sech E_CSCH3 Invalid value for calculating the sinh reciprocal for csch E_ASIN3 Invalid value for calculating asin E_ACOS3 Invalid value for calculating acos E_ASINH3 Invalid value for calculating asinh E_ACOSH3 Invalid value for calculating acosn E_ATAN3 Invalid value for calculating atan E_ACOT3 Invalid value for calculating acot E_ASEC3 Invalid value for calculating asec E_ACSC3 Invalid value for calculating acsc E_ATANH3 Invalid value for calculating atan E_ACOTH3 Invalid value for calculating acot E_ASECH3 Invalid value for calculating asec E_ACSCH3 Invalid value for calculating acsc E_D2R1 Bad epsilon for converting degrees to radians E_D2R2 Bad first argument converting degrees to radians E_R2D1 Bad epsilon for converting radians to degrees E_R2D2 Bad first argument converting radians to degrees E_G2R1 Bad epsilon for converting gradians to radians E_G2R2 Bad first argument converting gradians to radians E_R2G1 Bad epsilon for converting radians to gradians E_R2G2 Bad first argument converting radians to gradians E_D2G1 Bad first argument converting degrees to gradians E_G2D1 Bad first argument converting gradians to degrees E_D2DMS1 Non-lvalue arguments 2, 3 or 4 for d2dms E_D2DMS2 Non-real-number arg 1 for d2dms E_D2DMS3 No-assign-to argument 2, 3 or 4 for d2dms E_D2DM1 Non-lvalue arguments 2 or 3 for d2dm E_D2DM2 Non-real-number arg 1 for d2dm E_D2DM3 No-assign-to argument 2 or 3 for d2dm E_G2GMS1 Non-lvalue arguments 2, 3 or 4 for g2gms E_G2GMS2 Non-real-number arg 1 for g2gms E_G2GMS3 No-assign-to argument 2 or 3 for g2gm E_G2GM1 Non-lvalue arguments 2 or 3 for g2gm E_G2GM2 Non-real-number arg 1 for g2gm E_G2GM3 No-assign-to argument 2, 3 or 4 for g2gms E_H2HMS1 Non-lvalue arguments 2, 3 or 4 for h2hms E_H2HMS2 Non-real-number arg 1 for h2hms E_H2HMS3 No-assign-to argument 2, 3 or 4 for h2hms E_H2HM1 Non-lvalue arguments 2 or 3 for h2hm E_H2HM2 Non-real-number arg 1 for h2hm E_H2HM3 No-assign-to argument 2 or 3 for h2hm