Exemple #1
0
static int
page_file(char *filename)
{
    int result;

    result = pager_file(filename);

    if (result == -1)
	sprintf(command_errbuf, "error showing %s", filename);

    return result;
}   
Exemple #2
0
static int
page_file(char *filename)
{
    int result;
    int fd;
    char *fullpath;

    if ((fd = rel_open(filename, &fullpath, O_RDONLY)) != -1) {
	close(fd);
	result = pager_file(fullpath);
	free(fullpath);
    } else {
	result = -1;
    }
    if (result == -1)
	sprintf(command_errbuf, "error showing %s", filename);

    return result;
}