📄 gb_io.ch
字号:
@x l.35int main()@yint main(void)@z@x l.123static void fill_buf()@ystatic void fill_buf(void)@z@x l.185static char *imap="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\abcdefghijklmnopqrstuvwxyz_^~&@@,;.:?!%#$+-*/|\\<=>()[]{}`'\" \n";@ystatic char *imap= "0123456789"@| "ABCDEFGHIJKLMNOPQRSTUVWXYZ"@| "abcdefghijklmnopqrstuvwxyz"@| "_^~&@@,;.:?!%#$+-*/|\\<=>()[]{}`'\" \n";@z@x l.191char imap_chr(d) long d;{ return d<0 || d>strlen(imap)? '\0': imap[d];}@ychar imap_chr(long d){ return((char)(d<0 || d>strlen(imap)? '\0': imap[d]));}@z@x l.197long imap_ord(c) char c;@ylong imap_ord(char c)@z@x l.206extern char imap_chr(); /* the character that maps to a given character */extern long imap_ord(); /* the ordinal number of a given character */@yextern char imap_chr(long); /* the character that maps to a given character */extern long imap_ord(char); /* the ordinal number of a given character */@z@x l.213static void icode_setup()@ystatic void icode_setup(void)@z@x l.225extern void gb_newline(); /* advance to next line of the data file */extern long new_checksum(); /* compute change in magic number */@yextern void gb_newline(void); /* advance to next line of the data file */extern long new_checksum(char *,long); /* compute change in magic number */@z@x l.232long new_checksum(s,old_checksum) char *s; /* a string */ long old_checksum;@ylong new_checksum(@t\1\1@> char *s, /* a string */ long old_checksum@t\2\2@>)@z@x l.245void gb_newline()@yvoid gb_newline(void)@z@x l.259extern long gb_eof(); /* has the data all been read? */@yextern long gb_eof(void); /* has the data all been read? */@z@x l.260long gb_eof() { return !more_data; }@ylong gb_eof(void) { return !more_data; }@z@x l.276extern char gb_char(); /* get next character of current line, or |'\n'| */extern void gb_backup(); /* move back ready to scan a character again */@yextern char gb_char(void); /* get next character of current line, or |'\n'| */extern void gb_backup(void); /* move back ready to scan a character again */@z@x l.280char gb_char()@ychar gb_char(void)@z@x l.286void gb_backup()@yvoid gb_backup(void)@z@x l.307extern long gb_digit(); /* |gb_digit(d)| reads a digit between 0 and |d-1| */extern unsigned long gb_number(); /* |gb_number(d)| reads a radix-|d| number */@yextern long gb_digit(char); /* |gb_digit(d)| reads a digit between 0 and |d-1| */extern unsigned long gb_number(char); /* |gb_number(d)| reads a radix-|d| number */@z@x l.315long gb_digit(d) char d;@ylong gb_digit(char d)@z@x l.322unsigned long gb_number(d) char d;@yunsigned long gb_number(char d)@z@x l.353extern char *gb_string(); /* |gb_string(p,c)| reads a string delimited by |c|@yextern char *gb_string(char *,char); /* |gb_string(p,c)| reads a string delimited by |c|@z@x l.360char *gb_string(p,c) char *p; /* where to put the result */ char c; /* character following the string */@ychar *gb_string(@t\1\1@> char *p, /* where to put the result */ char c@t\2\2@>) /* character following the string */@z@x l.427extern void gb_raw_open(); /* open a file for GraphBase input */extern long gb_open(); /* open a GraphBase data file; return 0 if OK */@yextern void gb_raw_open(char *); /* open a file for GraphBase input */extern long gb_open(char *); /* open a GraphBase data file; return 0 if OK */@z@x l.431void gb_raw_open(f) char *f;@yvoid gb_raw_open(char *f)@z@x l.463long gb_open(f) char *f;@ylong gb_open(char *f)@z@x l.534long gb_close()@ylong gb_close(void)@z@x l.567extern long gb_close(); /* close a GraphBase data file; return 0 if OK */extern long gb_raw_close(); /* close file and return the checksum */@yextern long gb_close(void); /* close a GraphBase data file; return 0 if OK */extern long gb_raw_close(void); /* close file and return the checksum */@z@x l.571long gb_raw_close()@ylong gb_raw_close(void)@z
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -