Changeset 168


Ignore:
Timestamp:
Oct 13, 2004, 4:06:32 AM (21 years ago)
Author:
bird
Message:

Merged in mozilla changes and config.

Location:
trunk/src/makedep
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/makedep/def.h

    r164 r168  
    2727/* $XFree86: xc/config/makedepend/def.h,v 3.13tsi Exp $ */
    2828
    29 #include "Xos.h"
    30 #include "Xfuncproto.h"
     29#ifndef NO_X11 /* from mozilla */
     30#include "X11/Xos.h"
     31#include "X11/Xfuncproto.h"
     32#endif
    3133#include <stdlib.h>
    3234#include <stdio.h>
     
    8183/*
    8284 * debug levels are:
    83  * 
     85 *
    8486 *     0        show ifn*(def)*,endif
    8587 *     1        trace defined/!defined
     
    148150                                   struct inclist **srcfile);
    149151struct filepointer      *getfile(char *file);
    150 void                    included_by(struct inclist *ip, 
     152void                    included_by(struct inclist *ip,
    151153                                    struct inclist *newfile);
    152154struct inclist          *newinclude(char *newfile, char *incstring);
     
    159161void                    define(char *def, struct inclist *file);
    160162void                    undefine(char *symbol, struct inclist *file);
    161 int                     find_includes(struct filepointer *filep, 
    162                                       struct inclist *file, 
    163                                       struct inclist *file_red, 
     163int                     find_includes(struct filepointer *filep,
     164                                      struct inclist *file,
     165                                      struct inclist *file_red,
    164166                                      int recursion, boolean failOK);
    165167
    166 void                    recursive_pr_include(struct inclist *head, 
     168void                    recursive_pr_include(struct inclist *head,
    167169                                             char *file, char *base);
    168 void                    add_include(struct filepointer *filep, 
    169                                     struct inclist *file, 
    170                                     struct inclist *file_red, 
     170void                    add_include(struct filepointer *filep,
     171                                    struct inclist *file,
     172                                    struct inclist *file_red,
    171173                                    char *include, int type,
    172174                                    boolean failOK);
  • trunk/src/makedep/include.c

    r164 r168  
    2929
    3030#include "def.h"
     31
     32/* mozilla: */
     33#ifdef _MSC_VER
     34#define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR)
     35#endif
    3136
    3237extern struct   inclist inclist[ MAXFILES ],
     
    119124                    char **tp = cp;
    120125
    121                     do 
     126                    do
    122127                        *tp++ = *fp; /* move all the pointers down */
    123128                    while (*fp++);
     
    267272                    (type == INCLUDENEXTDOT) ||
    268273                    (*include == '/')) {
    269                         if (stat(include, &st) == 0)
     274                        if (stat(include, &st) == 0 && !S_ISDIR(st.st_mode)) /* mozilla */
    270275                                return newinclude(include, include);
    271276                        if (show_where_not)
     
    289294                        }
    290295                        remove_dotdot(path);
    291                         if (stat(path, &st) == 0)
     296                        if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) /* mozilla */
    292297                                return newinclude(path, include);
    293298                        if (show_where_not)
     
    307312                sprintf(path, "%s/%s", *pp, include);
    308313                remove_dotdot(path);
    309                 if (stat(path, &st) == 0) {
     314                if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) { /* mozilla */
    310315                        includedirsnext = pp + 1;
    311316                        return newinclude(path, include);
  • trunk/src/makedep/main.c

    r164 r168  
    158158        char **undeflist = NULL;
    159159        int numundefs = 0, i;
     160        register char offset; /* mozilla */
    160161
    161162        ProgramName = argv[0];
     
    232233                        break;
    233234                case 'D':
     235                        offset = 2; /* mozilla */
     236Imaginary Buffer Line
    234237                        if (argv[0][2] == '\0') {
    235238                                argv++;
    236239                                argc--;
    237                         }
    238                         for (p=argv[0] + 2; *p ; p++)
     240                                offset = 0;
     241                        }
     242                        /* offset +1 here since first def letter
     243                         * cannot be `=`
     244                         */
     245                        for (p = argv[0] + offset + 1; *p; p++) /* mozilla */
    239246                                if (*p == '=') {
    240247                                        *p = ' ';
    241248                                        break;
    242249                                }
    243                         define(argv[0] + 2, &maininclist);
     250                        define(argv[0] + offset, &maininclist); /* mozilla */
    244251                        break;
    245252                case 'I':
     
    260267                            undeflist = realloc(undeflist,
    261268                                                numundefs * sizeof(char *));
     269                        offset = 2;  /* mozilla */
    262270                        if (argv[0][2] == '\0') {
    263271                                argv++;
    264272                                argc--;
    265                         }
    266                         undeflist[numundefs - 1] = argv[0] + 2;
     273                                offset = 0;  /* mozilla */
     274                        }
     275                        undeflist[numundefs - 1] = argv[0] + offset; /* mozilla */
    267276                        break;
    268277                case 'Y':
     
    510519 * eliminate \r chars from file
    511520 */
    512 static int 
     521static int
    513522elim_cr(char *buf, int sz)
    514523{
     
    634643                        whitespace = TRUE;
    635644                }
    636        
     645
    637646                if (*p == '/' && (p+1) < eof && *(p+1) == '*') {
    638647                        /* Consume C comments */
     
    662671                                }
    663672                                else if (*p == '?' && (p+3) < eof &&
    664                                          *(p+1) == '?' && 
     673                                         *(p+1) == '?' &&
    665674                                         *(p+2) == '/' &&
    666675                                         *(p+3) == '\n') {
     
    698707                                *(p++) = '\0';
    699708                                /* punt lines with just # (yacc generated) */
    700                                 for (cp = bol+1; 
     709                                for (cp = bol+1;
    701710                                     *cp && (*cp == ' ' || *cp == '\t'); cp++);
    702711                                if (*cp) goto done;
Note: See TracChangeset for help on using the changeset viewer.