diff options
| author | Louis Burda <quent.burda@gmail.com> | 2021-05-29 14:24:31 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2021-05-29 14:24:31 +0200 |
| commit | 13b65f01132c41be9ab8d9f92c2c5ca605c366d8 (patch) | |
| tree | 74bd5b4dee779e4600d416adf4abcd4f621addab /service/src/stlfile.c | |
| parent | 62d99253144a14648c4da1c2a60c01e7b06ef02c (diff) | |
| download | enowars5-service-stldoctor-13b65f01132c41be9ab8d9f92c2c5ca605c366d8.tar.gz enowars5-service-stldoctor-13b65f01132c41be9ab8d9f92c2c5ca605c366d8.zip | |
changed repo structure and commited releease files such that default docker-compose worklow commands work in testvm
Diffstat (limited to 'service/src/stlfile.c')
| -rw-r--r-- | service/src/stlfile.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/service/src/stlfile.c b/service/src/stlfile.c index 88fc430..7b37df4 100644 --- a/service/src/stlfile.c +++ b/service/src/stlfile.c @@ -98,7 +98,7 @@ consume_keyword(char **start) for (i = 0; i < ARRSIZE(kwmap); i++) { len = strlen(kwmap[i].str); if (!strncmp(kwmap[i].str, bp, len) && (!bp[len] || isws(bp[len]))) { - // printf("GOT: %s\n", kwmap[i].str); + *start = bp + len + (bp[len] ? 1 : 0); return kwmap[i].code; } @@ -108,7 +108,7 @@ consume_keyword(char **start) } #define PARSE_FAIL(...) \ - do { fprintf(stderr, "FORMAT ERR: " __VA_ARGS__); goto fail; } while (0) + do { printf("FORMAT ERR: " __VA_ARGS__); goto fail; } while (0) int parse_file_ascii(struct parseinfo *info, char *buf, size_t len) @@ -272,13 +272,12 @@ parse_file(struct parseinfo *info, char *buf, size_t len) if (info->valid) free_info(info); if (len < 7) { - fprintf(stderr, "File too small!\n"); + printf("File too small!\n"); return FAIL; } info->filesize = len; - /* check bin vs ascii with first keyword */ for (bp = buf; isws(*bp); bp++); status = !strncmp("solid", bp, 5) && isws(bp[5]) ? parse_file_ascii(info, buf, len) @@ -290,7 +289,7 @@ parse_file(struct parseinfo *info, char *buf, size_t len) if (!info->modelname) { resp = ask("Please enter your model name: "); if (strlen(resp) < 4) { - fprintf(stderr, "Model name is too short!\n"); + printf("Model name is too short!\n"); return FAIL; } info->modelname = checkp(strdup(resp)); |
