diff src/text.h @ 1333:1b0339b048ce

[xemacs-hg @ 2003-03-02 09:38:37 by ben] To: xemacs-patches@xemacs.org PROBLEMS: Include nt/PROBLEMS and update. Add note about incremental linking badness. cmdloop.el, custom.el, dumped-lisp.el, files.el, keydefs.el, keymap.el, lisp-mode.el, make-docfile.el, replace.el, simple.el, subr.el, view-less.el, wid-edit.el: Lots of syncing with FSF 21.2. Use if-fboundp in wid-edit.el. New file newcomment.el from FSF. internals/internals.texi: Fix typo. (Build-Time Dependencies): New node. PROBLEMS: Delete. config.inc.samp, xemacs.mak: Eliminate HAVE_VC6, use SUPPORT_EDIT_AND_CONTINUE in its place. No incremental linking unless SUPPORT_EDIT_AND_CONTINUE, since it can cause nasty crashes in pdump. Put warnings about this in config.inc.samp. Report the full compile flags used for src and lib-src in the Installation output. alloc.c, lisp.h, ralloc.c, regex.c: Use ALLOCA() in regex.c to avoid excessive stack allocation. Also fix subtle problem with REL_ALLOC() -- any call to malloc() (direct or indirect) may relocate rel-alloced data, causing buffer text to shift. After any such call, regex must update all its pointers to such data. Add a system, when ERROR_CHECK_MALLOC, whereby regex.c indicates all the places it is prepared to handle malloc()/realloc()/free(), and any calls anywhere in XEmacs outside of this will trigger an abort. alloc.c, dialog-msw.c, eval.c, event-stream.c, general-slots.h, insdel.c, lisp.h, menubar-msw.c, menubar-x.c: Change *run_hook*_trapping_problems to take a warning class, not a string. Factor out code to issue warnings, add flag to call_trapping_problems() to postpone warning issue, and make *run_hook*_trapping_problems issue their own warnings tailored to the hook, postponed in the case of safe_run_hook_trapping_problems() so that the appropriate message can be issued about resetting to nil only when not `quit'. Make record_unwind_protect_restoring_int() non-static. dumper.c: Issue notes about incremental linking problems under Windows. fileio.c: Mule-ize encrypt/decrypt-string code. text.h: Spacing changes.
author ben
date Sun, 02 Mar 2003 09:38:54 +0000
parents b531bf8658e9
children e9929b7b37ad
line wrap: on
line diff
--- a/src/text.h	Sun Mar 02 02:18:12 2003 +0000
+++ b/src/text.h	Sun Mar 02 09:38:54 2003 +0000
@@ -490,7 +490,7 @@
 #ifdef ERROR_CHECK_TEXT
 /* We use a separate definition to avoid warnings about unused dc_ptr1 */
 #define DEC_IBYTEPTR(ptr) do {						      \
-  const Ibyte *dc_ptr1 = (ptr);					      \
+  const Ibyte *dc_ptr1 = (ptr);						      \
   do {									      \
     (ptr)--;								      \
   } while (!valid_ibyteptr_p (ptr));					      \
@@ -1880,7 +1880,7 @@
 	{								      \
 	  if ((ei)->mallocp_)						      \
 	    /* xrealloc always preserves existing data as much as possible */ \
-	    (ei)->data_ = (Ibyte *) xrealloc ((ei)->data_, ei1newsize);     \
+	    (ei)->data_ = (Ibyte *) xrealloc ((ei)->data_, ei1newsize);       \
 	  else								      \
 	    {								      \
 	      /* We don't have realloc, so ALLOCA() more space and copy the   \
@@ -1936,7 +1936,7 @@
 do {									\
   Lisp_Object ei3 = (lisp_string);					\
   EI_ALLOC_AND_COPY (ei, XSTRING_DATA (ei3), XSTRING_LENGTH (ei3),	\
-		     string_char_length (ei3));			\
+		     string_char_length (ei3));				\
 } while (0)
 
 #define eicpy_lstr_off(ei, lisp_string, off, charoff, len, charlen)	\
@@ -1958,7 +1958,7 @@
 
 #define eicpy_raw_fmt(ei, ptr, len, fmt, object)			\
 do {									\
-  const Ibyte *ei12ptr = (ptr);					\
+  const Ibyte *ei12ptr = (ptr);						\
   Internal_Format ei12fmt = (fmt);					\
   int ei12len = (len);							\
   assert (ei12fmt == FORMAT_DEFAULT);					\
@@ -1979,11 +1979,11 @@
 
 #define eicpy_rawz(ei, ptr) eicpy_rawz_fmt (ei, ptr, FORMAT_DEFAULT, Qnil)
 
-#define eicpy_ch(ei, ch)					\
-do {								\
+#define eicpy_ch(ei, ch)				\
+do {							\
   Ibyte ei12p2[MAX_ICHAR_LEN];				\
   Bytecount ei12p2len = set_itext_ichar (ei12p2, ch);	\
-  EI_ALLOC_AND_COPY (ei, ei12p2, ei12p2len, 1);			\
+  EI_ALLOC_AND_COPY (ei, ei12p2, ei12p2len, 1);		\
 } while (0)
 
 #define eicpy_c(ei, c_string)			\
@@ -2244,7 +2244,7 @@
 
 #define eicat_ch(ei, ch)				\
 do {							\
-  Ibyte ei22ch[MAX_ICHAR_LEN];			\
+  Ibyte ei22ch[MAX_ICHAR_LEN];				\
   Bytecount ei22len = set_itext_ichar (ei22ch, ch);	\
   eicat_1 (ei, ei22ch, ei22len, 1);			\
 } while (0)
@@ -2285,7 +2285,7 @@
 
 #define eisub_ei(ei, off, charoff, len, charlen, ei2)			\
 do {									\
-  const Eistring *ei19 = (ei2);					\
+  const Eistring *ei19 = (ei2);						\
   eisub_1 (ei, off, charoff, len, charlen, ei19->data_, ei19->bytelen_,	\
 	   ei19->charlen_);						\
 } while (0)
@@ -2300,7 +2300,7 @@
 
 #define eisub_ch(ei, off, charoff, len, charlen, ch)		\
 do {								\
-  Ibyte ei21ch[MAX_ICHAR_LEN];				\
+  Ibyte ei21ch[MAX_ICHAR_LEN];					\
   Bytecount ei21len = set_itext_ichar (ei21ch, ch);		\
   eisub_1 (ei, off, charoff, len, charlen, ei21ch, ei21len, 1);	\
 } while (0)
@@ -2311,7 +2311,7 @@
 
 /*   ----- Converting to an external format -----   */
 
-#define eito_external(ei, codesys)				\
+#define eito_external(ei, codesys)					\
 do {									\
   if ((ei)->mallocp_)							\
     {									\
@@ -2322,7 +2322,7 @@
 	}								\
       TO_EXTERNAL_FORMAT (DATA, ((ei)->data_, (ei)->bytelen_),		\
 			  MALLOC, ((ei)->extdata_, (ei)->extlen_),	\
-			  codesys);				\
+			  codesys);					\
     }									\
   else									\
     TO_EXTERNAL_FORMAT (DATA, ((ei)->data_, (ei)->bytelen_),		\
@@ -2432,15 +2432,15 @@
 #define EI_CASECHANGE(ei, downp)					\
 do {									\
   int ei11new_allocmax = (ei)->charlen_ * MAX_ICHAR_LEN + 1;		\
-  Ibyte *ei11storage =						\
-     (Ibyte *) alloca_array (Ibyte, ei11new_allocmax);	\
+  Ibyte *ei11storage =							\
+     (Ibyte *) alloca_array (Ibyte, ei11new_allocmax);			\
   int ei11newlen = eistr_casefiddle_1 ((ei)->data_, (ei)->bytelen_,	\
 				       ei11storage, downp);		\
 									\
   if (ei11newlen)							\
     {									\
       (ei)->max_size_allocated_ = ei11new_allocmax;			\
-      (ei)->data_ = ei11storage;						\
+      (ei)->data_ = ei11storage;					\
       (ei)->bytelen_ = ei11newlen;					\
       /* charlen is the same. */					\
     }									\