Mercurial > hg > xemacs-beta
diff src/glyphs-x.c @ 563:183866b06e0b
[xemacs-hg @ 2001-05-24 07:50:48 by ben]
Makefile.in.in, abbrev.c, alloc.c, buffer.c, bytecode.c, callint.c, callproc.c, casetab.c, chartab.c, cmdloop.c, cmds.c, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console.c, data.c, database.c, debug.c, device-gtk.c, device-msw.c, device-tty.c, device-x.c, device.c, dialog-gtk.c, dialog-msw.c, dialog-x.c, dialog.c, dired-msw.c, dired.c, doc.c, doprnt.c, dragdrop.c, editfns.c, eldap.c, eldap.h, elhash.c, emacs-widget-accessors.c, emacs.c, emodules.c, esd.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, filelock.c, floatfns.c, fns.c, font-lock.c, frame-gtk.c, frame-x.c, frame.c, general-slots.h, glade.c, glyphs-gtk.c, glyphs-msw.c, glyphs-widget.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-gtk.c, gui-x.c, gui.c, gutter.c, hpplay.c, indent.c, input-method-xlib.c, insdel.c, intl.c, keymap.c, libsst.c, libsst.h, linuxplay.c, lisp.h, lread.c, lstream.c, lstream.h, macros.c, marker.c, md5.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, miscplay.c, miscplay.h, mule-ccl.c, mule-charset.c, mule-wnnfns.c, mule.c, nas.c, ntplay.c, ntproc.c, objects-gtk.c, objects-msw.c, objects-x.c, objects.c, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, ralloc.c, rangetab.c, redisplay.c, scrollbar.c, search.c, select-gtk.c, select-x.c, select.c, sgiplay.c, sheap.c, sound.c, specifier.c, sunplay.c, symbols.c, symeval.h, symsinit.h, syntax.c, sysdep.c, toolbar-msw.c, toolbar.c, tooltalk.c, ui-byhand.c, ui-gtk.c, undo.c, unexaix.c, unexapollo.c, unexconvex.c, unexec.c, widget.c, win32.c, window.c:
-- defsymbol -> DEFSYMBOL.
-- add an error type to all errors.
-- eliminate the error functions in eval.c that let you just
use Qerror as the type.
-- redo the error API to be more consistent, sensibly named,
and easier to use.
-- redo the error hierarchy somewhat. create new errors:
structure-formation-error, gui-error, invalid-constant,
stack-overflow, out-of-memory, process-error, network-error,
sound-error, printing-unreadable-object, base64-conversion-
error; coding-system-error renamed to text-conversion error;
some others.
-- fix Mule problems in error strings in emodules.c, tooltalk.c.
-- fix error handling in mswin open-network-stream.
-- Mule-ize all sound files and clean up the headers.
-- nativesound.h -> sound.h and used for all sound files.
-- move some shared stuff into glyphs-shared.c: first attempt
at eliminating some of the massive GTK code duplication.
xemacs.mak: add glyphs-shared.c.
xemacs-faq.texi: document how to debug X errors
subr.el: fix doc string to reflect reality
author | ben |
---|---|
date | Thu, 24 May 2001 07:51:33 +0000 |
parents | 0784d089fdc9 |
children | 4d7fdf497470 |
line wrap: on
line diff
--- a/src/glyphs-x.c Thu May 24 06:30:21 2001 +0000 +++ b/src/glyphs-x.c Thu May 24 07:51:33 2001 +0000 @@ -680,7 +680,7 @@ errno = old_errno; } report_file_error ("Creating temp file", - list1 (build_string (filename_out))); + build_string (filename_out)); } CHECK_STRING (string); @@ -741,7 +741,7 @@ if (fubar) report_file_error ("Writing temp file", - list1 (build_string (filename_out))); + build_string (filename_out)); } #endif /* 0 */ @@ -763,13 +763,13 @@ width, height, &best_width, &best_height)) /* this means that an X error of some sort occurred (we trap these so they're not fatal). */ - signal_simple_error ("XQueryBestCursor() failed?", instantiator); + gui_error ("XQueryBestCursor() failed?", instantiator); if (width > best_width || height > best_height) - error_with_frob (instantiator, - "pointer too large (%dx%d): " - "server requires %dx%d or smaller", - width, height, best_width, best_height); + signal_ferror_with_frob (Qgui_error, instantiator, + "pointer too large (%dx%d): " + "server requires %dx%d or smaller", + width, height, best_width, best_height); } @@ -862,7 +862,7 @@ Pixmap pixmap; if (!DEVICE_X_P (XDEVICE (device))) - signal_simple_error ("Not an X device", device); + gui_error ("Not an X device", device); dpy = DEVICE_X_DISPLAY (XDEVICE (device)); d = XtWindow(DEVICE_XT_APP_SHELL (XDEVICE (device))); @@ -874,13 +874,13 @@ pixmap = XCreatePixmap (dpy, d, ximage->width, ximage->height, ximage->depth); if (!pixmap) - signal_simple_error ("Unable to create pixmap", instantiator); + gui_error ("Unable to create pixmap", instantiator); gc = XCreateGC (dpy, pixmap, 0, NULL); if (!gc) { XFreePixmap (dpy, pixmap); - signal_simple_error ("Unable to create GC", instantiator); + gui_error ("Unable to create GC", instantiator); } XPutImage (dpy, pixmap, gc, ximage, 0, 0, 0, 0, @@ -923,13 +923,13 @@ pixmap = XCreatePixmap (dpy, d, ximage->width, ximage->height, ximage->depth); if (!pixmap) - signal_simple_error ("Unable to create pixmap", instantiator); + gui_error ("Unable to create pixmap", instantiator); gc = XCreateGC (dpy, pixmap, 0, NULL); if (!gc) { XFreePixmap (dpy, pixmap); - signal_simple_error ("Unable to create GC", instantiator); + gui_error ("Unable to create GC", instantiator); } XPutImage (dpy, pixmap, gc, ximage, 0, 0, 0, 0, @@ -1035,7 +1035,7 @@ enum image_instance_type type; if (!DEVICE_X_P (XDEVICE (device))) - signal_simple_error ("Not an X device", device); + gui_error ("Not an X device", device); dpy = DEVICE_X_DISPLAY (XDEVICE (device)); draw = XtWindow(DEVICE_XT_APP_SHELL (XDEVICE (device))); @@ -1323,7 +1323,7 @@ unsigned int w, h; if (!DEVICE_X_P (XDEVICE (device))) - signal_simple_error ("Not an X device", device); + gui_error ("Not an X device", device); dpy = DEVICE_X_DISPLAY (XDEVICE (device)); xs = DefaultScreenOfDisplay (dpy); @@ -1422,19 +1422,13 @@ if (force_mono) { /* second time; blow out. */ - signal_double_file_error ("Reading pixmap data", - "color allocation failed", - data); + gui_error ("XPM color allocation failed", data); } else { + /* second time; blow out. */ if (! (dest_mask & IMAGE_MONO_PIXMAP_MASK)) - { - /* second time; blow out. */ - signal_double_file_error ("Reading pixmap data", - "color allocation failed", - data); - } + gui_error ("XPM color allocation failed", data); force_mono = 1; IMAGE_INSTANCE_TYPE (ii) = IMAGE_MONO_PIXMAP; goto retry; @@ -1443,15 +1437,14 @@ case XpmNoMemory: { xpm_free (&xpmattrs); - signal_double_file_error ("Parsing pixmap data", - "out of memory", data); + out_of_memory ("Parsing pixmap data", data); } default: { xpm_free (&xpmattrs); - signal_double_file_error_2 ("Parsing pixmap data", - "unknown error code", - make_int (result), data); + signal_error_2 (Qgui_error, + "Parsing pixmap data: unknown error code", + make_int (result), data); } } @@ -1705,7 +1698,7 @@ } if (emsg) - signal_simple_error_2 (emsg, data, Qimage); + gui_error_2 (emsg, data, Qimage); bp = bits = (char *) alloca (PIXELS / 8); @@ -1948,13 +1941,13 @@ Lisp_Object foreground, background; if (!DEVICE_X_P (XDEVICE (device))) - signal_simple_error ("Not an X device", device); + gui_error ("Not an X device", device); dpy = DEVICE_X_DISPLAY (XDEVICE (device)); if (!STRINGP (data) || strncmp ("FONT ", (char *) XSTRING_DATA (data), 5)) - signal_simple_error ("Invalid font-glyph instantiator", + invalid_argument ("Invalid font-glyph instantiator", instantiator); if (!(dest_mask & IMAGE_POINTER_MASK)) @@ -1978,12 +1971,11 @@ count = 4, mask_name[0] = 0; if (count != 2 && count != 4) - signal_simple_error ("invalid cursor specification", data); + syntax_error ("invalid cursor specification", data); source = safe_XLoadFont (dpy, source_name); if (! source) - signal_simple_error_2 ("couldn't load font", - build_string (source_name), - data); + signal_error_2 (Qgui_error, + "couldn't load font", build_string (source_name), data); if (count == 2) mask = 0; else if (!mask_name[0]) @@ -1992,9 +1984,9 @@ { mask = safe_XLoadFont (dpy, mask_name); if (!mask) - /* continuable */ - Fsignal (Qerror, list3 (build_string ("couldn't load font"), - build_string (mask_name), data)); + signal_continuable_error_2 (Qgui_error, + "couldn't load font", + build_string (mask_name), data); } if (!mask) mask_char = 0; @@ -2043,7 +2035,7 @@ Lisp_Object foreground, background; if (!DEVICE_X_P (XDEVICE (device))) - signal_simple_error ("Not an X device", device); + gui_error ("Not an X device", device); dpy = DEVICE_X_DISPLAY (XDEVICE (device)); @@ -2052,7 +2044,7 @@ LISP_STRING_TO_EXTERNAL (data, name_ext, Qfile_name); if ((i = XmuCursorNameToIndex (name_ext)) == -1) - signal_simple_error ("Unrecognized cursor-font name", data); + invalid_argument ("Unrecognized cursor-font name", data); x_initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER); IMAGE_INSTANCE_X_CURSOR (ii) = XCreateFontCursor (dpy, i); @@ -2265,7 +2257,8 @@ { Lisp_Object sw; XSETIMAGE_INSTANCE (sw, p); - signal_simple_error ("XEmacs bug: subwindow is deleted", sw); + signal_error (Qinternal_error, + "XEmacs bug: subwindow is deleted", sw); } lw_add_widget_value_arg (wv, XtNwidth, @@ -2311,7 +2304,7 @@ h = IMAGE_INSTANCE_HEIGHT (ii); if (!DEVICE_X_P (XDEVICE (device))) - signal_simple_error ("Not an X device", device); + gui_error ("Not an X device", device); dpy = DEVICE_X_DISPLAY (XDEVICE (device)); xs = DefaultScreenOfDisplay (dpy); @@ -2472,7 +2465,7 @@ XColor fcolor, bcolor; if (!DEVICE_X_P (d)) - signal_simple_error ("Not an X device", device); + gui_error ("Not an X device", device); /* have to set the type this late in case there is no device instantiation for a widget. But we can go ahead and do it without