Esempio n. 1
0
int
forwsearch(int f, int n)
{
    int status;
    hst_init('/');
    status = fsearch(f, n, FALSE, FALSE);
    hst_flush();
    return status;
}
Esempio n. 2
0
/*
 * Search backward.  Get a search string from the user, and
 *	search for it.
 */
int
backsearch(int f, int n)
{
    int status;
    hst_init('?');
    status = rsearch(f, n, FALSE, FALSE);
    hst_flush();
    return status;
}
Esempio n. 3
0
/* ARGSUSED */
int
pipecmd(int f, int n)
{
	register BUFFER *bp;	/* pointer to buffer to zot */
	register int	s;
	char line[NLINE];	/* command line send to shell */

	/* get the command to pipe in */
	hst_init('!');
	s = ShellPrompt(&save_shell[!global_g_val(GMDSAMEBANGS)], line, -TRUE);
	hst_flush();

	/* prompt ok? */
	if (s != TRUE)
		return s;

	/* take care of autowrite */
	if (writeall(f,n,FALSE,FALSE,TRUE) != TRUE)
		return FALSE;


#if BEFORE
	if (((s = ((bp = bfind(OUTPUT_BufName, 0)) != NULL)) == TRUE)
	 && ((s = popupbuff(bp)) == TRUE)
	 && ((s = swbuffer(bp)) == TRUE)
	 && ((s = readin(line, FALSE, bp, TRUE)) == TRUE))
		set_rdonly(bp, line, MDVIEW);

#else
	if ((s = ((bp = bfind(OUTPUT_BufName, 0)) != NULL)) != TRUE)
		return s;
	if ((s = popupbuff(bp)) != TRUE)
		return s;
	ch_fname(bp,line);
	bp->b_active = FALSE; /* force a re-read */
	if ((s = swbuffer_lfl(bp,FALSE)) != TRUE)
		return s;
	set_rdonly(bp, line, MDVIEW);
#endif

	return (s);
}