-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathH5maker.cpp
More file actions
38 lines (36 loc) · 741 Bytes
/
H5maker.cpp
File metadata and controls
38 lines (36 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "h5mparse.hxx"
#include "h5mlex.hpp"
#include <iostream>
using namespace std;
int runwithoutarg(char **argv)
{
FILE *maker = fopen("h5maker", "r");
if (maker)
{
yyin = maker;
yyparse();
fclose(maker);
return EXIT_SUCCESS;
}
return EXIT_FAILURE;
}
int compilewithh5m(char **argv, int argc)
{
int mk = 0;
for (int i = 2; i < argc; i++)
{
FILE *maker = fopen(argv[i], "r");
if (maker)
{
yyin = maker;
yyparse();
fclose(maker);
mk++;
}
else
{
cout << "cannot find maker file :" << argv[i] << endl;
}
}
return (mk) ? EXIT_SUCCESS : EXIT_FAILURE;
}