Mercurial > hg > Members > kono > nitros9-code
view 3rdparty/packages/ed/getlst.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
/* getlst.c */ #include <stdio.h> #include "tools.h" #include "ed.h" int getlst() { int num; line2 = 0; for (nlines = 0; (num = getone()) >= 0;) { line1 = line2; line2 = num; nlines++; if (*inptr != ',' && *inptr != ';') break; if (*inptr == ';') curln = num; inptr++; } nlines = min(nlines, 2); if (nlines == 0) line2 = curln; if (nlines <= 1) line1 = line2; if (num == ERR) return(num); else return(nlines); }