added -f option to use short floats (non-standard).
authorRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Fri, 25 Jan 1985 01:21:56 +0000 (17:21 -0800)
committerRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Fri, 25 Jan 1985 01:21:56 +0000 (17:21 -0800)
SCCS-vsn: old/pcc/cc/cc.c 4.11

usr/src/old/pcc/cc/cc.c

index a11e321..846b9e7 100644 (file)
@@ -1,4 +1,4 @@
-static char sccsid[] = "@(#)cc.c 4.10 %G%";
+static char sccsid[] = "@(#)cc.c 4.11 %G%";
 /*
  * cc - front end for C compiler
  */
 /*
  * cc - front end for C compiler
  */
@@ -10,6 +10,7 @@ static        char sccsid[] = "@(#)cc.c 4.10 %G%";
 
 char   *cpp = "/lib/cpp";
 char   *ccom = "/lib/ccom";
 
 char   *cpp = "/lib/cpp";
 char   *ccom = "/lib/ccom";
+char   *sccom = "/lib/sccom";
 char   *c2 = "/lib/c2";
 char   *as = "/bin/as";
 char   *ld = "/bin/ld";
 char   *c2 = "/lib/c2";
 char   *as = "/bin/as";
 char   *ld = "/bin/ld";
@@ -22,7 +23,7 @@ char  *savestr(), *strspl(), *setsuf();
 int    idexit();
 char   **av, **clist, **llist, **plist;
 int    cflag, eflag, oflag, pflag, sflag, wflag, Rflag, exflag, proflag;
 int    idexit();
 char   **av, **clist, **llist, **plist;
 int    cflag, eflag, oflag, pflag, sflag, wflag, Rflag, exflag, proflag;
-int    gflag, Gflag, Mflag, debug;
+int    fflag, gflag, Gflag, Mflag, debug;
 char   *dflag;
 int    exfail;
 char   *chpass;
 char   *dflag;
 int    exfail;
 char   *chpass;
@@ -75,6 +76,9 @@ main(argc, argv)
                        if (argv[i][2] == 'g')
                                crt0 = "/usr/lib/gcrt0.o";
                        continue;
                        if (argv[i][2] == 'g')
                                crt0 = "/usr/lib/gcrt0.o";
                        continue;
+               case 'f':
+                       fflag++;
+                       continue;
                case 'g':
                        if (argv[i][2] == 'o') {
                            Gflag++;    /* old format for -go */
                case 'g':
                        if (argv[i][2] == 'o') {
                            Gflag++;    /* old format for -go */
@@ -158,7 +162,10 @@ main(argc, argv)
                switch (*t) {
 
                case '0':
                switch (*t) {
 
                case '0':
-                       ccom = strspl(npassname, "ccom");
+                       if (fflag)
+                               sccom = strspl(npassname, "sccom");
+                       else
+                               ccom = strspl(npassname, "ccom");
                        continue;
                case '2':
                        c2 = strspl(npassname, "c2");
                        continue;
                case '2':
                        c2 = strspl(npassname, "c2");
@@ -217,7 +224,8 @@ main(argc, argv)
                                tmp3 = setsuf(clist[i], 's');
                        assource = tmp3;
                }
                                tmp3 = setsuf(clist[i], 's');
                        assource = tmp3;
                }
-               av[0] = "ccom"; av[1] = tmp4; av[2] = oflag?tmp5:tmp3; na = 3;
+               av[0] = fflag ? "sccom" : "ccom";
+               av[1] = tmp4; av[2] = oflag?tmp5:tmp3; na = 3;
                if (proflag)
                        av[na++] = "-XP";
                if (gflag) {
                if (proflag)
                        av[na++] = "-XP";
                if (gflag) {
@@ -228,7 +236,7 @@ main(argc, argv)
                if (wflag)
                        av[na++] = "-w";
                av[na] = 0;
                if (wflag)
                        av[na++] = "-w";
                av[na] = 0;
-               if (callsys(ccom, av)) {
+               if (callsys(fflag ? sccom : ccom, av)) {
                        cflag++;
                        eflag++;
                        continue;
                        cflag++;
                        eflag++;
                        continue;