Example #1
0
int tbl(int argc,char *argv[])
{
char line[BUFSIZ];
/* required by GCOS because "stdout" is set by troff preprocessor */
tabin=stdin; tabout=stdout;
setinp(argc,argv);
while (gets1(line))
	{
	fprintf(tabout, "%s\n",line);
	if (prefix(".TS", line))
		tableput();
	}
fclose(tabin);
return(0);
}
Example #2
0
File: t1.c Project: 99years/plan9
int
tbl(int argc, char *argv[])
{
	char	line[5120];
	/*int x;*/
	/*x=malloc((char *)0);	uncomment when allocation breaks*/
	Binit(&tabout, 1, OWRITE);
	setinp(argc, argv);
	while (gets1(line, sizeof(line))) {
		Bprint(&tabout, "%s\n", line);
		if (prefix(".TS", line))
			tableput();
	}
	Bterm(tabin);
	return(0);
}
Example #3
0
int 
tbl(int argc, char *argv[])
{
char *line = NULL;
size_t linesize = 0;
/* required by GCOS because "stdout" is set by troff preprocessor */
tabin=stdin; tabout=stdout;
setinp(argc,argv);
while (gets1(&line, &line, &linesize))
	{
	fprintf(tabout, "%s\n",line);
	if (cprefix("TS", line))
		tableput();
	}
fclose(tabin);
free(line);
return(0);
}