From 457afac7c0a208413ff6a7f1d0932da76ecf685b Mon Sep 17 00:00:00 2001 From: tTh Date: Mon, 6 Jun 2022 11:43:19 +0200 Subject: [PATCH] cosmetic --- .gitignore | 1 + importobj.c | 10 ++++++---- tools/read_obj.c | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 2ea0f84..e537f15 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ dummy-file tools/*.obj tools/read_obj tools/*.xyz +tools/*.asc diff --git a/importobj.c b/importobj.c index 159d9df..cf3d87e 100644 --- a/importobj.c +++ b/importobj.c @@ -87,7 +87,7 @@ if (NULL==(fpin=fopen(infname, "r"))) { exit(1); } -bublist = alloc_bubulles(infname, 1000, 0); +bublist = alloc_bubulles(infname, 800000, 0); if (NULL==bublist) { fprintf(stderr, "err in %s, aborting...\n", __func__); abort(); @@ -98,8 +98,10 @@ nbre = 0; while(NULL!=(cptr=fgets(line, LINE_SZ, fpin))) { if ('\n' != line[strlen(line)-1]) { - fprintf(stderr, "%s: short read, exiting...\n", __func__); - return -2; + fprintf(stderr, "%s: short read on %s...\n", + __func__, infname); + // return -2; + break; } line[strlen(line)-1] = '\0'; /* kill the newline */ if (verbosity>1) fprintf(stderr, "line read ===%s===\n", line); @@ -110,7 +112,7 @@ while(NULL!=(cptr=fgets(line, LINE_SZ, fpin))) { continue; } tokenid = type_of_the_line(cptr); - if (verbosity) fprintf(stderr, "token '%s' --> %d\n", cptr, tokenid); + if (verbosity > 1) fprintf(stderr, "token '%s' --> %d\n", cptr, tokenid); memset(&bubulle, 0, sizeof(Bubulle)); diff --git a/tools/read_obj.c b/tools/read_obj.c index d78bbc9..1a5339e 100644 --- a/tools/read_obj.c +++ b/tools/read_obj.c @@ -18,9 +18,9 @@ if (2 != argc) { exit(0); } -verbosity = 2; +verbosity = 1; -foo = try_to_read_an_OBJ_file(argv[1], "bulles.xyz", 0); +foo = try_to_read_an_OBJ_file(argv[1], "bubulles.asc", 0); fprintf(stderr, "try to read -> %d\n", foo); return 0;