[comp.bugs.4bsd] 4.3BSD new/rcs/src/partime.c vs. -DDEBUG

jtkohl@athena.mit.edu (John T Kohl) (12/20/88)

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 <jtkohl@ATHENA.MIT.EDU>
Digital Equipment Corporation/MIT Project Athena
(As usual, the opinions expressed above do not necessarily reflect the
opinions of my employer. :-)