Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!athena.mit.edu!jtkohl From: jtkohl@athena.mit.edu (John T Kohl) Newsgroups: comp.bugs.4bsd Subject: 4.3BSD new/rcs/src/partime.c vs. -DDEBUG Message-ID: <8517@bloom-beacon.MIT.EDU> Date: 19 Dec 88 16:14:32 GMT Sender: daemon@bloom-beacon.MIT.EDU Reply-To: jtkohl@athena.mit.edu (John T Kohl) Organization: Massachusetts Institute of Technology Lines: 43 Subject: Short summary of the problem Index: new/rcs/src/partime.c 4.3BSD Description: partime.c doesn't work properly if -DDEBUG is turned on. Repeat-By: Try it. It never fills in any dates, but returns a successful status code. Fix: Make the code inside #ifdef DEBUG/#endif do sane things: *** partime.c.~1~ Mon Dec 19 10:11:35 1988 --- partime.c Mon Dec 19 11:06:48 1988 *************** *** 362,370 **** tkp->tval.tnum = 0; if(pttoken(astr,tkp) == 0) #ifdef DEBUG printf("EOF\n"); ! #endif DEBUG return(0); cp = tkp->tcp; #ifdef DEBUG --- 362,374 ---- tkp->tval.tnum = 0; if(pttoken(astr,tkp) == 0) #ifdef DEBUG + { printf("EOF\n"); ! return(0); ! } ! #else return(0); + #endif DEBUG cp = tkp->tcp; #ifdef DEBUG John Kohl Digital Equipment Corporation/MIT Project Athena (As usual, the opinions expressed above do not necessarily reflect the opinions of my employer. :-)