* rework export svg/pdf/ps functionality to export images with 1:1 scale. Previously...
[geda-gerbv.git] / src / opdefines.h
blob74797fae179c45d5df05e536c8c2d0d3bb0e560e
1 /** \file opdefines.h
2 \brief More support data for the TinyScheme parser
3 \ingroup gerbv
4 */
6 _OP_DEF(opexe_0, "load", 1, 1, TST_STRING, OP_LOAD )
7 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_T0LVL )
8 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_T1LVL )
9 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_READ_INTERNAL )
10 _OP_DEF(opexe_0, "gensym", 0, 0, 0, OP_GENSYM )
11 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_VALUEPRINT )
12 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_EVAL )
13 #if USE_TRACING
14 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_REAL_EVAL )
15 #endif
16 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_E0ARGS )
17 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_E1ARGS )
18 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_APPLY )
19 #if USE_TRACING
20 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_REAL_APPLY )
21 _OP_DEF(opexe_0, "tracing", 1, 1, TST_NATURAL, OP_TRACING )
22 #endif
23 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_DOMACRO )
24 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LAMBDA )
25 _OP_DEF(opexe_0, "make-closure", 1, 2, TST_PAIR TST_ENVIRONMENT, OP_MKCLOSURE )
26 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_QUOTE )
27 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_DEF0 )
28 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_DEF1 )
29 _OP_DEF(opexe_0, "defined?", 1, 2, TST_SYMBOL TST_ENVIRONMENT, OP_DEFP )
30 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_BEGIN )
31 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_IF0 )
32 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_IF1 )
33 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_SET0 )
34 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_SET1 )
35 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET0 )
36 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET1 )
37 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET2 )
38 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET0AST )
39 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET1AST )
40 _OP_DEF(opexe_0, 0, 0, 0, 0, OP_LET2AST )
41 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_LET0REC )
42 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_LET1REC )
43 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_LET2REC )
44 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_COND0 )
45 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_COND1 )
46 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_DELAY )
47 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_AND0 )
48 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_AND1 )
49 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_OR0 )
50 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_OR1 )
51 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_C0STREAM )
52 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_C1STREAM )
53 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_MACRO0 )
54 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_MACRO1 )
55 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_CASE0 )
56 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_CASE1 )
57 _OP_DEF(opexe_1, 0, 0, 0, 0, OP_CASE2 )
58 _OP_DEF(opexe_1, "eval", 1, 2, TST_ANY TST_ENVIRONMENT, OP_PEVAL )
59 _OP_DEF(opexe_1, "apply", 1, INF_ARG, TST_NONE, OP_PAPPLY )
60 _OP_DEF(opexe_1, "call-with-current-continuation", 1, 1, TST_NONE, OP_CONTINUATION )
61 #if USE_MATH
62 _OP_DEF(opexe_2, "inexact->exact", 1, 1, TST_NUMBER, OP_INEX2EX )
63 _OP_DEF(opexe_2, "exp", 1, 1, TST_NUMBER, OP_EXP )
64 _OP_DEF(opexe_2, "log", 1, 1, TST_NUMBER, OP_LOG )
65 _OP_DEF(opexe_2, "sin", 1, 1, TST_NUMBER, OP_SIN )
66 _OP_DEF(opexe_2, "cos", 1, 1, TST_NUMBER, OP_COS )
67 _OP_DEF(opexe_2, "tan", 1, 1, TST_NUMBER, OP_TAN )
68 _OP_DEF(opexe_2, "asin", 1, 1, TST_NUMBER, OP_ASIN )
69 _OP_DEF(opexe_2, "acos", 1, 1, TST_NUMBER, OP_ACOS )
70 _OP_DEF(opexe_2, "atan", 1, 2, TST_NUMBER, OP_ATAN )
71 _OP_DEF(opexe_2, "sqrt", 1, 1, TST_NUMBER, OP_SQRT )
72 _OP_DEF(opexe_2, "expt", 2, 2, TST_NUMBER, OP_EXPT )
73 _OP_DEF(opexe_2, "floor", 1, 1, TST_NUMBER, OP_FLOOR )
74 _OP_DEF(opexe_2, "ceiling", 1, 1, TST_NUMBER, OP_CEILING )
75 _OP_DEF(opexe_2, "truncate", 1, 1, TST_NUMBER, OP_TRUNCATE )
76 _OP_DEF(opexe_2, "round", 1, 1, TST_NUMBER, OP_ROUND )
77 #endif
78 _OP_DEF(opexe_2, "+", 0, INF_ARG, TST_NUMBER, OP_ADD )
79 _OP_DEF(opexe_2, "-", 1, INF_ARG, TST_NUMBER, OP_SUB )
80 _OP_DEF(opexe_2, "*", 0, INF_ARG, TST_NUMBER, OP_MUL )
81 _OP_DEF(opexe_2, "/", 1, INF_ARG, TST_NUMBER, OP_DIV )
82 _OP_DEF(opexe_2, "quotient", 1, INF_ARG, TST_INTEGER, OP_INTDIV )
83 _OP_DEF(opexe_2, "remainder", 2, 2, TST_INTEGER, OP_REM )
84 _OP_DEF(opexe_2, "modulo", 2, 2, TST_INTEGER, OP_MOD )
85 _OP_DEF(opexe_2, "car", 1, 1, TST_PAIR, OP_CAR )
86 _OP_DEF(opexe_2, "cdr", 1, 1, TST_PAIR, OP_CDR )
87 _OP_DEF(opexe_2, "cons", 2, 2, TST_NONE, OP_CONS )
88 _OP_DEF(opexe_2, "set-car!", 2, 2, TST_PAIR TST_ANY, OP_SETCAR )
89 _OP_DEF(opexe_2, "set-cdr!", 2, 2, TST_PAIR TST_ANY, OP_SETCDR )
90 _OP_DEF(opexe_2, "char->integer", 1, 1, TST_CHAR, OP_CHAR2INT )
91 _OP_DEF(opexe_2, "integer->char", 1, 1, TST_NATURAL, OP_INT2CHAR )
92 _OP_DEF(opexe_2, "char-upcase", 1, 1, TST_CHAR, OP_CHARUPCASE )
93 _OP_DEF(opexe_2, "char-downcase", 1, 1, TST_CHAR, OP_CHARDNCASE )
94 _OP_DEF(opexe_2, "symbol->string", 1, 1, TST_SYMBOL, OP_SYM2STR )
95 _OP_DEF(opexe_2, "atom->string", 1, 1, TST_ANY, OP_ATOM2STR )
96 _OP_DEF(opexe_2, "string->symbol", 1, 1, TST_STRING, OP_STR2SYM )
97 _OP_DEF(opexe_2, "string->atom", 1, 1, TST_STRING, OP_STR2ATOM )
98 _OP_DEF(opexe_2, "make-string", 1, 2, TST_NATURAL TST_CHAR, OP_MKSTRING )
99 _OP_DEF(opexe_2, "string-length", 1, 1, TST_STRING, OP_STRLEN )
100 _OP_DEF(opexe_2, "string-ref", 2, 2, TST_STRING TST_NATURAL, OP_STRREF )
101 _OP_DEF(opexe_2, "string-set!", 3, 3, TST_STRING TST_NATURAL TST_CHAR, OP_STRSET )
102 _OP_DEF(opexe_2, "string-append", 0, INF_ARG, TST_STRING, OP_STRAPPEND )
103 _OP_DEF(opexe_2, "substring", 2, 3, TST_STRING TST_NATURAL, OP_SUBSTR )
104 _OP_DEF(opexe_2, "vector", 0, INF_ARG, TST_NONE, OP_VECTOR )
105 _OP_DEF(opexe_2, "make-vector", 1, 2, TST_NATURAL TST_ANY, OP_MKVECTOR )
106 _OP_DEF(opexe_2, "vector-length", 1, 1, TST_VECTOR, OP_VECLEN )
107 _OP_DEF(opexe_2, "vector-ref", 2, 2, TST_VECTOR TST_NATURAL, OP_VECREF )
108 _OP_DEF(opexe_2, "vector-set!", 3, 3, TST_VECTOR TST_NATURAL TST_ANY, OP_VECSET )
109 _OP_DEF(opexe_3, "not", 1, 1, TST_NONE, OP_NOT )
110 _OP_DEF(opexe_3, "boolean?", 1, 1, TST_NONE, OP_BOOLP )
111 _OP_DEF(opexe_3, "eof-object?", 1, 1, TST_NONE, OP_EOFOBJP )
112 _OP_DEF(opexe_3, "null?", 1, 1, TST_NONE, OP_NULLP )
113 _OP_DEF(opexe_3, "=", 2, INF_ARG, TST_NUMBER, OP_NUMEQ )
114 _OP_DEF(opexe_3, "<", 2, INF_ARG, TST_NUMBER, OP_LESS )
115 _OP_DEF(opexe_3, ">", 2, INF_ARG, TST_NUMBER, OP_GRE )
116 _OP_DEF(opexe_3, "<=", 2, INF_ARG, TST_NUMBER, OP_LEQ )
117 _OP_DEF(opexe_3, ">=", 2, INF_ARG, TST_NUMBER, OP_GEQ )
118 _OP_DEF(opexe_3, "symbol?", 1, 1, TST_ANY, OP_SYMBOLP )
119 _OP_DEF(opexe_3, "number?", 1, 1, TST_ANY, OP_NUMBERP )
120 _OP_DEF(opexe_3, "string?", 1, 1, TST_ANY, OP_STRINGP )
121 _OP_DEF(opexe_3, "integer?", 1, 1, TST_ANY, OP_INTEGERP )
122 _OP_DEF(opexe_3, "real?", 1, 1, TST_ANY, OP_REALP )
123 _OP_DEF(opexe_3, "char?", 1, 1, TST_ANY, OP_CHARP )
124 #if USE_CHAR_CLASSIFIERS
125 _OP_DEF(opexe_3, "char-alphabetic?", 1, 1, TST_CHAR, OP_CHARAP )
126 _OP_DEF(opexe_3, "char-numeric?", 1, 1, TST_CHAR, OP_CHARNP )
127 _OP_DEF(opexe_3, "char-whitespace?", 1, 1, TST_CHAR, OP_CHARWP )
128 _OP_DEF(opexe_3, "char-upper-case?", 1, 1, TST_CHAR, OP_CHARUP )
129 _OP_DEF(opexe_3, "char-lower-case?", 1, 1, TST_CHAR, OP_CHARLP )
130 #endif
131 _OP_DEF(opexe_3, "port?", 1, 1, TST_ANY, OP_PORTP )
132 _OP_DEF(opexe_3, "input-port?", 1, 1, TST_ANY, OP_INPORTP )
133 _OP_DEF(opexe_3, "output-port?", 1, 1, TST_ANY, OP_OUTPORTP )
134 _OP_DEF(opexe_3, "procedure?", 1, 1, TST_ANY, OP_PROCP )
135 _OP_DEF(opexe_3, "pair?", 1, 1, TST_ANY, OP_PAIRP )
136 _OP_DEF(opexe_3, "list?", 1, 1, TST_ANY, OP_LISTP )
137 _OP_DEF(opexe_3, "environment?", 1, 1, TST_ANY, OP_ENVP )
138 _OP_DEF(opexe_3, "vector?", 1, 1, TST_ANY, OP_VECTORP )
139 _OP_DEF(opexe_3, "eq?", 2, 2, TST_ANY, OP_EQ )
140 _OP_DEF(opexe_3, "eqv?", 2, 2, TST_ANY, OP_EQV )
141 _OP_DEF(opexe_4, "force", 1, 1, TST_ANY, OP_FORCE )
142 _OP_DEF(opexe_4, 0, 0, 0, 0, OP_SAVE_FORCED )
143 _OP_DEF(opexe_4, "write", 1, 2, TST_ANY TST_OUTPORT, OP_WRITE )
144 _OP_DEF(opexe_4, "write-char", 1, 2, TST_CHAR TST_OUTPORT, OP_WRITE_CHAR )
145 _OP_DEF(opexe_4, "display", 1, 2, TST_ANY TST_OUTPORT, OP_DISPLAY )
146 _OP_DEF(opexe_4, "newline", 0, 1, TST_OUTPORT, OP_NEWLINE )
147 _OP_DEF(opexe_4, "error", 1, INF_ARG, TST_NONE, OP_ERR0 )
148 _OP_DEF(opexe_4, 0, 0, 0, 0, OP_ERR1 )
149 _OP_DEF(opexe_4, "reverse", 1, 1, TST_PAIR, OP_REVERSE )
150 _OP_DEF(opexe_4, "list*", 1, INF_ARG, TST_NONE, OP_LIST_STAR )
151 _OP_DEF(opexe_4, "append", 0, INF_ARG, TST_NONE, OP_APPEND )
152 _OP_DEF(opexe_4, "put", 3, 3, TST_NONE, OP_PUT )
153 _OP_DEF(opexe_4, "get", 2, 2, TST_NONE, OP_GET )
154 _OP_DEF(opexe_4, "quit", 0, 1, TST_NUMBER, OP_QUIT )
155 _OP_DEF(opexe_4, "gc", 0, 0, 0, OP_GC )
156 _OP_DEF(opexe_4, "gc-verbose", 0, 1, TST_NONE, OP_GCVERB )
157 _OP_DEF(opexe_4, "new-segment", 0, 1, TST_NUMBER, OP_NEWSEGMENT )
158 _OP_DEF(opexe_4, "oblist", 0, 0, 0, OP_OBLIST )
159 _OP_DEF(opexe_4, "current-input-port", 0, 0, 0, OP_CURR_INPORT )
160 _OP_DEF(opexe_4, "current-output-port", 0, 0, 0, OP_CURR_OUTPORT )
161 _OP_DEF(opexe_4, "open-input-file", 1, 1, TST_STRING, OP_OPEN_INFILE )
162 _OP_DEF(opexe_4, "open-output-file", 1, 1, TST_STRING, OP_OPEN_OUTFILE )
163 _OP_DEF(opexe_4, "open-input-output-file", 1, 1, TST_STRING, OP_OPEN_INOUTFILE )
164 #if USE_STRING_PORTS
165 _OP_DEF(opexe_4, "open-input-string", 1, 1, TST_STRING, OP_OPEN_INSTRING )
166 _OP_DEF(opexe_4, "open-output-string", 1, 1, TST_STRING, OP_OPEN_OUTSTRING )
167 _OP_DEF(opexe_4, "open-input-output-string", 1, 1, TST_STRING, OP_OPEN_INOUTSTRING )
168 #endif
169 _OP_DEF(opexe_4, "close-input-port", 1, 1, TST_INPORT, OP_CLOSE_INPORT )
170 _OP_DEF(opexe_4, "close-output-port", 1, 1, TST_OUTPORT, OP_CLOSE_OUTPORT )
171 _OP_DEF(opexe_4, "interaction-environment", 0, 0, 0, OP_INT_ENV )
172 _OP_DEF(opexe_4, "current-environment", 0, 0, 0, OP_CURR_ENV )
173 _OP_DEF(opexe_5, "read", 0, 1, TST_INPORT, OP_READ )
174 _OP_DEF(opexe_5, "read-char", 0, 1, TST_INPORT, OP_READ_CHAR )
175 _OP_DEF(opexe_5, "peek-char", 0, 1, TST_INPORT, OP_PEEK_CHAR )
176 _OP_DEF(opexe_5, "char-ready?", 0, 1, TST_INPORT, OP_CHAR_READY )
177 _OP_DEF(opexe_5, "set-input-port", 1, 1, TST_INPORT, OP_SET_INPORT )
178 _OP_DEF(opexe_5, "set-output-port", 1, 1, TST_OUTPORT, OP_SET_OUTPORT )
179 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDSEXPR )
180 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDLIST )
181 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDDOT )
182 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDQUOTE )
183 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDQQUOTE )
184 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDQQUOTEVEC )
185 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDUNQUOTE )
186 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDUQTSP )
187 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_RDVEC )
188 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_P0LIST )
189 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_P1LIST )
190 _OP_DEF(opexe_5, 0, 0, 0, 0, OP_PVECFROM )
191 _OP_DEF(opexe_6, "length", 1, 1, TST_LIST, OP_LIST_LENGTH )
192 _OP_DEF(opexe_6, "assq", 2, 2, TST_NONE, OP_ASSQ )
193 _OP_DEF(opexe_6, "get-closure-code", 1, 1, TST_NONE, OP_GET_CLOSURE )
194 _OP_DEF(opexe_6, "closure?", 1, 1, TST_NONE, OP_CLOSUREP )
195 _OP_DEF(opexe_6, "macro?", 1, 1, TST_NONE, OP_MACROP )
196 #undef _OP_DEF