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