Make bin2res silent by default.
This commit is contained in:
parent
7ee18df7c0
commit
d50fdcdc04
|
@ -39,6 +39,7 @@ static const char* help =
|
|||
" -i <filename> archive the named file into the <rsrc.rc> file\n"
|
||||
" -o <filename> extract the named file from the <rsrc.rc> file\n"
|
||||
" -f force processing of older resources\n"
|
||||
" -v causes the command to be verbous during processing\n"
|
||||
" -h print this help screen and exit\n"
|
||||
"\n"
|
||||
"This tool allows the insertion/extractions of embedded binary\n"
|
||||
|
@ -121,7 +122,8 @@ const char* parse_marker(const char *line, time_t* last_updated)
|
|||
return res_file_name;
|
||||
}
|
||||
|
||||
int process_resources(const char* input_file_name, const char* specific_file_name, int inserting, int force_processing)
|
||||
int process_resources(const char* input_file_name, const char* specific_file_name,
|
||||
int inserting, int force_processing, int verbose)
|
||||
{
|
||||
char buffer[2048], tmp_file_name[PATH_MAX];
|
||||
const char *res_file_name;
|
||||
|
@ -153,11 +155,11 @@ int process_resources(const char* input_file_name, const char* specific_file_nam
|
|||
if ( (specific_file_name && strcmp(specific_file_name, res_file_name)) ||
|
||||
(!force_processing && ((rc_last_update < res_last_update) == !inserting)) )
|
||||
{
|
||||
printf("skipping '%s'\n", res_file_name);
|
||||
if (verbose) printf("skipping '%s'\n", res_file_name);
|
||||
continue;
|
||||
}
|
||||
|
||||
printf("processing '%s'\n", res_file_name);
|
||||
if (verbose) printf("processing '%s'\n", res_file_name);
|
||||
while ( (c = fgetc(fin)) != EOF && c != '{')
|
||||
if (inserting) fputc(c, ftmp);
|
||||
if (c == EOF) break;
|
||||
|
@ -191,7 +193,7 @@ int process_resources(const char* input_file_name, const char* specific_file_nam
|
|||
int main(int argc, char **argv)
|
||||
{
|
||||
int convert_dir = 0, optc;
|
||||
int force_overwrite = 0;
|
||||
int force_overwrite = 0, verbose = 0;
|
||||
const char* input_file_name = 0;
|
||||
const char* specific_file_name = 0;
|
||||
|
||||
|
@ -215,6 +217,9 @@ int main(int argc, char **argv)
|
|||
case 'f':
|
||||
force_overwrite = 1;
|
||||
break;
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
case 'h':
|
||||
printf(help);
|
||||
exit(0);
|
||||
|
@ -230,7 +235,7 @@ int main(int argc, char **argv)
|
|||
if (!convert_dir) usage();
|
||||
|
||||
if (!process_resources(input_file_name, specific_file_name,
|
||||
convert_dir == 'a', force_overwrite))
|
||||
convert_dir == 'a', force_overwrite, verbose))
|
||||
{
|
||||
perror("Processing failed");
|
||||
exit(1);
|
||||
|
|
Loading…
Reference in New Issue