diff --git a/build/Xcode/epanet/epanet.xcodeproj/project.pbxproj b/build/Xcode/epanet/epanet.xcodeproj/project.pbxproj index ec5a5ae..3ef27ef 100644 --- a/build/Xcode/epanet/epanet.xcodeproj/project.pbxproj +++ b/build/Xcode/epanet/epanet.xcodeproj/project.pbxproj @@ -42,6 +42,19 @@ 22322FA51068369500641384 /* rules.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7F1068369500641384 /* rules.c */; }; 22322FA61068369500641384 /* smatrix.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F801068369500641384 /* smatrix.c */; }; 22322FAA106836BC00641384 /* epanet2.h in Headers */ = {isa = PBXBuildFile; fileRef = 22322FA9106836B000641384 /* epanet2.h */; }; + 2255753F17551234009946B1 /* epanet.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F711068369500641384 /* epanet.c */; }; + 2255754017551234009946B1 /* hash.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F731068369500641384 /* hash.c */; }; + 2255754117551234009946B1 /* hydraul.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F751068369500641384 /* hydraul.c */; }; + 2255754217551234009946B1 /* inpfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F761068369500641384 /* inpfile.c */; }; + 2255754317551234009946B1 /* input1.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F771068369500641384 /* input1.c */; }; + 2255754417551234009946B1 /* input2.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F781068369500641384 /* input2.c */; }; + 2255754517551234009946B1 /* input3.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F791068369500641384 /* input3.c */; }; + 2255754617551234009946B1 /* mempool.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7A1068369500641384 /* mempool.c */; }; + 2255754717551234009946B1 /* output.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7C1068369500641384 /* output.c */; }; + 2255754817551234009946B1 /* quality.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7D1068369500641384 /* quality.c */; }; + 2255754917551234009946B1 /* report.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7E1068369500641384 /* report.c */; }; + 2255754A17551234009946B1 /* rules.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F7F1068369500641384 /* rules.c */; }; + 2255754B17551234009946B1 /* smatrix.c in Sources */ = {isa = PBXBuildFile; fileRef = 22322F801068369500641384 /* smatrix.c */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -78,6 +91,7 @@ 22322F831068369500641384 /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = types.h; path = ../../../src/types.h; sourceTree = SOURCE_ROOT; }; 22322F841068369500641384 /* vars.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vars.h; path = ../../../src/vars.h; sourceTree = SOURCE_ROOT; }; 22322FA9106836B000641384 /* epanet2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = epanet2.h; path = ../../../include/epanet2.h; sourceTree = SOURCE_ROOT; }; + 2255753B17551217009946B1 /* libepanet-static.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libepanet-static.a"; sourceTree = BUILT_PRODUCTS_DIR; }; D2AAC0630554660B00DB518D /* libepanet.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libepanet.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -89,6 +103,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 2255753817551217009946B1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; D289988505E68E00004EDB86 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -142,6 +163,7 @@ children = ( D2AAC0630554660B00DB518D /* libepanet.dylib */, 22322F66106833BB00641384 /* runepanet */, + 2255753B17551217009946B1 /* libepanet-static.a */, ); name = Products; sourceTree = ""; @@ -157,6 +179,13 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 2255753917551217009946B1 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; D2AAC0600554660B00DB518D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -193,6 +222,23 @@ productReference = 22322F66106833BB00641384 /* runepanet */; productType = "com.apple.product-type.tool"; }; + 2255753A17551217009946B1 /* epanet-static */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2255753E17551217009946B1 /* Build configuration list for PBXNativeTarget "epanet-static" */; + buildPhases = ( + 2255753717551217009946B1 /* Sources */, + 2255753817551217009946B1 /* Frameworks */, + 2255753917551217009946B1 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "epanet-static"; + productName = "epanet-static"; + productReference = 2255753B17551217009946B1 /* libepanet-static.a */; + productType = "com.apple.product-type.library.static"; + }; D2AAC0620554660B00DB518D /* epanet */ = { isa = PBXNativeTarget; buildConfigurationList = 1DEB914A08733D8E0010E9CD /* Build configuration list for PBXNativeTarget "epanet" */; @@ -234,6 +280,7 @@ targets = ( D2AAC0620554660B00DB518D /* epanet */, 22322F65106833BB00641384 /* runepanet */, + 2255753A17551217009946B1 /* epanet-static */, ); }; /* End PBXProject section */ @@ -259,6 +306,26 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 2255753717551217009946B1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2255753F17551234009946B1 /* epanet.c in Sources */, + 2255754017551234009946B1 /* hash.c in Sources */, + 2255754117551234009946B1 /* hydraul.c in Sources */, + 2255754217551234009946B1 /* inpfile.c in Sources */, + 2255754317551234009946B1 /* input1.c in Sources */, + 2255754417551234009946B1 /* input2.c in Sources */, + 2255754517551234009946B1 /* input3.c in Sources */, + 2255754617551234009946B1 /* mempool.c in Sources */, + 2255754717551234009946B1 /* output.c in Sources */, + 2255754817551234009946B1 /* quality.c in Sources */, + 2255754917551234009946B1 /* report.c in Sources */, + 2255754A17551234009946B1 /* rules.c in Sources */, + 2255754B17551234009946B1 /* smatrix.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D2AAC0610554660B00DB518D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -394,6 +461,49 @@ }; name = Release; }; + 2255753C17551217009946B1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_EMPTY_BODY = YES; + COPY_PHASE_STRIP = NO; + EXECUTABLE_PREFIX = lib; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + 2255753D17551217009946B1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_EMPTY_BODY = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -424,6 +534,14 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 2255753E17551217009946B1 /* Build configuration list for PBXNativeTarget "epanet-static" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2255753C17551217009946B1 /* Debug */, + 2255753D17551217009946B1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; /* End XCConfigurationList section */ }; rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; diff --git a/src/input2.c b/src/input2.c index 1c8b873..41fe783 100755 --- a/src/input2.c +++ b/src/input2.c @@ -546,7 +546,8 @@ int addcoord(char *id) } else { /* Initialize list element properties */ - c->i = MaxCoords; + // c->i = MaxCoords; // bug! if coordinates are not in the same order as junctions, then this is a BAD assumption + // do this later: c->i = findnode(id); strncpy(c->ID,id,MAXID); c->x = NULL; c->y = NULL; @@ -768,7 +769,8 @@ int getcoords(void) /* Traverse list of coordinates */ while (coordinateList != NULL) { - i = coordinateList->i; + // BAD! ---> i = coordinateList->i; + i = findnode(coordinateList->ID); if (i >= 1 && i <= MaxNodes) { /* Save coordinate ID */