Subversion Repositories filter_foundry

Rev

Rev 2 | Rev 171 | 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
2 toby 3
    Copyright (C) 2003-5 Toby Thain, toby@telegraphics.com.au
4
 
5
    This program is free software; you can redistribute it and/or modify
6
    it under the terms of the GNU General Public License as published by  
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
 
15
    You should have received a copy of the GNU General Public License  
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 */
28
typedef long value_type;
29
typedef value_type (*pfunc_type)(value_type,...);
30
 
31
struct sym_rec{
32
        struct sym_rec *next;
33
        int token;
34
        char *name;
35
 
36
        pfunc_type fn;
37
        value_type *pvar;
38
};
39
 
40
unsigned long djb2(char *str);
41
struct sym_rec *lookup(char *s);
42
void init_symtab(struct sym_rec *);
43
void insert(struct sym_rec *p);
44
void dump_symbols();
45
 
46
#endif