Annotation of researchv10no/cmd/lcc/etc/hart.c, revision 1.1

1.1     ! root        1: /* DECStations running ULTRIX at Princeton University */
        !             2: 
        !             3: #include <string.h>
        !             4: 
        !             5: char *cpp[] = {
        !             6:        "/usr/gnu/lib/gcc-cpp", "-undef",
        !             7:        "-DLANGUAGE_C", "-D_LANGUAGE_C", "-D__LANGUAGE_C",
        !             8:        "-D_unix", "-D__unix",
        !             9:        "-Dultrix", "-D_ultrix", "-D__ultrix",
        !            10:        "-Dmips", "-D_mips", "-D__mips",
        !            11:        "-Dhost_mips", "-D_host_mips", "-D__host_mips",
        !            12:        "-DMIPSEL", "-D_MIPSEL", "-D__MIPSEL",
        !            13:        "$1", "$2", "$3", 0 };
        !            14: char *include[] = { "-I/usr/local/include/ansi", 0 };
        !            15: char *com[] =  { "/usr/local/lib/rcc", "$1", "$2", "$3", 0 };
        !            16: char *as[] =  { "/bin/as", "-o", "$3", "", "$1",
        !            17:        "-nocpp", "-EL", "$2", 0 };
        !            18: char *ld[] =  { "/usr/bin/ld", "-o", "$3", "/usr/lib/crt0.o",
        !            19:        "$1", "$2", "", "", "-lm", "-lc", 0 };
        !            20: 
        !            21: int option(arg) char *arg; {
        !            22:        if (strcmp(arg, "-g") == 0)
        !            23:                as[3] = "-g";
        !            24:        else if (strcmp(arg, "-p") == 0
        !            25:        && strcmp(ld[3], "/usr/lib/crt0.o") == 0) {
        !            26:                ld[3] = "/usr/lib/mcrt0.o";
        !            27:                ld[7] = "/usr/lib/libprof1.a";
        !            28:        } else if (strcmp(arg, "-b") == 0
        !            29:        && access("/usr/local/lib/bbexit.o", 4) == 0)
        !            30:                ld[6] = "/usr/local/lib/bbexit.o";
        !            31:        else
        !            32:                return 0;
        !            33:        return 1;
        !            34: }

unix.superglobalmegacorp.com

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