cosmetic
This commit is contained in:
parent
9cbbb35cde
commit
457afac7c0
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,4 +9,5 @@ dummy-file
|
|||||||
tools/*.obj
|
tools/*.obj
|
||||||
tools/read_obj
|
tools/read_obj
|
||||||
tools/*.xyz
|
tools/*.xyz
|
||||||
|
tools/*.asc
|
||||||
|
|
||||||
|
10
importobj.c
10
importobj.c
@ -87,7 +87,7 @@ if (NULL==(fpin=fopen(infname, "r"))) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bublist = alloc_bubulles(infname, 1000, 0);
|
bublist = alloc_bubulles(infname, 800000, 0);
|
||||||
if (NULL==bublist) {
|
if (NULL==bublist) {
|
||||||
fprintf(stderr, "err in %s, aborting...\n", __func__);
|
fprintf(stderr, "err in %s, aborting...\n", __func__);
|
||||||
abort();
|
abort();
|
||||||
@ -98,8 +98,10 @@ nbre = 0;
|
|||||||
while(NULL!=(cptr=fgets(line, LINE_SZ, fpin))) {
|
while(NULL!=(cptr=fgets(line, LINE_SZ, fpin))) {
|
||||||
|
|
||||||
if ('\n' != line[strlen(line)-1]) {
|
if ('\n' != line[strlen(line)-1]) {
|
||||||
fprintf(stderr, "%s: short read, exiting...\n", __func__);
|
fprintf(stderr, "%s: short read on %s...\n",
|
||||||
return -2;
|
__func__, infname);
|
||||||
|
// return -2;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
line[strlen(line)-1] = '\0'; /* kill the newline */
|
line[strlen(line)-1] = '\0'; /* kill the newline */
|
||||||
if (verbosity>1) fprintf(stderr, "line read ===%s===\n", line);
|
if (verbosity>1) fprintf(stderr, "line read ===%s===\n", line);
|
||||||
@ -110,7 +112,7 @@ while(NULL!=(cptr=fgets(line, LINE_SZ, fpin))) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
tokenid = type_of_the_line(cptr);
|
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));
|
memset(&bubulle, 0, sizeof(Bubulle));
|
||||||
|
|
||||||
|
@ -18,9 +18,9 @@ if (2 != argc) {
|
|||||||
exit(0);
|
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);
|
fprintf(stderr, "try to read -> %d\n", foo);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user