🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #112

Advice sought for GNUgrep

#112
From: Mark C. Marsh
Date: Thu, 24 Aug 1989 08:20
75 lines
3183 bytes
I am having a problem getting GNUgrep to work on my poor system. I have a
Compaq 286 running SCO Xenix 2.3. Any help that can be pointed my way I 
would greatly appreciate. Error description follows:

I have found a suspicous construction in the gnugrep file dfa.h. It states:
----------------------------------------------------------------------
typedef struct
{
  unsigned index:24,		/* Index into the parse array. */
	   constraint:8;	/* Constraint for matching this position. */
} _position;
----------------------------------------------------------------------

Isn't the storage class for unsigned the same as unsigned int, and if this
is so then a total of 32 bits are being assigned to the storage allocated
for this structof ~16 bits. Needless to say, the compiler grumbles with the
error:
----------------------------------------------------------------------
	cc -O -DUSG -i -F 8000 -c grep.c
grep.c
dfa.h(384) : error 34: `index' : field type too small for number of bits
*** Error code 1

Stop.
----------------------------------------------------------------------

If the structure is changed to read:
----------------------------------------------------------------------
typedef struct
{
 	unsigned long index:24;		/* Index into the parse array. */
	unsigned constraint:8;	/* Constraint for matching this position. */
} _position;

-or- 

typedef struct
{
  unsigned long index:24,		/* Index into the parse array. */
	   constraint:8;	/* Constraint for matching this position. */
} _position;
----------------------------------------------------------------------

Then the result is:
----------------------------------------------------------------------
   cd tests; sh regress.sh
egrep: Regular expression too big
cmp: EOF on khadafy.out
Khadafy test failed -- output left on khadafy.out
Spencer test #30 failed ... Spencer test #35 failed
Spencer test #37 failed
Spencer test #41 failed ... Spencer test #47 failed
Spencer test #72 failed ... Spencer test #76 failed
Spencer test #83 failed ... Spencer test #87 failed
Spencer test #92 failed
Spencer test #95 failed ...  Spencer test #115 failed
Spencer test #118 failed
Spencer test #121 failed
*** Error code 1

Stop.
----------------------------------------------------------------------

Running the tests also dumped the core, a stack re-trace of which reads:
----------------------------------------------------------------------
_reganalyze()	from _regcompile+0xe5
_regcompile(0xb130, 0xa, 0xb70,	0x1)	from _main+0x4e3
_main(0x3, 0xb106, 0xb10e)	from __start+0x32
__start()	from start0+0x5
----------------------------------------------------------------------

-- 
smail: mark@siva
uucp : {ames!pacbell!sactoh0|csusac!unify}!siva!mark
geo  : Sacramento, California
Technical Details
Message-ID: <134@siva.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ctrsol!uakari.primate.wisc.edu!indri!ames!amdahl!pacbell!sactoh0!siva!mark

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ctrsol!uakari.primate.wisc.edu!indri!ames!amdahl!pacbell!sactoh0!siva!mark
From: mark@siva.UUCP (Mark C. Marsh)
Newsgroups: comp.sources.bugs
Subject: Advice sought for GNUgrep
Keywords: errors
Message-ID: <134@siva.UUCP>
Date: 24 Aug 89 08:20:20 GMT
Distribution: na
Organization: siva, Sacramento, CA
Lines: 75