This commit is contained in:
tTh 2022-06-06 11:43:19 +02:00
parent 9cbbb35cde
commit 457afac7c0
3 changed files with 9 additions and 6 deletions

1
.gitignore vendored
View File

@ -9,4 +9,5 @@ dummy-file
tools/*.obj
tools/read_obj
tools/*.xyz
tools/*.asc

View File

@ -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));

View File

@ -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;