From: ceriel Date: Mon, 14 Mar 1988 15:58:07 +0000 (+0000) Subject: fixed for operand separators within operands X-Git-Tag: release-5-5~3568 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ea9e90d7859997d3903610cb617e57361d97656a;p=ack.git fixed for operand separators within operands --- diff --git a/mach/arm/top/Makefile b/mach/arm/top/Makefile index 38293cb79..6648418fd 100644 --- a/mach/arm/top/Makefile +++ b/mach/arm/top/Makefile @@ -1,10 +1,11 @@ -EM=../../.. +EMHOME=../../.. +LIBS=$(EMHOME)/modules/lib/libstring.a PREFLAGS=-I. PFLAGS= CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG LDFLAGS=-i $(PFLAGS) LINTOPTS=-hbxac -CDIR=$(EM)/mach/proto/top +CDIR=$(EMHOME)/mach/proto/top CFILES=$(CDIR)/top.c $(CDIR)/queue.c OFILES=top.o queue.o @@ -21,13 +22,13 @@ queue.o: $(CDIR)/queue.c $(CC) -c $(CFLAGS) $(CDIR)/queue.c install: all - $(EM)/mach/install top + $(EMHOME)/mach/install top cmp: all - -$(EM)/mach/compare top + -$(EMHOME)/mach/compare top gen.c: table - $(EM)/lib/topgen table + $(EMHOME)/lib/topgen table lint: $(CFILES) lint $(LINTOPTS) $(PREFLAGS) $(CFILES) diff --git a/mach/m68020/top/Makefile b/mach/m68020/top/Makefile index 38293cb79..6648418fd 100644 --- a/mach/m68020/top/Makefile +++ b/mach/m68020/top/Makefile @@ -1,10 +1,11 @@ -EM=../../.. +EMHOME=../../.. +LIBS=$(EMHOME)/modules/lib/libstring.a PREFLAGS=-I. PFLAGS= CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG LDFLAGS=-i $(PFLAGS) LINTOPTS=-hbxac -CDIR=$(EM)/mach/proto/top +CDIR=$(EMHOME)/mach/proto/top CFILES=$(CDIR)/top.c $(CDIR)/queue.c OFILES=top.o queue.o @@ -21,13 +22,13 @@ queue.o: $(CDIR)/queue.c $(CC) -c $(CFLAGS) $(CDIR)/queue.c install: all - $(EM)/mach/install top + $(EMHOME)/mach/install top cmp: all - -$(EM)/mach/compare top + -$(EMHOME)/mach/compare top gen.c: table - $(EM)/lib/topgen table + $(EMHOME)/lib/topgen table lint: $(CFILES) lint $(LINTOPTS) $(PREFLAGS) $(CFILES) diff --git a/mach/m68k2/top/Makefile b/mach/m68k2/top/Makefile index 38293cb79..6648418fd 100644 --- a/mach/m68k2/top/Makefile +++ b/mach/m68k2/top/Makefile @@ -1,10 +1,11 @@ -EM=../../.. +EMHOME=../../.. +LIBS=$(EMHOME)/modules/lib/libstring.a PREFLAGS=-I. PFLAGS= CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG LDFLAGS=-i $(PFLAGS) LINTOPTS=-hbxac -CDIR=$(EM)/mach/proto/top +CDIR=$(EMHOME)/mach/proto/top CFILES=$(CDIR)/top.c $(CDIR)/queue.c OFILES=top.o queue.o @@ -21,13 +22,13 @@ queue.o: $(CDIR)/queue.c $(CC) -c $(CFLAGS) $(CDIR)/queue.c install: all - $(EM)/mach/install top + $(EMHOME)/mach/install top cmp: all - -$(EM)/mach/compare top + -$(EMHOME)/mach/compare top gen.c: table - $(EM)/lib/topgen table + $(EMHOME)/lib/topgen table lint: $(CFILES) lint $(LINTOPTS) $(PREFLAGS) $(CFILES) diff --git a/mach/pdp/top/Makefile b/mach/pdp/top/Makefile index 38293cb79..6648418fd 100644 --- a/mach/pdp/top/Makefile +++ b/mach/pdp/top/Makefile @@ -1,10 +1,11 @@ -EM=../../.. +EMHOME=../../.. +LIBS=$(EMHOME)/modules/lib/libstring.a PREFLAGS=-I. PFLAGS= CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG LDFLAGS=-i $(PFLAGS) LINTOPTS=-hbxac -CDIR=$(EM)/mach/proto/top +CDIR=$(EMHOME)/mach/proto/top CFILES=$(CDIR)/top.c $(CDIR)/queue.c OFILES=top.o queue.o @@ -21,13 +22,13 @@ queue.o: $(CDIR)/queue.c $(CC) -c $(CFLAGS) $(CDIR)/queue.c install: all - $(EM)/mach/install top + $(EMHOME)/mach/install top cmp: all - -$(EM)/mach/compare top + -$(EMHOME)/mach/compare top gen.c: table - $(EM)/lib/topgen table + $(EMHOME)/lib/topgen table lint: $(CFILES) lint $(LINTOPTS) $(PREFLAGS) $(CFILES) diff --git a/mach/proto/top/Makefile b/mach/proto/top/Makefile index 38293cb79..6648418fd 100644 --- a/mach/proto/top/Makefile +++ b/mach/proto/top/Makefile @@ -1,10 +1,11 @@ -EM=../../.. +EMHOME=../../.. +LIBS=$(EMHOME)/modules/lib/libstring.a PREFLAGS=-I. PFLAGS= CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG LDFLAGS=-i $(PFLAGS) LINTOPTS=-hbxac -CDIR=$(EM)/mach/proto/top +CDIR=$(EMHOME)/mach/proto/top CFILES=$(CDIR)/top.c $(CDIR)/queue.c OFILES=top.o queue.o @@ -21,13 +22,13 @@ queue.o: $(CDIR)/queue.c $(CC) -c $(CFLAGS) $(CDIR)/queue.c install: all - $(EM)/mach/install top + $(EMHOME)/mach/install top cmp: all - -$(EM)/mach/compare top + -$(EMHOME)/mach/compare top gen.c: table - $(EM)/lib/topgen table + $(EMHOME)/lib/topgen table lint: $(CFILES) lint $(LINTOPTS) $(PREFLAGS) $(CFILES) diff --git a/mach/proto/top/top.c b/mach/proto/top/top.c index 4b423fba0..a3adb180f 100644 --- a/mach/proto/top/top.c +++ b/mach/proto/top/top.c @@ -342,13 +342,19 @@ bool operand(ip,n) { register char *p; int oplen; +#ifdef PAREN_OPEN int nesting = 0; +#else +#define nesting 0 +#endif skip_white(ip); p = ip->rest_line; while((*p != OP_SEPARATOR || nesting) && *p != '\n') { - if (*p == '(') nesting++; - else if (*p == ')') nesting--; +#ifdef PAREN_OPEN + if (strindex(PAREN_OPEN, *p) != 0) nesting++; + else if (strindex(PAREN_CLOSE, *p) != 0) nesting--; +#endif p++; } oplen = p - ip->rest_line; @@ -357,6 +363,9 @@ bool operand(ip,n) ip->op[n][oplen] = '\0'; ip->rest_line = p; return TRUE; +#ifdef nesting +#undef nesting +#endif } diff --git a/mach/vax4/top/Makefile b/mach/vax4/top/Makefile index 38293cb79..6648418fd 100644 --- a/mach/vax4/top/Makefile +++ b/mach/vax4/top/Makefile @@ -1,10 +1,11 @@ -EM=../../.. +EMHOME=../../.. +LIBS=$(EMHOME)/modules/lib/libstring.a PREFLAGS=-I. PFLAGS= CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG LDFLAGS=-i $(PFLAGS) LINTOPTS=-hbxac -CDIR=$(EM)/mach/proto/top +CDIR=$(EMHOME)/mach/proto/top CFILES=$(CDIR)/top.c $(CDIR)/queue.c OFILES=top.o queue.o @@ -21,13 +22,13 @@ queue.o: $(CDIR)/queue.c $(CC) -c $(CFLAGS) $(CDIR)/queue.c install: all - $(EM)/mach/install top + $(EMHOME)/mach/install top cmp: all - -$(EM)/mach/compare top + -$(EMHOME)/mach/compare top gen.c: table - $(EM)/lib/topgen table + $(EMHOME)/lib/topgen table lint: $(CFILES) lint $(LINTOPTS) $(PREFLAGS) $(CFILES)