diff options
Diffstat (limited to 'backendC')
| -rw-r--r-- | backendC/CleanCompilerSources/compiler.c | 20 | ||||
| -rw-r--r-- | backendC/CleanCompilerSources/instructions.c | 18 | ||||
| -rw-r--r-- | backendC/CleanCompilerSources/system.h | 27 | 
3 files changed, 9 insertions, 56 deletions
| diff --git a/backendC/CleanCompilerSources/compiler.c b/backendC/CleanCompilerSources/compiler.c index be619f6..ba9a443 100644 --- a/backendC/CleanCompilerSources/compiler.c +++ b/backendC/CleanCompilerSources/compiler.c @@ -18,9 +18,7 @@  	extern DumpProfile ();  #endif -#ifdef _STANDALONE_  char *CurrentFilePath; -#endif  static Bool RemoveExtension (char *name)  { @@ -45,9 +43,8 @@ static void ExecCompiler (char *fname,char *output_file_name)  	ImpMod imod;  /*	PrintVersion (); */ -	  +   	if (fname){	 -#ifdef _STANDALONE_  		Bool hadext;  		char *p; @@ -56,15 +53,14 @@ static void ExecCompiler (char *fname,char *output_file_name)  		hadext = RemoveExtension (CurrentFilePath);  		for (p=CurrentFilePath; *p!='\0'; ++p) -# if defined (_MAC_) || defined (_MACUSER_) +#if defined (_MAC_)  			if (*p == ':') -# elif defined (_WINDOWS_) || defined (OS2) +#elif defined (_WINDOWS_) || defined (OS2)  			if (*p == '\\') -# else +#else  			if (*p == '/') -# endif -				fname = p+1;  #endif +				fname = p+1;  		/* Parse and check */  		if (! (imod = ParseAndCheckImplementationModule (fname))) @@ -95,10 +91,8 @@ static void ExecCompiler (char *fname,char *output_file_name)  #endif  			CodeGeneration (imod, fname); -#ifdef _STANDALONE_  		if (hadext)  			AddExtension (CurrentFilePath); -#endif  	} else  		CmdError ("No source file specified");  } @@ -124,11 +118,7 @@ Bool Compile (char *fname,char *output_file_name)  	if (setjmp (ExitEnv)==0){  		InitCompiler (); -#ifdef _MACUSER_ -		ExecCompiler (fname,NULL); -#else  		ExecCompiler (fname,output_file_name); -#endif  	} else  		CompilerError = True; diff --git a/backendC/CleanCompilerSources/instructions.c b/backendC/CleanCompilerSources/instructions.c index 5e9f104..14bb5de 100644 --- a/backendC/CleanCompilerSources/instructions.c +++ b/backendC/CleanCompilerSources/instructions.c @@ -35,7 +35,6 @@ static void error_in_function (char *m)  	ErrorInCompiler ("instructions.c",m,"");  } -#ifdef _STANDALONE_  /* also defined in project.c, only needed for stand alone compiler */  #define N_DoDebug				0 @@ -77,11 +76,6 @@ static void ConvertOptionsToString (CompilerOptions options,char *optstring)  	optstring[N_System]               = '0';  	optstring[NR_OPTIONS]             = '\0';  } -#else -# define N_System				8 -# include "cginterface.t" -# include "project.h" -#endif  #define D_PREFIX "d"  #define N_PREFIX "n" @@ -3284,9 +3278,6 @@ void GenDepend (char *modname  #endif  				)  { -#ifndef _STANDALONE_ -	AddDependency (modname); -#endif  	put_directive_ (Ddepend);  	FPrintF (OutFile, "\"%s\"",modname); @@ -3378,10 +3369,7 @@ void InitFileInfo (ImpMod imod)  	SymbDef start_sdef;  	start_sdef=imod->im_start; -	 -#ifndef _STANDALONE_ -	MakeOptionsFromCurrentOptions (& opts); -#endif +  	ConvertOptionsToString (opts,option_string);  	if (imod->im_def_module!=NULL && imod->im_def_module->dm_system_module) @@ -3389,9 +3377,7 @@ void InitFileInfo (ImpMod imod)  	put_first_directive_ (Dcomp);  	FPrintF (OutFile, "%d %s", VERSION,option_string); -#ifndef _STANDALONE_ -	AddVersionAndOptions (VERSION, opts); -#endif +  	put_directive_ (Dcode);  	FPrintF (OutFile, "%7ld %7ld %7ld", (long) 0, (long) 0, (long) 0); diff --git a/backendC/CleanCompilerSources/system.h b/backendC/CleanCompilerSources/system.h index c03ef56..02c3b67 100644 --- a/backendC/CleanCompilerSources/system.h +++ b/backendC/CleanCompilerSources/system.h @@ -13,21 +13,13 @@  #if defined (applec) || (defined (__MWERKS__) && !defined (_X86_)) || defined (__MRC__)  #	define _MAC_ -#	define _STANDALONE_  #	define __ppc__ - -#elif defined (THINK_C) -#	define _MACUSER_ -#else -#	define _STANDALONE_  #endif  #define _DEBUG_  #if defined (_MAC_)  # include "mac.h" -#elif defined (_MACUSER_) -# include "macuser.h"  #elif defined (_SUN_)  # include "sun.h"  #elif defined (OS2) @@ -56,27 +48,12 @@ extern File FOpenWithFileTime (char *file_name,FileKind kind, char *mode,FileTim  extern int FDelete (char *fname, FileKind kind);  extern int FClose (File f); -#ifdef _MACUSER_ -/* const declarations required */ -	extern int FPrintF (File f, const char *fmt,...); -	extern int FPutS (const char *s, File f); -	extern size_t FWrite (const void *ptr, size_t size, size_t count, File f); -#else  extern int FPutS (char *s, File f);  extern size_t FWrite (void *ptr, size_t size, size_t count, File f); -# ifdef _VARARGS_ +#ifdef _VARARGS_  extern int FPrintF (File f, char *fmt,...); -# else +#else  extern int FPrintF (); /* (File w, char *fmt,...) */ -# endif -#endif - -#if defined (_MACUSER_) -	extern File StdOut; -	extern File StdError; -	extern File StdVerboseH; -	extern File StdVerboseL; -	extern File StdListTypes;  #endif  #ifndef __ppc__ | 
