Dawg utility users note: bug warning

Graham Toal gtoal at tharr.UUCP
Sun Jul 1 10:20:26 AEST 1990


Two minor bugs:

soundex.c; the isalpha test should include an isprint (==isascii)
  test because chars > 128 can be alpha; also the toupper should
  be conditional on islower().

locate.c & others:
   If you have, say, a dict with only lower-case entries, and you
   search for a word starting with uppercase, you will have undefined
   behaviour or a core dump.  This happens in any case where the first
   letter of the word searched for does not occur as the first letter
   of any word in the dictionary.  It appears I leaned on the delete key
   too hard; a crucial line (below) got lost somewhere.

   if (((*edge)&M_END_OF_NODE) != 0) break;  should be in the outer loop
   of anything which traverses the dawg.

   Someone else also mentioned problems with proot.c -- check for this
   problem in there too if it is going wrong.

I'll post proper patches in alt.sources fairly soon, when I have enough
to make it worthwhile.  meanwhile you can fix by hand if it really
bothers you, or just leave it; the problems in both cases only happen
on errorneous input.

Graham Toal <gtoal at ed.ac.uk>  (Note the address; I *don't* use mail on tharr)



More information about the Alt.sources.d mailing list