Mercurial > hg > xemacs-beta
diff src/file-coding.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 | ef4d2466a29c |
children | 001628b7a5b3 |
line wrap: on
line diff
--- a/src/file-coding.c Thu May 24 06:30:21 2001 +0000 +++ b/src/file-coding.c Thu May 24 07:51:33 2001 +0000 @@ -37,7 +37,7 @@ #endif #include "file-coding.h" -Lisp_Object Qcoding_system_error; +Lisp_Object Qtext_conversion_error; Lisp_Object Vkeyboard_coding_system; Lisp_Object Vterminal_coding_system; @@ -376,8 +376,7 @@ { Lisp_Coding_System *c = XCODING_SYSTEM (obj); if (print_readably) - error ("printing unreadable object #<coding_system 0x%x>", - c->header.uid); + printing_unreadable_object ("#<coding_system 0x%x>", c->header.uid); write_c_string ("#<coding_system ", printcharfun); print_internal (c->name, printcharfun, 1); @@ -424,7 +423,7 @@ if (EQ (symbol, Qcrlf)) return EOL_CRLF; if (EQ (symbol, Qcr)) return EOL_CR; - signal_simple_error ("Unrecognized eol type", symbol); + invalid_constant ("Unrecognized eol type", symbol); return EOL_AUTODETECT; /* not reached */ } @@ -547,7 +546,7 @@ Lisp_Object coding_system = Ffind_coding_system (name); if (NILP (coding_system)) - signal_simple_error ("No such coding system", name); + invalid_argument ("No such coding system", name); return coding_system; } @@ -649,11 +648,11 @@ struct charset_conversion_spec spec; if (!CONSP (car) || !CONSP (XCDR (car)) || !NILP (XCDR (XCDR (car)))) - signal_simple_error ("Invalid charset conversion spec", car); + invalid_argument ("Invalid charset conversion spec", car); from = Fget_charset (XCAR (car)); to = Fget_charset (XCAR (XCDR (car))); if (XCHARSET_TYPE (from) != XCHARSET_TYPE (to)) - signal_simple_error_2 + invalid_operation_2 ("Attempted conversion between different charset types", from, to); spec.from_charset = from; @@ -880,7 +879,7 @@ else if (EQ (type, Qinternal)) { ty = CODESYS_INTERNAL; } #endif else - signal_simple_error ("Invalid coding system type", type); + invalid_constant ("Invalid coding system type", type); CHECK_SYMBOL (name); @@ -958,7 +957,7 @@ value); } else - signal_simple_error ("Unrecognized property", key); + invalid_constant ("Unrecognized property", key); } else if (EQ (type, Qccl)) { @@ -972,7 +971,7 @@ else if (EQ (key, Qencode)) suffix = "-ccl-encode"; else - signal_simple_error ("Unrecognized property", key); + invalid_constant ("Unrecognized property", key); /* If value is vector, register it as a ccl program associated with an newly created symbol for @@ -991,7 +990,7 @@ } /* check if the given ccl programs are valid. */ if (setup_ccl_program (&test_ccl, sym) < 0) - signal_simple_error ("Invalid CCL program", value); + invalid_argument ("Invalid CCL program", value); if (EQ (key, Qdecode)) CODING_SYSTEM_CCL_DECODE (codesys) = sym; @@ -1001,7 +1000,7 @@ } #endif /* MULE */ else - signal_simple_error ("Unrecognized property", key); + invalid_constant ("Unrecognized property", key); } } @@ -1074,7 +1073,7 @@ if (SYMBOLP (aliasee)) return aliasee; else - signal_simple_error ("Symbol is not a coding system alias", alias); + invalid_argument ("Symbol is not a coding system alias", alias); return Qnil; /* To keep the compiler happy */ } @@ -1126,7 +1125,7 @@ CHECK_SYMBOL (alias); if (!NILP (Fcoding_system_canonical_name_p (alias))) - signal_simple_error + invalid_change ("Symbol is the canonical name of a coding system and cannot be redefined", alias); @@ -1172,7 +1171,7 @@ /* Check for coding system alias loops */ if (EQ (alias, aliasee)) - alias_loop: signal_simple_error_2 + alias_loop: invalid_operation_2 ("Attempt to create a coding system alias loop", alias, aliasee); for (probe = aliasee; @@ -1311,14 +1310,14 @@ #ifdef MULE case CODESYS_PROP_ISO2022: if (type != CODESYS_ISO2022) - signal_simple_error + invalid_argument ("Property only valid in ISO2022 coding systems", prop); break; case CODESYS_PROP_CCL: if (type != CODESYS_CCL) - signal_simple_error + invalid_argument ("Property only valid in CCL coding systems", prop); break; @@ -1329,7 +1328,7 @@ } if (!ok) - signal_simple_error ("Unrecognized property", prop); + invalid_constant ("Unrecognized property", prop); if (EQ (prop, Qname)) return XCODING_SYSTEM_NAME (coding_system); @@ -1425,7 +1424,7 @@ if (EQ (coding_category_symbol[i], symbol)) return i; - signal_simple_error ("Unrecognized coding category", symbol); + invalid_constant ("Unrecognized coding category", symbol); return 0; /* not reached */ } @@ -1467,7 +1466,7 @@ int cat = decode_coding_category (XCAR (rest)); if (category_to_priority[cat] >= 0) - signal_simple_error ("Duplicate coding category in list", XCAR (rest)); + sferror ("Duplicate coding category in list", XCAR (rest)); category_to_priority[cat] = i++; } @@ -5590,7 +5589,7 @@ { INIT_LRECORD_IMPLEMENTATION (coding_system); - DEFERROR_STANDARD (Qcoding_system_error, Qio_error); + DEFERROR_STANDARD (Qtext_conversion_error, Qconversion_error); DEFSUBR (Fcoding_system_p); DEFSUBR (Ffind_coding_system); @@ -5628,50 +5627,50 @@ DEFSUBR (Fset_char_ucs); DEFSUBR (Fchar_ucs); #endif /* MULE */ - defsymbol (&Qcoding_systemp, "coding-system-p"); - defsymbol (&Qno_conversion, "no-conversion"); - defsymbol (&Qraw_text, "raw-text"); + DEFSYMBOL_MULTIWORD_PREDICATE (Qcoding_systemp); + DEFSYMBOL (Qno_conversion); + DEFSYMBOL (Qraw_text); #ifdef MULE - defsymbol (&Qbig5, "big5"); - defsymbol (&Qshift_jis, "shift-jis"); + DEFSYMBOL (Qbig5); + DEFSYMBOL (Qshift_jis); defsymbol (&Qucs4, "ucs-4"); defsymbol (&Qutf8, "utf-8"); - defsymbol (&Qccl, "ccl"); - defsymbol (&Qiso2022, "iso2022"); + DEFSYMBOL (Qccl); + DEFSYMBOL (Qiso2022); #endif /* MULE */ - defsymbol (&Qmnemonic, "mnemonic"); - defsymbol (&Qeol_type, "eol-type"); - defsymbol (&Qpost_read_conversion, "post-read-conversion"); - defsymbol (&Qpre_write_conversion, "pre-write-conversion"); - - defsymbol (&Qcr, "cr"); - defsymbol (&Qlf, "lf"); - defsymbol (&Qcrlf, "crlf"); - defsymbol (&Qeol_cr, "eol-cr"); - defsymbol (&Qeol_lf, "eol-lf"); - defsymbol (&Qeol_crlf, "eol-crlf"); + DEFSYMBOL (Qmnemonic); + DEFSYMBOL (Qeol_type); + DEFSYMBOL (Qpost_read_conversion); + DEFSYMBOL (Qpre_write_conversion); + + DEFSYMBOL (Qcr); + DEFSYMBOL (Qlf); + DEFSYMBOL (Qcrlf); + DEFSYMBOL (Qeol_cr); + DEFSYMBOL (Qeol_lf); + DEFSYMBOL (Qeol_crlf); #ifdef MULE - defsymbol (&Qcharset_g0, "charset-g0"); - defsymbol (&Qcharset_g1, "charset-g1"); - defsymbol (&Qcharset_g2, "charset-g2"); - defsymbol (&Qcharset_g3, "charset-g3"); - defsymbol (&Qforce_g0_on_output, "force-g0-on-output"); - defsymbol (&Qforce_g1_on_output, "force-g1-on-output"); - defsymbol (&Qforce_g2_on_output, "force-g2-on-output"); - defsymbol (&Qforce_g3_on_output, "force-g3-on-output"); - defsymbol (&Qno_iso6429, "no-iso6429"); - defsymbol (&Qinput_charset_conversion, "input-charset-conversion"); - defsymbol (&Qoutput_charset_conversion, "output-charset-conversion"); - - defsymbol (&Qshort, "short"); - defsymbol (&Qno_ascii_eol, "no-ascii-eol"); - defsymbol (&Qno_ascii_cntl, "no-ascii-cntl"); - defsymbol (&Qseven, "seven"); - defsymbol (&Qlock_shift, "lock-shift"); - defsymbol (&Qescape_quoted, "escape-quoted"); + DEFSYMBOL (Qcharset_g0); + DEFSYMBOL (Qcharset_g1); + DEFSYMBOL (Qcharset_g2); + DEFSYMBOL (Qcharset_g3); + DEFSYMBOL (Qforce_g0_on_output); + DEFSYMBOL (Qforce_g1_on_output); + DEFSYMBOL (Qforce_g2_on_output); + DEFSYMBOL (Qforce_g3_on_output); + DEFSYMBOL (Qno_iso6429); + DEFSYMBOL (Qinput_charset_conversion); + DEFSYMBOL (Qoutput_charset_conversion); + + DEFSYMBOL (Qshort); + DEFSYMBOL (Qno_ascii_eol); + DEFSYMBOL (Qno_ascii_cntl); + DEFSYMBOL (Qseven); + DEFSYMBOL (Qlock_shift); + DEFSYMBOL (Qescape_quoted); #endif /* MULE */ - defsymbol (&Qencode, "encode"); - defsymbol (&Qdecode, "decode"); + DEFSYMBOL (Qencode); + DEFSYMBOL (Qdecode); #ifdef MULE defsymbol (&coding_category_symbol[CODING_CATEGORY_SHIFT_JIS],