Mercurial > hg > Members > kono > nitros9-code
view 3rdparty/packages/ed/append.c @ 3226:9749d0dfc4a2
Changed a puls PC to rts to save cycles
author | David Ladd <drencor-xeen@users.sourceforge.net> |
---|---|
date | Sat, 20 Jan 2018 19:32:22 -0600 |
parents | bef1844de0dc |
children |
line wrap: on
line source
/* append.c */ #include <stdio.h> #include "tools.h" #include "ed.h" int append(line, glob) int line, glob; { int stat; char lin[MAXLINE]; if (glob) return(ERR); curln = line; while (1) { if (nflg) printf("%6d. ", curln + 1); if (fgets(lin, MAXLINE, stdin) == NULL) return(EOF); if (lin[0] == '.' && lin[1] == '\n') return (0); stat = ins(lin); if (stat < 0) return(ERR); } }