|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T t
Length: 1122 (0x462)
Types: TextFile
Names: »table.c«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
└─⟦this⟧ »EUUGD11/euug-87hel/sec1/jove/table.c«
/************************************************************************
* This program is Copyright (C) 1986 by Jonathan Payne. JOVE is *
* provided to you without charge, and with no warranty. You may give *
* away copies of JOVE, including sources, provided that this notice is *
* included in all the files. *
************************************************************************/
#include "jove.h"
#include "table.h"
private Table *tables = NIL;
Table *
make_table()
{
Table *tab = (Table *) emalloc(sizeof *tab);
tab->t_next = tables;
tables = tab;
tab->t_wordlist = NIL;
return tab;
}
Word *
word_in_table(text, table)
char *text;
Table *table;
{
register Word *w;
for (w = table_top(table); w != NIL; w = next_word(w))
if (strcmp(word_text(w), text) == 0)
break; /* already in list */
return w;
}
add_word(wname, table)
char *wname;
Table *table;
{
register Word *w;
if (w = word_in_table(wname, table))
return;
w = (Word *) emalloc(sizeof *w);
word_text(w) = wname;
next_word(w) = table_top(table);
table_top(table) = w;
}