Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.238
 
1.239
 
MAIN:ragge:20120810112707
 
cc.c
_>281281 int     nostartfiles, Bstatic, shared;
 282282 int     nostdinc, nostdlib;
 283283 int     pthreads;
<>284 -int     xasm, xcflag, xgnu89, xgnu99;
  284+int     xgnu89, xgnu99;
285285 int     ascpp;
 286286 #ifdef CHAR_UNSIGNED
 287287 int     xuchar = 1;
     
 !
394394         struct Wflags *Wf;
 395395         struct string *s;
 396396         char *t, *u, *argp;
<> 397+        char *msuffix;
397398         int ninput, j;
 398399 
 399400         lav = argv;
     
 !
695696                 case 'x':
 696697                         t = nxtopt("-x");
 697698                         if (match(t, "c"))
<>698 -                                xcflag = 1; /* default */
  699+                                strlist_append(&inputs, ")c");
699700                         else if (match(t, "assembler"))
<>700 -                                xasm = 1;
  701+                                strlist_append(&inputs, ")s");
701702                         else if (match(t, "assembler-with-cpp"))
<>702 -                                ascpp = 1;
  703+                                strlist_append(&inputs, ")S");
703704                         else if (match(t, "c++"))
<>704 -                                cxxflag++;
  705+                                strlist_append(&inputs, ")c++");
705706                         else {
 706707                                 strlist_append(&compiler_flags, "-x");
 707708                                 strlist_append(&compiler_flags, t);
     
 !
800801                 if (ninput == 0) {
 801802                         strlist_append(&inputs, "-");
 802803                         ninput++;
<>803 -                        xcflag++;
804804                 } else if (ninput > 2 || (ninput == 2 && outfile)) {
 805805                         errorx(8, "too many files");
 806806                 } else if (ninput == 2) {
     
 !
842842                 isysroot = sysroot;
 843843         expand_sysroot();
 844844 
<> 845+        msuffix = NULL;
845846         STRLIST_FOREACH(s, &inputs) {
 846847                 char *suffix;
 847848                 char *ifile, *ofile;
     
 !
850851                 if (ninput > 1 && !Eflag)
 851852                         printf("%s:\n", ifile);
 852853 
<>853 -                suffix = getsufp(ifile);
 854 -                if (xasm)
 855 -                        suffix = "s";
 856 -                else if (ascpp)
 857 -                        suffix = "S";
 858 -                else if (xcflag)
 859 -                        suffix = "c";
  854+                if (ifile[0] == ')') {
  855+                        msuffix = &ifile[1]; /* -x source type given */
  856+                        ascpp = match(msuffix, "S");
  857+                        continue;
  858+                }
  859+                if (ifile[0] == '-' && ifile[1] != 0)
  860+                        suffix = "o"; /* source files cannot begin with - */
  861+                else if (msuffix)
  862+                        suffix = msuffix;
  863+                else
  864+                        suffix = getsufp(ifile);
<_860865                 /*
 861866                  * C preprocessor
 862867                  */
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-10-02 16:32 +0200