diff -uprN scrot-0.6/src/imlib.c scrot-0.6.changed/src/imlib.c --- scrot-0.6/src/imlib.c 2000-12-05 00:22:26.000000000 +0100 +++ scrot-0.6.changed/src/imlib.c 2004-03-24 21:08:46.864931512 +0100 @@ -38,7 +38,7 @@ init_x_and_imlib(char *dispstr, int scre { disp = XOpenDisplay(dispstr); if (!disp) - eprintf("Can't open X display. It *is* running, yeah?"); + gib_eprintf("Can't open X display. It *is* running, yeah?"); if (screen_num) scr = ScreenOfDisplay(disp, screen_num); else diff -uprN scrot-0.6/src/main.c scrot-0.6.changed/src/main.c --- scrot-0.6/src/main.c 2001-08-08 22:23:30.000000000 +0200 +++ scrot-0.6.changed/src/main.c 2004-03-24 21:02:34.366559872 +0100 @@ -40,8 +40,8 @@ main(int argc, char **argv) if (!opt.output_file) { - opt.output_file = estrdup("%Y-%m-%d-%H%M%S_$wx$h_scrot.png"); - opt.thumb_file = estrdup("%Y-%m-%d-%H%M%S_$wx$h_scrot-thumb.png"); + opt.output_file = gib_estrdup("%Y-%m-%d-%H%M%S_$wx$h_scrot.png"); + opt.thumb_file = gib_estrdup("%Y-%m-%d-%H%M%S_$wx$h_scrot-thumb.png"); } @@ -61,7 +61,7 @@ main(int argc, char **argv) } if (!image) - eprintf("no image grabbed"); + gib_eprintf("no image grabbed"); imlib_context_set_image(image); imlib_image_attach_data_value("quality", NULL, opt.quality, NULL); @@ -69,7 +69,7 @@ main(int argc, char **argv) filename = im_printf(opt.output_file, NULL, image); gib_imlib_save_image_with_error_return(image, filename, &err); if (err) - eprintf("Saving to file %s failed\n", filename); + gib_eprintf("Saving to file %s failed\n", filename); if (opt.thumb) { int cwidth, cheight; @@ -80,13 +80,13 @@ main(int argc, char **argv) cwidth * opt.thumb / 100, cheight * opt.thumb / 100,1); if (thumbnail == NULL) - eprintf("Unable to create scaled Image\n"); + gib_eprintf("Unable to create scaled Image\n"); else { filename = im_printf(opt.thumb_file, NULL, thumbnail); gib_imlib_save_image_with_error_return(thumbnail, filename, &err); if (err) - eprintf("Saving thumbnail %s failed\n", filename); + gib_eprintf("Saving thumbnail %s failed\n", filename); } } if (opt.exec) @@ -181,13 +181,13 @@ Imlib_Image scrot_sel_and_grab_image(voi ButtonMotionMask | ButtonPressMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync, root, cursor, CurrentTime) != GrabSuccess)) - eprintf("couldn't grab pointer:"); + gib_eprintf("couldn't grab pointer:"); if ( (XGrabKeyboard (disp, root, False, GrabModeAsync, GrabModeAsync, CurrentTime) != GrabSuccess)) - eprintf("couldn't grab keyboard:"); + gib_eprintf("couldn't grab keyboard:"); while (1) @@ -263,7 +263,7 @@ Imlib_Image scrot_sel_and_grab_image(voi count = select(fdsize, &fdset, NULL, NULL, NULL); if ((count < 0) && ((errno == ENOMEM) || (errno == EINVAL) || (errno == EBADF))) - eprintf("Connection to X display lost"); + gib_eprintf("Connection to X display lost"); } if (rect_w) { @@ -491,7 +491,7 @@ im_printf(char *str, char *filename, Iml else strncat(ret, c, 1); } - return estrdup(ret); + return gib_estrdup(ret); } Window scrot_get_client_window(Display * display, Window target) @@ -567,7 +567,7 @@ scrot_grab_shot_multi(void) dispstr = DisplayString(disp); - subdisp = estrdup(DisplayString(disp)); + subdisp = gib_estrdup(DisplayString(disp)); for (i = 0; i