Annotation of researchv10dc/cmd/cyntax/lib/llib-lq, revision 1.1.1.1

1.1       root        1:        /* LINTLIBRARY */
                      2: /* Properly void-valued functions are declared void only if they
                      3:  * are so declared in one of the included files.  Otherwise they are
                      4:  * declared VOID, which is defined as the empty string.  This is
                      5:  * a compromise to keep lint quiet about these functions, which
                      6:  * normally are typed by default.  The cost is that lint will not
                      7:  * discover cases where the return value of a VOID function is 
                      8:  * used.  And it will complain about super-honest programs that 
                      9:  * contain the proper void declaration.
                     10: */
                     11: #define VOID
                     12: #include <sys/types.h>
                     13: #include <sys/stat.h>
                     14: #include <sys/timeb.h>
                     15: #include <sys/times.h>
                     16: #include <sys/utsname.h>
                     17: #include <ctype.h>     /* for consistency check, not types  */
                     18: #include <fio.h>       /* consistency */
                     19: #include <fstab.h>     /* consistency */
                     20: #include <grp.h>       /* consistency */
                     21: #include <label.h>
                     22: #include <libc.h>      /* consistency */
                     23: #include <math.h>      /* consistency */
                     24: #include <ndir.h>
                     25: #include <nlist.h>
                     26: #include <pwd.h>       /* consistency */
                     27: #include <regexp.h>
                     28: #include <setjmp.h>
                     29: #include <sgtty.h>
                     30: #include <signal.h>
                     31: #include <stdio.h>
                     32: #include <time.h>
                     33: char   chrtab[][16];
                     34: char   _ctype[];
                     35: int    errno;
                     36: int    gcmax;          /* galloc */
                     37: int    gcmin;          /* galloc */
                     38: struct _iobuf _iob[_NFILE];    /* stdio */
                     39: char   *optarg;        /* getopt */
                     40: int    optind;         /* getopt */
                     41: char   *printcol;      /* print */
                     42: int    signgam;        /* gamma */
                     43: char   *sys_errlist[];
                     44: int    sys_nerr;
                     45:        /* line disciplines */
                     46: int    arp_ld;
                     47: int    buf_ld;
                     48: int    cdkp_ld;
                     49: int    chaos_ld;
                     50: int    chroute_ld;
                     51: int    conn_ld;
                     52: int    dkp_ld;
                     53: int    dump_ld;
                     54: int    filter_ld;
                     55: int    ip_ld;
                     56: int    mesg_ld;
                     57: int    ntty_ld;
                     58: int    pk_ld;
                     59: int    rdk_ld;
                     60: int    rmesg_ld;
                     61: int    tcp_ld;
                     62: int    trc_ld;
                     63: int    tty_ld;
                     64: int    udp_ld;
                     65: int    uxp_ld;
                     66: VOID   abort() { }
                     67: int    abs(i) { return i; }
                     68: int    access(name, mode) char *name; { return 1; }
                     69: int    acct(f) char *f; { return 1; }
                     70: double acos(x) double x; { return x; };
                     71: unsigned       alarm(s) unsigned s; { return 1; }
                     72: char   *asctime(t) struct tm *t; { return ""; }
                     73: double asin(x) double x; { return x; };
                     74: double atan(x) double x; { return x; };
                     75: double atan2(x, y) double x, y; { return x; };
                     76: double atof(s) char *s; { return 1.; }
                     77: int    atoi(s) char *s; { return 1; }
                     78: long   atol(s) char *s; { return 1L; }
                     79: double besj0(x) double x; { return x; };
                     80: double besj1(x) double x; { return x; };
                     81: double besjn(n, x) double x; { return x; };
                     82: double besy0(x) double x; { return x; };
                     83: double besy1(x) double x; { return x; };
                     84: double besyn(n, x) double x; { return x; };
                     85: char   *brk(a) char *a; { return ""; }
                     86: char   *calloc(n, s) unsigned n, s; { return ""; }
                     87: double ceil(x) double x; { return x; };
                     88: VOID   cfree(p) char *p; { }
                     89: int    chdir(s) char *s; { return 1; }
                     90: int    chmod(s, m) char *s; { return 1; }
                     91: int    chown(s, u, g) char *s; { return 1; }
                     92: int    chroot(d) char *d; { return 1; }
                     93: int    clearerr(stream)  FILE *stream; { return 1; }
                     94: int    close(f) { return 1; }
                     95: void   closedir(d)  DIR *d; { }
                     96: double cos(x) double x; { return x; };
                     97: double cosh(x) double x; { return x; };
                     98: int    creat(s, m) char *s; { return 1; }
                     99: char   *crypt(k, s) char *k, *s; { return ""; }
                    100: char   *ctime(c) time_t *c;{ return ""; }
                    101: int    dialout(c, t) char *c, *t; { return 1; }
                    102: int    dup(f) { return f; }
                    103: int    dup2(f1, f2) { return 1; }
                    104: char   *ecvt(v, n, d, s) double v; int *d, *s; { return ""; }
                    105: VOID   encrypt(s, i) char *s; { }
                    106: VOID   endfsent() { }
                    107: VOID   endgrent() { }
                    108: int    endpwent() { }
                    109: double erf(x) double x; { return x; };
                    110: double erfc(x) double x; { return x; };
                    111:        /* VARARGS */
                    112: int    execl(f, a) char *f, *a; { }
                    113:        /* VARARGS */
                    114: int    execlp(f, a) char *f, *a; { }
                    115:        /* VARARGS */
                    116: int    execle(name, a) char *name, *a; { }
                    117: int    execv(s, v) char *s, *v[]; { }
                    118: int    execvp(s, v) char *s, *v[]; { }
                    119: int    execve(n, a, e) char *n, *a[], *e[]; {  }
                    120: void   exit(s) { }
                    121: void   _exit(s) { }
                    122: double exp(x) double x; { return x; };
                    123: double fabs(x) double x; { return x; };
                    124: int    fchmod(fd, mode) { return 1; }
                    125: int    fchown(fd, owner, group) { return 1; }
                    126: int    fclose(f) FILE *f; { return 1;}
                    127: char   *fcvt(v, n, d, s) double v; int *d, *s; { return ""; }
                    128: FILE   *fdopen(fd, m) char *m; { return stdin;}
                    129: int    Fflush(fd) { return 1; }
                    130: int    fflush(f) FILE *f; { return 1;}
                    131: int    Fgetc(fd) { return 1; }
                    132: int    fgetc(stream)  FILE *stream; { return 1; }
                    133: int    fgetflab(fd, l) struct label *l; { return 1; }
                    134: char   *fgets( s, l, f ) char *s; FILE *f; { return ""; }
                    135: void   Finit(fd, s) char *s; { }
                    136: double floor(x) double x; { return x; };
                    137: double fmod(x, y) double x, y; { return 1; }
                    138: FILE   *fopen(s, m) char *s, *m; { return stdin; }
                    139: int    fork() { return 1; }
                    140:        /* VARARGS */  /*PRINTFLIKE2*/
                    141: int    Fprint(fd, s) char *s; { return 1; }
                    142:        /* VARARGS */  /*PRINTFLIKE2*/
                    143: int    fprint(fd, s) char *s; { return 1; }
                    144:        /* VARARGS */  /*PRINTFLIKE2*/
                    145: int    fprintf( f, s ) FILE *f; char *s; { }
                    146: int    Fputc(fd, c) { return 1; }
                    147: int    fputc(c, stream) FILE *stream; { return 1; }
                    148: int    fputs(s, f) char *s; FILE *f; { return 1;}
                    149: double frand() { return 1.; };
                    150: char   *Frdline(fd) { return ""; }
                    151: long   Fread(fd, s, n) char *s; long n; { return 1L; }
                    152: int    fread( p, s, n, f ) char *p; FILE *f; { return 1;}
                    153: VOID   free(p) char *p; { }
                    154: FILE   *freopen(s, m, f) char *s, *m; FILE *f; { return stdin; }
                    155: double frexp(v, e) double v; int *e; { return v; }
                    156:        /* VARARGS */ /*SCANFLIKE2*/
                    157: int    fscanf( f, s ) FILE *f; char *s; { return 1;}
                    158: long   Fseek(fd, o, p) long o; { return 1l; }
                    159: int    fseek(f, o, p) FILE *f; long o; { return 1; }
                    160: int    fsetflab(fd, l) struct label *l; { return 1; }
                    161: int    fstat(f, b) struct stat *b; { return 1; }
                    162: long   ftell(f) FILE *f; { return 1L; }
                    163: VOID   Ftie(i, o) { }
                    164: VOID   ftime(tp) struct timeb *tp; { }
                    165: int    ftw(p, f, d) char *p; int (*f)(); { return 1; }
                    166: void   Fundo(fd) { }
                    167: long   Fwrite(fd, s, n) char *s; long n; { return 1; }
                    168: int    fwrite( p, s, n, f ) char *p; FILE *f; { return 1;}
                    169: char   *galloc(n) unsigned n; { return ""; }
                    170: double gamma(x) double x; { return x; };
                    171: VOID   garbage( ) { }
                    172: int    gcd(a, b) { return 1; }
                    173: char   *gcvt(v, n, b) double v; char *b; { return ""; }
                    174: char   *getcwd(b, s) char *b; { return ""; }
                    175: int    getegid() { return 1; }
                    176: char   *getenv(name) char *name; { return ""; }
                    177: int    geteuid() { return 1; }
                    178: int    getfields(s, p, n) char *s, **p; { return 1; }
                    179: int    getflab(s, l) char *s; struct label *l; { return 1; }
                    180: struct fstab *getfsent() { return getfsent(); }
                    181: struct fstab *getfsfile(s) char *s; { return getfsfile(s); }
                    182: struct fstab *getfsspec(s) char *s; { return getfsspec(s); }
                    183: int    getgid() { return 1; }
                    184: struct group *getgrent() { return getgrent(); }
                    185: struct group *getgrgid(g) { return getgrgid(g); }
                    186: struct group *getgrnam(s) char *s; { return getgrnam(s); }
                    187: int    getgroups(n, g) short *g; { return 1; }
                    188: char   *getlogin() { return ""; }
                    189: int    getlogname(s) char *s; { return 1; }
                    190: int    getmfields(s, p, n) char *s, **p; { return 1; }
                    191: int    getopt(argc, argv, o) char **argv, *o; { return 1; }
                    192: char   *getpass(p) char *p; { return ""; }
                    193: int    getpid() { return 1; }
                    194: int    getplab(l, c) struct label *l, *c; { return 1; }
                    195: int    getppid() { return 1; }
                    196: struct passwd *getpwent() { return getpwent(); }
                    197: struct passwd *getpwnam(name) char *name; { return getpwnam(name); }
                    198: struct passwd *getpwuid(uid) { return getpwuid(uid); }
                    199: char   *gets(s) char *s; { return ""; }
                    200: int    getuid() { return 1; }
                    201: int    getw(stream)  FILE *stream; { return 1; }
                    202: char   *getwd(buf) char *buf; { return ""; }
                    203: VOID   gfree(p) char *p; { }
                    204: struct tm *gmtime(c) time_t *c; { return gmtime(c); }
                    205: double hypot(x, y) double x, y; { return x; };
                    206: VOID   ialloc(ptr, size) char *ptr; unsigned size; { }
                    207: int    ioctl(f, r, argp) struct sgttyb *argp; { return 1; }
                    208: int    isatty(fildes) { return 1; }
                    209: int    kill(p, s) { return 1; }
                    210: long   labs(n) long n; { return 1L; }
                    211: long   lcm(a, b) { return lcm(a, b); }
                    212: double ldexp(x,y) double x; { return x; };
                    213: int    link(a, b) char *a, *b; { return 1; }
                    214: struct tm *localtime(c) time_t *c; { return localtime(c); }
                    215: double log(x) double x; { return x; };
                    216: double log10(x) double x; { return x; };
                    217: VOID   longjmp(env, val) jmp_buf env; { }
                    218: long   lrand() { return lrand(); }
                    219: long   lseek(f, o, d) long o; { return 1; }
                    220: int    lstat(n, b) char *n; struct stat *b; { return 1; }
                    221: VOID   ltol3(cp, lp, n) char *cp; long *lp; { }
                    222: char   *malloc(n) unsigned n; { return "";}
                    223: int    max(a, b) { return 1; }
                    224: char   *memccpy(s1, s2, c, n) char *s1, *s2; { return ""; }
                    225: char   *memchr(s, c, n) char *s; { return ""; }
                    226: int    memcmp(s1, s2, n) char *s1, *s2; { return 1; }
                    227: char   *memcpy(s1, s2, n) char *s1, *s2; { return ""; }
                    228: char   *memset(s, c, n) char *s; { return ""; } 
                    229: int    min(a, b) { return 1; }
                    230: int    mkdir(s,m) char *s; { return 1; }
                    231: int    mknod(n, m, a) char *n; { return 1; }
                    232: char   *mktemp(p) char *p; { return "";}
                    233: double modf(v, iptr) double v, *iptr; { return v; }
                    234: VOID   monitor(l, h, b, s, n) int (*l)(), (*h)(); short *b; { }
                    235: int    mount(s, n, f) char *s, *n; { return 1; }
                    236: void   nap(i) { }
                    237: void   nice(p) { }
                    238: VOID   nlist(s, p) struct nlist *p; { }
                    239: int    nrand(val) { return 1; }
                    240: int    onexit(f) int (*f)(); { return 1; }
                    241: int    open(f, m) char *f; { return 1; }
                    242: DIR    *opendir(f) char *f; { return opendir(f); }
                    243: void   pause() { }
                    244: int    pclose(stream) FILE *stream; { return 1; }
                    245: VOID   perror(s) char *s; { }
                    246: int    pipe(f) int f[2]; { return 1; }
                    247: FILE   *popen(c, t) char *c, *t; { return popen(c, t); }
                    248: double pow(x, y) double x, y; { return x; }
                    249: double pow10(n) { return 1.; }
                    250: FILE   *ppopen(c, t) char *c, *t; { return ppopen(c, t); }
                    251:        /* VARARGS */ /*PRINTFLIKE1*/
                    252: int    print( s ) char *s; { }
                    253:        /* VARARGS */ /*PRINTFLIKE1*/
                    254: int    printf( s ) char *s; { }
                    255: void   profil(b, s, o, i) char *b; { }
                    256: int    ptopen(name) char *name; { return 1; }
                    257: int    puts(s) char *s; { return 1;}
                    258: int    putw(w, stream) FILE *stream; { return 1; }
                    259: VOID   qsort(b, n, w, compar) char *b; int (*compar)(); { }
                    260: struct passwd *pwdecode(p) char *p; { return pwdecode(p); }
                    261: int    rand( ) { return 1; }
                    262: regexp *regcomp(s) char *s; { return regcomp(s); }
                    263: int    regexec(p, s, m, n) regexp *p; char *s; regsubexp *m; { return 1; }
                    264: void   regsub(s, t, m, n) char *s, *t; regsubexp *m; { }
                    265: int    read(f, b, l) char *b; { return l; }
                    266: struct direct *readdir(d) DIR *d; { return readdir(d); }
                    267: int    readlink(name, b, s) char *name, *b; { return 1; }
                    268: char   *realloc(p, n) char *p; unsigned n; { return "";}
                    269: VOID   rewind(f) FILE *f; { }
                    270: int    rmdir(s) char *s; { return 1; }
                    271: char   *sbrk(i) { return ""; }
                    272:        /* VARARGS */ /*SCANFLIKE1*/
                    273: int    scanf( f ) char *f; { return 1; }
                    274: void   seekdir(d, loc)  DIR *d; { }
                    275: int    select(n, r, w, m) fd_set *r, *w; { return 1; }
                    276: VOID   setbuf( f, b ) FILE *f; char *b; { }
                    277: VOID   setfields(s) char *s; { }
                    278: int    setflab(s, l) char *s; struct label *l; { return 1; }
                    279: int    setfsent() { return 1; }
                    280: int    setgid(g) { return 1; }
                    281: int    setgrent() { return 1; }
                    282: int    setgroups(n, g) short *g; { return 1; }
                    283: int    setjmp(e) jmp_buf e; { return 1; }
                    284: VOID   setkey(k) char *k; { }
                    285: int    setlogname(s) char *s; { return 1; }
                    286: int    setplab(s, l) char *s; struct label *l; { return 1; }
                    287: int    setpwent() { return 1; }
                    288: int    setruid(u) { return 1; }
                    289: unsigned long  settod(u) unsigned long u; { return u; }
                    290: int    setuid(u) { return 1; }
                    291: int    sgn(a) { return 1; }
                    292: SIG_TYP        signal(c, f) SIG_TYP f; { return f; }
                    293: double sin(x) double x; { return x; };
                    294: double sinh(x) double x; { return x; };
                    295: VOID   sleep(i) unsigned i; { }
                    296:        /* VARARGS */ /*PRINTFLIKE2*/
                    297: int    sprint( s, f ) char *s, *f; { return 1;}
                    298:        /* VARARGS */ /*PRINTFLIKE2*/
                    299: int    sprintf( s, f ) char *s, *f; { return 1;}
                    300: double sqrt(x) double x; { return x; };
                    301: VOID   srand(seed) { }
                    302:        /* VARARGS */ /*SCANFLIKE2*/
                    303: int    sscanf( s, f ) char *s, *f; { return 1; }
                    304: int    stat(s, b) char *s; struct stat *b; { return 1; }
                    305: int    stime(tp) long *tp; { return 1; }
                    306: char   *strcat(a, b) char *a, *b; { return ""; }
                    307: char   *strchr(s, c) char *s; { return ""; }
                    308: int    strcmp(a, b) char *a, *b; { return 1; }
                    309: VOID   strconv(s, m, n) char *s; { }
                    310: char   *strcpy(a, b) char *a, *b; { return ""; }
                    311: int    strcspn(s1, s2) char *s1, *s2; { return 1; }
                    312: char   *strdup(s) char *s; { return ""; }
                    313: int    strlen(s) char *s; { return 1; }
                    314: char   *strncat(s1, s2, n) char *s1, *s2; { return ""; }
                    315: int    strncmp(s1, s2, n) char *s1, *s2; { return 1; }
                    316: char   *strncpy(s1, s2, n) char *s1, *s2; { return ""; }
                    317: char   *strpbrk(s1, s2) char *s1, *s2; { return ""; }
                    318: char   *strrchr(s, c) char *s; { return ""; }
                    319: int    strspn(s1, s2) char *s1, *s2; { return 1; }
                    320: double strtod(s, r) char *s, **r; { return 1.; }
                    321: char   *strtok(s1, s2) char *s1, *s2; { return ""; }
                    322: VOID   swab(a, b, n) char *a, *b; { }
                    323: int    symlink(s1, s2) char *s1, *s2; { return 1; }
                    324: void   sync() { }
                    325:        /* VARARGS */
                    326: int    syscall(n) { }
                    327: int    system(s) char *s; { return 1; }
                    328: double tan(x) double x; { return x; };
                    329: double tanh(x) double x; { return x; };
                    330: long   telldir(d)  DIR *d; { return 1L; }
                    331: time_t time(t) time_t *t; { return  1;}
                    332: long   timec(s) char *s; { return 1L; }
                    333: long   timegm(t) struct tm *t; { return 1L; }
                    334: long   timelocal(t, s) struct tm *t; char *s; { return 1L; }
                    335: int    times(b) struct tms *b; { }
                    336: char   *timezone(z, dst) { return ""; }
                    337: char   *tmpnam(s) char s[L_tmpnam]; { return ""; }
                    338: int    tolower(c) { return 1; }
                    339: int    toupper(c) { return 1; }
                    340: char   *ttyname(f) { return ""; }
                    341: int    ttyslot() { return 1; }
                    342: int    umask(complmode) { return 1; }
                    343: int    umount(special) char *special; { return 1; }
                    344: int    uname(name) struct utsname *name; { return 1; }
                    345: int    ungetc( c, f ) FILE *f; {  return c; }
                    346: int    unlink(s) char *s; { return 1; }
                    347: int    utime(file, tp) char *file; time_t tp[2];  { return 1; }
                    348: int    wait(s) int *s; { return 1; }
                    349: int    write(f, b, l) char *b; { return l; }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.