Plan 9 from Bell Labs’s /usr/web/sources/contrib/btdn/src/pgp/826228074/more.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


/*      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;
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].