Skip to content

Commit 5469a83

Browse files
committed
Added new simulation implementation
Working on a new ecosim with the correct line endings (most importantly)
1 parent fd508dd commit 5469a83

File tree

7 files changed

+458
-2
lines changed

7 files changed

+458
-2
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
contents.xcworkspacedata
3+
*.xccheckout
4+
UserInterfaceState.xcuserstate
5+
*.xcscheme
6+
xcschememanagement.plist
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
5A3AFBE71B5184F60074C83B /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 5A3AFBE61B5184F60074C83B /* main.c */; };
11+
5A3AFBEF1B51E26E0074C83B /* ecosim.c in Sources */ = {isa = PBXBuildFile; fileRef = 5A3AFBED1B51E26E0074C83B /* ecosim.c */; };
12+
/* End PBXBuildFile section */
13+
14+
/* Begin PBXCopyFilesBuildPhase section */
15+
5A3AFBE11B5184F60074C83B /* CopyFiles */ = {
16+
isa = PBXCopyFilesBuildPhase;
17+
buildActionMask = 2147483647;
18+
dstPath = /usr/share/man/man1/;
19+
dstSubfolderSpec = 0;
20+
files = (
21+
);
22+
runOnlyForDeploymentPostprocessing = 1;
23+
};
24+
/* End PBXCopyFilesBuildPhase section */
25+
26+
/* Begin PBXFileReference section */
27+
5A3AFBE31B5184F60074C83B /* ecosim_cle */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ecosim_cle; sourceTree = BUILT_PRODUCTS_DIR; };
28+
5A3AFBE61B5184F60074C83B /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
29+
5A3AFBED1B51E26E0074C83B /* ecosim.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ecosim.c; sourceTree = "<group>"; };
30+
5A3AFBEE1B51E26E0074C83B /* ecosim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ecosim.h; sourceTree = "<group>"; };
31+
/* End PBXFileReference section */
32+
33+
/* Begin PBXFrameworksBuildPhase section */
34+
5A3AFBE01B5184F60074C83B /* Frameworks */ = {
35+
isa = PBXFrameworksBuildPhase;
36+
buildActionMask = 2147483647;
37+
files = (
38+
);
39+
runOnlyForDeploymentPostprocessing = 0;
40+
};
41+
/* End PBXFrameworksBuildPhase section */
42+
43+
/* Begin PBXGroup section */
44+
5A3AFBDA1B5184F60074C83B = {
45+
isa = PBXGroup;
46+
children = (
47+
5A3AFBE51B5184F60074C83B /* ecosim_cle */,
48+
5A3AFBE41B5184F60074C83B /* Products */,
49+
);
50+
sourceTree = "<group>";
51+
};
52+
5A3AFBE41B5184F60074C83B /* Products */ = {
53+
isa = PBXGroup;
54+
children = (
55+
5A3AFBE31B5184F60074C83B /* ecosim_cle */,
56+
);
57+
name = Products;
58+
sourceTree = "<group>";
59+
};
60+
5A3AFBE51B5184F60074C83B /* ecosim_cle */ = {
61+
isa = PBXGroup;
62+
children = (
63+
5A3AFBE61B5184F60074C83B /* main.c */,
64+
5A3AFBED1B51E26E0074C83B /* ecosim.c */,
65+
5A3AFBEE1B51E26E0074C83B /* ecosim.h */,
66+
);
67+
path = ecosim_cle;
68+
sourceTree = "<group>";
69+
};
70+
/* End PBXGroup section */
71+
72+
/* Begin PBXNativeTarget section */
73+
5A3AFBE21B5184F60074C83B /* ecosim_cle */ = {
74+
isa = PBXNativeTarget;
75+
buildConfigurationList = 5A3AFBEA1B5184F60074C83B /* Build configuration list for PBXNativeTarget "ecosim_cle" */;
76+
buildPhases = (
77+
5A3AFBDF1B5184F60074C83B /* Sources */,
78+
5A3AFBE01B5184F60074C83B /* Frameworks */,
79+
5A3AFBE11B5184F60074C83B /* CopyFiles */,
80+
);
81+
buildRules = (
82+
);
83+
dependencies = (
84+
);
85+
name = ecosim_cle;
86+
productName = ecosim_cle;
87+
productReference = 5A3AFBE31B5184F60074C83B /* ecosim_cle */;
88+
productType = "com.apple.product-type.tool";
89+
};
90+
/* End PBXNativeTarget section */
91+
92+
/* Begin PBXProject section */
93+
5A3AFBDB1B5184F60074C83B /* Project object */ = {
94+
isa = PBXProject;
95+
attributes = {
96+
LastUpgradeCheck = 0640;
97+
ORGANIZATIONNAME = "Tom Barbalet";
98+
TargetAttributes = {
99+
5A3AFBE21B5184F60074C83B = {
100+
CreatedOnToolsVersion = 6.4;
101+
};
102+
};
103+
};
104+
buildConfigurationList = 5A3AFBDE1B5184F60074C83B /* Build configuration list for PBXProject "ecosim_cle" */;
105+
compatibilityVersion = "Xcode 3.2";
106+
developmentRegion = English;
107+
hasScannedForEncodings = 0;
108+
knownRegions = (
109+
en,
110+
);
111+
mainGroup = 5A3AFBDA1B5184F60074C83B;
112+
productRefGroup = 5A3AFBE41B5184F60074C83B /* Products */;
113+
projectDirPath = "";
114+
projectRoot = "";
115+
targets = (
116+
5A3AFBE21B5184F60074C83B /* ecosim_cle */,
117+
);
118+
};
119+
/* End PBXProject section */
120+
121+
/* Begin PBXSourcesBuildPhase section */
122+
5A3AFBDF1B5184F60074C83B /* Sources */ = {
123+
isa = PBXSourcesBuildPhase;
124+
buildActionMask = 2147483647;
125+
files = (
126+
5A3AFBE71B5184F60074C83B /* main.c in Sources */,
127+
5A3AFBEF1B51E26E0074C83B /* ecosim.c in Sources */,
128+
);
129+
runOnlyForDeploymentPostprocessing = 0;
130+
};
131+
/* End PBXSourcesBuildPhase section */
132+
133+
/* Begin XCBuildConfiguration section */
134+
5A3AFBE81B5184F60074C83B /* Debug */ = {
135+
isa = XCBuildConfiguration;
136+
buildSettings = {
137+
ALWAYS_SEARCH_USER_PATHS = NO;
138+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
139+
CLANG_CXX_LIBRARY = "libc++";
140+
CLANG_ENABLE_MODULES = YES;
141+
CLANG_ENABLE_OBJC_ARC = YES;
142+
CLANG_WARN_BOOL_CONVERSION = YES;
143+
CLANG_WARN_CONSTANT_CONVERSION = YES;
144+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
145+
CLANG_WARN_EMPTY_BODY = YES;
146+
CLANG_WARN_ENUM_CONVERSION = YES;
147+
CLANG_WARN_INT_CONVERSION = YES;
148+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
149+
CLANG_WARN_UNREACHABLE_CODE = YES;
150+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
151+
COPY_PHASE_STRIP = NO;
152+
DEBUG_INFORMATION_FORMAT = dwarf;
153+
ENABLE_STRICT_OBJC_MSGSEND = YES;
154+
GCC_C_LANGUAGE_STANDARD = gnu99;
155+
GCC_DYNAMIC_NO_PIC = NO;
156+
GCC_NO_COMMON_BLOCKS = YES;
157+
GCC_OPTIMIZATION_LEVEL = 0;
158+
GCC_PREPROCESSOR_DEFINITIONS = (
159+
"DEBUG=1",
160+
"$(inherited)",
161+
);
162+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
163+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
164+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
165+
GCC_WARN_UNDECLARED_SELECTOR = YES;
166+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
167+
GCC_WARN_UNUSED_FUNCTION = YES;
168+
GCC_WARN_UNUSED_VARIABLE = YES;
169+
MACOSX_DEPLOYMENT_TARGET = 10.10;
170+
MTL_ENABLE_DEBUG_INFO = YES;
171+
ONLY_ACTIVE_ARCH = YES;
172+
SDKROOT = macosx;
173+
};
174+
name = Debug;
175+
};
176+
5A3AFBE91B5184F60074C83B /* Release */ = {
177+
isa = XCBuildConfiguration;
178+
buildSettings = {
179+
ALWAYS_SEARCH_USER_PATHS = NO;
180+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
181+
CLANG_CXX_LIBRARY = "libc++";
182+
CLANG_ENABLE_MODULES = YES;
183+
CLANG_ENABLE_OBJC_ARC = YES;
184+
CLANG_WARN_BOOL_CONVERSION = YES;
185+
CLANG_WARN_CONSTANT_CONVERSION = YES;
186+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
187+
CLANG_WARN_EMPTY_BODY = YES;
188+
CLANG_WARN_ENUM_CONVERSION = YES;
189+
CLANG_WARN_INT_CONVERSION = YES;
190+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
191+
CLANG_WARN_UNREACHABLE_CODE = YES;
192+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
193+
COPY_PHASE_STRIP = NO;
194+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
195+
ENABLE_NS_ASSERTIONS = NO;
196+
ENABLE_STRICT_OBJC_MSGSEND = YES;
197+
GCC_C_LANGUAGE_STANDARD = gnu99;
198+
GCC_NO_COMMON_BLOCKS = YES;
199+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
200+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
201+
GCC_WARN_UNDECLARED_SELECTOR = YES;
202+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
203+
GCC_WARN_UNUSED_FUNCTION = YES;
204+
GCC_WARN_UNUSED_VARIABLE = YES;
205+
MACOSX_DEPLOYMENT_TARGET = 10.10;
206+
MTL_ENABLE_DEBUG_INFO = NO;
207+
SDKROOT = macosx;
208+
};
209+
name = Release;
210+
};
211+
5A3AFBEB1B5184F60074C83B /* Debug */ = {
212+
isa = XCBuildConfiguration;
213+
buildSettings = {
214+
PRODUCT_NAME = "$(TARGET_NAME)";
215+
};
216+
name = Debug;
217+
};
218+
5A3AFBEC1B5184F60074C83B /* Release */ = {
219+
isa = XCBuildConfiguration;
220+
buildSettings = {
221+
PRODUCT_NAME = "$(TARGET_NAME)";
222+
};
223+
name = Release;
224+
};
225+
/* End XCBuildConfiguration section */
226+
227+
/* Begin XCConfigurationList section */
228+
5A3AFBDE1B5184F60074C83B /* Build configuration list for PBXProject "ecosim_cle" */ = {
229+
isa = XCConfigurationList;
230+
buildConfigurations = (
231+
5A3AFBE81B5184F60074C83B /* Debug */,
232+
5A3AFBE91B5184F60074C83B /* Release */,
233+
);
234+
defaultConfigurationIsVisible = 0;
235+
defaultConfigurationName = Release;
236+
};
237+
5A3AFBEA1B5184F60074C83B /* Build configuration list for PBXNativeTarget "ecosim_cle" */ = {
238+
isa = XCConfigurationList;
239+
buildConfigurations = (
240+
5A3AFBEB1B5184F60074C83B /* Debug */,
241+
5A3AFBEC1B5184F60074C83B /* Release */,
242+
);
243+
defaultConfigurationIsVisible = 0;
244+
};
245+
/* End XCConfigurationList section */
246+
};
247+
rootObject = 5A3AFBDB1B5184F60074C83B /* Project object */;
248+
}

