From 23865315aa24b5bc7b07b381f26bed059182357e Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Fri, 12 Jun 2015 11:22:04 -0400 Subject: [PATCH] removing utility code from library source main function should only be in standalone app. also removing inline defs for compile-time directives --- build/Xcode/epanet.xcodeproj/project.pbxproj | 4 +- src/epanet.c | 62 +------------------- 2 files changed, 4 insertions(+), 62 deletions(-) diff --git a/build/Xcode/epanet.xcodeproj/project.pbxproj b/build/Xcode/epanet.xcodeproj/project.pbxproj index 7d48c46..a2c8b20 100755 --- a/build/Xcode/epanet.xcodeproj/project.pbxproj +++ b/build/Xcode/epanet.xcodeproj/project.pbxproj @@ -428,7 +428,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = CLE; + GCC_PREPROCESSOR_DEFINITIONS = ""; INFOPLIST_PREPROCESSOR_DEFINITIONS = ""; PRODUCT_NAME = runepanet; }; @@ -439,7 +439,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = CLE; + GCC_PREPROCESSOR_DEFINITIONS = ""; INFOPLIST_PREPROCESSOR_DEFINITIONS = ""; PRODUCT_NAME = runepanet; ZERO_LINK = NO; diff --git a/src/epanet.c b/src/epanet.c index a4aae2b..a2e6307 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -144,64 +144,6 @@ void (* viewprog) (char *); /* Pointer to progress viewing function */ ---------------------------------------------------------------- */ -/*** This code is no longer required ***** //(2.00.11 - LR) -#ifdef DLL -int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* reserved) -{ - viewprog = NULL; - return 1; -} -#endif -*****************************************/ - - -/* ----------------------------------------------------------------- - Entry point used to compile a stand-alone executable. ----------------------------------------------------------------- -*/ - -#ifdef CLE //(2.00.11 - LR) - -int main(int argc, char *argv[]) -/*-------------------------------------------------------------- -** Input: argc = number of command line arguments -** *argv[] = array of command line arguments -** Output: none -** Purpose: main program segment -** -** Command line for stand-alone operation is: -** progname f1 f2 f3 -** where progname = name of executable this code was compiled to, -** f1 = name of input file, f2 = name of report file, and -** f3 = name of binary output file (optional). -**-------------------------------------------------------------- -*/ -{ - char *f1,*f2,*f3; - char blank[] = ""; - int errcode; - -/* Check for proper number of command line arguments */ - if (argc < 3) writecon(FMT03); - else - { - - /* Call the main control function */ - f1 = argv[1]; - f2 = argv[2]; - if (argc > 3) f3 = argv[3]; - else f3 = blank; - writecon(FMT01); - errcode = ENepanet(f1,f2,f3,NULL); - if (errcode > 0) writecon(FMT11); - else if (Warnflag > 0) writecon(FMT10); - else writecon(FMT09); - } - return(0); -} /* End of main */ -#endif - /* ---------------------------------------------------------------- @@ -3295,10 +3237,10 @@ void writecon(char *s) **---------------------------------------------------------------- */ { -#ifdef CLE //(2.00.11 - LR) + //(2.00.11 - LR) fprintf(stdout,s); fflush(stdout); -#endif + }