[comp.sys.next] fixrtf bug

dejnsen@caen.engin.umich.edu (Nik Anthony Gervae) (04/16/91)

  I've discovered a subtle but basically benign bug in the fixrtf program I
write (fixes rtf problems in files ported to NeXT). Basically, it crashes with
a segmentation fault on some files that I have. I'm trying to figure out right
now if it is my code or if the files got corrupted in some weird way. Still,
the way I wrote the program it just dies before writing any changes, so the 
original file doesn't get munged. If anybody's seen something similar and has
any ideas, please email me. I've spet 2+ hours tracking this down and haven't
found anything so far (may be the Mac \r vs UNIX \n, who knows right now?).

  An unrelated problem: my non-networked slab seems to be having a few
problems with Mail and other things. When I log in as a "regular" user (ie,
in group "other" and no special privileges), I can't use the New Shell 
command in the Workspace--every time I choose it, the window opens and I
get a [process exited] message. Also, I can't send mail between accounts on
my slab.... I don't know if I munged a file permission or what, but it seems
this shouldn't be happening. I did try deleting and reinstalling the user
account, but that didn't help.... Any suggestions are vastly appreciated.

  Nik
--
/ Nik Gervae aka dejnsen@caen.engin.umich.edu | "It'll be finished next week, \
| CS/Linguistics stud. & NeRD at UM (go blow) | I promise!"--me               |
|                                             |                               |
| **When all else fails, bug someone who      | "Just say an iguana chewed    |
\   knows (not me!).                          | up your textbook."--Jason Fox /

dejnsen@caen.engin.umich.edu (Nik Anthony Gervae) (04/16/91)

  I've isolated (and corrected) the bus(s--there were 2) in fixrtf. Version
3.1 is now available at the usual nova.cc.pursdue.edu and cs.ordt.edu.

  You wouldn't believe the bugs--I was doing a scanf for a hex number but 
left out the width specifier--after all, I only wanted 2 digits! I was getting
some pretty huge array indices, let me tell you!
  The other bug was just wasting loop time. Used a subscript instead of the
actual array cell in a comparison.

  Oh, these embarrasing typos and other minor errors....

  [Hey, it worked for the test files! Just goes to show, try it on real
data before you ship--"\'d2failure" was registering as an ascii escape with
hex value d2fa! This is so embarrassing!  ;-)]

  Nik
--
/ Nik Gervae aka dejnsen@caen.engin.umich.edu | "It'll be finished next week, \
| CS/Linguistics stud. & NeRD at UM (go blow) | I promise!"--me               |
|                                             |                               |
| **When all else fails, bug someone who      | "Just say an iguana chewed    |
\   knows (not me!).                          | up your textbook."--Jason Fox /