Commit c04d30b2 authored by johnvg@science.ru.nl's avatar johnvg@science.ru.nl

remove verbose printing and some unused code and definitions from

backend
parent 8c44cc9d
......@@ -99,7 +99,6 @@ Bool CallCompiler (int argc, char **argv)
#endif
DoWarning = True;
DoVerbose = False;
DoCode = True;
DoDebug = False;
DoStrictnessAnalysis = True;
......@@ -144,7 +143,7 @@ Bool CallCompiler (int argc, char **argv)
argv_i=argv[i];
if (strcmp (argv_i, "-v") == 0)
DoVerbose = True;
;
else if (strcmp (argv_i, "-w") == 0){
DoWarning = False;
DoStrictWarning = False;
......@@ -319,10 +318,7 @@ Bool CallCompiler (int argc, char **argv)
if (fname)
return Compile (fname,output_file_name);
else if (DoVerbose){
FPrintF (StdOut, "\nConcurrent Clean Compiler (Version %d.%d)\n\n", VERSION / 1000, VERSION % 1000);
return True;
} else {
else {
CmdError ("no input file given");
return False;
}
......
......@@ -1184,8 +1184,6 @@ void CodeGeneration (ImpMod imod, char *fname)
if (DoCode && !CompilerError){
ImpRuleS *rule;
Verbose ("Code generation");
if (!OpenABCFile (fname)){
StaticMessage (True, "<open file>","Can't create abc file '%s'",fname);
return;
......
#undef PROFILE
#include "compiledefines.h"
#include "types.t"
#include "system.h"
......@@ -13,11 +11,6 @@
#include "codegen.h"
#include "statesgen.h"
#ifdef _PROFILE_
/* FROM profile IMPORT */
extern DumpProfile ();
#endif
char *CurrentFilePath;
static Bool RemoveExtension (char *name)
......@@ -41,8 +34,6 @@ static void AddExtension (char *name)
static void ExecCompiler (char *fname,char *output_file_name)
{
ImpMod imod;
/* PrintVersion (); */
if (fname){
Bool hadext;
......@@ -97,21 +88,12 @@ static void ExecCompiler (char *fname,char *output_file_name)
CmdError ("No source file specified");
}
#ifdef PROFILE
#include "profile.h"
#endif
#ifdef _MAC_
extern void GetInitialPathList (void);
#endif
Bool Compile (char *fname,char *output_file_name)
{
#ifdef PROFILE
InitProfile (900,300);
freopen ("Profile","w",stdout);
#endif
#ifdef _MAC_
GetInitialPathList();
#endif
......@@ -124,9 +106,5 @@ Bool Compile (char *fname,char *output_file_name)
ExitCompiler ();
#ifdef PROFILE
DumpProfile();
#endif
return ! CompilerError;
}
......@@ -440,19 +440,6 @@ void StaticMessage (Bool error, char *symbol_format, char *message_format, ...)
CompilerError = True;
}
void Verbose (char *msg)
{
if (DoVerbose)
FPrintF (StdVerboseL, "%s \"%s%s\"\n", msg, CurrentModule, CurrentExt);
}
void PrintVersion (void)
{
if (DoVerbose)
FPrintF (StdVerboseL, "Concurrent Clean Compiler (Version %d.%d)\n",
VERSION / 1000, VERSION % 1000);
}
static char Init[] = "Compiler initialization";
File OpenedFile;
......
......@@ -45,8 +45,6 @@ extern void CompFree (void);
extern Bool ArgParser (int argc, char *argv[]);
extern void FatalCompError (char *mod, char *proc, char *mess);
extern void Verbose (char *msg);
extern void PrintVersion (void);
extern void InitSettings (void);
extern void ExitOnInterrupt (void);
extern void InitCompiler (void);
......
......@@ -45,11 +45,7 @@ static void error_in_function (char *m)
*/
#define N_DoStrictnessAnalysis 4
#define N_NoTimeProfiling 5
#define N_ExportLocalLabels 6
/*
#define N_DoVerbose 6
*/
#define N_DoWarning 7
#define N_System 8
#define N_DoFusion 9
......@@ -74,9 +70,6 @@ static void ConvertOptionsToString (char *optstring)
optstring[N_NoTimeProfiling] = !DoTimeProfiling ? '1' : '0';
optstring[N_ExportLocalLabels] = ExportLocalLabels ? '1' : '0';
/*
optstring[N_DoVerbose] = DoVerbose ? '1' : '0';
*/
optstring[N_DoWarning] = DoWarning ? '1' : '0';
optstring[N_System] = '0';
......
......@@ -35,11 +35,7 @@ void FreePathList (void);
#else
#define StdError stdout
#endif
#define StdVerboseH stdout
#define StdVerboseL stdout
#define StdListTypes stdout
#define FGetC(f) fgetc(f)
#define FGetS(s,n,f) fgets(s,n,f)
#define FPutC(c,f) fputc(c,f)
......@@ -5696,8 +5696,6 @@ int init_strictness_analysis (ImpMod imod)
StrictAllWarning = DoStrictAllWarning;
StrictChecks = DoStrictCheck;
StrictExportChecks = DoStrictExportChecks;
Verbose ("Strictness analysis");
/* Initialise all */
#ifdef _DB_
......
......@@ -26,11 +26,6 @@ typedef FILE *File;
extern FILE *std_out_file_p,*std_error_file_p;
#define StdOut std_out_file_p
#define StdError std_error_file_p
#define StdVerboseH std_out_file_p
#define StdVerboseL std_out_file_p
#define StdTrace std_out_file_p
#define StdDebug std_out_file_p
#define StdListTypes std_out_file_p
#define FGetC(f) fgetc(f)
#define FGetS(s,n,f) fgets(s,n,f)
......
......@@ -32,27 +32,13 @@ typedef float FourBytesReal;
typedef FILE *File;
/* special for MacIntosh command line support */
extern void InitIO (void);
extern void GetPreferences (char *fname);
#ifdef _MSC_VER
extern FILE *std_out_file_p,*std_error_file_p;
# define StdOut std_out_file_p
# define StdError std_error_file_p
# define StdVerboseH std_out_file_p
# define StdVerboseL std_out_file_p
# define StdTrace std_out_file_p
# define StdDebug std_out_file_p
# define StdListTypes std_out_file_p
#else
# define StdOut stdout
# define StdError stderr
# define StdVerboseH stdout
# define StdVerboseL stdout
# define StdTrace stdout
# define StdDebug stdout;
# define StdListTypes stdout
#endif
#define FGetC(f) fgetc(f)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment