2 * custom - interface for custom software and hardware interfaces
4 * Copyright (C) 1999 Landon Curt Noll
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 * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
24 * Under source code control: 1997/03/03 04:53:08
25 * File existed as early as: 1997
27 * chongo <was here> /\oo/\ http://www.isthe.com/chongo/
28 * Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
32 * Be careful what you put in this file, upper .c files include
33 * this file even when CUSTOM is not defined (ALLOW_CUSTOM is empty).
35 * Don't include anything, let the including .c file bring in:
40 * before they include this file.
42 * Keep this file down to a minimum. Don't put custom builtin funcion
47 #if !defined(CUSTOM_H)
52 * arg count definitons
54 #define MAX_CUSTOM_ARGS 100 /* maximum number of custom arguments */
58 * custom function interface
61 char *name; /* name of the custom builtin */
62 char *desc; /* very brief description of custom builtin */
63 short minargs; /* minimum number of arguments */
64 short maxargs; /* maximum number of arguments */
65 VALUE (*func)(char *name, int argc, VALUE **argv); /* custom func */
70 * external declarations
72 * These are the required interfaces. The dummy.c stubs these interfaces too.
74 extern VALUE custom(char*, int, VALUE**); /* master custom interface */
75 extern BOOL allow_custom; /* TRUE => custom builtins allowed */
76 extern void showcustom(void); /* print custom functions */
77 extern void customhelp(char *); /* direct custom help */
78 extern CONST struct custom cust[]; /* custom interface table */
80 #endif /* !CUSTOM_H */