Mercurial > ~dholland > hg > ag > index.cgi
diff anagram/agcore/tsd.h @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/anagram/agcore/tsd.h Sat Dec 22 17:52:45 2007 -0500 @@ -0,0 +1,36 @@ +/* + * AnaGram, A System for Syntax Directed Programming + * Copyright 1993-2002 Parsifal Software. All Rights Reserved. + * See the file COPYING for license and usage terms. + * + * tsd.h - tuple set dictionary + */ + +#ifndef TSD_H +#define TSD_H + +#define check_tsd(t) assert(!invalid_tsd(t)) + +struct tsd { + int *sb; + unsigned nt; + unsigned tw; + unsigned na; +}; + +void at(tsd *t, ...); +tsd *copy_tuple_set(tsd *t); +tsd *delete_tsd(tsd *ts); +tsd *init_tsd(unsigned n); +int invalid_tsd(tsd *t); +void purge_tsd(tsd *r, tsd *k); +void p1_tsd(tsd *r, int rc, tsd *k, int kc); +void reset_tsd(tsd *ts); +tsd *resize_tsd(tsd *ts, unsigned n); +int sit(tsd *t, ...); +tsd *spec_tsd(unsigned size, unsigned n); +void xtx(tsd *t, unsigned x, ...); +void xtxf(tsd *t, unsigned x, ...); + + +#endif /* TSD_H */