FreeBSD/contrib/nvi/ex/ex_cscope.c
/*
 * read_prompt --
 *	Read a prompt from cscope.
 */
read_prompt
Read a prompt from cscope.
read_prompt Read a prompt from cscope .
static int
read_prompt(SCR *sp, CSC *csc)
{
	int ch;
#define	CSCOPE_PROMPT		">> "
	for (;;) {
		while ((ch =
		    getc(csc->from_fp)) != EOF && ch != CSCOPE_PROMPT[0]);
		if (ch == EOF) {
			terminate(sp, csc, 0);
			return (1);
		}
		if (getc(csc->from_fp) != CSCOPE_PROMPT[1])
			continue;
		if (getc(csc->from_fp) != CSCOPE_PROMPT[2])
			continue;
		break;
	}
	return (0);
}
static int read_prompt ( SCR * sp , CSC * csc ) { int ch ; #define CSCOPE_PROMPT 		">> " for ( ; ; ) { while ( ( ch = getc ( csc -> from_fp ) ) != EOF && ch != CSCOPE_PROMPT [ 0 ] ) ; if ( ch == EOF ) { terminate ( sp , csc , 0 ) ; return ( 1 ) ; } if ( getc ( csc -> from_fp ) != CSCOPE_PROMPT [ 1 ] ) continue ; if ( getc ( csc -> from_fp ) != CSCOPE_PROMPT [ 2 ] ) continue ; break ; } return ( 0 ) ; }
read_prompt
      Read a prompt from cscope.
read_prompt Read a prompt from cscope .