2 # calcerr - error codes and messages
4 # Copyright (C) 1999-2006 Ernest Bowen
6 # Calc is open software; you can redistribute it and/or modify it under
7 # the terms of the version 2.1 of the GNU Lesser General Public License
8 # as published by the Free Software Foundation.
10 # Calc is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
13 # Public License for more details.
15 # A copy of version 2.1 of the GNU Lesser General Public License is
16 # distributed with calc under the filename COPYING-LGPL. You should have
17 # received a copy with calc; if not, write to Free Software Foundation, Inc.
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 # @(#) $Revision: 30.1 $
21 # @(#) $Id: calcerr.tbl,v 30.1 2007/03/16 11:09:46 chongo Exp $
22 # @(#) $Source: /usr/local/src/bin/calc/RCS/calcerr.tbl,v $
24 # Under source code control: 1996/05/23 17:38:44
25 # File existed as early as: 1996
27 # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
29 # This file is used to build calcerr.h include file.
31 # Lines should be of the form:
35 E_1OVER0 Division by zero
36 E_0OVER0 Indeterminate (0/0)
37 E_ADD Bad arguments for +
38 E_SUB Bad arguments for binary -
39 E_MUL Bad arguments for *
40 E_DIV Bad arguments for /
41 E_NEG Bad argument for unary -
42 E_SQUARE Bad argument for squaring
43 E_INV Bad argument for inverse
44 E_INCV Bad argument for ++
45 E_DECV Bad argument for --
46 E_INT Bad argument for int
47 E_FRAC Bad argument for frac
48 E_CONJ Bad argument for conj
49 E_APPR Bad first argument for appr
50 E_APPR2 Bad second argument for appr
51 E_APPR3 Bad third argument for appr
52 E_ROUND Bad first argument for round
53 E_ROUND2 Bad second argument for round
54 E_ROUND3 Bad third argument for round
55 E_BROUND Bad first argument for bround
56 E_BROUND2 Bad second argument for bround
57 E_BROUND3 Bad third argument for bround
58 E_SQRT Bad first argument for sqrt
59 E_SQRT2 Bad second argument for sqrt
60 E_SQRT3 Bad third argument for sqrt
61 E_ROOT Bad first argument for root
62 E_ROOT2 Bad second argument for root
63 E_ROOT3 Bad third argument for root
64 E_NORM Bad argument for norm
65 E_SHIFT Bad first argument for << or >>
66 E_SHIFT2 Bad second argument for << or >>
67 E_SCALE Bad first argument for scale
68 E_SCALE2 Bad second argument for scale
69 E_POWI Bad first argument for ^
70 E_POWI2 Bad second argument for ^
71 E_POWER Bad first argument for power
72 E_POWER2 Bad second argument for power
73 E_POWER3 Bad third argument for power
74 E_QUO Bad first argument for quo or //
75 E_QUO2 Bad second argument for quo or //
76 E_QUO3 Bad third argument for quo
77 E_MOD Bad first argument for mod or %
78 E_MOD2 Bad second argument for mod or %
79 E_MOD3 Bad third argument for mod
80 E_SGN Bad argument for sgn
81 E_ABS Bad first argument for abs
82 E_ABS2 Bad second argument for abs
83 E_EVAL Scan error in argument for eval
84 E_STR Non-simple type for str
85 E_EXP1 Non-real epsilon for exp
86 E_EXP2 Bad first argument for exp
87 E_FPUTC1 Non-file first argument for fputc
88 E_FPUTC2 Bad second argument for fputc
89 E_FPUTC3 File not open for writing for fputc
90 E_FGETC1 Non-file first argument for fgetc
91 E_FGETC2 File not open for reading for fgetc
92 E_FOPEN1 Non-string arguments for fopen
93 E_FOPEN2 Unrecognized mode for fopen
94 E_FREOPEN1 Non-file first argument for freopen
95 E_FREOPEN2 Non-string or unrecognized mode for freopen
96 E_FREOPEN3 Non-string third argument for freopen
97 E_FCLOSE1 Non-file argument for fclose
98 E_FFLUSH Non-file argument for fflush
99 E_FPUTS1 Non-file first argument for fputs
100 E_FPUTS2 Non-string argument after first for fputs
101 E_FPUTS3 File not open for writing for fputs
102 E_FGETS1 Non-file argument for fgets
103 E_FGETS2 File not open for reading for fgets
104 E_FPUTSTR1 Non-file first argument for fputstr
105 E_FPUTSTR2 Non-string argument after first for fputstr
106 E_FPUTSTR3 File not open for writing for fputstr
107 E_FGETSTR1 Non-file first argument for fgetstr
108 E_FGETSTR2 File not open for reading for fgetstr
109 E_FGETLINE1 Non-file argument for fgetline
110 E_FGETLINE2 File not open for reading for fgetline
111 E_FGETFIELD1 Non-file argument for fgetfield
112 E_FGETFIELD2 File not open for reading for fgetfield
113 E_REWIND1 Non-file argument for rewind
114 E_FILES Non-integer argument for files
115 E_PRINTF1 Non-string fmt argument for fprint
116 E_PRINTF2 Stdout not open for writing to ???
117 E_FPRINTF1 Non-file first argument for fprintf
118 E_FPRINTF2 Non-string second (fmt) argument for fprintf
119 E_FPRINTF3 File not open for writing for fprintf
120 E_STRPRINTF1 Non-string first (fmt) argument for strprintf
121 E_STRPRINTF2 Error in attempting strprintf ???
122 E_FSCAN1 Non-file first argument for fscan
123 E_FSCAN2 File not open for reading for fscan
124 E_STRSCAN Non-string first argument for strscan
125 E_FSCANF1 Non-file first argument for fscanf
126 E_FSCANF2 Non-string second (fmt) argument for fscanf
127 E_FSCANF3 Non-lvalue argument after second for fscanf
128 E_FSCANF4 File not open for reading or other error for fscanf
129 E_STRSCANF1 Non-string first argument for strscanf
130 E_STRSCANF2 Non-string second (fmt) argument for strscanf
131 E_STRSCANF3 Non-lvalue argument after second for strscanf
132 E_STRSCANF4 Some error in attempting strscanf ???
133 E_SCANF1 Non-string first (fmt) argument for scanf
134 E_SCANF2 Non-lvalue argument after first for scanf
135 E_SCANF3 Some error in attempting scanf ???
136 E_FTELL1 Non-file argument for ftell
137 E_FTELL2 File not open or other error for ftell
138 E_FSEEK1 Non-file first argument for fseek
139 E_FSEEK2 Non-integer or negative second argument for fseek
140 E_FSEEK3 File not open or other error for fseek
141 E_FSIZE1 Non-file argument for fsize
142 E_FSIZE2 File not open or other error for fsize
143 E_FEOF1 Non-file argument for feof
144 E_FEOF2 File not open or other error for feof
145 E_FERROR1 Non-file argument for ferror
146 E_FERROR2 File not open or other error for ferror
147 E_UNGETC1 Non-file argument for ungetc
148 E_UNGETC2 File not open for reading for ungetc
149 E_UNGETC3 Bad second argument or other error for ungetc
150 E_BIGEXP Exponent too big in scanning
151 E_ISATTY1 E_ISATTY1 is no longer used
152 E_ISATTY2 E_ISATTY2 is no longer used
153 E_ACCESS1 Non-string first argument for access
154 E_ACCESS2 Bad second argument for access
155 E_SEARCH1 Bad first argument for search
156 E_SEARCH2 Bad second argument for search
157 E_SEARCH3 Bad third argument for search
158 E_SEARCH4 Bad fourth argument for search
159 E_SEARCH5 Cannot find fsize or fpos for search
160 E_SEARCH6 File not readable for search
161 E_RSEARCH1 Bad first argument for rsearch
162 E_RSEARCH2 Bad second argument for rsearch
163 E_RSEARCH3 Bad third argument for rsearch
164 E_RSEARCH4 Bad fourth argument for rsearch
165 E_RSEARCH5 Cannot find fsize or fpos for rsearch
166 E_RSEARCH6 File not readable for rsearch
167 E_MANYOPEN Too many open files
168 E_REWIND2 Attempt to rewind a file that is not open
169 E_STRERROR1 Bad argument type for strerror
170 E_STRERROR2 Index out of range for strerror
171 E_COS1 Bad epsilon for cos
172 E_COS2 Bad first argument for cos
173 E_SIN1 Bad epsilon for sin
174 E_SIN2 Bad first argument for sin
175 E_EVAL2 Non-string argument for eval
176 E_ARG1 Bad epsilon for arg
177 E_ARG2 Bad first argument for arg
178 E_POLAR1 Non-real argument for polar
179 E_POLAR2 Bad epsilon for polar
180 E_FCNT Non-integral argument for fcnt
181 E_MATFILL1 Non-variable first argument for matfill
182 E_MATFILL2 Non-matrix first argument-value for matfill
183 E_MATDIM Non-matrix argument for matdim
184 E_MATSUM Non-matrix argument for matsum
185 E_ISIDENT E_ISIDENT is no longer used
186 E_MATTRANS1 Non-matrix argument for mattrans
187 E_MATTRANS2 Non-two-dimensional matrix for mattrans
188 E_DET1 Non-matrix argument for det
189 E_DET2 Matrix for det not of dimension 2
190 E_DET3 Non-square matrix for det
191 E_MATMIN1 Non-matrix first argument for matmin
192 E_MATMIN2 Non-positive-integer second argument for matmin
193 E_MATMIN3 Second argument for matmin exceeds dimension
194 E_MATMAX1 Non-matrix first argument for matmin
195 E_MATMAX2 Second argument for matmax not positive integer
196 E_MATMAX3 Second argument for matmax exceeds dimension
197 E_CP1 Non-matrix argument for cp
198 E_CP2 Non-one-dimensional matrix for cp
199 E_CP3 Matrix size not 3 for cp
200 E_DP1 Non-matrix argument for dp
201 E_DP2 Non-one-dimensional matrix for dp
202 E_DP3 Different-size matrices for dp
203 E_STRLEN Non-string argument for strlen
204 E_STRCAT Non-string argument for strcat
205 E_SUBSTR1 Non-string first argument for strcat
206 E_SUBSTR2 Non-non-negative integer second argument for strcat
207 E_CHAR Bad argument for char
208 E_ORD Non-string argument for ord
209 E_INSERT1 Non-list-variable first argument for insert
210 E_INSERT2 Non-integral second argument for insert
211 E_PUSH Non-list-variable first argument for push
212 E_APPEND Non-list-variable first argument for append
213 E_DELETE1 Non-list-variable first argument for delete
214 E_DELETE2 Non-integral second argument for delete
215 E_POP Non-list-variable argument for pop
216 E_REMOVE Non-list-variable argument for remove
217 E_LN1 Bad epsilon argument for ln
218 E_LN2 Non-numeric first argument for ln
219 E_ERROR1 Non-integer argument for error
220 E_ERROR2 Argument outside range for error
221 E_EVAL3 Attempt to eval at maximum input depth
222 E_EVAL4 Unable to open string for reading
223 E_RM1 First argument for rm is not a non-empty string
224 E_RM2 Unable to remove a file
225 E_RDPERM Operation allowed because calc mode disallows read operations
226 E_WRPERM Operation allowed because calc mode disallows write operations
227 E_EXPERM Operation allowed because calc mode disallows exec operations
228 E_MIN Unordered arguments for min
229 E_MAX Unordered arguments for max
230 E_LISTMIN Unordered items for minimum of list
231 E_LISTMAX Unordered items for maximum of list
232 E_SIZE Size undefined for argument type
233 E_NO_C_ARG Calc must be run with a -C argument to use custom function
234 E_NO_CUSTOM Calc was built with custom functions disabled
235 E_UNK_CUSTOM Custom function unknown, try: show custom
236 E_BLK1 Non-integral length for block
237 E_BLK2 Negative or too-large length for block
238 E_BLK3 Non-integral chunksize for block
239 E_BLK4 Negative or too-large chunksize for block
240 E_BLKFREE1 Named block does not exist for blkfree
241 E_BLKFREE2 Non-integral id specification for blkfree
242 E_BLKFREE3 Block with specified id does not exist
243 E_BLKFREE4 Block already freed
244 E_BLKFREE5 No-realloc protection prevents blkfree
245 E_BLOCKS1 Non-integer argument for blocks
246 E_BLOCKS2 Non-allocated index number for blocks
247 E_COPY1 Non-integer or negative source index for copy
248 E_COPY2 Source index too large for copy
249 E_COPY3 E_COPY3 is no longer used
250 E_COPY4 Non-integer or negative number for copy
251 E_COPY5 Number too large for copy
252 E_COPY6 Non-integer or negative destination index for copy
253 E_COPY7 Destination index too large for copy
254 E_COPY8 Freed block source for copy
255 E_COPY9 Unsuitable source type for copy
256 E_COPY10 Freed block destinction for copy
257 E_COPY11 Unsuitable destination type for copy
258 E_COPY12 Incompatible source and destination for copy
259 E_COPY13 No-copy-from source variable
260 E_COPY14 No-copy-to destination variable
261 E_COPY15 No-copy-from source named block
262 E_COPY16 No-copy-to destination named block
263 E_COPY17 No-relocate destination for copy
264 E_COPYF1 File not open for copy
265 E_COPYF2 fseek or fsize failure for copy
266 E_COPYF3 fwrite error for copy
267 E_COPYF4 fread error for copy
268 E_PROTECT1 Non-variable first argument for protect
269 E_PROTECT2 Bad second argument for protect
270 E_PROTECT3 Bad third argument for protect
271 E_MATFILL3 No-copy-to destination for matfill
272 E_MATFILL4 No-assign-from source for matfill
273 E_MATTRACE1 Non-matrix argument for mattrace
274 E_MATTRACE2 Non-two-dimensional argument for mattrace
275 E_MATTRACE3 Non-square argument for mattrace
276 E_TAN1 Bad epsilon for tan
277 E_TAN2 Bad argument for tan
278 E_COT1 Bad epsilon for cot
279 E_COT2 Bad argument for cot
280 E_SEC1 Bad epsilon for sec
281 E_SEC2 Bad argument for sec
282 E_CSC1 Bad epsilon for csc
283 E_CSC2 Bad argument for csc
284 E_SINH1 Bad epsilon for sinh
285 E_SINH2 Bad argument for sinh
286 E_COSH1 Bad epsilon for cosh
287 E_COSH2 Bad argument for cosh
288 E_TANH1 Bad epsilon for tanh
289 E_TANH2 Bad argument for tanh
290 E_COTH1 Bad epsilon for coth
291 E_COTH2 Bad argument for coth
292 E_SECH1 Bad epsilon for sech
293 E_SECH2 Bad argument for sech
294 E_CSCH1 Bad epsilon for csch
295 E_CSCH2 Bad argument for csch
296 E_ASIN1 Bad epsilon for asin
297 E_ASIN2 Bad argument for asin
298 E_ACOS1 Bad epsilon for acos
299 E_ACOS2 Bad argument for acos
300 E_ATAN1 Bad epsilon for atan
301 E_ATAN2 Bad argument for atan
302 E_ACOT1 Bad epsilon for acot
303 E_ACOT2 Bad argument for acot
304 E_ASEC1 Bad epsilon for asec
305 E_ASEC2 Bad argument for asec
306 E_ACSC1 Bad epsilon for acsc
307 E_ACSC2 Bad argument for acsc
308 E_ASINH1 Bad epsilon for asin
309 E_ASINH2 Bad argument for asinh
310 E_ACOSH1 Bad epsilon for acosh
311 E_ACOSH2 Bad argument for acosh
312 E_ATANH1 Bad epsilon for atanh
313 E_ATANH2 Bad argument for atanh
314 E_ACOTH1 Bad epsilon for acoth
315 E_ACOTH2 Bad argument for acoth
316 E_ASECH1 Bad epsilon for asech
317 E_ASECH2 Bad argument for asech
318 E_ACSCH1 Bad epsilon for acsch
319 E_ACSCH2 Bad argument for acsch
320 E_GD1 Bad epsilon for gd
321 E_GD2 Bad argument for gd
322 E_AGD1 Bad epsilon for agd
323 E_AGD2 Bad argument for agd
324 E_LOGINF Log of zero or infinity
325 E_STRADD String addition failure
326 E_STRMUL String multiplication failure
327 E_STRNEG String reversal failure
328 E_STRSUB String subtraction failure
329 E_BIT1 Bad argument type for bit
330 E_BIT2 Index too large for bit
331 E_SETBIT1 Non-integer second argument for setbit
332 E_SETBIT2 Out-of-range index for setbit
333 E_SETBIT3 Non-string first argument for setbit
334 E_OR Bad argument for or
335 E_AND Bad argument for and
336 E_STROR Allocation failure for string or
337 E_STRAND Allocation failure for string and
338 E_XOR Bad argument for xorvalue
339 E_COMP Bad argument for comp
340 E_STRDIFF Allocation failure for string diff
341 E_STRCOMP Allocation failure for string comp
342 E_SEG1 Bad first argument for segment
343 E_SEG2 Bad second argument for segment
344 E_SEG3 Bad third argument for segment
345 E_STRSEG Failure for string segment
346 E_HIGHBIT1 Bad argument type for highbit
347 E_HIGHBIT2 Non-integer argument for highbit
348 E_LOWBIT1 Bad argument type for lowbit
349 E_LOWBIT2 Non-integer argument for lowbit
350 E_CONTENT Bad argument type for unary hash op
351 E_HASHOP Bad argument type for binary hash op
352 E_HEAD1 Bad first argument for head
353 E_HEAD2 Bad second argument for head
354 E_STRHEAD Failure for strhead
355 E_TAIL1 Bad first argument for tail
356 E_TAIL2 Bad second argument for tail
357 E_STRTAIL Failure for strtail
358 E_STRSHIFT Failure for strshift
359 E_STRCMP Non-string argument for strcmp
360 E_STRNCMP Bad argument type for strncmp
361 E_XOR1 Varying types of argument for xor
362 E_XOR2 Bad argument type for xor
363 E_STRCPY Bad argument type for strcpy
364 E_STRNCPY Bad argument type for strncpy
365 E_BACKSLASH Bad argument type for unary backslash
366 E_SETMINUS Bad argument type for setminus
367 E_INDICES1 Bad first argument type for indices
368 E_INDICES2 Bad second argument for indices
369 E_EXP3 Too-large re(argument) for exp
370 E_SINH3 Too-large re(argument) for sinh
371 E_COSH3 Too-large re(argument) for cosh
372 E_SIN3 Too-large im(argument) for sin
373 E_COS3 Too-large im(argument) for cos
374 E_GD3 Infinite or too-large result for gd
375 E_AGD3 Infinite or too-large result for agd
376 E_POWER4 Too-large value for power
377 E_ROOT4 Too-large value for root
378 E_DGT1 Non-real first arg for digit
379 E_DGT2 Non-integral second arg for digit
380 E_DGT3 Bad third arg for digit
381 E_PLCS1 Bad first argument for places
382 E_PLCS2 Bad second argument for places
383 E_DGTS1 Bad first argument for digits
384 E_DGTS2 Bad second argument for digits
385 E_ILOG Bad first argument for ilog
386 E_ILOGB Bad second argument for ilog
387 E_ILOG10 Bad argument for ilog10
388 E_ILOG2 Bad argument for ilog2
389 E_COMB1 Non-integer second arg for comb
390 E_COMB2 Too-large second arg for comb
391 E_CTLN Bad argument for catalan
392 E_BERN Bad argument for bern
393 E_EULER Bad argument for euler
394 E_SLEEP Bad argument for sleep
395 E_TTY calc_tty failure
396 E_ASSIGN1 No-copy-to destination for octet assign
397 E_ASSIGN2 No-copy-from source for octet assign
398 E_ASSIGN3 No-change destination for octet assign
399 E_ASSIGN4 Non-variable destination for assign
400 E_ASSIGN5 No-assign-to destination for assign
401 E_ASSIGN6 No-assign-from source for assign
402 E_ASSIGN7 No-change destination for assign
403 E_ASSIGN8 No-type-change destination for assign
404 E_ASSIGN9 No-error-value destination for assign
405 E_SWAP1 No-copy argument for octet swap
406 E_SWAP2 No-assign-to-or-from argument for swap
407 E_SWAP3 Non-lvalue argument for swap
408 E_QUOMOD1 Non-lvalue argument 3 or 4 for quomod
409 E_QUOMOD2 Non-real-number arg 1 or 2 or bad arg 5 for quomod
410 E_QUOMOD3 No-assign-to argument 3 or 4 for quomod
411 E_PREINC1 No-copy-to or no-change argument for octet preinc
412 E_PREINC2 Non-variable argument for preinc
413 E_PREINC3 No-assign-to or no-change argument for preinc
414 E_PREDEC1 No-copy-to or no-change argument for octet predec
415 E_PREDEC2 Non-variable argument for predec
416 E_PREDEC3 No-assign-to or no-change argument for predec
417 E_POSTINC1 No-copy-to or no-change argument for octet postinc
418 E_POSTINC2 Non-variable argument for postinc
419 E_POSTINC3 No-assign-to or no-change argument for postinc
420 E_POSTDEC1 No-copy-to or no-change argument for octet postdec
421 E_POSTDEC2 Non-variable argument for postdec
422 E_POSTDEC3 No-assign-to or no-change argument for postdec
423 E_INIT1 Error-type structure for initialization
424 E_INIT2 No-copy-to structure for initialization
425 E_INIT3 Too many initializer values
426 E_INIT4 Attempt to initialize freed named block
427 E_INIT5 Bad structure type for initialization
428 E_INIT6 No-assign-to element for initialization
429 E_INIT7 No-change element for initialization
430 E_INIT8 No-type-change element for initialization
431 E_INIT9 No-error-value element for initialization
432 E_INIT10 No-assign-or-copy-from source for initialization
433 E_LIST1 No-relocate for list insert
434 E_LIST2 No-relocate for list delete
435 E_LIST3 No-relocate for list push
436 E_LIST4 No-relocate for list append
437 E_LIST5 No-relocate for list pop
438 E_LIST6 No-relocate for list remove
439 E_MODIFY1 Non-variable first argument for modify
440 E_MODIFY2 Non-string second argument for modify
441 E_MODIFY3 No-change first argument for modify
442 E_MODIFY4 Undefined function for modify
443 E_MODIFY5 Unacceptable type first argument for modify
444 E_FPATHOPEN1 Non-string arguments for fpathopen
445 E_FPATHOPEN2 Unrecognized mode for fpathopen
446 E_LOG1 Bad epsilon argument for log
447 E_LOG2 Non-numeric first argument for log
448 E_FGETFILE1 Non-file argument for fgetfile
449 E_FGETFILE2 File argument for fgetfile not open for reading
450 E_FGETFILE3 Unable to set file position in fgetfile
451 E_ESTR Non-representable type for estr