aboutsummaryrefslogtreecommitdiff
path: root/applets/applet_tables.c
diff options
context:
space:
mode:
Diffstat (limited to 'applets/applet_tables.c')
-rw-r--r--applets/applet_tables.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/applets/applet_tables.c b/applets/applet_tables.c
index 7894b2c33..9a2aa5329 100644
--- a/applets/applet_tables.c
+++ b/applets/applet_tables.c
@@ -143,7 +143,9 @@ int main(int argc, char **argv)
143 printf("};\n"); 143 printf("};\n");
144 printf("#endif\n\n"); 144 printf("#endif\n\n");
145 145
146#if ENABLE_FEATURE_PREFER_APPLETS 146#if ENABLE_FEATURE_PREFER_APPLETS \
147 || ENABLE_FEATURE_SH_STANDALONE \
148 || ENABLE_FEATURE_SH_NOFORK
147 printf("const uint8_t applet_flags[] ALIGN1 = {\n"); 149 printf("const uint8_t applet_flags[] ALIGN1 = {\n");
148 i = 0; 150 i = 0;
149 while (i < NUM_APPLETS) { 151 while (i < NUM_APPLETS) {
@@ -190,27 +192,28 @@ int main(int argc, char **argv)
190 printf("};\n"); 192 printf("};\n");
191#endif 193#endif
192 //printf("#endif /* SKIP_definitions */\n"); 194 //printf("#endif /* SKIP_definitions */\n");
195
193// printf("\n"); 196// printf("\n");
194// printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN); 197// printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN);
195 198
196 if (argv[2]) { 199 if (argv[2]) {
197 char line_old[80];
198 char line_new[80];
199 FILE *fp; 200 FILE *fp;
201 char line_new[80];
202// char line_old[80];
200 203
201 line_old[0] = 0;
202 fp = fopen(argv[2], "r");
203 if (fp) {
204 fgets(line_old, sizeof(line_old), fp);
205 fclose(fp);
206 }
207 sprintf(line_new, "#define NUM_APPLETS %u\n", NUM_APPLETS); 204 sprintf(line_new, "#define NUM_APPLETS %u\n", NUM_APPLETS);
208 if (strcmp(line_old, line_new) != 0) { 205// line_old[0] = 0;
206// fp = fopen(argv[2], "r");
207// if (fp) {
208// fgets(line_old, sizeof(line_old), fp);
209// fclose(fp);
210// }
211// if (strcmp(line_old, line_new) != 0) {
209 fp = fopen(argv[2], "w"); 212 fp = fopen(argv[2], "w");
210 if (!fp) 213 if (!fp)
211 return 1; 214 return 1;
212 fputs(line_new, fp); 215 fputs(line_new, fp);
213 } 216// }
214 } 217 }
215 218
216 return 0; 219 return 0;