Subversion Repositories filter_foundry

Rev

Rev 171 | Rev 192 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 toby 1
/*
18 toby 2
    This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
171 dmarschall 3
    Copyright (C) 2003-2019 Toby Thain, toby@telegraphics.com.au
2 toby 4
 
5
    This program is free software; you can redistribute it and/or modify
171 dmarschall 6
    it under the terms of the GNU General Public License as published by
2 toby 7
    the Free Software Foundation; either version 2 of the License, or
8
    (at your option) any later version.
9
 
10
    This program is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
    GNU General Public License for more details.
14
 
171 dmarschall 15
    You should have received a copy of the GNU General Public License
2 toby 16
    along with this program; if not, write to the Free Software
17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
*/
19
 
20
#ifndef SYMTAB_H
21
#define SYMTAB_H
22
 
23
#include <stdlib.h>
24
 
25
#define NEW(P) ( (P) = malloc(sizeof(*(P))) )
26
 
27
/* if this type is floating point, then #define FP_VALUE */
185 dmarschall 28
#ifdef FP_VALUE
29
typedef double value_type;
30
#else
2 toby 31
typedef long value_type;
185 dmarschall 32
#endif
2 toby 33
typedef value_type (*pfunc_type)(value_type,...);
34
 
35
struct sym_rec{
36
        struct sym_rec *next;
37
        int token;
38
        char *name;
39
 
40
        pfunc_type fn;
41
        value_type *pvar;
42
};
43
 
44
unsigned long djb2(char *str);
45
struct sym_rec *lookup(char *s);
46
void init_symtab(struct sym_rec *);
47
void insert(struct sym_rec *p);
48
void dump_symbols();
49
 
50
#endif