Ejemplo n.º 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);
}
Ejemplo n.º 2
0
Archivo: t1.c Proyecto: 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);
}
Ejemplo n.º 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);
}