Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.
while (psymp->p_name)
{
hash_define(psymp->p_name, psymp->p_value, &maininclist);
psymp++;
} if (argc == 2 && argv[1][0] == '@') { struct stat ast; int afd; char *args; char **nargv; int nargc; char quotechar = '\0';
nargc = 1; if ((afd = open(argv[1]+1, O_RDONLY)) < 0)
fatalerr("cannot open \"%s\"\n", argv[1]+1);
(void)fstat(afd, &ast);
args = (char *)malloc(ast.st_size + 1); if (args == NULL) {
abort();
} if ((ast.st_size = read(afd, args, (size_t) ast.st_size)) < 0)
fatalerr("failed to read %s\n", argv[1]+1);
args[ast.st_size] = '\0';
close(afd); for (p = args; *p; p++) { if (quotechar) { if (quotechar == '\\'
|| (*p == quotechar && p[-1] != '\\'))
quotechar = '\0'; continue;
} switch (*p) { case'\\': case'"': case'\'':
quotechar = *p; break; case' ': case'\n':
*p = '\0'; if (p > args && p[-1])
nargc++; break;
}
} if (p[-1])
nargc++;
nargv = (char **)malloc(nargc * sizeof(char *));
nargv[0] = argv[0];
argc = 1; for (p = args; argc < nargc; p += strlen(p) + 1) if (*p) nargv[argc++] = p;
argv = nargv;
} for(argc--, argv++; argc; argc--, argv++) { /* if looking for endmarker then check before parsing */ if (endmarker && strcmp (endmarker, *argv) == 0) {
endmarker = NULL; continue;
} if (**argv != '-') { /* treat +thing as an option for C++ */ if (endmarker && **argv == '+') continue;
*fp++ = argv[0]; continue;
} switch(argv[0][1]) { case'-':
endmarker = &argv[0][2]; if (endmarker[0] == '\0') endmarker = "--"; break; case'D': if (argv[0][2] == '\0') {
argv++;
argc--;
} for (p=argv[0] + 2; *p ; p++) if (*p == '=') {
*p = ' '; break;
}
define(argv[0] + 2, &maininclist); break; case'I': if (incp >= includedirs + MAXDIRS)
fatalerr("Too many -I flags.\n");
*incp++ = argv[0]+2; if (**(incp-1) == '\0') {
*(incp-1) = *(++argv);
argc--;
} break; case'Y':
defincdir = argv[0]+2; break; /* do not use if endmarker processing */ case'a': break; case'w': if (endmarker) break; if (argv[0][2] == '\0') {
argv++;
argc--;
} break; case'n': // Use "-n" switch to generate dependencies with windows-native slash style
native_win_slashes = TRUE; break; case'o': if (endmarker) break; if (argv[0][2] == '\0') {
argv++;
argc--;
objsuffix = argv[0];
} else
objsuffix = argv[0]+2; break; case'p': if (endmarker) break; if (argv[0][2] == '\0') {
argv++;
argc--;
objprefix = argv[0];
} else
objprefix = argv[0]+2; break; case'v': if (endmarker) break;
verbose = TRUE; #if OSL_DEBUG_LEVEL >= 2 if (argv[0][2])
_debugmask = atoi(argv[0]+2); #endif break; case's': if (endmarker) break;
startat = argv[0]+2; if (*startat == '\0') {
startat = *(++argv);
argc--;
} if (*startat != '#')
fatalerr("-s flag's value should start %s\n", "with '#'."); break; case'f': if (endmarker) break;
makefile = argv[0]+2; if (*makefile == '\0') {
makefile = *(++argv);
argc--;
} break;
case'm':
warn_multiple = TRUE; break;
/* Ignore -O, -g so we can just pass ${CFLAGS} to makedepend
*/ case'O': case'g': break; default: if (endmarker) break;
warning("ignoring option %s\n", argv[0]);
}
}
size_backup = st.st_size;
malloc_size = size_backup; /* Since off_t usually is larger than unsigned, need to test for * truncation.
*/ if ( (off_t)malloc_size != size_backup )
{
close( fd );
warning("makedepend: File \"%s\" is too large.\n", file);
content->f_p = content->f_base = content->f_end = (char *)malloc(1);
*content->f_p = '\0'; return content;
}
content->f_base = (char *)malloc(malloc_size+1); if (content->f_base == NULL)
fatalerr("makedepend: Cannot allocate memory to process file \"%s\"\n", file); if ((bytes_read = read(fd, content->f_base, malloc_size)) < 0) if ( st.st_mode & S_IFREG )
fatalerr("makedepend: Failed to read file \"%s\"\n", file);
for (i=0; *list; i++, list++) if (strcmp(str, *list) == 0) return i; return -1;
}
/* * Get the next line. We only return lines beginning with '#' since that * is all this program is ever interested in.
*/ char *get_line(struct filepointer *filep)
{ char *p, /* walking pointer */
*eof, /* end of file pointer */
*bol; /* beginning of line pointer */ int lineno; /* line number */
p = filep->f_p;
eof = filep->f_end; if (p >= eof) return (char *)NULL;
lineno = filep->f_line;
*p++ = '\0'; /* punt lines with just # (yacc generated) */ for (cp = bol+1;
*cp && (*cp == ' ' || *cp == '\t'); cp++); if (*cp) goto done;
}
bol = p+1;
}
} if (*bol != '#')
bol = NULL;
done:
filep->f_p = p;
filep->f_line = lineno; return bol;
}
/* * Strip the file name down to what we want to see in the Makefile. * It will have objprefix and objsuffix around it.
*/ char *base_name(char *file)
{ char *p;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.