usr.bin/patch/inp.c
/* New patch--prepare to edit another file. */
New patch--prepare to edit another file.
New patch -- prepare to edit another file .
void
re_input()
{
    if (using_plan_a) {
	i_size = 0;
#ifndef lint
	if (i_ptr != Null(char**))
	    free((char *)i_ptr);
#endif
	if (i_womp != Nullch)
	    free(i_womp);
	i_womp = Nullch;
	i_ptr = Null(char **);
    }
    else {
	using_plan_a = TRUE;		
	Close(tifd);
	tifd = -1;
	free(tibuf[0]);
	free(tibuf[1]);
	tibuf[0] = tibuf[1] = Nullch;
	tiline[0] = tiline[1] = -1;
	tireclen = 0;
    }
}
void re_input ( ) { if ( using_plan_a ) { i_size = 0 ; #ifndef lint if ( i_ptr != Null ( char * * ) ) free ( ( char * ) i_ptr ) ; #endif if ( i_womp != Nullch ) free ( i_womp ) ; i_womp = Nullch ; i_ptr = Null ( char * * ) ; } else { using_plan_a = TRUE ; Close ( tifd ) ; tifd = -1 ; free ( tibuf [ 0 ] ) ; free ( tibuf [ 1 ] ) ; tibuf [ 0 ] = tibuf [ 1 ] = Nullch ; tiline [ 0 ] = tiline [ 1 ] = -1 ; tireclen = 0 ; } }
New patch--prepare to edit another file.
New patch -- prepare to edit another file .
/* maybe the next one is smaller */