/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
int Pflag = 0; /* print no line information */ int Iflag = 0; /* print includes */ int Mflag = 0; /* print macro expansion */ int Xflag = 0; /* print pragma for include/import */ int Vflag = 0; /* verbose flag */ int Cflag = 0; /* do not remove any comments */ int Dflag = 0; /* add parameter check to delete op */ int Cplusplus = 0;
void
setup(int argc, char **argv)
{ int c, fd, i, n; char *fp, *dp;
Tokenrow tr;
setup_kwtab(); #ifdefined(MACOSX) || defined(_WIN32) while ((c = stgetopt(argc, argv, "NOPV:I:D:U:F:A:X:u:l:+")) != -1) #else while ((c = getopt(argc, argv, "NOPV:I:D:U:F:A:X:u:l:+")) != -1) #endif switch (c)
{ case'N': for (i = 0; i < NINCLUDE; i++) if (includelist[i].always == 1)
includelist[i].deleted = 1; break;
case'I': for (i = NINCLUDE - 2; i >= 0; i--)
{ if (includelist[i].file == NULL)
{
includelist[i].always = 1;
includelist[i].file = optarg; break;
}
} if (i < 0)
error(FATAL, "Too many -I directives"); break;
case'D': case'U': case'A':
setsource("", -1, -1, optarg, 0);
maketokenrow(3, &tr); // coverity[overrun-buffer-arg: FALSE] - a multiple of trp->max is allocated, not trp->max itself
gettokens(&tr, 1);
doadefine(&tr, c);
dofree(tr.bp);
unsetsource(); break;
case'P': /* Lineinfo */
Pflag++; break;
case'V': for (n = 0;; n++)
{
c = optarg[n]; if (c == '\0') break; switch (c)
{ case'i':
Iflag++; break;
case'X': for (n = 0;; n++)
{
c = optarg[n]; if (c == '\0') break; switch (c)
{ case'i':
Xflag++; break;
case'c':
Cflag++; break;
case'd':
Dflag++; break;
case'w':
dp = &optarg[n + 1];
n += (int)strlen(dp); while (isspace((unsignedchar)*dp)) dp++;
for (i = NINCLUDE - 1; i >= 0; i--)
{ if (wraplist[i].file == NULL)
{
wraplist[i].file = dp; break;
}
} if (i < 0)
error(WARNING, "Too many -Xw directives"); break;
¤ 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.0.14Bemerkung:
(vorverarbeitet)
¤
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 ist noch experimentell.