]> www.ginac.de Git - ginac.git/blob - ginsh/ginsh.h
killed typo.
[ginac.git] / ginsh / ginsh.h
1 /*
2  *  ginsh.h - GiNaC Interactive Shell, global definitions
3  */
4
5 #ifndef GINSH_H_
6 #define GINSH_H_
7
8 // yacc semantic type
9 #define YYSTYPE ex
10
11 // lex functions/variables
12 extern int yyerror(char *s);
13 extern int yylex(void);
14 #if YYTEXT_POINTER
15 extern char *yytext;
16 #else
17 extern char yytext[];
18 #endif
19
20 // Table of all used symbols
21 typedef map<string, symbol> sym_tab;
22 extern sym_tab syms;
23
24 // Ersatz functions
25 #ifndef HAVE_STRDUP
26 char *strdup(const char *s)
27 {
28         char *n = (char *)malloc(strlen(s) + 1);
29         strcpy(n, s);
30         return n;
31 }
32 #endif
33
34 #endif