Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / tbg / tbg_Options.c
1 /* functions for the pattern.c file */
2
3 #include "tbg.h"
4
5 ht *GENERICS_HT = NULL;
6 chain_list *GENERICS_CHAIN = NULL;
7 chain_list *VALUES_CHAIN = NULL;
8
9 extern int vhdldebug;
10
11 void Options (int argc, char **argv)
12 {
13 char *buf, *p;
14 int i;
15
16 mbkenv ();
17
18 GENERICS_HT = addht (10);
19
20 for (i = 1; i < argc; i++) {
21 buf = strdup (argv[i]);
22 if ((p = strchr (buf, '='))) {
23 p++;
24 *(p - 1) = '\0';
25 addhtitem (GENERICS_HT, namealloc (buf), atoi (p));
26 GENERICS_CHAIN = addchain (GENERICS_CHAIN, namealloc (buf));
27 VALUES_CHAIN = addchain (VALUES_CHAIN, (void*)atoi (p));
28 }
29 mbkfree(buf);
30 }
31 }