|
|
@ -33,6 +33,7 @@ void usage(int exitcode) { |
|
|
|
" -D <a>,<b> Show difference bitmap for this samples\n" |
|
|
|
" -D <a>,<b> Show difference bitmap for this samples\n" |
|
|
|
" -S <num> Search for images similar ot this sample\n" |
|
|
|
" -S <num> Search for images similar ot this sample\n" |
|
|
|
" -U <num> Show db usage map, <num> entries per column\n" |
|
|
|
" -U <num> Show db usage map, <num> entries per column\n" |
|
|
|
|
|
|
|
" Special case - 0, output will be single line\n" |
|
|
|
); |
|
|
|
); |
|
|
|
exit(exitcode); |
|
|
|
exit(exitcode); |
|
|
|
} |
|
|
|
} |
|
|
@ -83,6 +84,13 @@ int db_usage_map(imdb_db_t *db, unsigned short int cols) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (cols == 0) { |
|
|
|
|
|
|
|
putchar(CHAR_NONE); /* zero */ |
|
|
|
|
|
|
|
puts(map); |
|
|
|
|
|
|
|
FREE(map); |
|
|
|
|
|
|
|
return 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
m = map; |
|
|
|
m = map; |
|
|
|
while (records) { |
|
|
|
while (records) { |
|
|
|
rest = (records > cols) ? cols : records; |
|
|
|
rest = (records > cols) ? cols : records; |
|
|
@ -200,8 +208,8 @@ int main(int argc, char **argv) |
|
|
|
case 'U' : |
|
|
|
case 'U' : |
|
|
|
mode = usage_map; |
|
|
|
mode = usage_map; |
|
|
|
cols = atoi(optarg); |
|
|
|
cols = atoi(optarg); |
|
|
|
if (cols <= 0 || cols >= 256) |
|
|
|
if (cols >= 256) |
|
|
|
cols = 64; |
|
|
|
cols = 100; |
|
|
|
break; |
|
|
|
break; |
|
|
|
default : |
|
|
|
default : |
|
|
|
usage(EXIT_FAILURE); |
|
|
|
usage(EXIT_FAILURE); |
|
|
|