aboutsummaryrefslogtreecommitdiff
path: root/src/shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/shell.c b/src/shell.c
index 420dc1c..77d5d1d 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -11,10 +11,10 @@ checkfiles()
11 char fname[strlen(tabledir)+100]; 11 char fname[strlen(tabledir)+100];
12 int i; 12 int i;
13 13
14 for (i = 0; allpd[i] != NULL; i++) { 14 for (i = 0; all_pd[i] != NULL; i++) {
15 strcpy(fname, tabledir); 15 strcpy(fname, tabledir);
16 strcpy(fname, "/"); 16 strcat(fname, "/");
17 strcpy(fname, allpd[i]->filename); 17 strcat(fname, all_pd[i]->filename);
18 if ((f = fopen(fname, "rb")) == NULL) 18 if ((f = fopen(fname, "rb")) == NULL)
19 return false; 19 return false;
20 else 20 else
@@ -140,14 +140,16 @@ launch(bool batchmode)
140int 140int
141main(int argc, char *argv[]) 141main(int argc, char *argv[])
142{ 142{
143 char *closing_cmd[1] = { "freemem" };
144
143 init_env(); 145 init_env();
144 146
145 if (!checkfiles()) { 147 if (!checkfiles()) {
146 fprintf(stderr, 148 fprintf(stderr,
147 "--- Warning ---\n" 149 "--- Warning ---\n"
148 "Some pruning tables are missing or unreadable." 150 "Some pruning tables are missing or unreadable\n"
149 "You can generate them with `nissy gen -t 4'\n" 151 "You can generate them with `nissy gen -t 4'\n"
150 "Here `4' is the number of threads. Use more if your" 152 "Here `4' is the number of threads. Use more if your "
151 "CPU has them, or expect it to take a while.\n" 153 "CPU has them, or expect it to take a while.\n"
152 "---------------\n\n" 154 "---------------\n\n"
153 ); 155 );
@@ -163,7 +165,7 @@ main(int argc, char *argv[])
163 launch(false); 165 launch(false);
164 } 166 }
165 167
166 /* TODO: exec freemem */ 168 exec_args(1, closing_cmd);
167 169
168 return 0; 170 return 0;
169} 171}

Generated with cgit - Back to sebastiano.tronto.net