/* more.c - Unix-style "more" paging output for PGP.
If you want "more", you know where to find it.
*/
#include <stdio.h>
char pager[80] = "";
extern FILE *pgpout;
int more_file(char *fn)
{
FILE *fp;
int c;
if ((fp = fopen(fn, "r")) == NULL)
return -1;
fflush(pgpout);
while ((c = fgetc(fp)) != EOF)
putchar(c);
fclose(fp);
return 0;
}
int open_more(void)
{
fflush(pgpout);
return 0;
}
int close_more(void)
{
fflush(pgpout);
return 0;
}
|