1 /* 2 * news sys file reading functions (fast, big, in-memory version) 3 * formerly libbig/sys.fast.c 4 */ 5 6 #include <stdio.h> 7 #include <sys/types.h> 8 #include "news.h" 9 #include "ngmatch.h" 10 #include "system.h" 11 12 /* imports */ 13 extern struct system *currsys, *firstsys; 14 15 /* private */ 16 static struct system *thissys = NULL; 17 18 void remmysys(sys)19remmysys(sys) /* remember this system */ 20 struct system *sys; 21 { 22 thissys = sys; 23 } 24 25 struct system * mysysincache()26mysysincache() /* optimisation */ 27 { 28 return thissys; 29 } 30 31 void setupsys(fp)32setupsys(fp) 33 FILE *fp; 34 { 35 rewind(fp); 36 } 37 38 boolean donesys()39donesys() 40 { 41 return NO; 42 } 43 44 /* ARGSUSED */ 45 void rewsys(fp)46rewsys(fp) 47 FILE *fp; 48 { 49 currsys = firstsys; 50 } 51 52 void advcurrsys()53advcurrsys() /* advance currsys to the next in-core sys entry, if any. */ 54 { 55 if (currsys != NULL) 56 currsys = currsys->sy_next; 57 } 58