From: tomo Date: Mon, 17 May 1999 09:42:13 +0000 (+0000) Subject: XEmacs 21.2.5 X-Git-Tag: r21-2-5^2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4c0c5d1d054e60fb9ffa3dd9ec1c1d7bb8eedef0;p=chise%2Fxemacs-chise.git.1 XEmacs 21.2.5 --- diff --git a/lib-src/pstogif b/lib-src/pstogif index 9ff1cbf..7ddbcd3 100755 --- a/lib-src/pstogif +++ b/lib-src/pstogif @@ -59,7 +59,7 @@ $GS= $ENV{'GS'} || 'gs'; #$PSTOPPM= $ENV{'PSTOPPM'} || # 'pstoppm.ps'; -# Available in the PBMPLUS libary +# Available in the PBMPLUS library $PNMCROP=$ENV{'PNMCROP'} || 'pnmcrop' ; # Also in PBMPLUS diff --git a/lisp/winnt.el b/lisp/winnt.el index b0898a9..9ce0750 100644 --- a/lisp/winnt.el +++ b/lisp/winnt.el @@ -76,7 +76,7 @@ before calling this function. You can redefine this for customization. See also `auto-save-file-name-p'." (let ((name (original-make-auto-save-file-name)) (start 0)) - ;; destructively replace occurences of * or ? with $ + ;; destructively replace occurrences of * or ? with $ (while (string-match "[?*]" name start) (aset name (match-beginning 0) ?$) (setq start (1+ (match-end 0)))) @@ -88,7 +88,7 @@ See also `auto-save-file-name-p'." (defun nt-quote-args-verbatim (args) "Copy ARG list verbatim, separating each arg with space." - (mapconcat 'identity args " ")) + (mapconcat #'identity args " ")) (defun nt-quote-args-prefix-quote (prefix args) (mapconcat (lambda (str) diff --git a/src/dbxrc b/src/dbxrc index b9ae837..bb2b78b 100644 --- a/src/dbxrc +++ b/src/dbxrc @@ -23,7 +23,7 @@ # You can use this file to debug XEmacs using Sun WorkShop's dbx. # Add the contents of this file to $HOME/.dbxrc or # Source the contents of this file with something like: -# test -r ./dbxrc && . ./dbxrc +# if test -r ./dbxrc; then . ./dbxrc; fi # Some functions defined here require a running process, but most # don't. Considerable effort has been expended to this end. @@ -76,9 +76,17 @@ end # Various dbx bugs cause ugliness in following code function decode_object { - test -z "$xemacs_initted" && XEmacsInit - obj=$[*(void**)(&$1)] - test "$obj" = "(nil)" && obj="0x0" + if test -z "$xemacs_initted"; then XEmacsInit; fi; + if test $dbg_USE_UNION_TYPE = 1; then + # Repeat after me... dbx sux, dbx sux, dbx sux... + # Allow both `pobj Qnil' and `pobj 0x82746834' to work + case $(whatis $1) in + *Lisp_Object*) obj="$[(unsigned long)(($1).i)]";; + *) obj="$[(unsigned long)($1)]";; + esac + else + obj="$[(unsigned long)($1)]"; + fi if test $dbg_USE_MINIMAL_TAGBITS = 1; then if test $[(int)($obj & 1)] = 1; then # It's an int @@ -91,13 +99,22 @@ function decode_object { else # It's a record pointer val=$[(void*)$obj] + if test "$val" = "(nil)"; then type=null_pointer; fi fi fi else # not dbg_USE_MINIMAL_TAGBITS - val=$[(void*)($obj & $dbg_valmask)] - test "$val" = "(nil)" && val="0x0" type=$[(int)(((unsigned long long)($obj & $dbg_typemask)) >> ($dbg_valbits + 1))] + if test "$[$type == Lisp_Type_Int]" = 1; then + val=$[(int)($obj & $dbg_valmask)] + elif test "$[$type == Lisp_Type_Char]" = 1; then + val=$[(int)($obj & $dbg_valmask)] + else + val=$[(void*)($obj & $dbg_valmask)] + if test "$val" = "(nil)"; then type=null_pointer; fi + fi + #val=$[(void*)($obj & $dbg_valmask)] + #printvar val type obj fi if test $type = $dbg_Lisp_Type_Record; then @@ -126,6 +143,7 @@ function xtype { elif test $type = $dbg_Lisp_Type_String; then echo "string" elif test $type = $dbg_Lisp_Type_Vector; then echo "vector" elif test $type = $dbg_Lisp_Type_Cons; then echo "cons" + elif test $type = null_pointer; then echo "$type" else echo "record type with name: $[((struct lrecord_implementation *)$imp)->name]" fi @@ -227,7 +245,7 @@ function pobj { elif lrecord_type_p console; then pstruct console elif lrecord_type_p database; then - pstruct database + pstruct Lisp_Database elif lrecord_type_p device; then pstruct device elif lrecord_type_p event; then @@ -248,12 +266,12 @@ function pobj { pstruct frame elif lrecord_type_p glyph; then pstruct Lisp_Glyph - elif lrecord_type_p hashtable; then - pstruct hashtable + elif lrecord_type_p hash_table; then + pstruct Lisp_Hash_Table elif lrecord_type_p image_instance; then pstruct Lisp_Image_Instance elif lrecord_type_p keymap; then - pstruct keymap + pstruct Lisp_Keymap elif lrecord_type_p lcrecord_list; then pstruct lcrecord_list elif lrecord_type_p lstream; then @@ -294,6 +312,8 @@ function pobj { pstruct window elif lrecord_type_p window_configuration; then pstruct window_config + elif test "$type" = "null_pointer"; then + echo "Lisp Object is a null pointer!!" else echo "Unknown Lisp Object type" print $1 @@ -307,6 +327,7 @@ function pproc { } dbxenv suppress_startup_message 4.0 +dbxenv mt_watchpoints on function dp_core { print ((struct x_frame *)(((struct frame*)(Fselected_frame(Qnil)&0x00FFFFFF))->frame_data))->widget->core diff --git a/src/dll.c b/src/dll.c index 94225cf..3620032 100644 --- a/src/dll.c +++ b/src/dll.c @@ -43,7 +43,6 @@ Boston, MA 02111-1307, USA. */ #include "lisp.h" #include "buffer.h" #include "sysdll.h" -#include DEFUN ("dll-open", Fdll_open, 1, 1, "FShared object: ", /* Load LIBRARY as a shared object file. diff --git a/src/gdbinit b/src/gdbinit index 162b641..56cc682 100644 --- a/src/gdbinit +++ b/src/gdbinit @@ -221,12 +221,12 @@ define pobj else if $type == dbg_Lisp_Type_Symbol || $imp == lrecord_symbol pstruct Lisp_Symbol - printf "Symbol name: %s\n", $xstruct->name->_data + printf "Symbol name: %s\n", $xstruct->name->data else if $type == dbg_Lisp_Type_Vector || $imp == lrecord_vector pstruct Lisp_Vector printf "Vector of length %d\n", $xstruct->size - #print *($xstruct->_data) @ $xstruct->size + #print *($xstruct->data) @ $xstruct->size else if $imp == lrecord_bit_vector pstruct Lisp_Bit_Vector @@ -259,7 +259,7 @@ define pobj pstruct console else if $imp == lrecord_database - pstruct database + pstruct Lisp_Database else if $imp == lrecord_device pstruct device @@ -291,14 +291,14 @@ define pobj if $imp == lrecord_glyph pstruct Lisp_Glyph else - if $imp == lrecord_hashtable - pstruct hashtable + if $imp == lrecord_hash_table + pstruct Lisp_Hash_Table else if $imp == lrecord_image_instance pstruct Lisp_Image_Instance else if $imp == lrecord_keymap - pstruct keymap + pstruct Lisp_Keymap else if $imp == lrecord_lcrecord_list pstruct lcrecord_list @@ -378,6 +378,7 @@ define pobj end end end + # Repeat after me... gdb sux, gdb sux, gdb sux... end end end @@ -396,6 +397,7 @@ define pobj end end end + # Are we having fun yet?? end end end diff --git a/src/mule-coding.c b/src/mule-coding.c index a0a4ff9..635b381 100644 --- a/src/mule-coding.c +++ b/src/mule-coding.c @@ -75,7 +75,7 @@ Lisp_Object Qencode, Qdecode; Lisp_Object Qctext; -Lisp_Object Vcoding_system_hashtable; +Lisp_Object Vcoding_system_hash_table; int enable_multibyte_characters; @@ -220,27 +220,27 @@ mark_coding_system (Lisp_Object obj, void (*markobj) (Lisp_Object)) { struct Lisp_Coding_System *codesys = XCODING_SYSTEM (obj); - (markobj) (CODING_SYSTEM_NAME (codesys)); - (markobj) (CODING_SYSTEM_DOC_STRING (codesys)); - (markobj) (CODING_SYSTEM_MNEMONIC (codesys)); - (markobj) (CODING_SYSTEM_EOL_LF (codesys)); - (markobj) (CODING_SYSTEM_EOL_CRLF (codesys)); - (markobj) (CODING_SYSTEM_EOL_CR (codesys)); + markobj (CODING_SYSTEM_NAME (codesys)); + markobj (CODING_SYSTEM_DOC_STRING (codesys)); + markobj (CODING_SYSTEM_MNEMONIC (codesys)); + markobj (CODING_SYSTEM_EOL_LF (codesys)); + markobj (CODING_SYSTEM_EOL_CRLF (codesys)); + markobj (CODING_SYSTEM_EOL_CR (codesys)); switch (CODING_SYSTEM_TYPE (codesys)) { int i; case CODESYS_ISO2022: for (i = 0; i < 4; i++) - (markobj) (CODING_SYSTEM_ISO2022_INITIAL_CHARSET (codesys, i)); + markobj (CODING_SYSTEM_ISO2022_INITIAL_CHARSET (codesys, i)); if (codesys->iso2022.input_conv) { for (i = 0; i < Dynarr_length (codesys->iso2022.input_conv); i++) { struct charset_conversion_spec *ccs = Dynarr_atp (codesys->iso2022.input_conv, i); - (markobj) (ccs->from_charset); - (markobj) (ccs->to_charset); + markobj (ccs->from_charset); + markobj (ccs->to_charset); } } if (codesys->iso2022.output_conv) @@ -249,21 +249,21 @@ mark_coding_system (Lisp_Object obj, void (*markobj) (Lisp_Object)) { struct charset_conversion_spec *ccs = Dynarr_atp (codesys->iso2022.output_conv, i); - (markobj) (ccs->from_charset); - (markobj) (ccs->to_charset); + markobj (ccs->from_charset); + markobj (ccs->to_charset); } } break; case CODESYS_CCL: - (markobj) (CODING_SYSTEM_CCL_DECODE (codesys)); - (markobj) (CODING_SYSTEM_CCL_ENCODE (codesys)); + markobj (CODING_SYSTEM_CCL_DECODE (codesys)); + markobj (CODING_SYSTEM_CCL_ENCODE (codesys)); break; default: break; } - (markobj) (CODING_SYSTEM_PRE_WRITE_CONVERSION (codesys)); + markobj (CODING_SYSTEM_PRE_WRITE_CONVERSION (codesys)); return CODING_SYSTEM_POST_READ_CONVERSION (codesys); } @@ -334,11 +334,11 @@ eol_type_to_symbol (enum eol_type type) { switch (type) { + default: abort (); case EOL_LF: return Qlf; case EOL_CRLF: return Qcrlf; case EOL_CR: return Qcr; case EOL_AUTODETECT: return Qnil; - default: abort (); return Qnil; /* not reached */ } } @@ -411,7 +411,7 @@ associated coding system object is returned. return coding_system_or_name; CHECK_SYMBOL (coding_system_or_name); - return Fgethash (coding_system_or_name, Vcoding_system_hashtable, Qnil); + return Fgethash (coding_system_or_name, Vcoding_system_hash_table, Qnil); } DEFUN ("get-coding-system", Fget_coding_system, 1, 1, 0, /* @@ -465,7 +465,7 @@ Return a list of the names of all defined coding systems. GCPRO1 (coding_system_list); coding_system_list_closure.coding_system_list = &coding_system_list; - elisp_maphash (add_coding_system_to_list_mapper, Vcoding_system_hashtable, + elisp_maphash (add_coding_system_to_list_mapper, Vcoding_system_hash_table, &coding_system_list_closure); UNGCPRO; @@ -855,7 +855,7 @@ if TYPE is 'ccl: { Lisp_Object codesys_obj; XSETCODING_SYSTEM (codesys_obj, codesys); - Fputhash (name, codesys_obj, Vcoding_system_hashtable); + Fputhash (name, codesys_obj, Vcoding_system_hash_table); return codesys_obj; } } @@ -876,7 +876,7 @@ be created. allocate_coding_system (XCODING_SYSTEM_TYPE (old_coding_system), new_name)); - Fputhash (new_name, new_coding_system, Vcoding_system_hashtable); + Fputhash (new_name, new_coding_system, Vcoding_system_hash_table); } { @@ -1702,7 +1702,7 @@ decoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) and automatically marked. */ XSETLSTREAM (str_obj, str); - (markobj) (str_obj); + markobj (str_obj); if (str->imp->marker) return (str->imp->marker) (str_obj, markobj); else @@ -2141,7 +2141,7 @@ encoding_marker (Lisp_Object stream, void (*markobj) (Lisp_Object)) and automatically marked. */ XSETLSTREAM (str_obj, str); - (markobj) (str_obj); + markobj (str_obj); if (str->imp->marker) return (str->imp->marker) (str_obj, markobj); else @@ -2692,7 +2692,7 @@ Return the corresponding character code in SHIFT-JIS as a cons of two bytes. Since the number of characters in Big5 is larger than maximum characters in Emacs' charset (96x96), it can't be handled as one - charset. So, in Emacs, Big5 is devided into two: `charset-big5-1' + charset. So, in Emacs, Big5 is divided into two: `charset-big5-1' and `charset-big5-2'. Both s are TYPE94x94. The former contains frequently used characters and the latter contains less frequently used characters. */ @@ -4428,17 +4428,25 @@ static Bufbyte_dynarr *conversion_in_dynarr; /* Determine coding system from coding format */ -#define FILE_NAME_CODING_SYSTEM \ - ((NILP (Vfile_name_coding_system) || \ - (EQ ((Vfile_name_coding_system), Qbinary))) ? \ - Qnil : Fget_coding_system (Vfile_name_coding_system)) - /* #### not correct for all values of `fmt'! */ -#define FMT_CODING_SYSTEM(fmt) \ - (((fmt) == FORMAT_FILENAME) ? FILE_NAME_CODING_SYSTEM : \ - ((fmt) == FORMAT_CTEXT ) ? Fget_coding_system (Qctext) : \ - ((fmt) == FORMAT_TERMINAL) ? FILE_NAME_CODING_SYSTEM : \ - Qnil) +static Lisp_Object +external_data_format_to_coding_system (enum external_data_format fmt) +{ + switch (fmt) + { + case FORMAT_FILENAME: + case FORMAT_TERMINAL: + if (EQ (Vfile_name_coding_system, Qnil) || + EQ (Vfile_name_coding_system, Qbinary)) + return Qnil; + else + return Fget_coding_system (Vfile_name_coding_system); + case FORMAT_CTEXT: + return Fget_coding_system (Qctext); + default: + return Qnil; + } +} CONST Extbyte * convert_to_external_format (CONST Bufbyte *ptr, @@ -4446,7 +4454,7 @@ convert_to_external_format (CONST Bufbyte *ptr, Extcount *len_out, enum external_data_format fmt) { - Lisp_Object coding_system = FMT_CODING_SYSTEM (fmt); + Lisp_Object coding_system = external_data_format_to_coding_system (fmt); if (!conversion_out_dynarr) conversion_out_dynarr = Dynarr_new (Extbyte); @@ -4514,7 +4522,7 @@ convert_from_external_format (CONST Extbyte *ptr, Bytecount *len_out, enum external_data_format fmt) { - Lisp_Object coding_system = FMT_CODING_SYSTEM (fmt); + Lisp_Object coding_system = external_data_format_to_coding_system (fmt); if (!conversion_in_dynarr) conversion_in_dynarr = Dynarr_new (Bufbyte); @@ -4749,9 +4757,9 @@ Setting this to nil does not do anything. void complex_vars_of_mule_coding (void) { - staticpro (&Vcoding_system_hashtable); - Vcoding_system_hashtable = make_lisp_hashtable (50, HASHTABLE_NONWEAK, - HASHTABLE_EQ); + staticpro (&Vcoding_system_hash_table); + Vcoding_system_hash_table = + make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ); the_codesys_prop_dynarr = Dynarr_new (codesys_prop); diff --git a/src/mule-mcpath.c b/src/mule-mcpath.c index 9e10b70..ce7d257 100644 --- a/src/mule-mcpath.c +++ b/src/mule-mcpath.c @@ -217,7 +217,7 @@ mc_getcwd (unsigned char *null, size_t size) path = (unsigned char *) getcwd ((char *)buffer, MAXPATHLEN); if (path) { - /* here, shoule be (path == buffer). */ + /* here, should be (path == buffer). */ path = (unsigned char *) xmalloc (MC_MAXPATHLEN); /* MSDOS */ if (path) { diff --git a/src/puresize.h b/src/puresize.h index 0e4bc33..b9cd89e 100644 --- a/src/puresize.h +++ b/src/puresize.h @@ -163,7 +163,10 @@ Boston, MA 02111-1307, USA. */ #endif /* !RAW_PURESIZE */ -size_t get_PURESIZE (void); +# include +#define PURESIZE ((RAW_PURESIZE) + (PURESIZE_ADJUSTMENT)) +#define get_PURESIZE() PURESIZE + extern EMACS_INT pure[]; #endif /* PURESIZE_H */ diff --git a/src/s/msdos.h b/src/s/msdos.h index 875083c..5f857c3 100644 --- a/src/s/msdos.h +++ b/src/s/msdos.h @@ -169,7 +169,7 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ #define FLOAT_CHECK_DOMAIN /* When $TERM is "internal" then this is substituted: */ -#define INTERNAL_TERMINAL "pc|bios|IBM PC with colour display:\ +#define INTERNAL_TERMINAL "pc|bios|IBM PC with color display:\ :co#80:li#25:km:ms:cm=:cl=:ce=:" /* Define this to a function (Fdowncase, Fupcase) if your file system diff --git a/src/xselect.c b/src/xselect.c index b974d25..3d95426 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -688,7 +688,6 @@ x_handle_selection_request (XSelectionRequestEvent *event) { /* This function can GC */ struct gcpro gcpro1, gcpro2, gcpro3; - XSelectionEvent reply; Lisp_Object local_selection_data = Qnil; Lisp_Object selection_symbol; Lisp_Object target_symbol = Qnil; @@ -700,37 +699,24 @@ x_handle_selection_request (XSelectionRequestEvent *event) GCPRO3 (local_selection_data, converted_selection, target_symbol); - reply.type = SelectionNotify; /* Construct the reply event */ - reply.display = event->display; - reply.requestor = event->requestor; - reply.selection = event->selection; - reply.time = event->time; - reply.target = event->target; - reply.property = (event->property == None ? event->target : event->property); - selection_symbol = x_atom_to_symbol (d, event->selection); local_selection_data = assq_no_quit (selection_symbol, Vselection_alist); #if 0 -# define CDR(x) (XCDR (x)) -# define CAR(x) (XCAR (x)) /* This list isn't user-visible, so it can't "go bad." */ - if (!CONSP (local_selection_data)) abort (); - if (!CONSP (CDR (local_selection_data))) abort (); - if (!CONSP (CDR (CDR (local_selection_data)))) abort (); - if (!NILP (CDR (CDR (CDR (local_selection_data))))) abort (); - if (!CONSP (CAR (CDR (CDR (local_selection_data))))) abort (); - if (!INTP (CAR (CAR (CDR (CDR (local_selection_data)))))) abort (); - if (!INTP (CDR (CAR (CDR (CDR (local_selection_data)))))) abort (); -# undef CAR -# undef CDR + assert (CONSP (local_selection_data)); + assert (CONSP (XCDR (local_selection_data))); + assert (CONSP (XCDR (XCDR (local_selection_data)))); + assert (NILP (XCDR (XCDR (XCDR (local_selection_data))))); + assert (CONSP (XCAR (XCDR (XCDR (local_selection_data))))); + assert (INTP (XCAR (XCAR (XCDR (XCDR (local_selection_data)))))); + assert (INTP (XCDR (XCAR (XCDR (XCDR (local_selection_data)))))); #endif if (NILP (local_selection_data)) { - /* Someone asked for the selection, but we don't have it any more. - */ + /* Someone asked for the selection, but we don't have it any more. */ x_decline_selection_request (event); goto DONE_LABEL; } @@ -742,8 +728,7 @@ x_handle_selection_request (XSelectionRequestEvent *event) local_selection_time > event->time) { /* Someone asked for the selection, and we have one, but not the one - they're looking for. - */ + they're looking for. */ x_decline_selection_request (event); goto DONE_LABEL; } @@ -1152,7 +1137,7 @@ x_get_window_property (Display *display, Window window, Atom property, total_size = bytes_remaining + 1; *data_ret = (unsigned char *) xmalloc (total_size); - /* Now read, until weve gotten it all. */ + /* Now read, until we've gotten it all. */ while (bytes_remaining) { #if 0 @@ -1215,7 +1200,7 @@ receive_incremental_selection (Display *display, Window window, Atom property, int tmp_size_bytes; wait_for_property_change (prop_id); /* expect it again immediately, because x_get_window_property may - .. no it wont, I dont get it. + .. no it won't, I don't get it. .. Ok, I get it now, the Xt code that implements INCR is broken. */ prop_id = expect_property_change (display, window, property,