#$PSTOPPM= $ENV{'PSTOPPM'} ||
# 'pstoppm.ps';
-# Available in the PBMPLUS libary
+# Available in the PBMPLUS library
$PNMCROP=$ENV{'PNMCROP'} || 'pnmcrop' ;
# Also in PBMPLUS
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))))
(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)
# 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.
# 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
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
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
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
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
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
}
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
#include "lisp.h"
#include "buffer.h"
#include "sysdll.h"
-#include <errno.h>
DEFUN ("dll-open", Fdll_open, 1, 1, "FShared object: ", /*
Load LIBRARY as a shared object file.
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
pstruct console
else
if $imp == lrecord_database
- pstruct database
+ pstruct Lisp_Database
else
if $imp == lrecord_device
pstruct device
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
end
end
end
+ # Repeat after me... gdb sux, gdb sux, gdb sux...
end
end
end
end
end
end
+ # Are we having fun yet??
end
end
end
Lisp_Object Qctext;
-Lisp_Object Vcoding_system_hashtable;
+Lisp_Object Vcoding_system_hash_table;
int enable_multibyte_characters;
{
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)
{
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);
}
{
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 */
}
}
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, /*
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;
{
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;
}
}
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);
}
{
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
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
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 <type>s are TYPE94x94. The former
contains frequently used characters and the latter contains less
frequently used characters. */
/* 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,
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);
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);
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);
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)
{
#endif /* !RAW_PURESIZE */
-size_t get_PURESIZE (void);
+# include <puresize-adjust.h>
+#define PURESIZE ((RAW_PURESIZE) + (PURESIZE_ADJUSTMENT))
+#define get_PURESIZE() PURESIZE
+
extern EMACS_INT pure[];
#endif /* PURESIZE_H */
#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=<CM>:cl=<CL>:ce=<CE>:"
/* Define this to a function (Fdowncase, Fupcase) if your file system
{
/* 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;
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;
}
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;
}
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
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,