[16331] in Athena Bugs

home help back first fref pref prev next nref lref last post

sgi 8.2.9: znol

daemon@ATHENA.MIT.EDU (matt debergalis)
Wed Sep 16 15:01:36 1998

Date: Wed, 16 Sep 1998 15:01:33 -0400 (EDT)
From: matt debergalis <deberg@MIT.EDU>
To: bugs@MIT.EDU

System name:            oliver.mit.edu
Type and version:       IP32 8.2.9 (with mkserv)
Display type:           CRM

What were you trying to do?
use znol

What's wrong:
znol doesn't parse \t in .anyone correctly if there's a comment in a
line.  the username in a line like:

deberg\t\t\t# this is a comment

isn't correctly extracted.

What should have happened:
znol should deal with \t correctly.

Please describe any relevant documentation references:

patch supplied:
--- znol.c.orig Wed Sep 16 14:56:47 1998
+++ znol.c      Wed Sep 16 14:56:02 1998
@@ -143,8 +143,10 @@
                    /* Get rid of old-style nol entries, just in case */
                    cp = cleanname + strlen(cleanname) - 1;
                    *cp = '\0';
-                   while(*--cp == ' ')
-                       *cp = '\0';
+                   cp--;
+                   while( (*cp == ' ') || (*cp == '\t') ) {
+                       *cp-- = '\0';
+                   }
                    if (*cleanname == '@' || !*cleanname)
                        continue;
                } else if (ind)

-- 
matt debergalis <deberg@mit.edu> KB1CTH
finger deberg@ai.mit.edu for PGP key
home 617.492.1448  work 617.873.5173  pager 617.546.0399

home help back first fref pref prev next nref lref last post