commit du bug rebelle

This commit is contained in:
tTh
2023-05-02 10:06:24 +02:00
parent d3cca97dbf
commit 5eaa64a664
12 changed files with 163 additions and 56 deletions

View File

@@ -17,11 +17,11 @@ int verbosity = 0;
/* --------------------------------------------------------------------- */
void help(void)
{
printf("### READ_OBJ 0X%X TALKING\n", getpid());
printf("### READ_OBJ 0X%X TALKING\n", getpid());
puts("usage:");
puts("\t-h\tthis help (use -v -h for more");
puts("\t-h\t\tthis help (use -v -h for more");
puts("\t-o fname\tfix the output filename");
puts("\t-v\tincrease verbosity");
puts("\t-v\t\tincrease verbosity");
exit(0);
}
@@ -32,7 +32,7 @@ int main(int argc, char *argv[])
int foo, opt;
char *ofname = NULL;
fprintf(stderr, "\n### READ_OBJ compiled %s at %s\n", __DATE__, __TIME__);
fprintf(stderr, "### READ_OBJ compiled %s at %s\n", __DATE__, __TIME__);
if (1 == argc) {
bubulles_version(1);
@@ -55,10 +55,12 @@ while ((opt = getopt(argc, argv, "ho:v")) != -1) {
}
if (optind < argc) {
if (verbosity) fprintf(stderr, "arg[%d] = %s\n", optind, argv[optind]);
if (verbosity) fprintf(stderr, " arg[%d] = %s\n",
optind, argv[optind]);
foo = try_to_read_an_OBJ_file(argv[optind], ofname, 0);
if (foo) {
fprintf(stderr, "Error number %d on '%s'\n", foo, argv[optind]);
fprintf(stderr, "Error number %d on '%s'\n",
foo, argv[optind]);
exit(1);
}
}