From 45c36911146b79349858c682facfe873e3703d1a Mon Sep 17 00:00:00 2001 From: Hugo Clement Date: Wed, 11 May 2005 08:05:36 +0000 Subject: [PATCH] Making Alliance compile with GCC 4.0 * reordering of functions in Pirouz' code * fixed bug : variable declared as extern in .h and as static in .c * adding some missing inclusions of string.h, stdlib.h (this suppresses some nasty warnings) * fixed gcc version detection in ocp --- alliance/src/asimut/src/c_fsyn_sr1k_1.c | 37 +- alliance/src/asimut/src/c_fsyn_sr1k_10.c | 36 +- alliance/src/asimut/src/c_fsyn_sr1k_24.c | 37 +- alliance/src/asimut/src/c_fsyn_sr1k_4.c | 36 +- alliance/src/asimut/src/c_fsyn_sr1k_56.c | 36 +- alliance/src/asimut/src/c_fsyn_sr4k_10.c | 37 +- alliance/src/asimut/src/c_sr1k_8a.c | 37 +- alliance/src/asimut/src/c_sr1k_8b.c | 319 ++++---- alliance/src/asimut/src/c_sr8k_8a.c | 37 +- alliance/src/asimut/src/sch_bug.c | 1 + alliance/src/asimut/src/sch_debug.c | 645 ++++++++-------- alliance/src/asimut/src/vh_debug.c | 719 +++++++++--------- alliance/src/asimut/src/vh_util.c | 2 + alliance/src/asimut/src/vh_xcomm.c | 1 + alliance/src/asimut/src/vh_xspec.c | 1 + alliance/src/beh/src/beh_expdelayed.c | 1 + alliance/src/bhl/src/beh_debug.c | 618 ++++++++------- alliance/src/boog/src/bog_lib_complete.c | 1 + alliance/src/boog/src/bog_lib_matching.c | 2 +- alliance/src/boog/src/bog_lib_negativ.c | 2 +- .../src/boog/src/bog_lib_specifications.c | 1 + alliance/src/boog/src/bog_lib_utils.c | 2 +- alliance/src/boog/src/bog_main.c | 2 +- alliance/src/boog/src/bog_map_adapt.c | 2 +- alliance/src/boog/src/bog_map_pattern.c | 1 + alliance/src/boog/src/bog_map_prepare.c | 2 +- alliance/src/boog/src/bog_normalize_DAG.c | 1 + alliance/src/boog/src/bog_signal_delay.c | 1 + alliance/src/boog/src/bog_signal_utils.c | 2 +- alliance/src/boog/src/bog_unflatten_abl.c | 2 +- alliance/src/boog/src/bog_unflatten_area.c | 1 + alliance/src/boog/src/bog_unflatten_befig.c | 1 + alliance/src/boog/src/bog_unflatten_delay.c | 2 +- alliance/src/boog/src/bog_unflatten_oper.c | 2 +- alliance/src/boog/src/bog_unflatten_utils.c | 1 + alliance/src/bvl/src/bvl_bcomp_l.l | 197 ++--- alliance/src/elp/src/Makefile | 40 +- alliance/src/flatbeh/src/abstract.c | 2 + alliance/src/flatbeh/src/main.c | 1 + alliance/src/flatlo/src/flatlo.c | 4 +- alliance/src/gcp/src/c_ccomp.y | 2 +- alliance/src/gcp/src/c_cdecl.c | 1 + alliance/src/gcp/src/c_convert.c | 1 + alliance/src/gcp/src/c_ctypeck.c | 1 + alliance/src/gcp/src/c_foldconst.c | 1 + alliance/src/genlib/src/dpgen_ROM_code.y | 1 + alliance/src/genpat/src/Makefile | 40 +- alliance/src/ocp/src/placer/PPlacement.h | 2 +- alliance/src/phl/src/pat_debug.c | 663 ++++++++-------- alliance/src/phl/src/pat_getusage.c | 1 + alliance/src/ppt/src/pat_decl_l.l | 77 +- alliance/src/xfsm/src/XTB_panel.c | 2 +- alliance/src/xpat/src/XPT_error.c | 1 + alliance/src/xpat/src/XSB_error.c | 1 + alliance/src/xpat/src/XTB_panel.c | 2 +- alliance/src/xsch/src/XMX_color.c | 1 + alliance/src/xsch/src/XSB_error.c | 1 + alliance/src/xsch/src/XTB_panel.c | 2 +- alliance/src/xvpn/src/XMX_color.c | 2 + alliance/src/xvpn/src/XSB_error.c | 2 + alliance/src/xvpn/src/XTB_panel.c | 2 +- 61 files changed, 1840 insertions(+), 1838 deletions(-) diff --git a/alliance/src/asimut/src/c_fsyn_sr1k_1.c b/alliance/src/asimut/src/c_fsyn_sr1k_1.c index a343395f..05c345ad 100644 --- a/alliance/src/asimut/src/c_fsyn_sr1k_1.c +++ b/alliance/src/asimut/src/c_fsyn_sr1k_1.c @@ -14,6 +14,24 @@ #include "vh_ltype.h" #include "vh_xcomm.h" +/* ###--------------------------------------------------------------### */ +/* function : init */ +/* description : initializations */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +static void init (pt_lkdins, pt_mem) + +struct lkdins *pt_lkdins; +char *pt_mem ; + + { + char *name; + + name = vhx_GetInstanceName (pt_lkdins); + printf ("coucou %s\n", name); + } + /* ###--------------------------------------------------------------### */ /* function : c_fsyn_sr1k_1 */ /* description : 1K synchronous (clock's falling edge) static 1-bit */ @@ -48,7 +66,6 @@ struct lkdins *pt_lkdins; }; struct local_mem *local ; - static void init () ; /* ###------------------------------------------------------### */ /* get the memory space reserved for the current instance */ @@ -104,21 +121,3 @@ struct lkdins *pt_lkdins; } } } - -/* ###--------------------------------------------------------------### */ -/* function : init */ -/* description : initializations */ -/* called func. : none */ -/* ###--------------------------------------------------------------### */ - -static void init (pt_lkdins, pt_mem) - -struct lkdins *pt_lkdins; -char *pt_mem ; - - { - char *name; - - name = vhx_GetInstanceName (pt_lkdins); - printf ("coucou %s\n", name); - } diff --git a/alliance/src/asimut/src/c_fsyn_sr1k_10.c b/alliance/src/asimut/src/c_fsyn_sr1k_10.c index b8fd9469..094adf9b 100644 --- a/alliance/src/asimut/src/c_fsyn_sr1k_10.c +++ b/alliance/src/asimut/src/c_fsyn_sr1k_10.c @@ -14,6 +14,24 @@ #include "vh_ltype.h" #include "vh_xcomm.h" +/* ###--------------------------------------------------------------### */ +/* function : init */ +/* description : initializations */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +static void init (pt_lkdins, pt_mem) + +struct lkdins *pt_lkdins; +char *pt_mem ; + + { + char *name; + + name = vhx_GetInstanceName (pt_lkdins); + printf ("coucou %s\n", name); + } + /* ###--------------------------------------------------------------### */ /* function : c_fsyn_sr1k_10 */ /* description : 1K synchronous (clock's falling edge) static 10-bit */ @@ -48,7 +66,6 @@ struct lkdins *pt_lkdins; }; struct local_mem *local ; - static void init () ; /* ###------------------------------------------------------### */ /* get the memory space reserved for the current instance */ @@ -105,20 +122,3 @@ struct lkdins *pt_lkdins; } } -/* ###--------------------------------------------------------------### */ -/* function : init */ -/* description : initializations */ -/* called func. : none */ -/* ###--------------------------------------------------------------### */ - -static void init (pt_lkdins, pt_mem) - -struct lkdins *pt_lkdins; -char *pt_mem ; - - { - char *name; - - name = vhx_GetInstanceName (pt_lkdins); - printf ("coucou %s\n", name); - } diff --git a/alliance/src/asimut/src/c_fsyn_sr1k_24.c b/alliance/src/asimut/src/c_fsyn_sr1k_24.c index 8fc62a5b..24b06f04 100644 --- a/alliance/src/asimut/src/c_fsyn_sr1k_24.c +++ b/alliance/src/asimut/src/c_fsyn_sr1k_24.c @@ -14,6 +14,24 @@ #include "vh_ltype.h" #include "vh_xcomm.h" +/* ###--------------------------------------------------------------### */ +/* function : init */ +/* description : initializations */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +static void init (pt_lkdins, pt_mem) + +struct lkdins *pt_lkdins; +char *pt_mem ; + + { + char *name; + + name = vhx_GetInstanceName (pt_lkdins); + printf ("coucou %s\n", name); + } + /* ###--------------------------------------------------------------### */ /* function : c_fsyn_sr1k_24 */ /* description : 1K synchronous (clock's falling edge) static 24-bit */ @@ -48,7 +66,6 @@ struct lkdins *pt_lkdins; }; struct local_mem *local ; - static void init () ; /* ###------------------------------------------------------### */ /* get the memory space reserved for the current instance */ @@ -105,21 +122,3 @@ struct lkdins *pt_lkdins; } } } - -/* ###--------------------------------------------------------------### */ -/* function : init */ -/* description : initializations */ -/* called func. : none */ -/* ###--------------------------------------------------------------### */ - -static void init (pt_lkdins, pt_mem) - -struct lkdins *pt_lkdins; -char *pt_mem ; - - { - char *name; - - name = vhx_GetInstanceName (pt_lkdins); - printf ("coucou %s\n", name); - } diff --git a/alliance/src/asimut/src/c_fsyn_sr1k_4.c b/alliance/src/asimut/src/c_fsyn_sr1k_4.c index 4d674ca3..97fa43c6 100644 --- a/alliance/src/asimut/src/c_fsyn_sr1k_4.c +++ b/alliance/src/asimut/src/c_fsyn_sr1k_4.c @@ -14,6 +14,24 @@ #include "vh_ltype.h" #include "vh_xcomm.h" +/* ###--------------------------------------------------------------### */ +/* function : init */ +/* description : initializations */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +static void init (pt_lkdins, pt_mem) + +struct lkdins *pt_lkdins; +char *pt_mem ; + + { + char *name; + + name = vhx_GetInstanceName (pt_lkdins); + printf ("coucou %s\n", name); + } + /* ###--------------------------------------------------------------### */ /* function : c_fsyn_sr1k_4 */ /* description : 1K synchronous (clock's falling edge) static 4-bit */ @@ -48,7 +66,6 @@ struct lkdins *pt_lkdins; }; struct local_mem *local ; - static void init () ; /* ###------------------------------------------------------### */ /* get the memory space reserved for the current instance */ @@ -105,20 +122,3 @@ struct lkdins *pt_lkdins; } } -/* ###--------------------------------------------------------------### */ -/* function : init */ -/* description : initializations */ -/* called func. : none */ -/* ###--------------------------------------------------------------### */ - -static void init (pt_lkdins, pt_mem) - -struct lkdins *pt_lkdins; -char *pt_mem ; - - { - char *name; - - name = vhx_GetInstanceName (pt_lkdins); - printf ("coucou %s\n", name); - } diff --git a/alliance/src/asimut/src/c_fsyn_sr1k_56.c b/alliance/src/asimut/src/c_fsyn_sr1k_56.c index 664dc9a8..04377fe9 100644 --- a/alliance/src/asimut/src/c_fsyn_sr1k_56.c +++ b/alliance/src/asimut/src/c_fsyn_sr1k_56.c @@ -14,6 +14,24 @@ #include "vh_ltype.h" #include "vh_xcomm.h" +/* ###--------------------------------------------------------------### */ +/* function : init */ +/* description : initializations */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +static void init (pt_lkdins, pt_mem) + +struct lkdins *pt_lkdins; +char *pt_mem ; + + { + char *name; + + name = vhx_GetInstanceName (pt_lkdins); + printf ("coucou %s\n", name); + } + /* ###--------------------------------------------------------------### */ /* function : c_fsyn_sr1k_56 */ /* description : 1K synchronous (clock's falling edge) static 56-bit */ @@ -53,7 +71,6 @@ struct lkdins *pt_lkdins; }; struct local_mem *local ; - static void init () ; /* ###------------------------------------------------------### */ /* get the memory space reserved for the current instance */ @@ -120,20 +137,3 @@ struct lkdins *pt_lkdins; } } -/* ###--------------------------------------------------------------### */ -/* function : init */ -/* description : initializations */ -/* called func. : none */ -/* ###--------------------------------------------------------------### */ - -static void init (pt_lkdins, pt_mem) - -struct lkdins *pt_lkdins; -char *pt_mem ; - - { - char *name; - - name = vhx_GetInstanceName (pt_lkdins); - printf ("coucou %s\n", name); - } diff --git a/alliance/src/asimut/src/c_fsyn_sr4k_10.c b/alliance/src/asimut/src/c_fsyn_sr4k_10.c index 5d6530a3..66d37e11 100644 --- a/alliance/src/asimut/src/c_fsyn_sr4k_10.c +++ b/alliance/src/asimut/src/c_fsyn_sr4k_10.c @@ -14,6 +14,24 @@ #include "vh_ltype.h" #include "vh_xcomm.h" +/* ###--------------------------------------------------------------### */ +/* function : init */ +/* description : initializations */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +static void init (pt_lkdins, pt_mem) + +struct lkdins *pt_lkdins; +char *pt_mem ; + + { + char *name; + + name = vhx_GetInstanceName (pt_lkdins); + printf ("coucou %s\n", name); + } + /* ###--------------------------------------------------------------### */ /* function : c_fsyn_sr4k_10 */ /* description : 4K synchronous (clock's falling edge) static 10-bit */ @@ -48,7 +66,6 @@ struct lkdins *pt_lkdins; }; struct local_mem *local ; - static void init () ; /* ###------------------------------------------------------### */ /* get the memory space reserved for the current instance */ @@ -104,21 +121,3 @@ struct lkdins *pt_lkdins; } } } - -/* ###--------------------------------------------------------------### */ -/* function : init */ -/* description : initializations */ -/* called func. : none */ -/* ###--------------------------------------------------------------### */ - -static void init (pt_lkdins, pt_mem) - -struct lkdins *pt_lkdins; -char *pt_mem ; - - { - char *name; - - name = vhx_GetInstanceName (pt_lkdins); - printf ("coucou %s\n", name); - } diff --git a/alliance/src/asimut/src/c_sr1k_8a.c b/alliance/src/asimut/src/c_sr1k_8a.c index 68595c8b..88dbb124 100644 --- a/alliance/src/asimut/src/c_sr1k_8a.c +++ b/alliance/src/asimut/src/c_sr1k_8a.c @@ -14,6 +14,24 @@ #include "vh_ltype.h" #include "vh_xcomm.h" +/* ###--------------------------------------------------------------### */ +/* function : init */ +/* description : initializations */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +static void init (pt_lkdins, pt_mem) + +struct lkdins *pt_lkdins; +char *pt_mem ; + + { + char *name; + + name = vhx_GetInstanceName (pt_lkdins); + printf ("coucou %s\n", name); + } + /* ###--------------------------------------------------------------### */ /* function : c_sr1k_8a */ /* description : A 1 KByte static Ram with a chip select pin */ @@ -43,7 +61,6 @@ struct lkdins *pt_lkdins; unsigned char *mem ; unsigned int cond = 0; - static void init () ; /* ###------------------------------------------------------### */ /* read the current value of input signals (e_n) */ @@ -90,21 +107,3 @@ struct lkdins *pt_lkdins; vhx_writebus (dat, cond, pt_lkdins, POSO_dat, 8); } - -/* ###--------------------------------------------------------------### */ -/* function : init */ -/* description : initializations */ -/* called func. : none */ -/* ###--------------------------------------------------------------### */ - -static void init (pt_lkdins, pt_mem) - -struct lkdins *pt_lkdins; -char *pt_mem ; - - { - char *name; - - name = vhx_GetInstanceName (pt_lkdins); - printf ("coucou %s\n", name); - } diff --git a/alliance/src/asimut/src/c_sr1k_8b.c b/alliance/src/asimut/src/c_sr1k_8b.c index d4a1a8da..064ae84e 100644 --- a/alliance/src/asimut/src/c_sr1k_8b.c +++ b/alliance/src/asimut/src/c_sr1k_8b.c @@ -30,6 +30,8 @@ /* ###--------------------------------------------------------------### */ #include +#include +#include #include "mut.h" #include "log.h" #include "beh.h" @@ -37,165 +39,6 @@ #include "vh_lspec.h" #include "vh_xspec.h" -/* ###--------------------------------------------------------------### */ -/* function : c_sr1k_8b */ -/* description : A 1 KByte static Ram with a chip select pin */ -/* called func. : vhx_getvalu, vhx_readinput, vhx_writebus */ -/* ###--------------------------------------------------------------### */ - -void c_sr1k_8b (pt_lkdins) - -struct lkdins *pt_lkdins; - - { - char e_n ; /* chip select */ - char w_n ; /* write enable */ - unsigned int dat ; /* input-output 8-bit data */ - unsigned int adr ; /* 10-bit address */ - char vdd ; /* power supply */ - char vss ; /* power supply */ - -#define POSI_vss 0 -#define POSI_vdd POSI_vss + 1 -#define POSI_adr POSI_vdd + 1 -#define POSI_dat POSI_adr + 10 -#define POSI_w_n POSI_dat + 8 -#define POSI_e_n POSI_w_n + 1 - -#define POSO_dat 0 - - unsigned char *mem ; - unsigned int cond = 0; - static void init () ; - - /* ###------------------------------------------------------### */ - /* read the current value of input signals (e_n) */ - /* ###------------------------------------------------------### */ - - e_n = vhx_readinput (pt_lkdins, POSI_e_n, 1); - - /* ###------------------------------------------------------### */ - /* read the current value of input signals */ - /* ###------------------------------------------------------### */ - - if (e_n == 0) - { - w_n = vhx_readinput (pt_lkdins, POSI_w_n, 1); - adr = vhx_readinput (pt_lkdins, POSI_adr, 10); - dat = vhx_readinput (pt_lkdins, POSI_dat, 8); - - /* ###------------------------------------------------------### */ - /* get the memory space reserved for the current instance */ - /* ###------------------------------------------------------### */ - - vhx_getvalu (pt_lkdins, &mem, 1024, init); - - /* ###------------------------------------------------------### */ - /* read or write the data from the memory */ - /* ###------------------------------------------------------### */ - - if (w_n == 0) - mem [adr] = dat; - else - dat = mem [adr]; - - } - - /* ###------------------------------------------------------### */ - /* write the result into the projected value of ouput signals */ - /* ###------------------------------------------------------### */ - - if ((e_n == 0) && (w_n == 1)) - cond = 0x000000ff; - else - cond = 0x00000000; - - vhx_writebus (dat, cond, pt_lkdins, POSO_dat, 8); - - } - -/* ###--------------------------------------------------------------### */ -/* function : init */ -/* description : initializations */ -/* called func. : none */ -/* ###--------------------------------------------------------------### */ - -#define READ_ADR 0 -#define READ_VAL 1 -#define ADR_MASK 0xfffff000 /* 1 k byte */ -#define BYT_MASK 0x00000003 /* byte address inside a word */ - -static void init (pt_lkdins, pt_mem) - -struct lkdins *pt_lkdins; -unsigned char *pt_mem ; - - { - static void splitname (); - char *name ; - char fil_name [128]; - unsigned int fil_addr = 0; - unsigned int fil_byte = 0; - FILE *fp ; - unsigned int cur_adr = 0; - unsigned int cur_val = 0; - unsigned int red_c = 0; - unsigned int red_val = 0; - unsigned int state = READ_ADR; - - name = (char *)vhx_GetInstanceName (pt_lkdins); - - splitname (name, fil_name, &fil_addr, &fil_byte); - - if ((fp = mbkfopen (fil_name, "ini", READ_TEXT)) == NULL) - { - fprintf (stderr, "cannot open RAM initialization file: %s.ini\n", fil_name); - exit (1); - } - - printf ("loading RAM initialization file: %s.ini , %.8x , %d\n", - fil_name, fil_addr, fil_byte); - - - while ((red_c = fgetc (fp)) != EOF) - { - switch (red_c) - { - case ' ' : - case '\t': - break; - - case '\n': - if (((cur_adr & ADR_MASK) == fil_addr) && - ((cur_adr & BYT_MASK) == fil_byte) ) - pt_mem [(cur_adr & (~ADR_MASK)) >> 2] = cur_val; - - state = READ_ADR; - cur_adr = 0; - cur_val = 0; - break; - - case ':' : - state = READ_VAL; - break; - - default : - if ((red_c >= '0') && (red_c <= '9')) - red_val = red_c - '0'; - if ((red_c >= 'a') && (red_c <= 'f')) - red_val = red_c - 'a' + 10; - if ((red_c >= 'A') && (red_c <= 'F')) - red_val = red_c - 'A' + 10; - - if (state == READ_ADR) - cur_adr = (cur_adr << 4) + red_val; - else - cur_val = (cur_val << 4) + red_val; - } - } - - fclose (fp); - } /* ###--------------------------------------------------------------### */ /* function : splitname */ @@ -268,3 +111,161 @@ unsigned int *byt_pnt ; *adr_pnt = adr ; *byt_pnt = name [i-1] - '0'; } + +/* ###--------------------------------------------------------------### */ +/* function : init */ +/* description : initializations */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +#define READ_ADR 0 +#define READ_VAL 1 +#define ADR_MASK 0xfffff000 /* 1 k byte */ +#define BYT_MASK 0x00000003 /* byte address inside a word */ + +static void init (pt_lkdins, pt_mem) + +struct lkdins *pt_lkdins; +unsigned char *pt_mem ; + + { + char *name ; + char fil_name [128]; + unsigned int fil_addr = 0; + unsigned int fil_byte = 0; + FILE *fp ; + unsigned int cur_adr = 0; + unsigned int cur_val = 0; + unsigned int red_c = 0; + unsigned int red_val = 0; + unsigned int state = READ_ADR; + + name = (char *)vhx_GetInstanceName (pt_lkdins); + + splitname (name, fil_name, &fil_addr, &fil_byte); + + if ((fp = mbkfopen (fil_name, "ini", READ_TEXT)) == NULL) + { + fprintf (stderr, "cannot open RAM initialization file: %s.ini\n", fil_name); + exit (1); + } + + printf ("loading RAM initialization file: %s.ini , %.8x , %d\n", + fil_name, fil_addr, fil_byte); + + + while ((red_c = fgetc (fp)) != EOF) + { + switch (red_c) + { + case ' ' : + case '\t': + break; + + case '\n': + if (((cur_adr & ADR_MASK) == fil_addr) && + ((cur_adr & BYT_MASK) == fil_byte) ) + pt_mem [(cur_adr & (~ADR_MASK)) >> 2] = cur_val; + + state = READ_ADR; + cur_adr = 0; + cur_val = 0; + break; + + case ':' : + state = READ_VAL; + break; + + default : + if ((red_c >= '0') && (red_c <= '9')) + red_val = red_c - '0'; + if ((red_c >= 'a') && (red_c <= 'f')) + red_val = red_c - 'a' + 10; + if ((red_c >= 'A') && (red_c <= 'F')) + red_val = red_c - 'A' + 10; + + if (state == READ_ADR) + cur_adr = (cur_adr << 4) + red_val; + else + cur_val = (cur_val << 4) + red_val; + } + } + + fclose (fp); + } + +/* ###--------------------------------------------------------------### */ +/* function : c_sr1k_8b */ +/* description : A 1 KByte static Ram with a chip select pin */ +/* called func. : vhx_getvalu, vhx_readinput, vhx_writebus */ +/* ###--------------------------------------------------------------### */ + +void c_sr1k_8b (pt_lkdins) + +struct lkdins *pt_lkdins; + + { + char e_n ; /* chip select */ + char w_n ; /* write enable */ + unsigned int dat ; /* input-output 8-bit data */ + unsigned int adr ; /* 10-bit address */ + char vdd ; /* power supply */ + char vss ; /* power supply */ + +#define POSI_vss 0 +#define POSI_vdd POSI_vss + 1 +#define POSI_adr POSI_vdd + 1 +#define POSI_dat POSI_adr + 10 +#define POSI_w_n POSI_dat + 8 +#define POSI_e_n POSI_w_n + 1 + +#define POSO_dat 0 + + unsigned char *mem ; + unsigned int cond = 0; + + /* ###------------------------------------------------------### */ + /* read the current value of input signals (e_n) */ + /* ###------------------------------------------------------### */ + + e_n = vhx_readinput (pt_lkdins, POSI_e_n, 1); + + /* ###------------------------------------------------------### */ + /* read the current value of input signals */ + /* ###------------------------------------------------------### */ + + if (e_n == 0) + { + w_n = vhx_readinput (pt_lkdins, POSI_w_n, 1); + adr = vhx_readinput (pt_lkdins, POSI_adr, 10); + dat = vhx_readinput (pt_lkdins, POSI_dat, 8); + + /* ###------------------------------------------------------### */ + /* get the memory space reserved for the current instance */ + /* ###------------------------------------------------------### */ + + vhx_getvalu (pt_lkdins, &mem, 1024, init); + + /* ###------------------------------------------------------### */ + /* read or write the data from the memory */ + /* ###------------------------------------------------------### */ + + if (w_n == 0) + mem [adr] = dat; + else + dat = mem [adr]; + + } + + /* ###------------------------------------------------------### */ + /* write the result into the projected value of ouput signals */ + /* ###------------------------------------------------------### */ + + if ((e_n == 0) && (w_n == 1)) + cond = 0x000000ff; + else + cond = 0x00000000; + + vhx_writebus (dat, cond, pt_lkdins, POSO_dat, 8); + + } diff --git a/alliance/src/asimut/src/c_sr8k_8a.c b/alliance/src/asimut/src/c_sr8k_8a.c index 748756e5..57d2477e 100644 --- a/alliance/src/asimut/src/c_sr8k_8a.c +++ b/alliance/src/asimut/src/c_sr8k_8a.c @@ -14,6 +14,24 @@ #include "vh_ltype.h" #include "vh_xcomm.h" +/* ###--------------------------------------------------------------### */ +/* function : init */ +/* description : initializations */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +static void init (pt_lkdins, pt_mem) + +struct lkdins *pt_lkdins; +char *pt_mem ; + + { + char *name; + + name = vhx_GetInstanceName (pt_lkdins); + printf ("coucou %s\n", name); + } + /* ###--------------------------------------------------------------### */ /* function : c_sr8k_8a */ /* description : A 8 KByte static Ram with a chip select pin */ @@ -43,7 +61,6 @@ struct lkdins *pt_lkdins; unsigned char *mem ; unsigned int cond = 0; - static void init () ; /* ###------------------------------------------------------### */ /* read the current value of input signals (e_n) */ @@ -90,21 +107,3 @@ struct lkdins *pt_lkdins; vhx_writebus (dat, cond, pt_lkdins, POSO_dat, 8); } - -/* ###--------------------------------------------------------------### */ -/* function : init */ -/* description : initializations */ -/* called func. : none */ -/* ###--------------------------------------------------------------### */ - -static void init (pt_lkdins, pt_mem) - -struct lkdins *pt_lkdins; -char *pt_mem ; - - { - char *name; - - name = vhx_GetInstanceName (pt_lkdins); - printf ("coucou %s\n", name); - } diff --git a/alliance/src/asimut/src/sch_bug.c b/alliance/src/asimut/src/sch_bug.c index f80f7fec..77566b71 100644 --- a/alliance/src/asimut/src/sch_bug.c +++ b/alliance/src/asimut/src/sch_bug.c @@ -8,6 +8,7 @@ /* ###--------------------------------------------------------------### */ #include +#include /* ###--------------------------------------------------------------### */ /* function : sch_bug */ diff --git a/alliance/src/asimut/src/sch_debug.c b/alliance/src/asimut/src/sch_debug.c index b0c9b160..15726c4b 100644 --- a/alliance/src/asimut/src/sch_debug.c +++ b/alliance/src/asimut/src/sch_debug.c @@ -12,332 +12,6 @@ #include "sch.h" #include "sch_debug.h" -/* ###--------------------------------------------------------------### */ -/* function : sch_debug */ -/* description : display any structure */ -/* called func. : none */ -/* ###--------------------------------------------------------------### */ - -void sch_debug (head_pnt, type) - -void *head_pnt; /* structure's pointer */ -char *type; /* structure's type */ - - { - static int translate (); - static int splitline (); - static void disp_immd (); - static void get_size (); - static void read_field (); - static void push (); - static void pop (); - static struct chain *go_forward (); - - char line [128]; /* buffer to read a cmd line */ - char buffer [128]; /* buffer to split the cmd line */ - - char *words [ 10]; /* number of words on a line */ - int nmbrs [ 10]; /* words translated into number */ - char flags [ 10]; /* set if words is a number */ - int indxs [ 10]; /* index of words */ - - struct stack jtab [ 10]; /* list of memorized addresses */ - int idx, i; - int readflg = 0; - int code; - unsigned int size; - char *pntr = NULL; - long pshtype; - int wrdcnt = 1; - - struct stack stk [STKSIZ_DFN]; - int stkpnt = -1; - - union value pnt [MAXCMD_DFN]; - long typ [MAXCMD_DFN]; - unsigned int siz [MAXCMD_DFN]; - - static char *str [] = { - "_back" , "_exit" , "_jump" , "_save" , - "_stop" , "_top" , "_up" , "_display" , - - "character" , "short" , "integer" , "long" , - "float" , "void" , "string" , - - "shdul" , "shent" , "shtra" , "shwav" , - - "cond" , "curtime" , "date" , "flags" , - "ident" , "itable" , "label" , "next" , - "prev" , "scdid" , "trans" , "ttable" , - "uflag" , "valu" , "wave" - }; - - /* ###------------------------------------------------------### */ - /* initialisation : */ - /* - allocate a buffer for read words */ - /* - break the argument that identifies the structure (type) */ - /* into words */ - /* - search that words among recognized strings */ - /* ###------------------------------------------------------### */ - - words [0] = buffer; - get_size (siz); - - wrdcnt = splitline (words, type); - idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); - - typ [idx] = POINTER_DFN | s_DFN | idx; - pnt [idx].dat = head_pnt; - - /* ###------------------------------------------------------### */ - /* process the command line until the _exit command */ - /* ###------------------------------------------------------### */ - - while ((idx & TYPE_DFN) != _exit_DFN) - { - /* ###------------------------------------------------------### */ - /* if the first word of the line has not been recognized, */ - /* print an error message. Otherwise, proccess the command line */ - /* (generally it is a request for displaying a specific field). */ - /* */ - /* At this point : */ - /* - pnt [] contains all available pointers */ - /* - typ [] contains the type of availabale pointers */ - /* ###------------------------------------------------------### */ - - if (idx == _error_DFN) - sch_error (118, "sch_debug", NULL, 0); - else - { - - /* ###------------------------------------------------------### */ - /* define the type of the structure that may be pushed on */ - /* the stack : */ - /* - if the pointer is a VOID pointer the type must be */ - /* defined on the command line (last word of the command) */ - /* ###------------------------------------------------------### */ - - pshtype = POINTER_DFN | s_DFN | void_DFN; - if ((typ [idx] & TYPE_DFN) == void_DFN) - { - if ((wrdcnt >= 2) && (indxs [wrdcnt - 1] != _error_DFN)) - pshtype = POINTER_DFN | s_DFN | indxs [wrdcnt - 1]; - else - sch_error (119, "sch_debug", NULL, 0); - } - else - pshtype = typ [idx]; - - /* ###------------------------------------------------------### */ - /* depending on the kind of the first word of the command */ - /* activate actions : */ - /* - COMMAND (_top, _up, ...) */ - /* - POINTER */ - /* - for NEXT go forward until the Nth element of the */ - /* list. Then, push it on the stack and read fields */ - /* - for others push and read fields */ - /* - ARRAY */ - /* - push the Nth element of the array and read its */ - /* fields */ - /* - ARRAY OF POINTER */ - /* - push the object which address is the Nth element of */ - /* the array and read its fields */ - /* ###------------------------------------------------------### */ - - switch (typ [idx] & KIND_DFN) - { - - /* ###------------------------------------------------------### */ - /* COMMANDS ... */ - /* ###------------------------------------------------------### */ - - case COMMAND_DFN : - - switch (typ [idx] & TYPE_DFN) - { - /* ###------------------------------------------------------### */ - /* _top COMMAND : reset the stack pointer, call read_field */ - /* to read the structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _top_DFN : - stkpnt = 0; - readflg = 1; - break; - - /* ###------------------------------------------------------### */ - /* _stop COMMAND : set the stop mark for the structure on */ - /* the top of stack */ - /* ###------------------------------------------------------### */ - - case _stop_DFN : - stk [stkpnt].mark = 1; - sch_message (19, "sch_debug", 0); - break; - - /* ###------------------------------------------------------### */ - /* _back COMMAND : pop structures from the stack until a */ - /* marked structure is found. Call read_field to read the */ - /* structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _back_DFN : - while ((stkpnt != 0) && (stk[--stkpnt].mark != 1)); - readflg = 1; - break; - - /* ###------------------------------------------------------### */ - /* _jump COMMAND : push on the stack the structure saved in */ - /* the jump table. Call read_field to read the structure on the */ - /* top of stack */ - /* ###------------------------------------------------------### */ - - case _jump_DFN : - if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) - { - push (stk, &stkpnt, jtab[nmbrs[1]].data, jtab[nmbrs[1]].type); - readflg = 1; - } - else - sch_error (118, "sch_debug", NULL, 0); - break; - - /* ###------------------------------------------------------### */ - /* _up COMMAND : pop structure from the stack. Call */ - /* read_field to read the structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _up_DFN : - if (wrdcnt == 1) - { - pop (&stkpnt, 1); - readflg = 1; - } - else - { - if ((wrdcnt == 2) && (flags [1] == 1)) - { - pop (&stkpnt, nmbrs [1] + 1); - readflg = 1; - } - else - sch_error (118, "sch_debug", NULL, 0); - } - break; - - /* ###------------------------------------------------------### */ - /* _save COMMAND : save the structure on the top of stack in */ - /* the jump table */ - /* ###------------------------------------------------------### */ - - case _save_DFN : - if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) - jtab [nmbrs[1]] = stk [stkpnt]; - else - sch_error (118, "sch_debug", NULL, 0); - break; - - /* ###------------------------------------------------------### */ - /* _display COMMAND : display a specified field as an */ - /* immediate */ - /* ###------------------------------------------------------### */ - - case _display_DFN : - if ((wrdcnt == 3) && (indxs [1] != _error_DFN)) - disp_immd (str, pnt [indxs [1]], indxs [2]); - else - sch_error (118, "sch_debug", NULL, 0); - break; - - } - break; - - /* ###------------------------------------------------------### */ - /* POINTERS ... */ - /* ###------------------------------------------------------### */ - - case POINTER_DFN : - if (idx == next_DFN) - { - if ((wrdcnt == 1) || ((wrdcnt == 2) && (flags [1] == 0))) - { - push (stk, &stkpnt, pnt [idx].dat, pshtype); - readflg = 1; - } - else - { - if (((wrdcnt == 3) || (wrdcnt == 2)) && (flags [1] == 1)) - { - pnt [idx].dat = (void *) go_forward (pnt [idx].dat, nmbrs [1]); - push (stk, &stkpnt, pnt [idx].dat, pshtype); - readflg = 1; - } - else - sch_error (118, "sch_debug", NULL, 0); - } - } - else - { - push (stk, &stkpnt, pnt [idx].dat, pshtype); - readflg = 1; - } - break; - - /* ###------------------------------------------------------### */ - /* ARRAIES of structure */ - /* ###------------------------------------------------------### */ - - case ARRAY_DFN : - if ((wrdcnt > 1) && (flags [1] == 1)) - { - size = siz [(typ [idx] & TYPE_DFN)]; - pntr = (void *) - (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); - push (stk, &stkpnt, pntr, pshtype); - readflg = 1; - } - else - sch_error (118, "sch_debug", NULL, 0); - break; - - /* ###------------------------------------------------------### */ - /* ARRAIES of pointers */ - /* ###------------------------------------------------------### */ - - case ARYOFPNT_DFN : - if ((wrdcnt > 1) && (flags [1] == 1)) - { - size = sizeof (void *); - pntr = * (void **) - (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); - push (stk, &stkpnt, pntr, pshtype); - readflg = 1; - } - else - sch_error (118, "sch_debug", NULL, 0); - break; - - } - - if (readflg == 1) - { - readflg = 0; - read_field (stk [stkpnt], pnt, typ, str); - } - - } - - printf ("\n\nCOMMAND > "); - - gets (line); - if (strcmp (line ,".")) - { - wrdcnt = splitline (words, line); - idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); - } - } - - } /* ###--------------------------------------------------------------### */ /* function : read_field */ @@ -847,3 +521,322 @@ int type ; sch_error (118, "sch_debug", NULL, 0); } } + + +/* ###--------------------------------------------------------------### */ +/* function : sch_debug */ +/* description : display any structure */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +void sch_debug (head_pnt, type) + +void *head_pnt; /* structure's pointer */ +char *type; /* structure's type */ + + { + char line [128]; /* buffer to read a cmd line */ + char buffer [128]; /* buffer to split the cmd line */ + + char *words [ 10]; /* number of words on a line */ + int nmbrs [ 10]; /* words translated into number */ + char flags [ 10]; /* set if words is a number */ + int indxs [ 10]; /* index of words */ + + struct stack jtab [ 10]; /* list of memorized addresses */ + int idx, i; + int readflg = 0; + int code; + unsigned int size; + char *pntr = NULL; + long pshtype; + int wrdcnt = 1; + + struct stack stk [STKSIZ_DFN]; + int stkpnt = -1; + + union value pnt [MAXCMD_DFN]; + long typ [MAXCMD_DFN]; + unsigned int siz [MAXCMD_DFN]; + + static char *str [] = { + "_back" , "_exit" , "_jump" , "_save" , + "_stop" , "_top" , "_up" , "_display" , + + "character" , "short" , "integer" , "long" , + "float" , "void" , "string" , + + "shdul" , "shent" , "shtra" , "shwav" , + + "cond" , "curtime" , "date" , "flags" , + "ident" , "itable" , "label" , "next" , + "prev" , "scdid" , "trans" , "ttable" , + "uflag" , "valu" , "wave" + }; + + /* ###------------------------------------------------------### */ + /* initialisation : */ + /* - allocate a buffer for read words */ + /* - break the argument that identifies the structure (type) */ + /* into words */ + /* - search that words among recognized strings */ + /* ###------------------------------------------------------### */ + + words [0] = buffer; + get_size (siz); + + wrdcnt = splitline (words, type); + idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); + + typ [idx] = POINTER_DFN | s_DFN | idx; + pnt [idx].dat = head_pnt; + + /* ###------------------------------------------------------### */ + /* process the command line until the _exit command */ + /* ###------------------------------------------------------### */ + + while ((idx & TYPE_DFN) != _exit_DFN) + { + /* ###------------------------------------------------------### */ + /* if the first word of the line has not been recognized, */ + /* print an error message. Otherwise, proccess the command line */ + /* (generally it is a request for displaying a specific field). */ + /* */ + /* At this point : */ + /* - pnt [] contains all available pointers */ + /* - typ [] contains the type of availabale pointers */ + /* ###------------------------------------------------------### */ + + if (idx == _error_DFN) + sch_error (118, "sch_debug", NULL, 0); + else + { + + /* ###------------------------------------------------------### */ + /* define the type of the structure that may be pushed on */ + /* the stack : */ + /* - if the pointer is a VOID pointer the type must be */ + /* defined on the command line (last word of the command) */ + /* ###------------------------------------------------------### */ + + pshtype = POINTER_DFN | s_DFN | void_DFN; + if ((typ [idx] & TYPE_DFN) == void_DFN) + { + if ((wrdcnt >= 2) && (indxs [wrdcnt - 1] != _error_DFN)) + pshtype = POINTER_DFN | s_DFN | indxs [wrdcnt - 1]; + else + sch_error (119, "sch_debug", NULL, 0); + } + else + pshtype = typ [idx]; + + /* ###------------------------------------------------------### */ + /* depending on the kind of the first word of the command */ + /* activate actions : */ + /* - COMMAND (_top, _up, ...) */ + /* - POINTER */ + /* - for NEXT go forward until the Nth element of the */ + /* list. Then, push it on the stack and read fields */ + /* - for others push and read fields */ + /* - ARRAY */ + /* - push the Nth element of the array and read its */ + /* fields */ + /* - ARRAY OF POINTER */ + /* - push the object which address is the Nth element of */ + /* the array and read its fields */ + /* ###------------------------------------------------------### */ + + switch (typ [idx] & KIND_DFN) + { + + /* ###------------------------------------------------------### */ + /* COMMANDS ... */ + /* ###------------------------------------------------------### */ + + case COMMAND_DFN : + + switch (typ [idx] & TYPE_DFN) + { + /* ###------------------------------------------------------### */ + /* _top COMMAND : reset the stack pointer, call read_field */ + /* to read the structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _top_DFN : + stkpnt = 0; + readflg = 1; + break; + + /* ###------------------------------------------------------### */ + /* _stop COMMAND : set the stop mark for the structure on */ + /* the top of stack */ + /* ###------------------------------------------------------### */ + + case _stop_DFN : + stk [stkpnt].mark = 1; + sch_message (19, "sch_debug", 0); + break; + + /* ###------------------------------------------------------### */ + /* _back COMMAND : pop structures from the stack until a */ + /* marked structure is found. Call read_field to read the */ + /* structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _back_DFN : + while ((stkpnt != 0) && (stk[--stkpnt].mark != 1)); + readflg = 1; + break; + + /* ###------------------------------------------------------### */ + /* _jump COMMAND : push on the stack the structure saved in */ + /* the jump table. Call read_field to read the structure on the */ + /* top of stack */ + /* ###------------------------------------------------------### */ + + case _jump_DFN : + if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) + { + push (stk, &stkpnt, jtab[nmbrs[1]].data, jtab[nmbrs[1]].type); + readflg = 1; + } + else + sch_error (118, "sch_debug", NULL, 0); + break; + + /* ###------------------------------------------------------### */ + /* _up COMMAND : pop structure from the stack. Call */ + /* read_field to read the structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _up_DFN : + if (wrdcnt == 1) + { + pop (&stkpnt, 1); + readflg = 1; + } + else + { + if ((wrdcnt == 2) && (flags [1] == 1)) + { + pop (&stkpnt, nmbrs [1] + 1); + readflg = 1; + } + else + sch_error (118, "sch_debug", NULL, 0); + } + break; + + /* ###------------------------------------------------------### */ + /* _save COMMAND : save the structure on the top of stack in */ + /* the jump table */ + /* ###------------------------------------------------------### */ + + case _save_DFN : + if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) + jtab [nmbrs[1]] = stk [stkpnt]; + else + sch_error (118, "sch_debug", NULL, 0); + break; + + /* ###------------------------------------------------------### */ + /* _display COMMAND : display a specified field as an */ + /* immediate */ + /* ###------------------------------------------------------### */ + + case _display_DFN : + if ((wrdcnt == 3) && (indxs [1] != _error_DFN)) + disp_immd (str, pnt [indxs [1]], indxs [2]); + else + sch_error (118, "sch_debug", NULL, 0); + break; + + } + break; + + /* ###------------------------------------------------------### */ + /* POINTERS ... */ + /* ###------------------------------------------------------### */ + + case POINTER_DFN : + if (idx == next_DFN) + { + if ((wrdcnt == 1) || ((wrdcnt == 2) && (flags [1] == 0))) + { + push (stk, &stkpnt, pnt [idx].dat, pshtype); + readflg = 1; + } + else + { + if (((wrdcnt == 3) || (wrdcnt == 2)) && (flags [1] == 1)) + { + pnt [idx].dat = (void *) go_forward (pnt [idx].dat, nmbrs [1]); + push (stk, &stkpnt, pnt [idx].dat, pshtype); + readflg = 1; + } + else + sch_error (118, "sch_debug", NULL, 0); + } + } + else + { + push (stk, &stkpnt, pnt [idx].dat, pshtype); + readflg = 1; + } + break; + + /* ###------------------------------------------------------### */ + /* ARRAIES of structure */ + /* ###------------------------------------------------------### */ + + case ARRAY_DFN : + if ((wrdcnt > 1) && (flags [1] == 1)) + { + size = siz [(typ [idx] & TYPE_DFN)]; + pntr = (void *) + (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); + push (stk, &stkpnt, pntr, pshtype); + readflg = 1; + } + else + sch_error (118, "sch_debug", NULL, 0); + break; + + /* ###------------------------------------------------------### */ + /* ARRAIES of pointers */ + /* ###------------------------------------------------------### */ + + case ARYOFPNT_DFN : + if ((wrdcnt > 1) && (flags [1] == 1)) + { + size = sizeof (void *); + pntr = * (void **) + (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); + push (stk, &stkpnt, pntr, pshtype); + readflg = 1; + } + else + sch_error (118, "sch_debug", NULL, 0); + break; + + } + + if (readflg == 1) + { + readflg = 0; + read_field (stk [stkpnt], pnt, typ, str); + } + + } + + printf ("\n\nCOMMAND > "); + + gets (line); + if (strcmp (line ,".")) + { + wrdcnt = splitline (words, line); + idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); + } + } + + } diff --git a/alliance/src/asimut/src/vh_debug.c b/alliance/src/asimut/src/vh_debug.c index 8f9b124b..bca8bcbb 100644 --- a/alliance/src/asimut/src/vh_debug.c +++ b/alliance/src/asimut/src/vh_debug.c @@ -17,367 +17,6 @@ #include "vh_ltype.h" #include "vh_debug.h" -/* ###--------------------------------------------------------------### */ -/* function : dast_dbg */ -/* description : display any structure */ -/* called func. : vhu_error, vhu_message */ -/* ###--------------------------------------------------------------### */ - -void dast_dbg (head_pnt, type) - -void *head_pnt; /* structure's pointer */ -char *type; /* structure's type */ - - { - static int translate (); - static int splitline (); - static void disp_immd (); - static void get_size (); - static void read_field (); - static void push (); - static void pop (); - static struct chain *go_forward (); - - char line [128]; /* buffer to read a cmd line */ - char buffer [128]; /* buffer to split the cmd line */ - - char *words [ 10]; /* number of words on a line */ - int nmbrs [ 10]; /* words translated into number */ - char flags [ 10]; /* set if words is a number */ - int indxs [ 10]; /* index of words */ - - struct stack jtab [ 10]; /* list of memorized addresses */ - int idx; - int readflg = 0; - unsigned int size; - char *pntr = NULL; - long pshtype; - int wrdcnt = 1; - - struct stack stk [STKSIZ_DFN]; - int stkpnt = -1; - - union value pnt [MAXCMD_DFN]; - long typ [MAXCMD_DFN]; - unsigned int siz [MAXCMD_DFN]; - - static char *str [] = { - "_back" , "_exit" , "_jump" , "_save" , - "_stop" , "_top" , "_up" , "_display" , - - "character" , "short" , "integer" , "long" , - "float" , "void" , "string" , - - "chain" , "ptype" , - - "lofig" , "locon" , "losig" , "loins" , - - "befig" , "bereg" , "bemsg" , "berin" , - "beout" , "bebus" , "beaux" , "bedly" , - "bebux" , "bepor" , "begen" , "biabl" , - "binode" , - - "paseq" , "pagrp" , "paiol" , "papat" , - "pacom" , "paini" , "paevt" , "pains" , - - "bussig" , "lkdfig" , "lkdins" , "simsig" , - "wrbsig" , "wriaux" , "wribux" , "wrireg" , - "wrssig" , "wrimsg" , - - "shdul" , "shent" , "shtra" , "shwav" , - - "abl" , "bdd" , "gex" , - - "actflag" , "aux_ref" , "blank" , "buffer" , - "bus_ref" , "bux_ref" , "capa" , "cndabl" , - "cndnode" , "cndval" , "cond" , "curcom" , - "curpat" , "curtime" , "curval" , "data" , - "date" , "deccom" , "depend" , "direction" , - "dly_ref" , "drvseq" , "drvval" , "endflg" , - "errflg" , "eval" , "figname" , "filname" , - "findex" , "flag" , "flags" , "format" , - "glnext" , "ident" , "index" , "insname" , - "instance" , "iolnbr" , "itable" , "label" , - "length" , "level" , "line" , "lineno" , - "message" , "mode" , "model" , "modelchain", - "msg_ref" , "name" , "namechain" , "next" , - "node" , "nxtpat" , "oldcom" , "oldpat" , - "out_ref" , "patnbr" , "position" , "prev" , - "prjbvl" , "prjrvl" , "prjval" , "redins" , - "redlst" , "reg_ref" , "root" , "savflg" , - "scdid" , "sig" , "simflag" , "simval" , - "subseq" , "text" , "time" , "time_unit" , - "trans" , "ttable" , "type" , "uflag" , - "user" , "usrval" , "valabl" , "valnode" , - "valsiz" , "valu" , "value" , "wave" - }; - - /* ###------------------------------------------------------### */ - /* initialisation : */ - /* - allocate a buffer for read words */ - /* - break the argument that identifies the structure (type) */ - /* into words */ - /* - search that words among recognized strings */ - /* ###------------------------------------------------------### */ - - words [0] = buffer; - get_size (siz); - - wrdcnt = splitline (words, type); - idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); - - typ [idx] = POINTER_DFN | s_DFN | idx; - pnt [idx].dat = head_pnt; - - /* ###------------------------------------------------------### */ - /* process the command line until the _exit command */ - /* ###------------------------------------------------------### */ - - while ((idx & TYPE_DFN) != _exit_DFN) - { - /* ###------------------------------------------------------### */ - /* if the first word of the line has not been recognized, */ - /* print an error message. Otherwise, proccess the command line */ - /* (generally it is a request for displaying a specific field). */ - /* */ - /* At this point : */ - /* - pnt [] contains all available pointers */ - /* - typ [] contains the type of availabale pointers */ - /* ###------------------------------------------------------### */ - - if (idx == _error_DFN) - vhu_error (118, NULL, NULL, 0); - else - { - - /* ###------------------------------------------------------### */ - /* define the type of the structure that may be pushed on */ - /* the stack : */ - /* - if the pointer is a VOID pointer the exact type must be */ - /* defined on the command line (last word of the command) */ - /* ###------------------------------------------------------### */ - - pshtype = POINTER_DFN | s_DFN | void_DFN; - if ((typ [idx] & TYPE_DFN) == void_DFN) - { - if ((wrdcnt >= 2) && (indxs [wrdcnt - 1] != _error_DFN)) - pshtype = POINTER_DFN | s_DFN | indxs [wrdcnt - 1]; - else - vhu_error (119, NULL, NULL, 0); - } - else - pshtype = typ [idx]; - - /* ###------------------------------------------------------### */ - /* depending on the kind of the first word of the command */ - /* activate actions : */ - /* - COMMAND (_top, _up, ...) */ - /* - POINTER */ - /* - for NEXT go forward until the Nth element of the */ - /* list. Then, push it on the stack and read fields */ - /* - for others push and read fields */ - /* - ARRAY */ - /* - push the Nth element of the array and read its */ - /* fields */ - /* - ARRAY OF POINTER */ - /* - push the object which address is the Nth element of */ - /* the array and read its fields */ - /* ###------------------------------------------------------### */ - - switch (typ [idx] & KIND_DFN) - { - - /* ###------------------------------------------------------### */ - /* COMMANDS ... */ - /* ###------------------------------------------------------### */ - - case COMMAND_DFN : - - switch (typ [idx] & TYPE_DFN) - { - /* ###------------------------------------------------------### */ - /* _top COMMAND : reset the stack pointer, call read_field */ - /* to read the structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _top_DFN : - stkpnt = 0; - readflg = 1; - break; - - /* ###------------------------------------------------------### */ - /* _stop COMMAND : set the stop mark for the structure on */ - /* the top of stack */ - /* ###------------------------------------------------------### */ - - case _stop_DFN : - stk [stkpnt].mark = 1; - vhu_message (19, "vhu_debug", 0); - break; - - /* ###------------------------------------------------------### */ - /* _back COMMAND : pop structures from the stack until a */ - /* marked structure is found. Call read_field to read the */ - /* structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _back_DFN : - while ((stkpnt != 0) && (stk[--stkpnt].mark != 1)); - readflg = 1; - break; - - /* ###------------------------------------------------------### */ - /* _jump COMMAND : push on the stack the structure saved in */ - /* the jump table. Call read_field to read the structure on the */ - /* top of stack */ - /* ###------------------------------------------------------### */ - - case _jump_DFN : - if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) - { - push (stk, &stkpnt, jtab[nmbrs[1]].data, jtab[nmbrs[1]].type); - readflg = 1; - } - else - vhu_error (118, NULL, NULL, 0); - break; - - /* ###------------------------------------------------------### */ - /* _up COMMAND : pop structure from the stack. Call */ - /* read_field to read the structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _up_DFN : - if (wrdcnt == 1) - { - pop (&stkpnt, 1); - readflg = 1; - } - else - { - if ((wrdcnt == 2) && (flags [1] == 1)) - { - pop (&stkpnt, nmbrs [1] + 1); - readflg = 1; - } - else - vhu_error (118, NULL, NULL, 0); - } - break; - - /* ###------------------------------------------------------### */ - /* _save COMMAND : save the structure on the top of stack in */ - /* the jump table */ - /* ###------------------------------------------------------### */ - - case _save_DFN : - if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) - jtab [nmbrs[1]] = stk [stkpnt]; - else - vhu_error (118, NULL, NULL, 0); - break; - - /* ###------------------------------------------------------### */ - /* _display COMMAND : display a specified field as an */ - /* immediate */ - /* ###------------------------------------------------------### */ - - case _display_DFN : - if ((wrdcnt == 3) && (indxs [1] != _error_DFN)) - disp_immd (str, pnt [indxs [1]], indxs [2]); - else - vhu_error (118, NULL, NULL, 0); - break; - - } - break; - - /* ###------------------------------------------------------### */ - /* POINTERS ... */ - /* ###------------------------------------------------------### */ - - case POINTER_DFN : - if (idx == next_DFN) - { - if ((wrdcnt == 1) || ((wrdcnt == 2) && (flags [1] == 0))) - { - push (stk, &stkpnt, pnt [idx].dat, pshtype); - readflg = 1; - } - else - { - if (((wrdcnt == 3) || (wrdcnt == 2)) && (flags [1] == 1)) - { - pnt [idx].dat = (void *) go_forward (pnt [idx].dat, nmbrs [1]); - push (stk, &stkpnt, pnt [idx].dat, pshtype); - readflg = 1; - } - else - vhu_error (118, NULL, NULL, 0); - } - } - else - { - push (stk, &stkpnt, pnt [idx].dat, pshtype); - readflg = 1; - } - break; - - /* ###------------------------------------------------------### */ - /* ARRAIES of structure */ - /* ###------------------------------------------------------### */ - - case ARRAY_DFN : - if ((wrdcnt > 1) && (flags [1] == 1)) - { - size = siz [(typ [idx] & TYPE_DFN)]; - pntr = (void *) - (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); - push (stk, &stkpnt, pntr, pshtype); - readflg = 1; - } - else - vhu_error (118, NULL, NULL, 0); - break; - - /* ###------------------------------------------------------### */ - /* ARRAIES of pointers */ - /* ###------------------------------------------------------### */ - - case ARYOFPNT_DFN : - if ((wrdcnt > 1) && (flags [1] == 1)) - { - size = sizeof (void *); - pntr = * (void **) - (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); - push (stk, &stkpnt, pntr, pshtype); - readflg = 1; - } - else - vhu_error (118, NULL, NULL, 0); - break; - - } - - if (readflg == 1) - { - readflg = 0; - read_field (stk [stkpnt], pnt, typ, str); - } - - } - - printf ("\n\nCOMMAND > "); - - gets (line); - if (strcmp (line ,".")) - { - wrdcnt = splitline (words, line); - idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); - } - } - - } /* ###--------------------------------------------------------------### */ /* function : read_field */ @@ -393,13 +32,11 @@ long *typ ; /* child struct. or data type */ char **str ; /* recognized strings */ { - extern char *exprToCharInt (); - extern struct chain *bddToAbl (); int i; struct chain *ptr_abl; static char *buffer = NULL; - static unsigned int buffer_size = 0; + static int buffer_size = 0; static struct circuit *circuit_pnt = NULL; struct chain *chain_pnt; @@ -1957,3 +1594,357 @@ int type ; vhu_error (118, NULL, NULL, 0); } } + +/* ###--------------------------------------------------------------### */ +/* function : dast_dbg */ +/* description : display any structure */ +/* called func. : vhu_error, vhu_message */ +/* ###--------------------------------------------------------------### */ + +void dast_dbg (head_pnt, type) + +void *head_pnt; /* structure's pointer */ +char *type; /* structure's type */ + + { + + char line [128]; /* buffer to read a cmd line */ + char buffer [128]; /* buffer to split the cmd line */ + + char *words [ 10]; /* number of words on a line */ + int nmbrs [ 10]; /* words translated into number */ + char flags [ 10]; /* set if words is a number */ + int indxs [ 10]; /* index of words */ + + struct stack jtab [ 10]; /* list of memorized addresses */ + int idx; + int readflg = 0; + unsigned int size; + char *pntr = NULL; + long pshtype; + int wrdcnt = 1; + + struct stack stk [STKSIZ_DFN]; + int stkpnt = -1; + + union value pnt [MAXCMD_DFN]; + long typ [MAXCMD_DFN]; + unsigned int siz [MAXCMD_DFN]; + + static char *str [] = { + "_back" , "_exit" , "_jump" , "_save" , + "_stop" , "_top" , "_up" , "_display" , + + "character" , "short" , "integer" , "long" , + "float" , "void" , "string" , + + "chain" , "ptype" , + + "lofig" , "locon" , "losig" , "loins" , + + "befig" , "bereg" , "bemsg" , "berin" , + "beout" , "bebus" , "beaux" , "bedly" , + "bebux" , "bepor" , "begen" , "biabl" , + "binode" , + + "paseq" , "pagrp" , "paiol" , "papat" , + "pacom" , "paini" , "paevt" , "pains" , + + "bussig" , "lkdfig" , "lkdins" , "simsig" , + "wrbsig" , "wriaux" , "wribux" , "wrireg" , + "wrssig" , "wrimsg" , + + "shdul" , "shent" , "shtra" , "shwav" , + + "abl" , "bdd" , "gex" , + + "actflag" , "aux_ref" , "blank" , "buffer" , + "bus_ref" , "bux_ref" , "capa" , "cndabl" , + "cndnode" , "cndval" , "cond" , "curcom" , + "curpat" , "curtime" , "curval" , "data" , + "date" , "deccom" , "depend" , "direction" , + "dly_ref" , "drvseq" , "drvval" , "endflg" , + "errflg" , "eval" , "figname" , "filname" , + "findex" , "flag" , "flags" , "format" , + "glnext" , "ident" , "index" , "insname" , + "instance" , "iolnbr" , "itable" , "label" , + "length" , "level" , "line" , "lineno" , + "message" , "mode" , "model" , "modelchain", + "msg_ref" , "name" , "namechain" , "next" , + "node" , "nxtpat" , "oldcom" , "oldpat" , + "out_ref" , "patnbr" , "position" , "prev" , + "prjbvl" , "prjrvl" , "prjval" , "redins" , + "redlst" , "reg_ref" , "root" , "savflg" , + "scdid" , "sig" , "simflag" , "simval" , + "subseq" , "text" , "time" , "time_unit" , + "trans" , "ttable" , "type" , "uflag" , + "user" , "usrval" , "valabl" , "valnode" , + "valsiz" , "valu" , "value" , "wave" + }; + + /* ###------------------------------------------------------### */ + /* initialisation : */ + /* - allocate a buffer for read words */ + /* - break the argument that identifies the structure (type) */ + /* into words */ + /* - search that words among recognized strings */ + /* ###------------------------------------------------------### */ + + words [0] = buffer; + get_size (siz); + + wrdcnt = splitline (words, type); + idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); + + typ [idx] = POINTER_DFN | s_DFN | idx; + pnt [idx].dat = head_pnt; + + /* ###------------------------------------------------------### */ + /* process the command line until the _exit command */ + /* ###------------------------------------------------------### */ + + while ((idx & TYPE_DFN) != _exit_DFN) + { + /* ###------------------------------------------------------### */ + /* if the first word of the line has not been recognized, */ + /* print an error message. Otherwise, proccess the command line */ + /* (generally it is a request for displaying a specific field). */ + /* */ + /* At this point : */ + /* - pnt [] contains all available pointers */ + /* - typ [] contains the type of availabale pointers */ + /* ###------------------------------------------------------### */ + + if (idx == _error_DFN) + vhu_error (118, NULL, NULL, 0); + else + { + + /* ###------------------------------------------------------### */ + /* define the type of the structure that may be pushed on */ + /* the stack : */ + /* - if the pointer is a VOID pointer the exact type must be */ + /* defined on the command line (last word of the command) */ + /* ###------------------------------------------------------### */ + + pshtype = POINTER_DFN | s_DFN | void_DFN; + if ((typ [idx] & TYPE_DFN) == void_DFN) + { + if ((wrdcnt >= 2) && (indxs [wrdcnt - 1] != _error_DFN)) + pshtype = POINTER_DFN | s_DFN | indxs [wrdcnt - 1]; + else + vhu_error (119, NULL, NULL, 0); + } + else + pshtype = typ [idx]; + + /* ###------------------------------------------------------### */ + /* depending on the kind of the first word of the command */ + /* activate actions : */ + /* - COMMAND (_top, _up, ...) */ + /* - POINTER */ + /* - for NEXT go forward until the Nth element of the */ + /* list. Then, push it on the stack and read fields */ + /* - for others push and read fields */ + /* - ARRAY */ + /* - push the Nth element of the array and read its */ + /* fields */ + /* - ARRAY OF POINTER */ + /* - push the object which address is the Nth element of */ + /* the array and read its fields */ + /* ###------------------------------------------------------### */ + + switch (typ [idx] & KIND_DFN) + { + + /* ###------------------------------------------------------### */ + /* COMMANDS ... */ + /* ###------------------------------------------------------### */ + + case COMMAND_DFN : + + switch (typ [idx] & TYPE_DFN) + { + /* ###------------------------------------------------------### */ + /* _top COMMAND : reset the stack pointer, call read_field */ + /* to read the structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _top_DFN : + stkpnt = 0; + readflg = 1; + break; + + /* ###------------------------------------------------------### */ + /* _stop COMMAND : set the stop mark for the structure on */ + /* the top of stack */ + /* ###------------------------------------------------------### */ + + case _stop_DFN : + stk [stkpnt].mark = 1; + vhu_message (19, "vhu_debug", 0); + break; + + /* ###------------------------------------------------------### */ + /* _back COMMAND : pop structures from the stack until a */ + /* marked structure is found. Call read_field to read the */ + /* structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _back_DFN : + while ((stkpnt != 0) && (stk[--stkpnt].mark != 1)); + readflg = 1; + break; + + /* ###------------------------------------------------------### */ + /* _jump COMMAND : push on the stack the structure saved in */ + /* the jump table. Call read_field to read the structure on the */ + /* top of stack */ + /* ###------------------------------------------------------### */ + + case _jump_DFN : + if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) + { + push (stk, &stkpnt, jtab[nmbrs[1]].data, jtab[nmbrs[1]].type); + readflg = 1; + } + else + vhu_error (118, NULL, NULL, 0); + break; + + /* ###------------------------------------------------------### */ + /* _up COMMAND : pop structure from the stack. Call */ + /* read_field to read the structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _up_DFN : + if (wrdcnt == 1) + { + pop (&stkpnt, 1); + readflg = 1; + } + else + { + if ((wrdcnt == 2) && (flags [1] == 1)) + { + pop (&stkpnt, nmbrs [1] + 1); + readflg = 1; + } + else + vhu_error (118, NULL, NULL, 0); + } + break; + + /* ###------------------------------------------------------### */ + /* _save COMMAND : save the structure on the top of stack in */ + /* the jump table */ + /* ###------------------------------------------------------### */ + + case _save_DFN : + if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) + jtab [nmbrs[1]] = stk [stkpnt]; + else + vhu_error (118, NULL, NULL, 0); + break; + + /* ###------------------------------------------------------### */ + /* _display COMMAND : display a specified field as an */ + /* immediate */ + /* ###------------------------------------------------------### */ + + case _display_DFN : + if ((wrdcnt == 3) && (indxs [1] != _error_DFN)) + disp_immd (str, pnt [indxs [1]], indxs [2]); + else + vhu_error (118, NULL, NULL, 0); + break; + + } + break; + + /* ###------------------------------------------------------### */ + /* POINTERS ... */ + /* ###------------------------------------------------------### */ + + case POINTER_DFN : + if (idx == next_DFN) + { + if ((wrdcnt == 1) || ((wrdcnt == 2) && (flags [1] == 0))) + { + push (stk, &stkpnt, pnt [idx].dat, pshtype); + readflg = 1; + } + else + { + if (((wrdcnt == 3) || (wrdcnt == 2)) && (flags [1] == 1)) + { + pnt [idx].dat = (void *) go_forward (pnt [idx].dat, nmbrs [1]); + push (stk, &stkpnt, pnt [idx].dat, pshtype); + readflg = 1; + } + else + vhu_error (118, NULL, NULL, 0); + } + } + else + { + push (stk, &stkpnt, pnt [idx].dat, pshtype); + readflg = 1; + } + break; + + /* ###------------------------------------------------------### */ + /* ARRAIES of structure */ + /* ###------------------------------------------------------### */ + + case ARRAY_DFN : + if ((wrdcnt > 1) && (flags [1] == 1)) + { + size = siz [(typ [idx] & TYPE_DFN)]; + pntr = (void *) + (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); + push (stk, &stkpnt, pntr, pshtype); + readflg = 1; + } + else + vhu_error (118, NULL, NULL, 0); + break; + + /* ###------------------------------------------------------### */ + /* ARRAIES of pointers */ + /* ###------------------------------------------------------### */ + + case ARYOFPNT_DFN : + if ((wrdcnt > 1) && (flags [1] == 1)) + { + size = sizeof (void *); + pntr = * (void **) + (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); + push (stk, &stkpnt, pntr, pshtype); + readflg = 1; + } + else + vhu_error (118, NULL, NULL, 0); + break; + + } + + if (readflg == 1) + { + readflg = 0; + read_field (stk [stkpnt], pnt, typ, str); + } + + } + + printf ("\n\nCOMMAND > "); + + gets (line); + if (strcmp (line ,".")) + { + wrdcnt = splitline (words, line); + idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); + } + } + + } diff --git a/alliance/src/asimut/src/vh_util.c b/alliance/src/asimut/src/vh_util.c index e2a2cd65..755977f7 100644 --- a/alliance/src/asimut/src/vh_util.c +++ b/alliance/src/asimut/src/vh_util.c @@ -10,6 +10,8 @@ /* ###--------------------------------------------------------------### */ #include +#include +#include #include "mut.h" #include "vh_util.h" diff --git a/alliance/src/asimut/src/vh_xcomm.c b/alliance/src/asimut/src/vh_xcomm.c index 55b30e9b..94619733 100644 --- a/alliance/src/asimut/src/vh_xcomm.c +++ b/alliance/src/asimut/src/vh_xcomm.c @@ -18,6 +18,7 @@ /* ###--------------------------------------------------------------### */ #include +#include #include #include "mut.h" #include "beh.h" diff --git a/alliance/src/asimut/src/vh_xspec.c b/alliance/src/asimut/src/vh_xspec.c index 4907bc2d..59270c4e 100644 --- a/alliance/src/asimut/src/vh_xspec.c +++ b/alliance/src/asimut/src/vh_xspec.c @@ -11,6 +11,7 @@ /* ###--------------------------------------------------------------### */ #include +#include #include #include "mut.h" #include "beh.h" diff --git a/alliance/src/beh/src/beh_expdelayed.c b/alliance/src/beh/src/beh_expdelayed.c index ab84935b..f340ed8e 100644 --- a/alliance/src/beh/src/beh_expdelayed.c +++ b/alliance/src/beh/src/beh_expdelayed.c @@ -30,6 +30,7 @@ /* ###--------------------------------------------------------------### */ #include +#include #include "mut.h" #include "log.h" #include "beh.h" diff --git a/alliance/src/bhl/src/beh_debug.c b/alliance/src/bhl/src/beh_debug.c index 1b0b4bab..0b37458d 100644 --- a/alliance/src/bhl/src/beh_debug.c +++ b/alliance/src/bhl/src/beh_debug.c @@ -39,317 +39,6 @@ static char *buffer = NULL; static unsigned int buff_size = 0; static struct circuit *circuit_pnt = NULL; -/* ###--------------------------------------------------------------### */ -/* function : beh_debug */ -/* description : dispaly any mad structure */ -/* called func. : goforward, translate, dispaly, splitline, pop, push */ -/* ###--------------------------------------------------------------### */ - -void beh_debug (head_pnt, type) - -void *head_pnt; /* structure's pointer */ -char *type; /* structure's type */ - - { - static void disp_immd (); - static void getsize (); - static void display (); - static void push (); - static void pop (); - static struct chain *goforward (); - static int splitline (); - static int translate (); - - char line [128]; /* buffer to read a cmd line */ - char heap [128]; /* buffer to split the cmd line */ - - char *words [ 10]; /* number of words on a line */ - int nmbrs [ 10]; /* words translated into number */ - char flags [ 10]; /* set if words is a number */ - int indxs [ 10]; /* index of words */ - - struct stack jtab [ 10]; /* list of memorized addresses */ - int idx, i; - int dispflg = 0; - int code; - unsigned int size; - char *pntr = NULL; - long pshtype; - int wrdcnt = 1; - - struct stack stk [STKSIZ_DFN]; - int stkpnt = -1; - - union value pnt [MAXCMD_DFN]; - long typ [MAXCMD_DFN]; - unsigned int siz [MAXCMD_DFN]; - - static char *str [] = { - "_back" , "_exit" , "_jump" , "_save" , - "_stop" , "_top" , "_up" , "_display" , - - "character", "short" , "integer" , "long" , - "void" , "string" , - "chain" , "ptype" , "befig" , "bereg" , - "bemsg" , "berin" , "beout" , "bebus" , - "beaux" , "bedly" , "bebux" , "bepor" , - "begen" , "biabl" , "binode" , "bequad" , - "beder" , - "next" , "name" , "user" , "errflg" , - "type" , "level" , "label" , "message" , - "abl" , "node" , "direction", "cndabl" , - "valabl" , "cndnode" , "valnode" , "out_ref" , - "bus_ref" , "aux_ref" , "reg_ref" , "bux_ref" , - "msg_ref" , "dly_ref" , "value" , "data" , - "time" , "bdd" , "gex" , "varlist" , - "derivate" , "index" , "flag" , "time_unit", - "time_step" - }; - - /* ###------------------------------------------------------### */ - /* initialisation : */ - /* - allocate a buffer for read words */ - /* - break the argument that identifies the structure (type) */ - /* into words */ - /* - search that words among recognized strings */ - /* ###------------------------------------------------------### */ - - words [0] = heap; - getsize (siz); - - wrdcnt = splitline (words, type); - idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); - - typ [idx] = POINTER_DFN | s_DFN | idx; - pnt [idx].dat = head_pnt; - - /* ###------------------------------------------------------### */ - /* process the command line until the _exit command */ - /* ###------------------------------------------------------### */ - - while ((idx & TYPE_DFN) != _exit_DFN) - { - /* ###------------------------------------------------------### */ - /* if the first word of the line has not been recognized, */ - /* print an error message. Otherwise, proccess the command line */ - /* (generally it is a request for displaying a specific field). */ - /* */ - /* At this point : */ - /* - pnt [] contains all available pointers */ - /* - typ [] contains the type of availabale pointers */ - /* ###------------------------------------------------------### */ - - if (idx == _error_DFN) - fprintf (stderr ,"unrecognized command\n"); - else - { - - /* ###------------------------------------------------------### */ - /* define the type of the structure that may be pushed on */ - /* the stack : */ - /* - if the pointer is a VOID pointer the exact type must be */ - /* defined on the command line (last word of the command) */ - /* ###------------------------------------------------------### */ - - pshtype = POINTER_DFN | s_DFN | void_DFN; - if ((typ [idx] & TYPE_DFN) == void_DFN) - { - if ((wrdcnt >= 2) && (indxs [wrdcnt - 1] != _error_DFN)) - pshtype = POINTER_DFN | s_DFN | indxs [wrdcnt - 1]; - else - fprintf (stderr ,"structure has unknown type (void *)\n"); - } - else - pshtype = typ [idx]; - - /* ###------------------------------------------------------### */ - /* depending on the kind of the first word of the command */ - /* activate actions : */ - /* - COMMAND (_top, _up, ...) */ - /* - POINTER */ - /* - for NEXT go forward until the Nth element of the */ - /* list. Then, push it on the stack and dispaly it */ - /* - for others push and display */ - /* - ARRAY */ - /* - push and display the Nth element of the array */ - /* ###------------------------------------------------------### */ - - switch (typ [idx] & KIND_DFN) - { - - case COMMAND_DFN : - switch (typ [idx] & TYPE_DFN) - { - /* ###------------------------------------------------------### */ - /* _top COMMAND : reset the stack pointer, call read_field */ - /* to read the structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _top_DFN : - stkpnt = 0; - dispflg = 1; - break; - - /* ###------------------------------------------------------### */ - /* _stop COMMAND : set the stop mark for the structure on */ - /* the top of stack */ - /* ###------------------------------------------------------### */ - - case _stop_DFN : - stk [stkpnt].mark = 1; - fprintf (stdout, "beh_debug : stop mark set\n"); - break; - - /* ###------------------------------------------------------### */ - /* _back COMMAND : pop structures from the stack until a */ - /* marked structure is found. Call read_field to read the */ - /* structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _back_DFN : - while ((stkpnt != 0) && (stk[--stkpnt].mark != 1)); - dispflg = 1; - break; - - /* ###------------------------------------------------------### */ - /* _jump COMMAND : push on the stack the structure saved in */ - /* the jump table. Call read_field to read the structure on the */ - /* top of stack */ - /* ###------------------------------------------------------### */ - - case _jump_DFN : - if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) - { - push (stk, &stkpnt, jtab[nmbrs[1]].data, jtab[nmbrs[1]].type); - dispflg = 1; - } - else - fprintf (stderr ,"unrecognized command\n"); - break; - - /* ###------------------------------------------------------### */ - /* _up COMMAND : pop structure from the stack. Call */ - /* read_field to read the structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _up_DFN : - if (wrdcnt == 1) - { - pop (&stkpnt, 1); - dispflg = 1; - } - else - { - if ((wrdcnt == 2) && (flags [1] == 1)) - { - pop (&stkpnt, nmbrs [1] + 1); - dispflg = 1; - } - else - fprintf (stderr ,"unrecognized command\n"); - } - break; - - /* ###------------------------------------------------------### */ - /* _save COMMAND : save the structure on the top of stack in */ - /* the jump table */ - /* ###------------------------------------------------------### */ - - case _save_DFN : - if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) - jtab [nmbrs[1]] = stk [stkpnt]; - else - fprintf (stderr ,"unrecognized command\n"); - break; - - /* ###------------------------------------------------------### */ - /* _display COMMAND : display a specified field as an */ - /* immediate */ - /* ###------------------------------------------------------### */ - - case _display_DFN : - if ((wrdcnt == 3) && (indxs [1] != _error_DFN)) - disp_immd (str, pnt [indxs [1]], indxs [2]); - else - fprintf (stderr ,"unrecognized command\n"); - break; - - } - break; - - case POINTER_DFN : - if (idx == next_DFN) - { - if ((wrdcnt == 1) || ((wrdcnt == 2) && (flags [1] == 0))) - { - push (stk, &stkpnt, pnt [idx].dat, pshtype); - dispflg = 1; - } - else - { - if (((wrdcnt == 3) || (wrdcnt == 2)) && (flags [1] == 1)) - { - pnt [idx].dat = (void *) goforward (pnt [idx].dat, nmbrs [1]); - push (stk, &stkpnt, pnt [idx].dat, pshtype); - dispflg = 1; - } - else - fprintf (stderr ,"unrecognized command\n"); - } - } - else - { - push (stk, &stkpnt, pnt [idx].dat, pshtype); - dispflg = 1; - } - break; - - case ARRAY_DFN : - if ((wrdcnt > 1) && (flags [1] == 1)) - { - size = siz [(typ [idx] & TYPE_DFN)]; - pntr = (void *) - (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); - push (stk, &stkpnt, pntr, pshtype); - dispflg = 1; - } - else - fprintf (stderr ,"unrecognized command\n"); - break; - - case ARYOFPNT_DFN : - if ((wrdcnt > 1) && (flags [1] == 1)) - { - size = sizeof (void *); - pntr = * (void **) - (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); - push (stk, &stkpnt, pntr, pshtype); - dispflg = 1; - } - else - fprintf (stderr ,"unrecognized command\n"); - break; - - } - - if (dispflg == 1) - { - dispflg = 0; - display (stk [stkpnt], pnt, typ, str); - } - - } - - printf ("\n\nCOMMAND > "); - - gets (line); - if (strcmp (line ,".")) - { - wrdcnt = splitline (words, line); - idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); - } - } - } /* ###--------------------------------------------------------------### */ /* function : display */ @@ -365,8 +54,6 @@ long *typ; /* child struct. or data type */ char **str; /* recognized strings */ { - extern char *exprToCharInt (); - extern struct chain *bddToAbl (); int i; struct chain *ptr_abl; @@ -1174,7 +861,6 @@ union value pnt ; int type ; { - extern char *exprToCharInt (); char *lcl_str ; struct chain *ptr_abl ; @@ -1227,3 +913,307 @@ int type ; fprintf (stderr ,"unrecognized command\n"); } } + + +/* ###--------------------------------------------------------------### */ +/* function : beh_debug */ +/* description : dispaly any mad structure */ +/* called func. : goforward, translate, dispaly, splitline, pop, push */ +/* ###--------------------------------------------------------------### */ + +void beh_debug (head_pnt, type) + +void *head_pnt; /* structure's pointer */ +char *type; /* structure's type */ + + { + char line [128]; /* buffer to read a cmd line */ + char heap [128]; /* buffer to split the cmd line */ + + char *words [ 10]; /* number of words on a line */ + int nmbrs [ 10]; /* words translated into number */ + char flags [ 10]; /* set if words is a number */ + int indxs [ 10]; /* index of words */ + + struct stack jtab [ 10]; /* list of memorized addresses */ + int idx, i; + int dispflg = 0; + int code; + unsigned int size; + char *pntr = NULL; + long pshtype; + int wrdcnt = 1; + + struct stack stk [STKSIZ_DFN]; + int stkpnt = -1; + + union value pnt [MAXCMD_DFN]; + long typ [MAXCMD_DFN]; + unsigned int siz [MAXCMD_DFN]; + + static char *str [] = { + "_back" , "_exit" , "_jump" , "_save" , + "_stop" , "_top" , "_up" , "_display" , + + "character", "short" , "integer" , "long" , + "void" , "string" , + "chain" , "ptype" , "befig" , "bereg" , + "bemsg" , "berin" , "beout" , "bebus" , + "beaux" , "bedly" , "bebux" , "bepor" , + "begen" , "biabl" , "binode" , "bequad" , + "beder" , + "next" , "name" , "user" , "errflg" , + "type" , "level" , "label" , "message" , + "abl" , "node" , "direction", "cndabl" , + "valabl" , "cndnode" , "valnode" , "out_ref" , + "bus_ref" , "aux_ref" , "reg_ref" , "bux_ref" , + "msg_ref" , "dly_ref" , "value" , "data" , + "time" , "bdd" , "gex" , "varlist" , + "derivate" , "index" , "flag" , "time_unit", + "time_step" + }; + + /* ###------------------------------------------------------### */ + /* initialisation : */ + /* - allocate a buffer for read words */ + /* - break the argument that identifies the structure (type) */ + /* into words */ + /* - search that words among recognized strings */ + /* ###------------------------------------------------------### */ + + words [0] = heap; + getsize (siz); + + wrdcnt = splitline (words, type); + idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); + + typ [idx] = POINTER_DFN | s_DFN | idx; + pnt [idx].dat = head_pnt; + + /* ###------------------------------------------------------### */ + /* process the command line until the _exit command */ + /* ###------------------------------------------------------### */ + + while ((idx & TYPE_DFN) != _exit_DFN) + { + /* ###------------------------------------------------------### */ + /* if the first word of the line has not been recognized, */ + /* print an error message. Otherwise, proccess the command line */ + /* (generally it is a request for displaying a specific field). */ + /* */ + /* At this point : */ + /* - pnt [] contains all available pointers */ + /* - typ [] contains the type of availabale pointers */ + /* ###------------------------------------------------------### */ + + if (idx == _error_DFN) + fprintf (stderr ,"unrecognized command\n"); + else + { + + /* ###------------------------------------------------------### */ + /* define the type of the structure that may be pushed on */ + /* the stack : */ + /* - if the pointer is a VOID pointer the exact type must be */ + /* defined on the command line (last word of the command) */ + /* ###------------------------------------------------------### */ + + pshtype = POINTER_DFN | s_DFN | void_DFN; + if ((typ [idx] & TYPE_DFN) == void_DFN) + { + if ((wrdcnt >= 2) && (indxs [wrdcnt - 1] != _error_DFN)) + pshtype = POINTER_DFN | s_DFN | indxs [wrdcnt - 1]; + else + fprintf (stderr ,"structure has unknown type (void *)\n"); + } + else + pshtype = typ [idx]; + + /* ###------------------------------------------------------### */ + /* depending on the kind of the first word of the command */ + /* activate actions : */ + /* - COMMAND (_top, _up, ...) */ + /* - POINTER */ + /* - for NEXT go forward until the Nth element of the */ + /* list. Then, push it on the stack and dispaly it */ + /* - for others push and display */ + /* - ARRAY */ + /* - push and display the Nth element of the array */ + /* ###------------------------------------------------------### */ + + switch (typ [idx] & KIND_DFN) + { + + case COMMAND_DFN : + switch (typ [idx] & TYPE_DFN) + { + /* ###------------------------------------------------------### */ + /* _top COMMAND : reset the stack pointer, call read_field */ + /* to read the structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _top_DFN : + stkpnt = 0; + dispflg = 1; + break; + + /* ###------------------------------------------------------### */ + /* _stop COMMAND : set the stop mark for the structure on */ + /* the top of stack */ + /* ###------------------------------------------------------### */ + + case _stop_DFN : + stk [stkpnt].mark = 1; + fprintf (stdout, "beh_debug : stop mark set\n"); + break; + + /* ###------------------------------------------------------### */ + /* _back COMMAND : pop structures from the stack until a */ + /* marked structure is found. Call read_field to read the */ + /* structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _back_DFN : + while ((stkpnt != 0) && (stk[--stkpnt].mark != 1)); + dispflg = 1; + break; + + /* ###------------------------------------------------------### */ + /* _jump COMMAND : push on the stack the structure saved in */ + /* the jump table. Call read_field to read the structure on the */ + /* top of stack */ + /* ###------------------------------------------------------### */ + + case _jump_DFN : + if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) + { + push (stk, &stkpnt, jtab[nmbrs[1]].data, jtab[nmbrs[1]].type); + dispflg = 1; + } + else + fprintf (stderr ,"unrecognized command\n"); + break; + + /* ###------------------------------------------------------### */ + /* _up COMMAND : pop structure from the stack. Call */ + /* read_field to read the structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _up_DFN : + if (wrdcnt == 1) + { + pop (&stkpnt, 1); + dispflg = 1; + } + else + { + if ((wrdcnt == 2) && (flags [1] == 1)) + { + pop (&stkpnt, nmbrs [1] + 1); + dispflg = 1; + } + else + fprintf (stderr ,"unrecognized command\n"); + } + break; + + /* ###------------------------------------------------------### */ + /* _save COMMAND : save the structure on the top of stack in */ + /* the jump table */ + /* ###------------------------------------------------------### */ + + case _save_DFN : + if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) + jtab [nmbrs[1]] = stk [stkpnt]; + else + fprintf (stderr ,"unrecognized command\n"); + break; + + /* ###------------------------------------------------------### */ + /* _display COMMAND : display a specified field as an */ + /* immediate */ + /* ###------------------------------------------------------### */ + + case _display_DFN : + if ((wrdcnt == 3) && (indxs [1] != _error_DFN)) + disp_immd (str, pnt [indxs [1]], indxs [2]); + else + fprintf (stderr ,"unrecognized command\n"); + break; + + } + break; + + case POINTER_DFN : + if (idx == next_DFN) + { + if ((wrdcnt == 1) || ((wrdcnt == 2) && (flags [1] == 0))) + { + push (stk, &stkpnt, pnt [idx].dat, pshtype); + dispflg = 1; + } + else + { + if (((wrdcnt == 3) || (wrdcnt == 2)) && (flags [1] == 1)) + { + pnt [idx].dat = (void *) goforward (pnt [idx].dat, nmbrs [1]); + push (stk, &stkpnt, pnt [idx].dat, pshtype); + dispflg = 1; + } + else + fprintf (stderr ,"unrecognized command\n"); + } + } + else + { + push (stk, &stkpnt, pnt [idx].dat, pshtype); + dispflg = 1; + } + break; + + case ARRAY_DFN : + if ((wrdcnt > 1) && (flags [1] == 1)) + { + size = siz [(typ [idx] & TYPE_DFN)]; + pntr = (void *) + (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); + push (stk, &stkpnt, pntr, pshtype); + dispflg = 1; + } + else + fprintf (stderr ,"unrecognized command\n"); + break; + + case ARYOFPNT_DFN : + if ((wrdcnt > 1) && (flags [1] == 1)) + { + size = sizeof (void *); + pntr = * (void **) + (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); + push (stk, &stkpnt, pntr, pshtype); + dispflg = 1; + } + else + fprintf (stderr ,"unrecognized command\n"); + break; + + } + + if (dispflg == 1) + { + dispflg = 0; + display (stk [stkpnt], pnt, typ, str); + } + + } + + printf ("\n\nCOMMAND > "); + + gets (line); + if (strcmp (line ,".")) + { + wrdcnt = splitline (words, line); + idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); + } + } + } diff --git a/alliance/src/boog/src/bog_lib_complete.c b/alliance/src/boog/src/bog_lib_complete.c index 3ee71ec4..91ea0577 100644 --- a/alliance/src/boog/src/bog_lib_complete.c +++ b/alliance/src/boog/src/bog_lib_complete.c @@ -28,6 +28,7 @@ */ +#include #include #include #include diff --git a/alliance/src/boog/src/bog_lib_matching.c b/alliance/src/boog/src/bog_lib_matching.c index 17e421b8..8595eafd 100644 --- a/alliance/src/boog/src/bog_lib_matching.c +++ b/alliance/src/boog/src/bog_lib_matching.c @@ -27,7 +27,7 @@ * Author : Francois Donnet */ - +#include #include #include #include diff --git a/alliance/src/boog/src/bog_lib_negativ.c b/alliance/src/boog/src/bog_lib_negativ.c index 06f6611c..e3a6b404 100644 --- a/alliance/src/boog/src/bog_lib_negativ.c +++ b/alliance/src/boog/src/bog_lib_negativ.c @@ -28,7 +28,7 @@ */ - +#include #include #include #include diff --git a/alliance/src/boog/src/bog_lib_specifications.c b/alliance/src/boog/src/bog_lib_specifications.c index ec1eee5c..113fcc09 100644 --- a/alliance/src/boog/src/bog_lib_specifications.c +++ b/alliance/src/boog/src/bog_lib_specifications.c @@ -28,6 +28,7 @@ */ +#include #include #include #include diff --git a/alliance/src/boog/src/bog_lib_utils.c b/alliance/src/boog/src/bog_lib_utils.c index 6ef4f49d..ce73f92c 100644 --- a/alliance/src/boog/src/bog_lib_utils.c +++ b/alliance/src/boog/src/bog_lib_utils.c @@ -28,7 +28,7 @@ */ - +#include #include #include #include diff --git a/alliance/src/boog/src/bog_main.c b/alliance/src/boog/src/bog_main.c index 57cbf08b..ff6a3337 100644 --- a/alliance/src/boog/src/bog_main.c +++ b/alliance/src/boog/src/bog_main.c @@ -27,7 +27,7 @@ */ - +#include #include #include #include diff --git a/alliance/src/boog/src/bog_map_adapt.c b/alliance/src/boog/src/bog_map_adapt.c index 1e64b94d..3f5e4477 100644 --- a/alliance/src/boog/src/bog_map_adapt.c +++ b/alliance/src/boog/src/bog_map_adapt.c @@ -27,7 +27,7 @@ * Author : Francois Donnet */ - +#include #include #include #include diff --git a/alliance/src/boog/src/bog_map_pattern.c b/alliance/src/boog/src/bog_map_pattern.c index 60ff91aa..e04a7782 100644 --- a/alliance/src/boog/src/bog_map_pattern.c +++ b/alliance/src/boog/src/bog_map_pattern.c @@ -37,6 +37,7 @@ # endif #endif +#include #include #include #include diff --git a/alliance/src/boog/src/bog_map_prepare.c b/alliance/src/boog/src/bog_map_prepare.c index b6058513..8648f9ff 100644 --- a/alliance/src/boog/src/bog_map_prepare.c +++ b/alliance/src/boog/src/bog_map_prepare.c @@ -27,7 +27,7 @@ * Author : Francois Donnet */ - +#include #include #include #include diff --git a/alliance/src/boog/src/bog_normalize_DAG.c b/alliance/src/boog/src/bog_normalize_DAG.c index e0e9f674..ada5f70a 100644 --- a/alliance/src/boog/src/bog_normalize_DAG.c +++ b/alliance/src/boog/src/bog_normalize_DAG.c @@ -29,6 +29,7 @@ #include +#include #include #include #include diff --git a/alliance/src/boog/src/bog_signal_delay.c b/alliance/src/boog/src/bog_signal_delay.c index 889644db..ae5171f7 100644 --- a/alliance/src/boog/src/bog_signal_delay.c +++ b/alliance/src/boog/src/bog_signal_delay.c @@ -29,6 +29,7 @@ #include +#include #include #include #include diff --git a/alliance/src/boog/src/bog_signal_utils.c b/alliance/src/boog/src/bog_signal_utils.c index 8f2ab5a4..e0b22554 100644 --- a/alliance/src/boog/src/bog_signal_utils.c +++ b/alliance/src/boog/src/bog_signal_utils.c @@ -29,7 +29,7 @@ - +#include #include #include #include diff --git a/alliance/src/boog/src/bog_unflatten_abl.c b/alliance/src/boog/src/bog_unflatten_abl.c index 01d845c7..cf36676f 100644 --- a/alliance/src/boog/src/bog_unflatten_abl.c +++ b/alliance/src/boog/src/bog_unflatten_abl.c @@ -27,7 +27,7 @@ * Author : Francois Donnet */ - +#include #include #include #include diff --git a/alliance/src/boog/src/bog_unflatten_area.c b/alliance/src/boog/src/bog_unflatten_area.c index d378fb76..f55b0c96 100644 --- a/alliance/src/boog/src/bog_unflatten_area.c +++ b/alliance/src/boog/src/bog_unflatten_area.c @@ -28,6 +28,7 @@ */ +#include #include #include #include diff --git a/alliance/src/boog/src/bog_unflatten_befig.c b/alliance/src/boog/src/bog_unflatten_befig.c index 477ef554..b6c2cfc4 100644 --- a/alliance/src/boog/src/bog_unflatten_befig.c +++ b/alliance/src/boog/src/bog_unflatten_befig.c @@ -30,6 +30,7 @@ #include +#include #include #include #include diff --git a/alliance/src/boog/src/bog_unflatten_delay.c b/alliance/src/boog/src/bog_unflatten_delay.c index 5034edd8..7aa7c0d7 100644 --- a/alliance/src/boog/src/bog_unflatten_delay.c +++ b/alliance/src/boog/src/bog_unflatten_delay.c @@ -29,7 +29,7 @@ - +#include #include #include #include diff --git a/alliance/src/boog/src/bog_unflatten_oper.c b/alliance/src/boog/src/bog_unflatten_oper.c index 522f4b10..9b1b6305 100644 --- a/alliance/src/boog/src/bog_unflatten_oper.c +++ b/alliance/src/boog/src/bog_unflatten_oper.c @@ -28,7 +28,7 @@ */ - +#include #include #include #include diff --git a/alliance/src/boog/src/bog_unflatten_utils.c b/alliance/src/boog/src/bog_unflatten_utils.c index 0308e677..794f8acc 100644 --- a/alliance/src/boog/src/bog_unflatten_utils.c +++ b/alliance/src/boog/src/bog_unflatten_utils.c @@ -37,6 +37,7 @@ # endif #endif +#include #include #include #include diff --git a/alliance/src/bvl/src/bvl_bcomp_l.l b/alliance/src/bvl/src/bvl_bcomp_l.l index 09cf000b..1d3c6d84 100644 --- a/alliance/src/bvl/src/bvl_bcomp_l.l +++ b/alliance/src/bvl/src/bvl_bcomp_l.l @@ -6,104 +6,6 @@ #include "bvl.h" #include "bvl_bcomp_y.h" -%} - -upper_case_letter [A-Z] -digit [0-9] -special_character [\#\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\_\|] -space_character [ \t] -format_effector [\t\v\r\l\f] -end_of_line \n -lower_case_letter [a-z] -other_special_character [\!\$\@\?\[\\\]\^\`\{\}\~] - -graphic_character ({basic_graphic_character}|{lower_case_letter}|{other_special_character}) -basic_graphic_character ({upper_case_letter}|{digit}|{special_character}|{space_character}) -letter ({upper_case_letter}|{lower_case_letter}) -letter_or_digit ({letter}|{digit}) -decimal_literal {integer}(\.{integer})?({exponent})? -integer {digit}(_?{digit})* -exponent ([eE][-+]?{integer}) -base {integer} -based_integer {extended_digit}(_?{extended_digit})* -extended_digit ({digit}|[a-fA-F]) -base_specifier (B|b|O|o|X|x) - -%% -[ \t] ; -\n { BEH_LINNUM++; } -\& { return (Ampersand ); } -\' { return (Apostrophe); } -\( { return (LeftParen ); } -\) { return (RightParen); } -"**" { return (DoubleStar); } -\* { return (Star ); } -\+ { return (Plus ); } -\, { return (Comma ); } -\- { return (Minus ); } -":=" { return (VarAsgn ); } -\: { return (Colon ); } -\; { return (Semicolon ); } -"<=" { return (_LESym ); } -">=" { return (_GESym ); } -\< { return (_LTSym ); } -\> { return (_GTSym ); } -= { return (_EQSym ); } -\/= { return (_NESym ); } -"=>" { return (Arrow ); } -"<>" { return (Box ); } -\| { return (Bar ); } -! { return (Bar ); } -\. { return (Dot ); } -\/ { return (Slash ); } - -{letter}(_?{letter_or_digit})* { - int itoken; - static int search (); - - itoken = search (yytext); - if (itoken == EMPTYHT) - { - yylval.text = namealloc (yytext); - return (Identifier); - } - else - { - return (itoken); - } - } -({decimal_literal})|({base}#{based_integer}(\.{based_integer})?#({exponent})?)|({base}:{based_integer}(\.{based_integer})?:({exponent})?) { - - yylval.text = mbkalloc ((unsigned int)strlen(yytext)+1); - strcpy (yylval.text, yytext); - return (AbstractLit); - } -'({graphic_character}|\"|\%)' { - yylval.text = namealloc (yytext); - return (CharacterLit); - } -(\"({graphic_character}|(\"\")|\%)*\")|(\%({graphic_character}|(\%\%)|\")*\%) { - yylval.text = namealloc (yytext); - return (StringLit); - } -{base_specifier}((\"{extended_digit}(_?{extended_digit})*\")|(\%{extended_digit}(_?{extended_digit})*\%)) { - yylval.text = namealloc (yytext); - return (BitStringLit); - } -\-\-.*$ ; -. { return (*yytext); } -%% - -/* ###--------------------------------------------------------------### */ -/* function : yywrap */ -/* description : return 1 */ -/* called func. : none */ -/* ###--------------------------------------------------------------### */ - -int yywrap () - { - return (1); - } /* ###--------------------------------------------------------------### */ /* function : search */ @@ -243,3 +145,102 @@ char *key; return (gethtitem (pt_hash, namealloc(key))); } + +%} + +upper_case_letter [A-Z] +digit [0-9] +special_character [\#\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\_\|] +space_character [ \t] +format_effector [\t\v\r\l\f] +end_of_line \n +lower_case_letter [a-z] +other_special_character [\!\$\@\?\[\\\]\^\`\{\}\~] + +graphic_character ({basic_graphic_character}|{lower_case_letter}|{other_special_character}) +basic_graphic_character ({upper_case_letter}|{digit}|{special_character}|{space_character}) +letter ({upper_case_letter}|{lower_case_letter}) +letter_or_digit ({letter}|{digit}) +decimal_literal {integer}(\.{integer})?({exponent})? +integer {digit}(_?{digit})* +exponent ([eE][-+]?{integer}) +base {integer} +based_integer {extended_digit}(_?{extended_digit})* +extended_digit ({digit}|[a-fA-F]) +base_specifier (B|b|O|o|X|x) + +%% +[ \t] ; +\n { BEH_LINNUM++; } +\& { return (Ampersand ); } +\' { return (Apostrophe); } +\( { return (LeftParen ); } +\) { return (RightParen); } +"**" { return (DoubleStar); } +\* { return (Star ); } +\+ { return (Plus ); } +\, { return (Comma ); } +\- { return (Minus ); } +":=" { return (VarAsgn ); } +\: { return (Colon ); } +\; { return (Semicolon ); } +"<=" { return (_LESym ); } +">=" { return (_GESym ); } +\< { return (_LTSym ); } +\> { return (_GTSym ); } += { return (_EQSym ); } +\/= { return (_NESym ); } +"=>" { return (Arrow ); } +"<>" { return (Box ); } +\| { return (Bar ); } +! { return (Bar ); } +\. { return (Dot ); } +\/ { return (Slash ); } + +{letter}(_?{letter_or_digit})* { + int itoken; + + itoken = search (yytext); + if (itoken == EMPTYHT) + { + yylval.text = namealloc (yytext); + return (Identifier); + } + else + { + return (itoken); + } + } +({decimal_literal})|({base}#{based_integer}(\.{based_integer})?#({exponent})?)|({base}:{based_integer}(\.{based_integer})?:({exponent})?) { + + yylval.text = mbkalloc ((unsigned int)strlen(yytext)+1); + strcpy (yylval.text, yytext); + return (AbstractLit); + } +'({graphic_character}|\"|\%)' { + yylval.text = namealloc (yytext); + return (CharacterLit); + } +(\"({graphic_character}|(\"\")|\%)*\")|(\%({graphic_character}|(\%\%)|\")*\%) { + yylval.text = namealloc (yytext); + return (StringLit); + } +{base_specifier}((\"{extended_digit}(_?{extended_digit})*\")|(\%{extended_digit}(_?{extended_digit})*\%)) { + yylval.text = namealloc (yytext); + return (BitStringLit); + } +\-\-.*$ ; +. { return (*yytext); } +%% + +/* ###--------------------------------------------------------------### */ +/* function : yywrap */ +/* description : return 1 */ +/* called func. : none */ +/* ###--------------------------------------------------------------### */ + +int yywrap () + { + return (1); + } + diff --git a/alliance/src/elp/src/Makefile b/alliance/src/elp/src/Makefile index d8ea0609..79ed72d8 100644 --- a/alliance/src/elp/src/Makefile +++ b/alliance/src/elp/src/Makefile @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. +# Makefile.in generated by automake 1.8.5 from Makefile.am. # elp/src/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -37,7 +37,7 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -host_triplet = i686-redhat-linux-gnu +host_triplet = i686-pc-linux-gnu subdir = elp/src DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in elp_l.c elp_y.c @@ -90,9 +90,9 @@ ALCBANNER_MINOR_VERSION = 1 ALCBANNER_VERSION = 1.1 ALLIANCE_BUILD_FALSE = # ALLIANCE_BUILD_TRUE = -ALLIANCE_CFLAGS = -I/dsk/l1/misc/hcl/altest/include -ALLIANCE_LIBS = -L/dsk/l1/misc/hcl/altest/lib -ALLIANCE_TOP = /dsk/l1/misc/hcl/altest +ALLIANCE_CFLAGS = -I/users/outil/alliance/Linux.FC2/include +ALLIANCE_LIBS = -L/users/outil/alliance/Linux.FC2/lib +ALLIANCE_TOP = /users/outil/alliance/Linux.FC2 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /dsk/l1/misc/hcl/alliance/src/missing --run tar @@ -121,9 +121,9 @@ BTR_DLL_VERSION = 1:3:0 BVL_DLL_VERSION = 1:14:0 CC = gcc CCDEPMODE = depmode=gcc3 -CFLAGS = -I/dsk/l1/misc/hcl/altest/include -g -O2 +CFLAGS = -I/users/outil/alliance/Linux.FC2/include -g -O2 CPP = gcc -E -CPPFLAGS = -I/dsk/l1/misc/hcl/albuild/dsk/l1/misc/hcl/altest/include +CPPFLAGS = CST_DLL_VERSION = 3:2:0 CTL_DLL_VERSION = 1:1:0 CTP_DLL_VERSION = 1:1:0 @@ -132,7 +132,7 @@ CXXCPP = g++ -E CXXDEPMODE = depmode=gcc3 CXXFLAGS = -g -O2 CYGPATH_W = echo -DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"alliance\" -DVERSION=\"5.0\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FCNTL_H=1 -DHAVE_MALLOC_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBIBERTY=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_UNISTD_H=1 -DHAVE_FORK=1 -DHAVE_VFORK=1 -DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DRETSIGTYPE=void -DHAVE_MOTIF=1 -DHAVE_XPM=1 -DHAVE_XPM=1 -DHAVE_X11_XPM_H=1 -DHAVE_XP=1 -DHAVE_MOTIF=1 -DHAVE_XMUSEVERSION=1 -DHAVE_XMINSTALLIMAGE=1 -DALLIANCE_VERSION=\"5.0\" -DALLIANCE_TOP=\"/dsk/l1/misc/hcl/altest\" -DHAVE_LIBIBERTY=1 +DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"alliance\" -DVERSION=\"5.0\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FCNTL_H=1 -DHAVE_MALLOC_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBIBERTY=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_UNISTD_H=1 -DHAVE_FORK=1 -DHAVE_VFORK=1 -DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DRETSIGTYPE=void -DHAVE_MOTIF=1 -DHAVE_XPM=1 -DHAVE_XPM=1 -DHAVE_X11_XPM_H=1 -DHAVE_XP=1 -DHAVE_MOTIF=1 -DHAVE_XMUSEVERSION=1 -DHAVE_XMINSTALLIMAGE=1 -DALLIANCE_VERSION=\"5.0\" -DALLIANCE_TOP=\"/users/outil/alliance/Linux.FC2\" -DHAVE_LIBIBERTY=1 DEPDIR = .deps DOC_MAJOR_VERSION = 1 DOC_MINOR_VERSION = 0 @@ -185,7 +185,7 @@ K2F_VERSION = 1.1 L2P_MAJOR_VERSION = 1 L2P_MINOR_VERSION = 12 L2P_VERSION = 1.12 -LDFLAGS = -L/dsk/l1/misc/hcl/altest/lib +LDFLAGS = -static -L/users/outil/alliance/Linux.FC2/lib LEX = flex LEXLIB = -lfl LEX_OUTPUT_ROOT = lex.yy @@ -295,7 +295,7 @@ STRIP = strip SYF_MAJOR_VERSION = 3 SYF_MINOR_VERSION = 6 SYF_VERSION = 3.6 -TOOLSDIRS = mbk mbkal mbkap mbkedif mbkhilo mbkmg mbkspice mbkvhdl mbkvrlog mbkvti mbkvhdlg aut rds rdscif rdsgds elp abl bdd log btr vex ctl ctp abe abt abv fsm fks fvh ftl rtn rtd scl vbh vbl vpn vpd vvh vtl pat ppt phl gcp druc beh bhl bvl alcban asimut attila b2f boog boom cells distrib documentation dreal exp flatbeh flatlo flatph fmi fsp genlib genpat graal growstk k2f l2p loon lvx lynx m2e mips_asm mocha nero ocp ocr pat2spi pcbs proof ring s2r scapin sea syf vasy vst2xnf x2y xfsm xpat xsch xvpn +TOOLSDIRS = mbk mbkal mbkap mbkedif mbkhilo mbkmg mbkspice mbkvhdl mbkvrlog mbkvti mbkvhdlg aut rds rdscif rdsgds elp abl bdd log btr vex ctl ctp abe abt abv fsm fks fvh ftl rtn rtd scl vbh vbl vpn vpd vvh vtl pat ppt phl gcp druc beh bhl bvl alcban asimut attila b2f boog boom cells distrib dreal exp flatbeh flatlo flatph fmi fsp genlib genpat graal k2f l2p loon lvx lynx m2e mips_asm mocha nero ocp pat2spi proof ring s2r scapin sea syf vasy vst2xnf x2y xfsm xpat xsch xvpn documentation VASY_MAJOR_VERSION = 1 VASY_MINOR_VERSION = 5 VASY_VERSION = 1.5 @@ -336,7 +336,7 @@ X_PRE_LIBS = -lSM -lICE YACC = bison -y ac_ct_AR = ar ac_ct_CC = gcc -ac_ct_CXX = +ac_ct_CXX = g++ ac_ct_F77 = g77 ac_ct_RANLIB = ranlib ac_ct_STRIP = strip @@ -348,18 +348,18 @@ am__include = include am__leading_dot = . am__quote = bindir = ${exec_prefix}/bin -build = i686-redhat-linux-gnu +build = i686-pc-linux-gnu build_alias = build_cpu = i686 build_os = linux-gnu -build_vendor = redhat +build_vendor = pc datadir = ${prefix}/share exec_prefix = ${prefix} -host = i686-redhat-linux-gnu +host = i686-pc-linux-gnu host_alias = host_cpu = i686 host_os = linux-gnu -host_vendor = redhat +host_vendor = pc includedir = ${prefix}/include infodir = ${prefix}/info install_sh = /dsk/l1/misc/hcl/alliance/src/install-sh @@ -439,7 +439,7 @@ clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" = "$$p" && dir=.; \ + test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done @@ -553,9 +553,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) diff --git a/alliance/src/flatbeh/src/abstract.c b/alliance/src/flatbeh/src/abstract.c index 8542e643..41f8f14c 100644 --- a/alliance/src/flatbeh/src/abstract.c +++ b/alliance/src/flatbeh/src/abstract.c @@ -21,6 +21,8 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include +#include #include #include #include diff --git a/alliance/src/flatbeh/src/main.c b/alliance/src/flatbeh/src/main.c index cee27c36..49d1f2c3 100644 --- a/alliance/src/flatbeh/src/main.c +++ b/alliance/src/flatbeh/src/main.c @@ -35,6 +35,7 @@ /* */ /****************************************************************************/ #include +#include #include #include #include diff --git a/alliance/src/flatlo/src/flatlo.c b/alliance/src/flatlo/src/flatlo.c index 73705674..3c34e1fe 100644 --- a/alliance/src/flatlo/src/flatlo.c +++ b/alliance/src/flatlo/src/flatlo.c @@ -21,8 +21,10 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ident "$Id: flatlo.c,v 1.2 2002/09/30 16:20:13 czo Exp $" +#ident "$Id: flatlo.c,v 1.3 2005/05/11 08:05:32 hcl Exp $" #include +#include +#include #include "mut.h" #include "mlo.h" diff --git a/alliance/src/gcp/src/c_ccomp.y b/alliance/src/gcp/src/c_ccomp.y index b28b4527..906223c7 100644 --- a/alliance/src/gcp/src/c_ccomp.y +++ b/alliance/src/gcp/src/c_ccomp.y @@ -82,6 +82,7 @@ State 434 contains 2 shift/reduce conflicts. (Four ways to parse this.) */ %{ #include +#include #include #include @@ -102,7 +103,6 @@ State 434 contains 2 shift/reduce conflicts. (Four ways to parse this.) */ # include "c_debug.h" #ifdef MULTIBYTE_CHARS -#include #include #endif diff --git a/alliance/src/gcp/src/c_cdecl.c b/alliance/src/gcp/src/c_cdecl.c index 97a78659..3ec84ee8 100644 --- a/alliance/src/gcp/src/c_cdecl.c +++ b/alliance/src/gcp/src/c_cdecl.c @@ -42,6 +42,7 @@ \------------------------------------------------------------*/ # include +# include # include # include "mut.h" diff --git a/alliance/src/gcp/src/c_convert.c b/alliance/src/gcp/src/c_convert.c index dbc393b4..4f45f298 100644 --- a/alliance/src/gcp/src/c_convert.c +++ b/alliance/src/gcp/src/c_convert.c @@ -42,6 +42,7 @@ \------------------------------------------------------------*/ # include +# include # include "mut.h" # include "aut.h" diff --git a/alliance/src/gcp/src/c_ctypeck.c b/alliance/src/gcp/src/c_ctypeck.c index 8cb301a6..e669129f 100644 --- a/alliance/src/gcp/src/c_ctypeck.c +++ b/alliance/src/gcp/src/c_ctypeck.c @@ -42,6 +42,7 @@ \------------------------------------------------------------*/ # include +# include # include # include "mut.h" diff --git a/alliance/src/gcp/src/c_foldconst.c b/alliance/src/gcp/src/c_foldconst.c index 9ce11244..3c2814d9 100644 --- a/alliance/src/gcp/src/c_foldconst.c +++ b/alliance/src/gcp/src/c_foldconst.c @@ -42,6 +42,7 @@ \------------------------------------------------------------*/ # include +# include # include # include "mut.h" diff --git a/alliance/src/genlib/src/dpgen_ROM_code.y b/alliance/src/genlib/src/dpgen_ROM_code.y index 603219b1..42b7da39 100644 --- a/alliance/src/genlib/src/dpgen_ROM_code.y +++ b/alliance/src/genlib/src/dpgen_ROM_code.y @@ -6,6 +6,7 @@ %{ #include +#include #include #include #include diff --git a/alliance/src/genpat/src/Makefile b/alliance/src/genpat/src/Makefile index 46e5a74b..51fe5cc8 100644 --- a/alliance/src/genpat/src/Makefile +++ b/alliance/src/genpat/src/Makefile @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. +# Makefile.in generated by automake 1.8.5 from Makefile.am. # genpat/src/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -38,7 +38,7 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -host_triplet = i686-redhat-linux-gnu +host_triplet = i686-pc-linux-gnu subdir = genpat/src DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -94,9 +94,9 @@ ALCBANNER_MINOR_VERSION = 1 ALCBANNER_VERSION = 1.1 ALLIANCE_BUILD_FALSE = # ALLIANCE_BUILD_TRUE = -ALLIANCE_CFLAGS = -I/dsk/l1/misc/hcl/altest/include -ALLIANCE_LIBS = -L/dsk/l1/misc/hcl/altest/lib -ALLIANCE_TOP = /dsk/l1/misc/hcl/altest +ALLIANCE_CFLAGS = -I/users/outil/alliance/Linux.FC2/include +ALLIANCE_LIBS = -L/users/outil/alliance/Linux.FC2/lib +ALLIANCE_TOP = /users/outil/alliance/Linux.FC2 AMDEP_FALSE = # AMDEP_TRUE = AMTAR = ${SHELL} /dsk/l1/misc/hcl/alliance/src/missing --run tar @@ -125,9 +125,9 @@ BTR_DLL_VERSION = 1:3:0 BVL_DLL_VERSION = 1:14:0 CC = gcc CCDEPMODE = depmode=gcc3 -CFLAGS = -I/dsk/l1/misc/hcl/altest/include -g -O2 +CFLAGS = -I/users/outil/alliance/Linux.FC2/include -g -O2 CPP = gcc -E -CPPFLAGS = -I/dsk/l1/misc/hcl/albuild/dsk/l1/misc/hcl/altest/include +CPPFLAGS = CST_DLL_VERSION = 3:2:0 CTL_DLL_VERSION = 1:1:0 CTP_DLL_VERSION = 1:1:0 @@ -136,7 +136,7 @@ CXXCPP = g++ -E CXXDEPMODE = depmode=gcc3 CXXFLAGS = -g -O2 CYGPATH_W = echo -DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"alliance\" -DVERSION=\"5.0\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FCNTL_H=1 -DHAVE_MALLOC_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBIBERTY=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_UNISTD_H=1 -DHAVE_FORK=1 -DHAVE_VFORK=1 -DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DRETSIGTYPE=void -DHAVE_MOTIF=1 -DHAVE_XPM=1 -DHAVE_XPM=1 -DHAVE_X11_XPM_H=1 -DHAVE_XP=1 -DHAVE_MOTIF=1 -DHAVE_XMUSEVERSION=1 -DHAVE_XMINSTALLIMAGE=1 -DALLIANCE_VERSION=\"5.0\" -DALLIANCE_TOP=\"/dsk/l1/misc/hcl/altest\" -DHAVE_LIBIBERTY=1 +DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"alliance\" -DVERSION=\"5.0\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FCNTL_H=1 -DHAVE_MALLOC_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBIBERTY=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_LIBM=1 -DHAVE_UNISTD_H=1 -DHAVE_FORK=1 -DHAVE_VFORK=1 -DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DRETSIGTYPE=void -DHAVE_MOTIF=1 -DHAVE_XPM=1 -DHAVE_XPM=1 -DHAVE_X11_XPM_H=1 -DHAVE_XP=1 -DHAVE_MOTIF=1 -DHAVE_XMUSEVERSION=1 -DHAVE_XMINSTALLIMAGE=1 -DALLIANCE_VERSION=\"5.0\" -DALLIANCE_TOP=\"/users/outil/alliance/Linux.FC2\" -DHAVE_LIBIBERTY=1 DEPDIR = .deps DOC_MAJOR_VERSION = 1 DOC_MINOR_VERSION = 0 @@ -189,7 +189,7 @@ K2F_VERSION = 1.1 L2P_MAJOR_VERSION = 1 L2P_MINOR_VERSION = 12 L2P_VERSION = 1.12 -LDFLAGS = -L/dsk/l1/misc/hcl/altest/lib +LDFLAGS = -static -L/users/outil/alliance/Linux.FC2/lib LEX = flex LEXLIB = -lfl LEX_OUTPUT_ROOT = lex.yy @@ -299,7 +299,7 @@ STRIP = strip SYF_MAJOR_VERSION = 3 SYF_MINOR_VERSION = 6 SYF_VERSION = 3.6 -TOOLSDIRS = mbk mbkal mbkap mbkedif mbkhilo mbkmg mbkspice mbkvhdl mbkvrlog mbkvti mbkvhdlg aut rds rdscif rdsgds elp abl bdd log btr vex ctl ctp abe abt abv fsm fks fvh ftl rtn rtd scl vbh vbl vpn vpd vvh vtl pat ppt phl gcp druc beh bhl bvl alcban asimut attila b2f boog boom cells distrib documentation dreal exp flatbeh flatlo flatph fmi fsp genlib genpat graal growstk k2f l2p loon lvx lynx m2e mips_asm mocha nero ocp ocr pat2spi pcbs proof ring s2r scapin sea syf vasy vst2xnf x2y xfsm xpat xsch xvpn +TOOLSDIRS = mbk mbkal mbkap mbkedif mbkhilo mbkmg mbkspice mbkvhdl mbkvrlog mbkvti mbkvhdlg aut rds rdscif rdsgds elp abl bdd log btr vex ctl ctp abe abt abv fsm fks fvh ftl rtn rtd scl vbh vbl vpn vpd vvh vtl pat ppt phl gcp druc beh bhl bvl alcban asimut attila b2f boog boom cells distrib dreal exp flatbeh flatlo flatph fmi fsp genlib genpat graal k2f l2p loon lvx lynx m2e mips_asm mocha nero ocp pat2spi proof ring s2r scapin sea syf vasy vst2xnf x2y xfsm xpat xsch xvpn documentation VASY_MAJOR_VERSION = 1 VASY_MINOR_VERSION = 5 VASY_VERSION = 1.5 @@ -340,7 +340,7 @@ X_PRE_LIBS = -lSM -lICE YACC = bison -y ac_ct_AR = ar ac_ct_CC = gcc -ac_ct_CXX = +ac_ct_CXX = g++ ac_ct_F77 = g77 ac_ct_RANLIB = ranlib ac_ct_STRIP = strip @@ -352,18 +352,18 @@ am__include = include am__leading_dot = . am__quote = bindir = ${exec_prefix}/bin -build = i686-redhat-linux-gnu +build = i686-pc-linux-gnu build_alias = build_cpu = i686 build_os = linux-gnu -build_vendor = redhat +build_vendor = pc datadir = ${prefix}/share exec_prefix = ${prefix} -host = i686-redhat-linux-gnu +host = i686-pc-linux-gnu host_alias = host_cpu = i686 host_os = linux-gnu -host_vendor = redhat +host_vendor = pc includedir = ${prefix}/include infodir = ${prefix}/info install_sh = /dsk/l1/misc/hcl/alliance/src/install-sh @@ -450,7 +450,7 @@ clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" = "$$p" && dir=.; \ + test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done @@ -566,9 +566,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) diff --git a/alliance/src/ocp/src/placer/PPlacement.h b/alliance/src/ocp/src/placer/PPlacement.h index a07f88a4..3d46abc0 100644 --- a/alliance/src/ocp/src/placer/PPlacement.h +++ b/alliance/src/ocp/src/placer/PPlacement.h @@ -32,7 +32,7 @@ #include #else #include -#if __GNUC_MINOR__ == 0 +#if (__GNUC_MINOR__ == 0) and (__GNUC__ == 3) #else using namespace __gnu_cxx; // GCC 3.1 and later #endif diff --git a/alliance/src/phl/src/pat_debug.c b/alliance/src/phl/src/pat_debug.c index 8bdf918a..2b44bbd3 100644 --- a/alliance/src/phl/src/pat_debug.c +++ b/alliance/src/phl/src/pat_debug.c @@ -34,340 +34,6 @@ #include "pat.h" #include "pat_debug.h" -/* ###--------------------------------------------------------------### */ -/* function : pat_debug */ -/* description : display any pat structure */ -/* called func. : pat_error, pat_message */ -/* go_forward, translate, splitline, pop, push */ -/* read_field, get_size */ -/* ###--------------------------------------------------------------### */ - -void pat_debug (head_pnt, type) - -void *head_pnt; /* structure's pointer */ -char *type; /* structure's type */ - - { - static void disp_immd (); - static void get_size (); - static void read_field (); - static void push (); - static void pop (); - static struct chain *go_forward (); - static int translate (); - static int splitline (); - - char line [128]; /* buffer to read a cmd line */ - char buffer [128]; /* buffer to split the cmd line */ - - char *words [ 10]; /* number of words on a line */ - int nmbrs [ 10]; /* words translated into number */ - char flags [ 10]; /* set if words is a number */ - int indxs [ 10]; /* index of words */ - - struct stack jtab [ 10]; /* list of memorized addresses */ - int idx; - int readflg = 0; - unsigned int size; - char *pntr = NULL; - long pshtype; - int wrdcnt = 1; - - struct stack stk [STKSIZ_DFN]; - int stkpnt = -1; - - union value pnt [MAXCMD_DFN]; - long typ [MAXCMD_DFN]; - unsigned int siz [MAXCMD_DFN]; - - static char *str [] = { - "_back" , "_exit" , "_jump" , "_save" , - "_stop" , "_top" , "_up" , "_display" , - - "character", "short" , "integer" , "long" , - "void" , "string" , - - "chain" , "ptype" , - - "paseq" , "pagrp" , "paiol" , "papat" , - "pacom" , "paini" , "paevt" , "pains" , - - "actflag" , "blank" , "buffer" , "curcom" , - "curpat" , "deccom" , "drvseq" , "endflg" , - "errflg" , "filname" , "filpnt" , "findex" , - "flag" , "format" , "index" , "insname" , - "instance" , "iolnbr" , "label" , "length" , - "line" , "lineno" , "mode" , "model" , - "name" , "next" , "nxtpat" , "oldcom" , - "oldpat" , "patnbr" , "position" , "savflg" , - "sig" , "simflag" , "simval" , "subseq" , - "text" , "time" , "usrval" , "value" , - "flags" , "time_unit", "time_step" - }; - - /* ###------------------------------------------------------### */ - /* initialisation : */ - /* - allocate a buffer for read words */ - /* - break the argument that identifies the structure (type) */ - /* into words */ - /* - search that words among recognized strings */ - /* ###------------------------------------------------------### */ - - words [0] = buffer; - get_size (siz); - - wrdcnt = splitline (words, type); - idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); - - typ [idx] = POINTER_DFN | s_DFN | idx; - pnt [idx].dat = head_pnt; - - /* ###------------------------------------------------------### */ - /* process the command line until the _exit command */ - /* ###------------------------------------------------------### */ - - while ((idx & TYPE_DFN) != _exit_DFN) - { - /* ###------------------------------------------------------### */ - /* if the first word of the line has not been recognized, */ - /* print an error message. Otherwise, proccess the command line */ - /* (generally it is a request for displaying a specific field). */ - /* */ - /* At this point : */ - /* - pnt [] contains all available pointers */ - /* - typ [] contains the type of availabale pointers */ - /* ###------------------------------------------------------### */ - - if (idx == _error_DFN) - pat_error (103, NULL, NULL, 0); - else - { - - /* ###------------------------------------------------------### */ - /* define the type of the structure that may be pushed on */ - /* the stack : */ - /* - if the pointer is a VOID pointer the exact type must be */ - /* defined on the command line (last word of the command) */ - /* ###------------------------------------------------------### */ - - pshtype = POINTER_DFN | s_DFN | void_DFN; - if ((typ [idx] & TYPE_DFN) == void_DFN) - { - if ((wrdcnt >= 2) && (indxs [wrdcnt - 1] != _error_DFN)) - pshtype = POINTER_DFN | s_DFN | indxs [wrdcnt - 1]; - else - pat_error (105, NULL, NULL, 0); - } - else - pshtype = typ [idx]; - - /* ###------------------------------------------------------### */ - /* depending on the kind of the first word of the command */ - /* activate actions : */ - /* - COMMAND (_top, _up, ...) */ - /* - POINTER */ - /* - for NEXT go forward until the Nth element of the */ - /* list. Then, push it on the stack and read fields */ - /* - for others push and read fields */ - /* - ARRAY */ - /* - push the Nth element of the array and read its */ - /* fields */ - /* - ARRAY OF POINTER */ - /* - push the object which address is the Nth element of */ - /* the array and read its fields */ - /* ###------------------------------------------------------### */ - - switch (typ [idx] & KIND_DFN) - { - - /* ###------------------------------------------------------### */ - /* COMMANDS ... */ - /* ###------------------------------------------------------### */ - - case COMMAND_DFN : - - switch (typ [idx] & TYPE_DFN) - { - /* ###------------------------------------------------------### */ - /* _top COMMAND : reset the stack pointer, call read_field */ - /* to read the structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _top_DFN : - stkpnt = 0; - readflg = 1; - break; - - /* ###------------------------------------------------------### */ - /* _stop COMMAND : set the stop mark for the structure on */ - /* the top of stack */ - /* ###------------------------------------------------------### */ - - case _stop_DFN : - stk [stkpnt].mark = 1; - pat_message (1, "pat_debug", NULL, 0); - break; - - /* ###------------------------------------------------------### */ - /* _back COMMAND : pop structures from the stack until a */ - /* marked structure is found. Call read_field to read the */ - /* structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _back_DFN : - while ((stkpnt != 0) && (stk[--stkpnt].mark != 1)); - readflg = 1; - break; - - /* ###------------------------------------------------------### */ - /* _jump COMMAND : push on the stack the structure saved in */ - /* the jump table. Call read_field to read the structure on the */ - /* top of stack */ - /* ###------------------------------------------------------### */ - - case _jump_DFN : - if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) - { - push (stk, &stkpnt, jtab[nmbrs[1]].data, jtab[nmbrs[1]].type); - readflg = 1; - } - else - pat_error (103, NULL, NULL, 0); - break; - - /* ###------------------------------------------------------### */ - /* _up COMMAND : pop structure from the stack. Call */ - /* read_field to read the structure on the top of stack */ - /* ###------------------------------------------------------### */ - - case _up_DFN : - if (wrdcnt == 1) - { - pop (&stkpnt, 1); - readflg = 1; - } - else - { - if ((wrdcnt == 2) && (flags [1] == 1)) - { - pop (&stkpnt, nmbrs [1] + 1); - readflg = 1; - } - else - pat_error (103, NULL, NULL, 0); - } - break; - - /* ###------------------------------------------------------### */ - /* _save COMMAND : save the structure on the top of stack in */ - /* the jump table */ - /* ###------------------------------------------------------### */ - - case _save_DFN : - if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) - jtab [nmbrs[1]] = stk [stkpnt]; - else - pat_error (103, NULL, NULL, 0); - break; - - /* ###------------------------------------------------------### */ - /* _display COMMAND : display a specified field as an */ - /* immediate */ - /* ###------------------------------------------------------### */ - - case _display_DFN : - if ((wrdcnt == 3) && (indxs [1] != _error_DFN)) - disp_immd (str, pnt [indxs [1]], indxs [2]); - else - pat_error (103, NULL, NULL, 0); - break; - - } - break; - - /* ###------------------------------------------------------### */ - /* POINTERS ... */ - /* ###------------------------------------------------------### */ - - case POINTER_DFN : - if (idx == next_DFN) - { - if ((wrdcnt == 1) || ((wrdcnt == 2) && (flags [1] == 0))) - { - push (stk, &stkpnt, pnt [idx].dat, pshtype); - readflg = 1; - } - else - { - if (((wrdcnt == 3) || (wrdcnt == 2)) && (flags [1] == 1)) - { - pnt [idx].dat = (void *) go_forward (pnt [idx].dat, nmbrs [1]); - push (stk, &stkpnt, pnt [idx].dat, pshtype); - readflg = 1; - } - else - pat_error (103, NULL, NULL, 0); - } - } - else - { - push (stk, &stkpnt, pnt [idx].dat, pshtype); - readflg = 1; - } - break; - - /* ###------------------------------------------------------### */ - /* ARRAIES of structure */ - /* ###------------------------------------------------------### */ - - case ARRAY_DFN : - if ((wrdcnt > 1) && (flags [1] == 1)) - { - size = siz [(typ [idx] & TYPE_DFN)]; - pntr = (void *) - (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); - push (stk, &stkpnt, pntr, pshtype); - readflg = 1; - } - else - pat_error (103, NULL, NULL, 0); - break; - - /* ###------------------------------------------------------### */ - /* ARRAIES of pointers */ - /* ###------------------------------------------------------### */ - - case ARYOFPNT_DFN : - if ((wrdcnt > 1) && (flags [1] == 1)) - { - size = sizeof (void *); - pntr = * (void **) - (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); - push (stk, &stkpnt, pntr, pshtype); - readflg = 1; - } - else - pat_error (103, NULL, NULL, 0); - break; - - } - - if (readflg == 1) - { - readflg = 0; - read_field (stk [stkpnt], pnt, typ, str); - } - - } - - printf ("\n\nCOMMAND > "); - - gets (line); - wrdcnt = splitline (words, line); - idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); - } - - } /* ###--------------------------------------------------------------### */ /* function : read_field */ @@ -1010,3 +676,332 @@ int type ; pat_error (103, NULL, NULL, 0); } } + + +/* ###--------------------------------------------------------------### */ +/* function : pat_debug */ +/* description : display any pat structure */ +/* called func. : pat_error, pat_message */ +/* go_forward, translate, splitline, pop, push */ +/* read_field, get_size */ +/* ###--------------------------------------------------------------### */ + +void pat_debug (head_pnt, type) + +void *head_pnt; /* structure's pointer */ +char *type; /* structure's type */ + + { + + char line [128]; /* buffer to read a cmd line */ + char buffer [128]; /* buffer to split the cmd line */ + + char *words [ 10]; /* number of words on a line */ + int nmbrs [ 10]; /* words translated into number */ + char flags [ 10]; /* set if words is a number */ + int indxs [ 10]; /* index of words */ + + struct stack jtab [ 10]; /* list of memorized addresses */ + int idx; + int readflg = 0; + unsigned int size; + char *pntr = NULL; + long pshtype; + int wrdcnt = 1; + + struct stack stk [STKSIZ_DFN]; + int stkpnt = -1; + + union value pnt [MAXCMD_DFN]; + long typ [MAXCMD_DFN]; + unsigned int siz [MAXCMD_DFN]; + + static char *str [] = { + "_back" , "_exit" , "_jump" , "_save" , + "_stop" , "_top" , "_up" , "_display" , + + "character", "short" , "integer" , "long" , + "void" , "string" , + + "chain" , "ptype" , + + "paseq" , "pagrp" , "paiol" , "papat" , + "pacom" , "paini" , "paevt" , "pains" , + + "actflag" , "blank" , "buffer" , "curcom" , + "curpat" , "deccom" , "drvseq" , "endflg" , + "errflg" , "filname" , "filpnt" , "findex" , + "flag" , "format" , "index" , "insname" , + "instance" , "iolnbr" , "label" , "length" , + "line" , "lineno" , "mode" , "model" , + "name" , "next" , "nxtpat" , "oldcom" , + "oldpat" , "patnbr" , "position" , "savflg" , + "sig" , "simflag" , "simval" , "subseq" , + "text" , "time" , "usrval" , "value" , + "flags" , "time_unit", "time_step" + }; + + /* ###------------------------------------------------------### */ + /* initialisation : */ + /* - allocate a buffer for read words */ + /* - break the argument that identifies the structure (type) */ + /* into words */ + /* - search that words among recognized strings */ + /* ###------------------------------------------------------### */ + + words [0] = buffer; + get_size (siz); + + wrdcnt = splitline (words, type); + idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); + + typ [idx] = POINTER_DFN | s_DFN | idx; + pnt [idx].dat = head_pnt; + + /* ###------------------------------------------------------### */ + /* process the command line until the _exit command */ + /* ###------------------------------------------------------### */ + + while ((idx & TYPE_DFN) != _exit_DFN) + { + /* ###------------------------------------------------------### */ + /* if the first word of the line has not been recognized, */ + /* print an error message. Otherwise, proccess the command line */ + /* (generally it is a request for displaying a specific field). */ + /* */ + /* At this point : */ + /* - pnt [] contains all available pointers */ + /* - typ [] contains the type of availabale pointers */ + /* ###------------------------------------------------------### */ + + if (idx == _error_DFN) + pat_error (103, NULL, NULL, 0); + else + { + + /* ###------------------------------------------------------### */ + /* define the type of the structure that may be pushed on */ + /* the stack : */ + /* - if the pointer is a VOID pointer the exact type must be */ + /* defined on the command line (last word of the command) */ + /* ###------------------------------------------------------### */ + + pshtype = POINTER_DFN | s_DFN | void_DFN; + if ((typ [idx] & TYPE_DFN) == void_DFN) + { + if ((wrdcnt >= 2) && (indxs [wrdcnt - 1] != _error_DFN)) + pshtype = POINTER_DFN | s_DFN | indxs [wrdcnt - 1]; + else + pat_error (105, NULL, NULL, 0); + } + else + pshtype = typ [idx]; + + /* ###------------------------------------------------------### */ + /* depending on the kind of the first word of the command */ + /* activate actions : */ + /* - COMMAND (_top, _up, ...) */ + /* - POINTER */ + /* - for NEXT go forward until the Nth element of the */ + /* list. Then, push it on the stack and read fields */ + /* - for others push and read fields */ + /* - ARRAY */ + /* - push the Nth element of the array and read its */ + /* fields */ + /* - ARRAY OF POINTER */ + /* - push the object which address is the Nth element of */ + /* the array and read its fields */ + /* ###------------------------------------------------------### */ + + switch (typ [idx] & KIND_DFN) + { + + /* ###------------------------------------------------------### */ + /* COMMANDS ... */ + /* ###------------------------------------------------------### */ + + case COMMAND_DFN : + + switch (typ [idx] & TYPE_DFN) + { + /* ###------------------------------------------------------### */ + /* _top COMMAND : reset the stack pointer, call read_field */ + /* to read the structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _top_DFN : + stkpnt = 0; + readflg = 1; + break; + + /* ###------------------------------------------------------### */ + /* _stop COMMAND : set the stop mark for the structure on */ + /* the top of stack */ + /* ###------------------------------------------------------### */ + + case _stop_DFN : + stk [stkpnt].mark = 1; + pat_message (1, "pat_debug", NULL, 0); + break; + + /* ###------------------------------------------------------### */ + /* _back COMMAND : pop structures from the stack until a */ + /* marked structure is found. Call read_field to read the */ + /* structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _back_DFN : + while ((stkpnt != 0) && (stk[--stkpnt].mark != 1)); + readflg = 1; + break; + + /* ###------------------------------------------------------### */ + /* _jump COMMAND : push on the stack the structure saved in */ + /* the jump table. Call read_field to read the structure on the */ + /* top of stack */ + /* ###------------------------------------------------------### */ + + case _jump_DFN : + if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) + { + push (stk, &stkpnt, jtab[nmbrs[1]].data, jtab[nmbrs[1]].type); + readflg = 1; + } + else + pat_error (103, NULL, NULL, 0); + break; + + /* ###------------------------------------------------------### */ + /* _up COMMAND : pop structure from the stack. Call */ + /* read_field to read the structure on the top of stack */ + /* ###------------------------------------------------------### */ + + case _up_DFN : + if (wrdcnt == 1) + { + pop (&stkpnt, 1); + readflg = 1; + } + else + { + if ((wrdcnt == 2) && (flags [1] == 1)) + { + pop (&stkpnt, nmbrs [1] + 1); + readflg = 1; + } + else + pat_error (103, NULL, NULL, 0); + } + break; + + /* ###------------------------------------------------------### */ + /* _save COMMAND : save the structure on the top of stack in */ + /* the jump table */ + /* ###------------------------------------------------------### */ + + case _save_DFN : + if ((wrdcnt == 2) && (flags [1] == 1) && (nmbrs [1] < 10)) + jtab [nmbrs[1]] = stk [stkpnt]; + else + pat_error (103, NULL, NULL, 0); + break; + + /* ###------------------------------------------------------### */ + /* _display COMMAND : display a specified field as an */ + /* immediate */ + /* ###------------------------------------------------------### */ + + case _display_DFN : + if ((wrdcnt == 3) && (indxs [1] != _error_DFN)) + disp_immd (str, pnt [indxs [1]], indxs [2]); + else + pat_error (103, NULL, NULL, 0); + break; + + } + break; + + /* ###------------------------------------------------------### */ + /* POINTERS ... */ + /* ###------------------------------------------------------### */ + + case POINTER_DFN : + if (idx == next_DFN) + { + if ((wrdcnt == 1) || ((wrdcnt == 2) && (flags [1] == 0))) + { + push (stk, &stkpnt, pnt [idx].dat, pshtype); + readflg = 1; + } + else + { + if (((wrdcnt == 3) || (wrdcnt == 2)) && (flags [1] == 1)) + { + pnt [idx].dat = (void *) go_forward (pnt [idx].dat, nmbrs [1]); + push (stk, &stkpnt, pnt [idx].dat, pshtype); + readflg = 1; + } + else + pat_error (103, NULL, NULL, 0); + } + } + else + { + push (stk, &stkpnt, pnt [idx].dat, pshtype); + readflg = 1; + } + break; + + /* ###------------------------------------------------------### */ + /* ARRAIES of structure */ + /* ###------------------------------------------------------### */ + + case ARRAY_DFN : + if ((wrdcnt > 1) && (flags [1] == 1)) + { + size = siz [(typ [idx] & TYPE_DFN)]; + pntr = (void *) + (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); + push (stk, &stkpnt, pntr, pshtype); + readflg = 1; + } + else + pat_error (103, NULL, NULL, 0); + break; + + /* ###------------------------------------------------------### */ + /* ARRAIES of pointers */ + /* ###------------------------------------------------------### */ + + case ARYOFPNT_DFN : + if ((wrdcnt > 1) && (flags [1] == 1)) + { + size = sizeof (void *); + pntr = * (void **) + (((unsigned int) pnt [idx].dat) + (size * nmbrs [1])); + push (stk, &stkpnt, pntr, pshtype); + readflg = 1; + } + else + pat_error (103, NULL, NULL, 0); + break; + + } + + if (readflg == 1) + { + readflg = 0; + read_field (stk [stkpnt], pnt, typ, str); + } + + } + + printf ("\n\nCOMMAND > "); + + gets (line); + wrdcnt = splitline (words, line); + idx = translate (words, wrdcnt, str, nmbrs, flags, indxs); + } + + } + diff --git a/alliance/src/phl/src/pat_getusage.c b/alliance/src/phl/src/pat_getusage.c index f84691a6..2d4010bc 100644 --- a/alliance/src/phl/src/pat_getusage.c +++ b/alliance/src/phl/src/pat_getusage.c @@ -30,6 +30,7 @@ /* ###--------------------------------------------------------------### */ #include +#include #include "pat.h" #include "phl.h" diff --git a/alliance/src/ppt/src/pat_decl_l.l b/alliance/src/ppt/src/pat_decl_l.l index 6dd1f398..40449cd4 100644 --- a/alliance/src/ppt/src/pat_decl_l.l +++ b/alliance/src/ppt/src/pat_decl_l.l @@ -51,6 +51,44 @@ extern int yynerrs; FIN LUDO */ +/* ###--------------------------------------------------------------### */ +/* function : lcl_search */ +/* description : check that an identifier is a reserved word or not */ +/* called func. : addht, addhtitem, gethtitem, namealloc */ +/* ###--------------------------------------------------------------### */ + +static int lcl_search (key) + +char *key; + + { + static ht *pt_hash = NULL; + + if (pt_hash == NULL) + { + pt_hash = addht (32); + + addhtitem (pt_hash, namealloc ("begin" ), BEGIN_ ); + addhtitem (pt_hash, namealloc ("downto" ), DOWNTO ); + addhtitem (pt_hash, namealloc ("end" ), END_ ); + addhtitem (pt_hash, namealloc ("fs" ), FS ); + addhtitem (pt_hash, namealloc ("in" ), _IN ); + addhtitem (pt_hash, namealloc ("inout" ), _INOUT ); + addhtitem (pt_hash, namealloc ("inspect" ), INSPECT ); + addhtitem (pt_hash, namealloc ("ms" ), MS ); + addhtitem (pt_hash, namealloc ("ns" ), NS ); + addhtitem (pt_hash, namealloc ("ps" ), PS ); + addhtitem (pt_hash, namealloc ("out" ), _OUT ); + addhtitem (pt_hash, namealloc ("register"), REGISTER); + addhtitem (pt_hash, namealloc ("save" ), SAVE ); + addhtitem (pt_hash, namealloc ("signal" ), SIGNAL ); + addhtitem (pt_hash, namealloc ("spy" ), SPY ); + addhtitem (pt_hash, namealloc ("to" ), TO ); + addhtitem (pt_hash, namealloc ("trace" ), TRACE ); + addhtitem (pt_hash, namealloc ("us" ), US ); + } + return (gethtitem (pt_hash, namealloc (key))); + } static char buff [1024]; %} @@ -176,7 +214,6 @@ letter [a-zA-Z] } {letter}(_?({letter}|[0-9]))* { int code ; - static int lcl_search (); yylval.text = namealloc (yytext); if ((code = lcl_search (yylval.text)) == -1) @@ -218,41 +255,3 @@ int pat_decl_y_wrap () return (1); } -/* ###--------------------------------------------------------------### */ -/* function : lcl_search */ -/* description : check that an identifier is a reserved word or not */ -/* called func. : addht, addhtitem, gethtitem, namealloc */ -/* ###--------------------------------------------------------------### */ - -static int lcl_search (key) - -char *key; - - { - static ht *pt_hash = NULL; - - if (pt_hash == NULL) - { - pt_hash = addht (32); - - addhtitem (pt_hash, namealloc ("begin" ), BEGIN_ ); - addhtitem (pt_hash, namealloc ("downto" ), DOWNTO ); - addhtitem (pt_hash, namealloc ("end" ), END_ ); - addhtitem (pt_hash, namealloc ("fs" ), FS ); - addhtitem (pt_hash, namealloc ("in" ), _IN ); - addhtitem (pt_hash, namealloc ("inout" ), _INOUT ); - addhtitem (pt_hash, namealloc ("inspect" ), INSPECT ); - addhtitem (pt_hash, namealloc ("ms" ), MS ); - addhtitem (pt_hash, namealloc ("ns" ), NS ); - addhtitem (pt_hash, namealloc ("ps" ), PS ); - addhtitem (pt_hash, namealloc ("out" ), _OUT ); - addhtitem (pt_hash, namealloc ("register"), REGISTER); - addhtitem (pt_hash, namealloc ("save" ), SAVE ); - addhtitem (pt_hash, namealloc ("signal" ), SIGNAL ); - addhtitem (pt_hash, namealloc ("spy" ), SPY ); - addhtitem (pt_hash, namealloc ("to" ), TO ); - addhtitem (pt_hash, namealloc ("trace" ), TRACE ); - addhtitem (pt_hash, namealloc ("us" ), US ); - } - return (gethtitem (pt_hash, namealloc (key))); - } diff --git a/alliance/src/xfsm/src/XTB_panel.c b/alliance/src/xfsm/src/XTB_panel.c index b5ea11c7..07a217ca 100644 --- a/alliance/src/xfsm/src/XTB_panel.c +++ b/alliance/src/xfsm/src/XTB_panel.c @@ -79,7 +79,7 @@ | | \------------------------------------------------------------*/ - static char *XfsmPanelButtonDisable = "xxxx"; + char *XfsmPanelButtonDisable = "xxxx"; /*------------------------------------------------------------\ | | diff --git a/alliance/src/xpat/src/XPT_error.c b/alliance/src/xpat/src/XPT_error.c index edde29b4..dc7411ff 100644 --- a/alliance/src/xpat/src/XPT_error.c +++ b/alliance/src/xpat/src/XPT_error.c @@ -44,6 +44,7 @@ # include # include +# include # include # include # include "mut.h" diff --git a/alliance/src/xpat/src/XSB_error.c b/alliance/src/xpat/src/XSB_error.c index c3d66d04..8edda667 100644 --- a/alliance/src/xpat/src/XSB_error.c +++ b/alliance/src/xpat/src/XSB_error.c @@ -44,6 +44,7 @@ \------------------------------------------------------------*/ # include +# include # include "mut.h" # include "aut.h" # include "pat.h" diff --git a/alliance/src/xpat/src/XTB_panel.c b/alliance/src/xpat/src/XTB_panel.c index 16f6fc90..d6a190e2 100644 --- a/alliance/src/xpat/src/XTB_panel.c +++ b/alliance/src/xpat/src/XTB_panel.c @@ -77,7 +77,7 @@ | | \------------------------------------------------------------*/ - static char *XpatPanelButtonDisable = "xxxx"; + char *XpatPanelButtonDisable = "xxxx"; /*------------------------------------------------------------\ | | diff --git a/alliance/src/xsch/src/XMX_color.c b/alliance/src/xsch/src/XMX_color.c index 3083693b..574421b5 100644 --- a/alliance/src/xsch/src/XMX_color.c +++ b/alliance/src/xsch/src/XMX_color.c @@ -44,6 +44,7 @@ \------------------------------------------------------------*/ # include +# include # include # include "mut.h" diff --git a/alliance/src/xsch/src/XSB_error.c b/alliance/src/xsch/src/XSB_error.c index 45448c59..cb5d8e21 100644 --- a/alliance/src/xsch/src/XSB_error.c +++ b/alliance/src/xsch/src/XSB_error.c @@ -44,6 +44,7 @@ \------------------------------------------------------------*/ # include +# include # include "mut.h" # include "aut.h" # include "mlo.h" diff --git a/alliance/src/xsch/src/XTB_panel.c b/alliance/src/xsch/src/XTB_panel.c index 74752276..17325b01 100644 --- a/alliance/src/xsch/src/XTB_panel.c +++ b/alliance/src/xsch/src/XTB_panel.c @@ -77,7 +77,7 @@ | | \------------------------------------------------------------*/ - static char *XschPanelButtonDisable = "xxxx"; + char *XschPanelButtonDisable = "xxxx"; /*------------------------------------------------------------\ | | diff --git a/alliance/src/xvpn/src/XMX_color.c b/alliance/src/xvpn/src/XMX_color.c index c7200cea..7583c70e 100644 --- a/alliance/src/xvpn/src/XMX_color.c +++ b/alliance/src/xvpn/src/XMX_color.c @@ -44,6 +44,8 @@ \------------------------------------------------------------*/ # include +# include +# include # include # include "mut.h" diff --git a/alliance/src/xvpn/src/XSB_error.c b/alliance/src/xvpn/src/XSB_error.c index e3f42870..9e43a3de 100644 --- a/alliance/src/xvpn/src/XSB_error.c +++ b/alliance/src/xvpn/src/XSB_error.c @@ -44,6 +44,8 @@ \------------------------------------------------------------*/ # include +# include +# include # include "mut.h" # include "aut.h" # include "XSB.h" diff --git a/alliance/src/xvpn/src/XTB_panel.c b/alliance/src/xvpn/src/XTB_panel.c index 77e730f8..e1692bf2 100644 --- a/alliance/src/xvpn/src/XTB_panel.c +++ b/alliance/src/xvpn/src/XTB_panel.c @@ -76,7 +76,7 @@ | | \------------------------------------------------------------*/ - static char *XvpnPanelButtonDisable = "xxxx"; + char *XvpnPanelButtonDisable = "xxxx"; /*------------------------------------------------------------\ | |