Loading ChangeLog +8 −0 Original line number Original line Diff line number Diff line git HEAD * exif-support fixes by Dennis Real * format specifier %S now uses the appropriate suffix (B/kB/MB) * format specifier %P now prints the number of pixels with k/M suffix, like %S. Printing the program name ("feh") is no longer supported * feh --list now uses %S/%P to print image size and amount of pixels Thu, 02 Feb 2012 21:04:06 +0100 Daniel Friesel <derf@finalrewind.org> Thu, 02 Feb 2012 21:04:06 +0100 Daniel Friesel <derf@finalrewind.org> * Release v2.3 * Release v2.3 Loading man/feh.pre +4 −3 Original line number Original line Diff line number Diff line Loading @@ -791,7 +791,8 @@ Number of image pixels . . .It \&%P .It \&%P . . .Nm Numbor of image pixels .Pq kilopixels / megapixels . . .It %s .It %s . . Loading @@ -799,8 +800,8 @@ Image size in bytes . . .It %S .It %S . . Image size in kilobytes Human-readable image size .Pq with kB postfix .Pq kB / MB . . .It %t .It %t . . Loading src/feh.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -137,6 +137,7 @@ void init_keyevents(void); void init_buttonbindings(void); void init_buttonbindings(void); void feh_event_handle_keypress(XEvent * ev); void feh_event_handle_keypress(XEvent * ev); void feh_action_run(feh_file * file, char *action); void feh_action_run(feh_file * file, char *action); char *format_size(int size); char *feh_printf(char *str, feh_file * file); char *feh_printf(char *str, feh_file * file); void im_weprintf(winwidget w, char *fmt, ...); void im_weprintf(winwidget w, char *fmt, ...); void feh_draw_zoom(winwidget w); void feh_draw_zoom(winwidget w); Loading src/list.c +6 −4 Original line number Original line Diff line number Diff line Loading @@ -37,7 +37,7 @@ void init_list_mode(void) mode = "list"; mode = "list"; if (!opt.customlist) if (!opt.customlist) fputs("NUM\tFORMAT\tWIDTH\tHEIGHT\tPIXELS\tSIZE(bytes)\tALPHA\tFILENAME\n", fputs("NUM\tFORMAT\tWIDTH\tHEIGHT\tPIXELS\tSIZE\tALPHA\tFILENAME\n", stdout); stdout); for (l = filelist; l; l = l->next) { for (l = filelist; l; l = l->next) { Loading @@ -45,10 +45,12 @@ void init_list_mode(void) if (opt.customlist) if (opt.customlist) printf("%s\n", feh_printf(opt.customlist, file)); printf("%s\n", feh_printf(opt.customlist, file)); else else printf("%d\t%s\t%d\t%d\t%d\t%d\t\t%c\t%s\n", ++j, printf("%d\t%s\t%d\t%d\t%s", ++j, file->info->format, file->info->width, file->info->format, file->info->width, file->info->height, file->info->pixels, file->info->height, file->info->size, format_size(file->info->pixels)); printf("\t%s\t\t%c\t%s\n", format_size(file->info->size), file->info->has_alpha ? 'X' : '-', file->filename); file->info->has_alpha ? 'X' : '-', file->filename); feh_action_run(file, opt.actions[0]); feh_action_run(file, opt.actions[0]); Loading src/slideshow.c +19 −6 Original line number Original line Diff line number Diff line Loading @@ -404,6 +404,19 @@ char *shell_escape(char *input) return ret; return ret; } } char *format_size(int size) { static char ret[5]; char units[] = {' ', 'k', 'M', 'G', 'T'}; unsigned char postfix = 0; while (size >= 1000) { size /= 1000; postfix++; } snprintf(ret, 5, "%3d%c", size, units[postfix]); return ret; } char *feh_printf(char *str, feh_file * file) char *feh_printf(char *str, feh_file * file) { { char *c; char *c; Loading Loading @@ -452,9 +465,7 @@ char *feh_printf(char *str, feh_file * file) break; break; case 'S': case 'S': if (file && (file->info || !feh_file_info_load(file, NULL))) { if (file && (file->info || !feh_file_info_load(file, NULL))) { snprintf(buf, sizeof(buf), strcat(ret, format_size(file->info->size)); "%.2fkB", ((double)file->info->size / 1000)); strcat(ret, buf); } } break; break; case 'p': case 'p': Loading @@ -463,14 +474,16 @@ char *feh_printf(char *str, feh_file * file) strcat(ret, buf); strcat(ret, buf); } } break; break; case 'P': if (file && (file->info || !feh_file_info_load(file, NULL))) { strcat(ret, format_size(file->info->pixels)); } break; case 't': case 't': if (file && (file->info || !feh_file_info_load(file, NULL))) { if (file && (file->info || !feh_file_info_load(file, NULL))) { strcat(ret, file->info->format); strcat(ret, file->info->format); } } break; break; case 'P': strcat(ret, PACKAGE); break; case 'v': case 'v': strcat(ret, VERSION); strcat(ret, VERSION); break; break; Loading Loading
ChangeLog +8 −0 Original line number Original line Diff line number Diff line git HEAD * exif-support fixes by Dennis Real * format specifier %S now uses the appropriate suffix (B/kB/MB) * format specifier %P now prints the number of pixels with k/M suffix, like %S. Printing the program name ("feh") is no longer supported * feh --list now uses %S/%P to print image size and amount of pixels Thu, 02 Feb 2012 21:04:06 +0100 Daniel Friesel <derf@finalrewind.org> Thu, 02 Feb 2012 21:04:06 +0100 Daniel Friesel <derf@finalrewind.org> * Release v2.3 * Release v2.3 Loading
man/feh.pre +4 −3 Original line number Original line Diff line number Diff line Loading @@ -791,7 +791,8 @@ Number of image pixels . . .It \&%P .It \&%P . . .Nm Numbor of image pixels .Pq kilopixels / megapixels . . .It %s .It %s . . Loading @@ -799,8 +800,8 @@ Image size in bytes . . .It %S .It %S . . Image size in kilobytes Human-readable image size .Pq with kB postfix .Pq kB / MB . . .It %t .It %t . . Loading
src/feh.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -137,6 +137,7 @@ void init_keyevents(void); void init_buttonbindings(void); void init_buttonbindings(void); void feh_event_handle_keypress(XEvent * ev); void feh_event_handle_keypress(XEvent * ev); void feh_action_run(feh_file * file, char *action); void feh_action_run(feh_file * file, char *action); char *format_size(int size); char *feh_printf(char *str, feh_file * file); char *feh_printf(char *str, feh_file * file); void im_weprintf(winwidget w, char *fmt, ...); void im_weprintf(winwidget w, char *fmt, ...); void feh_draw_zoom(winwidget w); void feh_draw_zoom(winwidget w); Loading
src/list.c +6 −4 Original line number Original line Diff line number Diff line Loading @@ -37,7 +37,7 @@ void init_list_mode(void) mode = "list"; mode = "list"; if (!opt.customlist) if (!opt.customlist) fputs("NUM\tFORMAT\tWIDTH\tHEIGHT\tPIXELS\tSIZE(bytes)\tALPHA\tFILENAME\n", fputs("NUM\tFORMAT\tWIDTH\tHEIGHT\tPIXELS\tSIZE\tALPHA\tFILENAME\n", stdout); stdout); for (l = filelist; l; l = l->next) { for (l = filelist; l; l = l->next) { Loading @@ -45,10 +45,12 @@ void init_list_mode(void) if (opt.customlist) if (opt.customlist) printf("%s\n", feh_printf(opt.customlist, file)); printf("%s\n", feh_printf(opt.customlist, file)); else else printf("%d\t%s\t%d\t%d\t%d\t%d\t\t%c\t%s\n", ++j, printf("%d\t%s\t%d\t%d\t%s", ++j, file->info->format, file->info->width, file->info->format, file->info->width, file->info->height, file->info->pixels, file->info->height, file->info->size, format_size(file->info->pixels)); printf("\t%s\t\t%c\t%s\n", format_size(file->info->size), file->info->has_alpha ? 'X' : '-', file->filename); file->info->has_alpha ? 'X' : '-', file->filename); feh_action_run(file, opt.actions[0]); feh_action_run(file, opt.actions[0]); Loading
src/slideshow.c +19 −6 Original line number Original line Diff line number Diff line Loading @@ -404,6 +404,19 @@ char *shell_escape(char *input) return ret; return ret; } } char *format_size(int size) { static char ret[5]; char units[] = {' ', 'k', 'M', 'G', 'T'}; unsigned char postfix = 0; while (size >= 1000) { size /= 1000; postfix++; } snprintf(ret, 5, "%3d%c", size, units[postfix]); return ret; } char *feh_printf(char *str, feh_file * file) char *feh_printf(char *str, feh_file * file) { { char *c; char *c; Loading Loading @@ -452,9 +465,7 @@ char *feh_printf(char *str, feh_file * file) break; break; case 'S': case 'S': if (file && (file->info || !feh_file_info_load(file, NULL))) { if (file && (file->info || !feh_file_info_load(file, NULL))) { snprintf(buf, sizeof(buf), strcat(ret, format_size(file->info->size)); "%.2fkB", ((double)file->info->size / 1000)); strcat(ret, buf); } } break; break; case 'p': case 'p': Loading @@ -463,14 +474,16 @@ char *feh_printf(char *str, feh_file * file) strcat(ret, buf); strcat(ret, buf); } } break; break; case 'P': if (file && (file->info || !feh_file_info_load(file, NULL))) { strcat(ret, format_size(file->info->pixels)); } break; case 't': case 't': if (file && (file->info || !feh_file_info_load(file, NULL))) { if (file && (file->info || !feh_file_info_load(file, NULL))) { strcat(ret, file->info->format); strcat(ret, file->info->format); } } break; break; case 'P': strcat(ret, PACKAGE); break; case 'v': case 'v': strcat(ret, VERSION); strcat(ret, VERSION); break; break; Loading