|
|
1.1 ! root 1: .th LIBQ FILES ! 2: .sh NAME ! 3: libq \- Equel run-time support library ! 4: .sh DESCRIPTION ! 5: .it Libq is the equel run-time support library containing ! 6: all the routines necessary for an equel program to load. ! 7: It typically resides in ! 8: .bd /usr/lib/libq.a, ! 9: and must be specified when loading ! 10: equel pre-processed object code. ! 11: It may be referenced on the ! 12: command line of ! 13: .it cc ! 14: by the abbreviation ! 15: .bd \-lq. ! 16: .s3 ! 17: Several useful routines ! 18: which are used by equel processes are included in the library. ! 19: These may be employed by the equel programmer to avoid code ! 20: duplication. ! 21: They are: ! 22: .ne 20 ! 23: .nf ! 24: ! 25: int IIatoi(buf, i) ! 26: char *buf; ! 27: int i; ! 28: ! 29: char *IIbmove(source, destination, len) ! 30: char *source, *destination; ! 31: int len; ! 32: ! 33: char *IIconcatv(buf, arg1, arg2, ..., 0) ! 34: char *buf, *arg1, ...; ! 35: ! 36: char *IIitos(i) ! 37: int i; ! 38: ! 39: int IIsequal(s1, s2) ! 40: char *s1, *s2; ! 41: ! 42: int IIlength(string) ! 43: char *string; ! 44: ! 45: IIsyserr(string, arg1, arg2, ...); ! 46: char *string; ! 47: ! 48: .fi ! 49: .in +5 ! 50: .de xx ! 51: .s3 ! 52: .lp +12 12 ! 53: \\$1\t\c ! 54: .. ! 55: .xx IIatoi ! 56: IIatoi is equivalent to atoi(UTIL). ! 57: .xx IIbmove ! 58: Moves ! 59: .it len ! 60: bytes from ! 61: .it source ! 62: to ! 63: .it destination\c ! 64: \&, returning a pointer to the location after the last byte moved. ! 65: Does not append a null byte. ! 66: .xx IIconcatv ! 67: Concatenates into ! 68: .it buf ! 69: all of its arguments, returning a pointer to ! 70: the null byte at the end of the concatenation. ! 71: .it Buf ! 72: may not be equal to any of the arg-n but arg1. ! 73: .xx IIitos ! 74: IIitos is equivalent to itoa(III). ! 75: .xx IIsequal ! 76: Returns 1 iff strings s1 is identical to s2. ! 77: .xx IIlength ! 78: Returns max(length of ! 79: .it string ! 80: without null byte at end, 255) ! 81: .xx IIsyserr ! 82: IIsyserr is diferrent from syserr(util) only in that ! 83: it will print the name in IIproc_name, and in that there is no 0 mode. ! 84: Also, it will always call exit(\*-1) after printing the error message. ! 85: .i0 ! 86: .s3 ! 87: There are also some global Equel variables which may be manipulated by the ! 88: user: ! 89: .ne 5 ! 90: .nf ! 91: ! 92: int IIerrflag; ! 93: char *IImainpr; ! 94: char (*IIprint_err)(); ! 95: int IIret_err(); ! 96: int IIno_err(); ! 97: ! 98: .fi ! 99: .in +5 ! 100: .xx IIerrflag ! 101: Set on an error from \*(II to be the error number (see ! 102: the error message section of the ``\*(II Reference Manual'') that ocurred. ! 103: This remains valid from the time the error occurrs to the time when ! 104: the next equel statement is issued. ! 105: This may be used just after an equel statement to see if it succeded. ! 106: .xx IImainpr ! 107: This is a string which determines which ingres to call when a ! 108: "## ingres" is issued. Initially it is "/usr/bin/ingres". ! 109: .xx IIprint_err ! 110: This function pointer is used to call a function which determines ! 111: what (if any) error message should be printed when an ingres error ! 112: occurs. It is called from IIerror() with the error number as an ! 113: argument, and the error message corresponding to the error number ! 114: returned will be printed. ! 115: If (*IIprint_err)(\c ! 116: .it <errno>\c ! 117: ) returns 0, then no error message will be printed. ! 118: Initially IIprint_err is set to IIret_err() to print the error ! 119: that ocurred. ! 120: .xx IIret_err ! 121: Returns its single integer argument. Used to have (*IIprint_err)() ! 122: cause printing of the error that ocurred. ! 123: .xx IIno_err ! 124: Returns 0. Used to have (*IIprint_err)() suppress error message printing. ! 125: IIno_err is used when an error in a parametrized equel statemenr occurs ! 126: to suppress printing of the corresponding parser error. ! 127: .sh "SEE ALSO" ! 128: atoi(util), ! 129: bmove(util), ! 130: cc(I), ! 131: equel(unix), ! 132: exit(II), ! 133: itoa(III), ! 134: length(util), ! 135: sequal(util), ! 136: syserr(util)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.