From 2cfb0e462faa1bbfe585cdddc46ae70c1650cb58 Mon Sep 17 00:00:00 2001 From: fche Date: Fri, 13 Jan 2006 22:36:42 +0000 Subject: [PATCH] 2006-01-13 Frank Ch. Eigler * main.cxx (main): Suppress "Try again with -v" message if already verbose. --- ChangeLog | 5 +++++ main.cxx | 19 ++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 512c86b44..37b6e5b87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-13 Frank Ch. Eigler + + * main.cxx (main): Suppress "Try again with -v" message if already + verbose. + 2006-01-13 Frank Ch. Eigler * translate.cxx (c_unparser:getmap): Correct exception throwing typo. diff --git a/main.cxx b/main.cxx index 8e7b882ec..648032d8e 100644 --- a/main.cxx +++ b/main.cxx @@ -378,6 +378,11 @@ main (int argc, char * const argv []) << s.library_files.size() << " library script(s)." << endl; + if (rc) + cerr << "Pass 1: parse failed. " + << (s.verbose ? "" : "Try again with '-v' (verbose) option.") + << endl; + if (rc || s.last_pass == 1) goto cleanup; // PASS 2: ELABORATION @@ -438,7 +443,8 @@ main (int argc, char * const argv []) if (rc) cerr << "Pass 2: analysis failed. " - << "Try again with '-v' (verbose) option." << endl; + << (s.verbose ? "" : "Try again with '-v' (verbose) option.") + << endl; if (rc || s.last_pass == 2) goto cleanup; @@ -457,8 +463,9 @@ main (int argc, char * const argv []) << "\"" << endl; if (rc) - cerr << "Pass 2: translation failed. " - << "Try again with '-v' (verbose) option." << endl; + cerr << "Pass 3: translation failed. " + << (s.verbose ? "" : "Try again with '-v' (verbose) option.") + << endl; if (rc || s.last_pass == 3) goto cleanup; @@ -467,7 +474,8 @@ main (int argc, char * const argv []) if (rc) cerr << "Pass 4: compilation failed. " - << "Try again with '-v' (verbose) option." << endl; + << (s.verbose ? "" : "Try again with '-v' (verbose) option.") + << endl; // XXX: what to do if rc==0 && last_pass == 4? dump .ko file to stdout? if (rc || s.last_pass == 4) goto cleanup; @@ -477,7 +485,8 @@ main (int argc, char * const argv []) if (rc) cerr << "Pass 5: run failed. " - << "Try again with '-v' (verbose) option." << endl; + << (s.verbose ? "" : "Try again with '-v' (verbose) option.") + << endl; // if (rc) goto cleanup; -- 2.43.5