*/
# include <signal.h>
-
+# include <time.h>
/*
** Ensure that WIN32 and _WIN32 are both defined or both undefined.
*/
# include "cgrammar.h"
# include "llmain.h"
# include "portab.h"
-# include "cpp.h"
-# include "mtreader.h"
-# include <time.h>
+
extern /*@external@*/ int yydebug;
static void showHelp (void);
static void interrupt (int p_i);
-static void loadrc (/*@open@*/ FILE *p_rcfile, cstringSList *p_passThroughArgs)
- /*@ensures closed p_rcfile@*/ ;
+static void loadrc (FILE *p_rcfile, cstringSList *p_passThroughArgs)
+ /*@ensures closed p_rcfile@*/ ;
static void describeVars (void);
static bool specialFlagsHelp (char *p_next);
if (open)
{
showHerald ();
- llerror (FLG_BADFLAG,
- message ("Unclosed quote in flag: %s",
- cstring_fromChars (arg)));
+ voptgenerror (FLG_BADFLAG,
+ message ("Unclosed quote in flag: %s",
+ cstring_fromChars (arg)),
+ g_currentloc);
}
else
{
else
{
DPRINTF (("Error!"));
- llgloberror (message ("Unrecognized option: %s",
- cstring_fromChars (thisarg)));
+ voptgenerror (FLG_BADFLAG,
+ message ("Unrecognized option: %s",
+ cstring_fromChars (thisarg)),
+ g_currentloc);
}
}
else
}
void
-loadrc (/*@open@*/ FILE *rcfile, cstringSList *passThroughArgs)
- /*@ensures closed rcfile@*/
+loadrc (/*:open:*/ FILE *rcfile, cstringSList *passThroughArgs)
+ /*@ensures closed rcfile@*/
{
char *s = mstring_create (MAX_LINE_LENGTH);
char *os = s;
else
{
showHerald ();
- llerror (FLG_SYNTAX,
- message ("Bad flag syntax (+ or - expected, "
- "+ is assumed): %s",
- cstring_fromChars (s)));
+ voptgenerror (FLG_BADFLAG,
+ message ("Bad flag syntax (+ or - expected, "
+ "+ is assumed): %s",
+ cstring_fromChars (s)),
+ g_currentloc);
s--;
set = TRUE;
}
}
else
{
- llerror (FLG_BADFLAG,
- message ("Unrecognized option: %s",
- cstring_fromChars (thisflag)));
+ voptgenerror (FLG_BADFLAG,
+ message ("Unrecognized option: %s",
+ cstring_fromChars (thisflag)),
+ g_currentloc);
}
}
else
if (opt == FLG_HELP)
{
showHerald ();
- llerror (FLG_BADFLAG,
- message ("Cannot use help in rc files"));
+ voptgenerror (FLG_BADFLAG,
+ message ("Cannot use help in rc files"),
+ g_currentloc);
}
else if (flagcode_isPassThrough (opt)) /* -D or -U */
{
if (cstring_isUndefined (extra))
{
showHerald ();
- llerror
+ voptgenerror
(FLG_BADFLAG,
message
("Flag %s must be followed by an argument",
- flagcode_unparse (opt)));
+ flagcode_unparse (opt)),
+ g_currentloc);
}
else
{
else
{
showHerald ();
- llerror
- (FLG_SYNTAX,
+ voptgenerror
+ (FLG_BADFLAG,
message ("Options file not found: %s",
- extra));
+ extra),
+ g_currentloc);
}
}
else if (opt == FLG_INIT)
}
else
{
- llerror
- (FLG_SYNTAX,
+ voptgenerror
+ (FLG_BADFLAG,
message ("Unmatched \" in option string: %s",
- extra));
+ extra),
+ g_currentloc);
}
}