Commit cfef1aae authored by John van Groningen's avatar John van Groningen
Browse files

remove macros _STANDALONE_ and _MACUSER_

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