ecosim_cle/ecosim_cle/ecosim.c

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/****************************************************************
2+
3+
ecosim.c
4+
5+
=============================================================
6+
7+
Copyright 1996-2015 Tom Barbalet. All rights reserved.
8+
9+
Permission is hereby granted, free of charge, to any person
10+
obtaining a copy of this software and associated documentation
11+
files (the "Software"), to deal in the Software without
12+
restriction, including without limitation the rights to use,
13+
copy, modify, merge, publish, distribute, sublicense, and/or
14+
sell copies of the Software, and to permit persons to whom the
15+
Software is furnished to do so, subject to the following
16+
conditions:
17+
18+
The above copyright notice and this permission notice shall be
19+
included in all copies or substantial portions of the Software.
20+
21+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28+
OTHER DEALINGS IN THE SOFTWARE.
29+
30+
This software and Noble Ape are a continuing work of Tom Barbalet,
31+
begun on 13 June 1996. No apes or cats were harmed in the writing
32+
of this software.
33+
34+
****************************************************************/
35+
36+
#include "ecosim.h"
37+
38+
void ecosim_init(void)
39+
{
40+
41+
}
42+
43+
void ecosim_cycle(void)
44+
{
45+
46+
}
47+
48+
e_int ecosim_population(ECOSIM_ENTITY entity)
49+
{
50+
return 1;
51+
}

0 commit comments

Comments
 (0)