@model-create/epanet-engine 0.7.1-alpha.3 → 0.8.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/test.c DELETED
@@ -1,54 +0,0 @@
1
- #include "emscripten.h"
2
- #include "epanet2_2.h"
3
-
4
- #include "stdio.h"
5
-
6
- EMSCRIPTEN_KEEPALIVE
7
- int test()
8
- {
9
- FILE *pFile;
10
- char sentence[256];
11
-
12
- printf("Enter sentence to append: ");
13
- fgets(sentence, 256, stdin);
14
- pFile = fopen("mylog.txt", "a");
15
- fputs(sentence, pFile);
16
- fclose(pFile);
17
- return 0;
18
- }
19
-
20
- EMSCRIPTEN_KEEPALIVE
21
- int netbuilder()
22
- {
23
- int errcode;
24
- EN_Project ph;
25
-
26
- char errmsg[256] = "";
27
- EN_geterror(219, errmsg, 255);
28
- printf("%s\n", errmsg);
29
- int i;
30
- EN_getversion(&i);
31
- return i;
32
- }
33
-
34
- EMSCRIPTEN_KEEPALIVE
35
- int getversion2(int *i)
36
- {
37
- return EN_getversion(i);
38
- }
39
-
40
- void writeConsole(char *s)
41
- {
42
- fprintf(stdout, "\n%s", s);
43
- }
44
-
45
- EMSCRIPTEN_KEEPALIVE
46
- int runEpanet(char *inpFile, char *rptFile, char *outFile)
47
- {
48
- int errcode;
49
- EN_Project ph;
50
- EN_createproject(&ph);
51
- errcode = EN_runproject(ph, inpFile, rptFile, outFile, &writeConsole);
52
- EN_deleteproject(ph);
53
- return errcode;
54
- }