Commit 753fc6ef authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Replace some printf calls by fputs/putc

parent 8b5e364d
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -62,20 +62,20 @@ void init_collage_mode(void)
	if (!opt.limit_w || !opt.limit_h) {
		if (bg_im) {
			if (opt.verbose)
				fprintf(stdout,
					PACKAGE
				fputs(PACKAGE
					" - 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");
					" collage size has defaulted to the size of the image\n",
					stdout);
			opt.limit_w = bg_w;
			opt.limit_h = bg_h;
		} else {
			if (opt.verbose)
				fprintf(stdout,
					PACKAGE
				fputs(PACKAGE
					" - 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");
					" Using defaults (width 800, height 600)\n",
					stdout);
			opt.limit_w = 800;
			opt.limit_h = 600;
		}
@@ -182,7 +182,7 @@ void init_collage_mode(void)
		}
	}
	if (opt.verbose)
		fprintf(stdout, "\n");
		fputs("\n", stdout);

	if (opt.output && opt.output_file) {
		char output_buf[1024];
+2 −2
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ gib_list *feh_file_info_preload(gib_list * list)
	gib_list *remove_list = NULL;

	if (opt.verbose)
		fprintf(stdout, PACKAGE " - preloading...\n");
		fputs(PACKAGE " - preloading...\n", stdout);

	for (l = list; l; l = l->next) {
		file = FEH_FILE(l->data);
@@ -270,7 +270,7 @@ gib_list *feh_file_info_preload(gib_list * list)
			feh_display_status('.');
	}
	if (opt.verbose)
		fprintf(stdout, "\n");
		fputs("\n", stdout);

	if (remove_list) {
		for (l = remove_list; l; l = l->next)
+5 −5
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ int feh_load_image(Imlib_Image * im, feh_file * file)

	if ((err) || (!im)) {
		if (opt.verbose && !opt.quiet) {
			fprintf(stdout, "\n");
			fputs("\n", stdout);
			reset_output = 1;
		}
		/* Check error code */
@@ -753,7 +753,7 @@ 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++)
				fprintf(stdout, " ");
				putc(' ', stdout);
		}

		if (!(i % 50)) {
@@ -763,11 +763,11 @@ void feh_display_status(char stat)
					i, init_len, len, ((int) ((float) i / init_len * 100)));

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

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

	fprintf(stdout, "%c", stat);
	fflush(stdout);
@@ -912,7 +912,7 @@ void feh_edit_inplace_lossless_rotate(winwidget w, int orientation)
	snprintf(file_str, len, "%s", filename);

	if ((pid = fork()) < 0) {
		iw_weprintf(w, "lossless rotate: fork failed:");
		im_weprintf(w, "lossless rotate: fork failed:");
		return;
	} else if (pid == 0) {

+7 −7
Original line number Diff line number Diff line
@@ -113,19 +113,19 @@ void init_index_mode(void)
	if (!opt.limit_w && !opt.limit_h) {
		if (bg_im) {
			if (opt.verbose)
				fprintf(stdout,
					PACKAGE
				fputs(PACKAGE
					" - No size restriction specified for index.\n"
					" You did specify a background however, so the\n"
					" index size has defaulted to the size of the image\n");
					" index size has defaulted to the size of the image\n",
					stdout);
			opt.limit_w = bg_w;
			opt.limit_h = bg_h;
		} else {
			if (opt.verbose)
				fprintf(stdout,
					PACKAGE
				fputs(PACKAGE
					" - No size restriction specified for index.\n"
					" Using defaults (width limited to 800)\n");
					" Using defaults (width limited to 800)\n",
					stdout);
			opt.limit_w = 800;
		}
	}
@@ -458,7 +458,7 @@ void init_index_mode(void)
		}
	}
	if (opt.verbose)
		fprintf(stdout, "\n");
		putc('\n', stdout);

	if (opt.title_font) {
		int fw, fh, fx, fy;
+4 −11
Original line number Diff line number Diff line
@@ -314,10 +314,10 @@ void feh_event_invoke_action(winwidget winwid, unsigned char action)
				|| (winwid->type == WIN_TYPE_THUMBNAIL_VIEWER)) {
			feh_action_run(FEH_FILE(winwid->file->data), opt.actions[action]);
			winwidget_destroy(winwid);
		} else if (winwid->type == WIN_TYPE_THUMBNAIL) {
			printf("actions from the main thumb window aren't currentl supported!\n");
			printf("For now, open the image to perform the action on it.\n");
		}
		} else if (winwid->type == WIN_TYPE_THUMBNAIL)
			fputs("actions from the main thumb window aren't currently supported!\n"
					"For now, open the image to perform the action on it.\n",
					stdout);
	}
	return;
}
@@ -596,15 +596,8 @@ void feh_event_handle_keypress(XEvent * ev)
			int i, rect[4];

			winwidget_get_geometry(winwid, rect);
			/* printf("window: (%d, %d)\n", rect[0], rect[1]);
			   printf("found %d screens.\n", num_xinerama_screens); */
			for (i = 0; i < num_xinerama_screens; i++) {
				xinerama_screen = 0;
				/* printf("%d: [%d, %d, %d, %d] (%d, %d)\n",
				   i,
				   xinerama_screens[i].x_org, xinerama_screens[i].y_org,
				   xinerama_screens[i].width, xinerama_screens[i].height,
				   rect[0], rect[1]); */
				if (XY_IN_RECT(rect[0], rect[1],
							xinerama_screens[i].x_org,
							xinerama_screens[i].y_org,
Loading