Commit a1583121 authored by Noah Birnel's avatar Noah Birnel
Browse files

make all opt.verbose messages print to stderr

manually changed in collage, imlib, filelist, thumbnail, slideshow,
index
feh_display_status also changed
parent 2b04e7f4
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ void init_collage_mode(void)
					": No size restriction specified for collage.\n"
					" You did specify a background however, so the\n"
					" collage size has defaulted to the size of the image\n",
					stdout);
					stderr);
			opt.limit_w = bg_w;
			opt.limit_h = bg_h;
		} else {
@@ -78,7 +78,7 @@ void init_collage_mode(void)
					": No size restriction specified for collage.\n"
					" - For collage mode, you need to specify width and height.\n"
					" Using defaults (width 800, height 600)\n",
					stdout);
					stderr);
			opt.limit_w = 800;
			opt.limit_h = 600;
		}
@@ -185,7 +185,7 @@ void init_collage_mode(void)
		}
	}
	if (opt.verbose)
		fputs("\n", stdout);
		fputs("\n", stderr);

	if (opt.output && opt.output_file) {
		char output_buf[1024];
@@ -199,8 +199,8 @@ void init_collage_mode(void)

			tw = gib_imlib_image_get_width(im_main);
			th = gib_imlib_image_get_height(im_main);
			fprintf(stdout, PACKAGE ": File saved as %s\n", output_buf);
			fprintf(stdout,
			fprintf(stderr, PACKAGE ": File saved as %s\n", output_buf);
			fprintf(stderr,
				"    - Image is %dx%d pixels and contains %d thumbnails\n",
				tw, th, (tw / opt.thumb_w) * (th / opt.thumb_h));
		}
+1 −1
Original line number Diff line number Diff line
@@ -600,7 +600,7 @@ void feh_save_filelist()
	tmpname = feh_unique_filename("", "filelist");

	if (opt.verbose)
		printf("saving filelist to filename '%s'\n", tmpname);
		fprintf(stderr, "saving filelist to filename '%s'\n", tmpname);

	feh_write_filelist(filelist, tmpname);
	free(tmpname);
+8 −8
Original line number Diff line number Diff line
@@ -276,7 +276,7 @@ int feh_load_image(Imlib_Image * im, feh_file * file)

	if ((err) || (!im)) {
		if (opt.verbose && !opt.quiet) {
			fputs("\n", stdout);
			fputs("\n", stderr);
			reset_output = 1;
		}
		feh_imlib_print_load_error(file->filename, NULL, err);
@@ -994,7 +994,7 @@ void feh_display_status(char stat)
	D(("filelist %p, filelist->next %p\n", filelist, filelist->next));

	if (!stat) {
		putc('\n', stdout);
		putc('\n', stderr);
		init_len = 0;
		i = 0;
		return;
@@ -1007,24 +1007,24 @@ void feh_display_status(char stat)
		if (reset_output) {
			/* There's just been an error message. Unfortunate ;) */
			for (j = 0; j < (((i % 50) + ((i % 50) / 10)) + 7); j++)
				putc(' ', stdout);
				putc(' ', stderr);
		}

		if (!(i % 50)) {
			int len = gib_list_length(filelist);

			fprintf(stdout, " %5d/%d (%d)\n[%3d%%] ",
			fprintf(stderr, " %5d/%d (%d)\n[%3d%%] ",
					i, init_len, len, ((int) ((float) i / init_len * 100)));

		} else if ((!(i % 10)) && (!reset_output))
			putc(' ', stdout);
			putc(' ', stderr);

		reset_output = 0;
	} else
		fputs("[  0%] ", stdout);
		fputs("[  0%] ", stderr);

	fprintf(stdout, "%c", stat);
	fflush(stdout);
	fprintf(stderr, "%c", stat);
	fflush(stderr);
	i++;
	return;
}
+3 −3
Original line number Diff line number Diff line
@@ -303,7 +303,7 @@ void init_index_mode(void)
		}
	}
	if (opt.verbose)
		putc('\n', stdout);
		putc('\n', stderr);

	if (opt.title_font) {
		int fw, fh, fx, fy;
@@ -336,8 +336,8 @@ void init_index_mode(void)

			tw = gib_imlib_image_get_width(im_main);
			th = gib_imlib_image_get_height(im_main);
			fprintf(stdout, PACKAGE " - File saved as %s\n", output_buf);
			fprintf(stdout,
			fprintf(stderr, PACKAGE " - File saved as %s\n", output_buf);
			fprintf(stderr,
				"    - Image is %dx%d pixels and contains %d thumbnails\n", tw, th, thumbnailcount);
		}
	}
+1 −1
Original line number Diff line number Diff line
@@ -662,7 +662,7 @@ void slideshow_save_image(winwidget win)
	}

	if (opt.verbose)
		printf("saving image to filename '%s'\n", tmpname);
		fprintf(stderr, "saving image to filename '%s'\n", tmpname);

	ungib_imlib_save_image_with_error_return(win->im, tmpname, &err);

Loading