changeset 609:13e3d7ae7155

[xemacs-hg @ 2001-06-06 12:34:42 by ben] nitpicky fixes: emodules.c, tooltalk.c, process-unix.c: Fix warnings pointed out by Martin. lisp.h: Correct usage of CBufbyte. esd.c: indentation changes. bytecode.c, eval.c, fileio.c: Use CBufbyte instead of char for error/warning functions. linuxplay.c, miscplay.c, sgiplay.c, sunplay.c: Define DONT_ENCAPSULATE. (All encapsulation is removed in my pending Mule workspace.) sgiplay.c: Put back #include <audio.h> accidentally removed. Make play_sound_data return an int, like all other such functions in *play.c. sound.c: Fix up documentation of `play-sound'. sysfile.h: Don't include sys/fcntl.h, as per Martin's advice.
author ben
date Wed, 06 Jun 2001 12:34:47 +0000
parents 4d7fdf497470
children 45ba69404a1f
files src/ChangeLog src/bytecode.c src/emodules.c src/esd.c src/eval.c src/fileio.c src/linuxplay.c src/lisp.h src/miscplay.c src/process-unix.c src/sgiplay.c src/sound.c src/sunplay.c src/sysfile.h src/tooltalk.c
diffstat 15 files changed, 266 insertions(+), 136 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/ChangeLog	Wed Jun 06 12:34:47 2001 +0000
@@ -1,3 +1,99 @@
+2001-06-06  Ben Wing  <ben@xemacs.org>
+
+	* emodules.c (emodules_load):
+	* tooltalk.c (check_status):
+	* process-unix.c (unix_canonicalize_host_name):
+	* process-unix.c (unix_open_network_stream):
+	Fix warnings pointed out by Martin.
+
+	* lisp.h:
+	Correct usage of CBufbyte.
+
+	* esd.c (esd_play_sound_file):
+	* esd.c (esd_play_sound_data):
+	indentation changes.
+
+	* bytecode.c (invalid_byte_code):
+	* eval.c (print_subr):
+	* eval.c (build_error_data):
+	* eval.c (signal_error):
+	* eval.c (maybe_signal_error):
+	* eval.c (signal_continuable_error):
+	* eval.c (maybe_signal_continuable_error):
+	* eval.c (signal_error_2):
+	* eval.c (maybe_signal_error_2):
+	* eval.c (signal_continuable_error_2):
+	* eval.c (maybe_signal_continuable_error_2):
+	* eval.c (signal_ferror):
+	* eval.c (maybe_signal_ferror):
+	* eval.c (signal_continuable_ferror):
+	* eval.c (maybe_signal_continuable_ferror):
+	* eval.c (signal_ferror_with_frob):
+	* eval.c (maybe_signal_ferror_with_frob):
+	* eval.c (signal_continuable_ferror_with_frob):
+	* eval.c (maybe_signal_continuable_ferror_with_frob):
+	* eval.c (syntax_error):
+	* eval.c (syntax_error_2):
+	* eval.c (maybe_syntax_error):
+	* eval.c (sferror):
+	* eval.c (sferror_2):
+	* eval.c (maybe_sferror):
+	* eval.c (invalid_argument):
+	* eval.c (invalid_argument_2):
+	* eval.c (maybe_invalid_argument):
+	* eval.c (invalid_constant):
+	* eval.c (invalid_constant_2):
+	* eval.c (maybe_invalid_constant):
+	* eval.c (invalid_operation):
+	* eval.c (invalid_operation_2):
+	* eval.c (maybe_invalid_operation):
+	* eval.c (invalid_change):
+	* eval.c (invalid_change_2):
+	* eval.c (maybe_invalid_change):
+	* eval.c (invalid_state):
+	* eval.c (invalid_state_2):
+	* eval.c (maybe_invalid_state):
+	* eval.c (wtaerror):
+	* eval.c (stack_overflow):
+	* eval.c (out_of_memory):
+	* eval.c (printing_unreadable_object):
+	* eval.c (caught_a_squirmer):
+	* eval.c (eval_in_buffer_trapping_errors):
+	* eval.c (run_hook_trapping_errors):
+	* eval.c (safe_run_hook_trapping_errors):
+	* eval.c (call0_trapping_errors):
+	* eval.c (call1_trapping_errors):
+	* eval.c (call2_trapping_errors):
+	* eval.c (warn_when_safe):
+	* fileio.c (report_file_type_error):
+	* fileio.c (report_error_with_errno):
+	* fileio.c (report_file_error):
+	Use CBufbyte instead of char for error/warning functions.
+	
+	* linuxplay.c:
+	* linuxplay.c (DONT_ENCAPSULATE):
+	* miscplay.c:
+	* miscplay.c (DONT_ENCAPSULATE):
+	* sgiplay.c:
+	* sgiplay.c (DONT_ENCAPSULATE):
+	* sunplay.c:
+	* sunplay.c (DONT_ENCAPSULATE):
+	Define DONT_ENCAPSULATE. (All encapsulation is removed in my
+	pending Mule workspace.)
+
+	* sgiplay.c (play_sound_data):
+	* sgiplay.c (play_internal):
+	Put back #include <audio.h> accidentally removed.
+	Make play_sound_data return an int, like all other
+	such functions in *play.c.
+	
+	* sound.c:
+	Fix up documentation of `play-sound'.
+	
+	* sysfile.h:
+	Don't include sys/fcntl.h, as per Martin's advice.
+	
+
 2001-06-04  William M. Perry  <wmperry@gnu.org>
 
 	* gpmevent.c (KG_CTRL): Just define these unconditionally.  The
--- a/src/bytecode.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/bytecode.c	Wed Jun 06 12:34:47 2001 +0000
@@ -1480,7 +1480,7 @@
 
 
 DOESNT_RETURN
-invalid_byte_code (const char *reason, Lisp_Object frob)
+invalid_byte_code (const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error (Qinvalid_byte_code, reason, frob);
 }
--- a/src/emodules.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/emodules.c	Wed Jun 06 12:34:47 2001 +0000
@@ -351,7 +351,7 @@
   dlhandle = dll_open (soname);
   if (dlhandle == (dll_handle)0)
     {
-      Bufbyte *dllerrint;
+      CBufbyte *dllerrint;
 
       EXTERNAL_TO_C_STRING (dll_error (dlhandle), dllerrint, Qnative);
       signal_error (Qdll_error, "Opening dynamic module",
--- a/src/esd.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/esd.c	Wed Jun 06 12:34:47 2001 +0000
@@ -36,13 +36,15 @@
 #define ESD_NAME "xemacs"
 
 int esd_play_sound_file (Extbyte *file, int vol);
-int esd_play_sound_file (Extbyte *file, int vol)
+int
+esd_play_sound_file (Extbyte *file, int vol)
 {                              /* #### FIXME: vol is ignored */
   return esd_play_file(ESD_NAME, file, 0);
 }
 
 int esd_play_sound_data (UChar_Binary *data, size_t length, int vol);
-int esd_play_sound_data (UChar_Binary *data, size_t length, int vol)
+int
+esd_play_sound_data (UChar_Binary *data, size_t length, int vol)
 {                              /* #### FIXME: vol is ignored */
   size_t         (*parsesndfile)(void **dayta,size_t *sz,void **outbuf);
   size_t         (*sndcnv)(void **dayta,size_t *sz,void **);
--- a/src/eval.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/eval.c	Wed Jun 06 12:34:47 2001 +0000
@@ -284,10 +284,10 @@
 print_subr (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
 {
   Lisp_Subr *subr = XSUBR (obj);
-  const char *header =
+  const CBufbyte *header =
     (subr->max_args == UNEVALLED) ? "#<special-form " : "#<subr ";
-  const char *name = subr_name (subr);
-  const char *trailer = subr->prompt ? " (interactive)>" : ">";
+  const CBufbyte *name = subr_name (subr);
+  const CBufbyte *trailer = subr->prompt ? " (interactive)>" : ">";
 
   if (print_readably)
     printing_unreadable_object ("%s%s%s", header, name, trailer);
@@ -2270,7 +2270,7 @@
    to signal_error_1(). */
 
 Lisp_Object
-build_error_data (const char *reason, Lisp_Object frob)
+build_error_data (const CBufbyte *reason, Lisp_Object frob)
 {
   if (EQ (frob, Qunbound))
     frob = Qnil;
@@ -2285,13 +2285,13 @@
 }
 
 DOESNT_RETURN
-signal_error (Lisp_Object type, const char *reason, Lisp_Object frob)
+signal_error (Lisp_Object type, const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error_1 (type, build_error_data (reason, frob));
 }
 
 void
-maybe_signal_error (Lisp_Object type, const char *reason,
+maybe_signal_error (Lisp_Object type, const CBufbyte *reason,
 		    Lisp_Object frob, Lisp_Object class,
 		    Error_Behavior errb)
 {
@@ -2302,14 +2302,14 @@
 }
 
 Lisp_Object
-signal_continuable_error (Lisp_Object type, const char *reason,
+signal_continuable_error (Lisp_Object type, const CBufbyte *reason,
 			  Lisp_Object frob)
 {
   return Fsignal (type, build_error_data (reason, frob));
 }
 
 Lisp_Object
-maybe_signal_continuable_error (Lisp_Object type, const char *reason,
+maybe_signal_continuable_error (Lisp_Object type, const CBufbyte *reason,
 				Lisp_Object frob, Lisp_Object class,
 				Error_Behavior errb)
 {
@@ -2331,7 +2331,7 @@
    but these are more convenient in this particular case.) */
 
 DOESNT_RETURN
-signal_error_2 (Lisp_Object type, const char *reason,
+signal_error_2 (Lisp_Object type, const CBufbyte *reason,
 		Lisp_Object frob0, Lisp_Object frob1)
 {
   signal_error_1 (type, list3 (build_translated_string (reason), frob0,
@@ -2339,7 +2339,7 @@
 }
 
 void
-maybe_signal_error_2 (Lisp_Object type, const char *reason,
+maybe_signal_error_2 (Lisp_Object type, const CBufbyte *reason,
 		      Lisp_Object frob0, Lisp_Object frob1,
 		      Lisp_Object class, Error_Behavior errb)
 {
@@ -2351,7 +2351,7 @@
 }
 
 Lisp_Object
-signal_continuable_error_2 (Lisp_Object type, const char *reason,
+signal_continuable_error_2 (Lisp_Object type, const CBufbyte *reason,
 			    Lisp_Object frob0, Lisp_Object frob1)
 {
   return Fsignal (type, list3 (build_translated_string (reason), frob0,
@@ -2359,7 +2359,7 @@
 }
 
 Lisp_Object
-maybe_signal_continuable_error_2 (Lisp_Object type, const char *reason,
+maybe_signal_continuable_error_2 (Lisp_Object type, const CBufbyte *reason,
 				  Lisp_Object frob0, Lisp_Object frob1,
 				  Lisp_Object class, Error_Behavior errb)
 {
@@ -2379,7 +2379,7 @@
    is a single string, created using the arguments. */
 
 DOESNT_RETURN
-signal_ferror (Lisp_Object type, const char *fmt, ...)
+signal_ferror (Lisp_Object type, const CBufbyte *fmt, ...)
 {
   Lisp_Object obj;
   va_list args;
@@ -2395,7 +2395,7 @@
 
 void
 maybe_signal_ferror (Lisp_Object type, Lisp_Object class, Error_Behavior errb,
-		     const char *fmt, ...)
+		     const CBufbyte *fmt, ...)
 {
   Lisp_Object obj;
   va_list args;
@@ -2414,7 +2414,7 @@
 }
 
 Lisp_Object
-signal_continuable_ferror (Lisp_Object type, const char *fmt, ...)
+signal_continuable_ferror (Lisp_Object type, const CBufbyte *fmt, ...)
 {
   Lisp_Object obj;
   va_list args;
@@ -2430,7 +2430,7 @@
 
 Lisp_Object
 maybe_signal_continuable_ferror (Lisp_Object type, Lisp_Object class,
-				 Error_Behavior errb, const char *fmt, ...)
+				 Error_Behavior errb, const CBufbyte *fmt, ...)
 {
   Lisp_Object obj;
   va_list args;
@@ -2464,7 +2464,7 @@
 */
 
 DOESNT_RETURN
-signal_ferror_with_frob (Lisp_Object type, Lisp_Object frob, const char *fmt,
+signal_ferror_with_frob (Lisp_Object type, Lisp_Object frob, const CBufbyte *fmt,
 			 ...)
 {
   Lisp_Object obj;
@@ -2482,7 +2482,7 @@
 void
 maybe_signal_ferror_with_frob (Lisp_Object type, Lisp_Object frob,
 			       Lisp_Object class, Error_Behavior errb,
-			       const char *fmt, ...)
+			       const CBufbyte *fmt, ...)
 {
   Lisp_Object obj;
   va_list args;
@@ -2503,7 +2503,7 @@
 
 Lisp_Object
 signal_continuable_ferror_with_frob (Lisp_Object type, Lisp_Object frob,
-				     const char *fmt, ...)
+				     const CBufbyte *fmt, ...)
 {
   Lisp_Object obj;
   va_list args;
@@ -2521,7 +2521,7 @@
 maybe_signal_continuable_ferror_with_frob (Lisp_Object type, Lisp_Object frob,
 					   Lisp_Object class,
 					   Error_Behavior errb,
-					   const char *fmt, ...)
+					   const CBufbyte *fmt, ...)
 {
   Lisp_Object obj;
   va_list args;
@@ -2603,158 +2603,161 @@
 }
 
 DOESNT_RETURN
-syntax_error (const char *reason, Lisp_Object frob)
+syntax_error (const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error (Qsyntax_error, reason, frob);
 }
 
 DOESNT_RETURN
-syntax_error_2 (const char *reason, Lisp_Object frob1, Lisp_Object frob2)
+syntax_error_2 (const CBufbyte *reason, Lisp_Object frob1, Lisp_Object frob2)
 {
   signal_error_2 (Qsyntax_error, reason, frob1, frob2);
 }
 
 void
-maybe_syntax_error (const char *reason, Lisp_Object frob,
+maybe_syntax_error (const CBufbyte *reason, Lisp_Object frob,
 		    Lisp_Object class, Error_Behavior errb)
 {
   maybe_signal_error (Qsyntax_error, reason, frob, class, errb);
 }
 
 DOESNT_RETURN
-sferror (const char *reason, Lisp_Object frob)
+sferror (const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error (Qstructure_formation_error, reason, frob);
 }
 
 DOESNT_RETURN
-sferror_2 (const char *reason, Lisp_Object frob1, Lisp_Object frob2)
+sferror_2 (const CBufbyte *reason, Lisp_Object frob1, Lisp_Object frob2)
 {
   signal_error_2 (Qstructure_formation_error, reason, frob1, frob2);
 }
 
 void
-maybe_sferror (const char *reason, Lisp_Object frob,
+maybe_sferror (const CBufbyte *reason, Lisp_Object frob,
 	       Lisp_Object class, Error_Behavior errb)
 {
   maybe_signal_error (Qstructure_formation_error, reason, frob, class, errb);
 }
 
 DOESNT_RETURN
-invalid_argument (const char *reason, Lisp_Object frob)
+invalid_argument (const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error (Qinvalid_argument, reason, frob);
 }
 
 DOESNT_RETURN
-invalid_argument_2 (const char *reason, Lisp_Object frob1, Lisp_Object frob2)
+invalid_argument_2 (const CBufbyte *reason, Lisp_Object frob1,
+		    Lisp_Object frob2)
 {
   signal_error_2 (Qinvalid_argument, reason, frob1, frob2);
 }
 
 void
-maybe_invalid_argument (const char *reason, Lisp_Object frob,
+maybe_invalid_argument (const CBufbyte *reason, Lisp_Object frob,
 			Lisp_Object class, Error_Behavior errb)
 {
   maybe_signal_error (Qinvalid_argument, reason, frob, class, errb);
 }
 
 DOESNT_RETURN
-invalid_constant (const char *reason, Lisp_Object frob)
+invalid_constant (const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error (Qinvalid_constant, reason, frob);
 }
 
 DOESNT_RETURN
-invalid_constant_2 (const char *reason, Lisp_Object frob1, Lisp_Object frob2)
+invalid_constant_2 (const CBufbyte *reason, Lisp_Object frob1,
+		    Lisp_Object frob2)
 {
   signal_error_2 (Qinvalid_constant, reason, frob1, frob2);
 }
 
 void
-maybe_invalid_constant (const char *reason, Lisp_Object frob,
+maybe_invalid_constant (const CBufbyte *reason, Lisp_Object frob,
 			Lisp_Object class, Error_Behavior errb)
 {
   maybe_signal_error (Qinvalid_constant, reason, frob, class, errb);
 }
 
 DOESNT_RETURN
-invalid_operation (const char *reason, Lisp_Object frob)
+invalid_operation (const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error (Qinvalid_operation, reason, frob);
 }
 
 DOESNT_RETURN
-invalid_operation_2 (const char *reason, Lisp_Object frob1, Lisp_Object frob2)
+invalid_operation_2 (const CBufbyte *reason, Lisp_Object frob1,
+		     Lisp_Object frob2)
 {
   signal_error_2 (Qinvalid_operation, reason, frob1, frob2);
 }
 
 void
-maybe_invalid_operation (const char *reason, Lisp_Object frob,
+maybe_invalid_operation (const CBufbyte *reason, Lisp_Object frob,
 			 Lisp_Object class, Error_Behavior errb)
 {
   maybe_signal_error (Qinvalid_operation, reason, frob, class, errb);
 }
 
 DOESNT_RETURN
-invalid_change (const char *reason, Lisp_Object frob)
+invalid_change (const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error (Qinvalid_change, reason, frob);
 }
 
 DOESNT_RETURN
-invalid_change_2 (const char *reason, Lisp_Object frob1, Lisp_Object frob2)
+invalid_change_2 (const CBufbyte *reason, Lisp_Object frob1, Lisp_Object frob2)
 {
   signal_error_2 (Qinvalid_change, reason, frob1, frob2);
 }
 
 void
-maybe_invalid_change (const char *reason, Lisp_Object frob,
+maybe_invalid_change (const CBufbyte *reason, Lisp_Object frob,
 		      Lisp_Object class, Error_Behavior errb)
 {
   maybe_signal_error (Qinvalid_change, reason, frob, class, errb);
 }
 
 DOESNT_RETURN
-invalid_state (const char *reason, Lisp_Object frob)
+invalid_state (const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error (Qinvalid_state, reason, frob);
 }
 
 DOESNT_RETURN
-invalid_state_2 (const char *reason, Lisp_Object frob1, Lisp_Object frob2)
+invalid_state_2 (const CBufbyte *reason, Lisp_Object frob1, Lisp_Object frob2)
 {
   signal_error_2 (Qinvalid_state, reason, frob1, frob2);
 }
 
 void
-maybe_invalid_state (const char *reason, Lisp_Object frob,
+maybe_invalid_state (const CBufbyte *reason, Lisp_Object frob,
 		     Lisp_Object class, Error_Behavior errb)
 {
   maybe_signal_error (Qinvalid_state, reason, frob, class, errb);
 }
 
 DOESNT_RETURN
-wtaerror (const char *reason, Lisp_Object frob)
+wtaerror (const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error (Qwrong_type_argument, reason, frob);
 }
 
 DOESNT_RETURN
-stack_overflow (const char *reason, Lisp_Object frob)
+stack_overflow (const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error (Qstack_overflow, reason, frob);
 }
 
 DOESNT_RETURN
-out_of_memory (const char *reason, Lisp_Object frob)
+out_of_memory (const CBufbyte *reason, Lisp_Object frob)
 {
   signal_error (Qout_of_memory, reason, frob);
 }
 
 DOESNT_RETURN
-printing_unreadable_object (const char *fmt, ...)
+printing_unreadable_object (const CBufbyte *fmt, ...)
 {
   Lisp_Object obj;
   va_list args;
@@ -4385,7 +4388,7 @@
 
       if (!NILP (arg))
         {
-          char *str = (char *) get_opaque_ptr (arg);
+          CBufbyte *str = (CBufbyte *) get_opaque_ptr (arg);
           args[0] = build_string (str);
         }
       else
@@ -4439,7 +4442,7 @@
 }
 
 Lisp_Object
-eval_in_buffer_trapping_errors (const char *warning_string,
+eval_in_buffer_trapping_errors (const CBufbyte *warning_string,
 				struct buffer *buf, Lisp_Object form)
 {
   int speccount = specpdl_depth();
@@ -4479,7 +4482,8 @@
 }
 
 Lisp_Object
-run_hook_trapping_errors (const char *warning_string, Lisp_Object hook_symbol)
+run_hook_trapping_errors (const CBufbyte *warning_string,
+			  Lisp_Object hook_symbol)
 {
   int speccount;
   Lisp_Object tem;
@@ -4512,7 +4516,7 @@
    if an error occurs. */
 
 Lisp_Object
-safe_run_hook_trapping_errors (const char *warning_string,
+safe_run_hook_trapping_errors (const CBufbyte *warning_string,
 			       Lisp_Object hook_symbol,
 			       int allow_quit)
 {
@@ -4558,7 +4562,7 @@
 }
 
 Lisp_Object
-call0_trapping_errors (const char *warning_string, Lisp_Object function)
+call0_trapping_errors (const CBufbyte *warning_string, Lisp_Object function)
 {
   int speccount;
   Lisp_Object tem;
@@ -4605,7 +4609,7 @@
 }
 
 Lisp_Object
-call1_trapping_errors (const char *warning_string, Lisp_Object function,
+call1_trapping_errors (const CBufbyte *warning_string, Lisp_Object function,
 		       Lisp_Object object)
 {
   int speccount = specpdl_depth();
@@ -4642,7 +4646,7 @@
 }
 
 Lisp_Object
-call2_trapping_errors (const char *warning_string, Lisp_Object function,
+call2_trapping_errors (const CBufbyte *warning_string, Lisp_Object function,
 		       Lisp_Object object1, Lisp_Object object2)
 {
   int speccount = specpdl_depth();
@@ -5199,7 +5203,7 @@
    automatically be called when it is safe to do so. */
 
 void
-warn_when_safe (Lisp_Object class, Lisp_Object level, const char *fmt, ...)
+warn_when_safe (Lisp_Object class, Lisp_Object level, const CBufbyte *fmt, ...)
 {
   Lisp_Object obj;
   va_list args;
--- a/src/fileio.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/fileio.c	Wed Jun 06 12:34:47 2001 +0000
@@ -132,7 +132,7 @@
 
 DOESNT_RETURN
 report_file_type_error (Lisp_Object errtype, Lisp_Object oserrmess,
-			const char *string, Lisp_Object data)
+			const CBufbyte *string, Lisp_Object data)
 {
   struct gcpro gcpro1;
   Lisp_Object errdata = build_error_data (NULL, data);
@@ -146,7 +146,7 @@
 
 DOESNT_RETURN
 report_error_with_errno (Lisp_Object errtype,
-			 const char *string, Lisp_Object data)
+			 const CBufbyte *string, Lisp_Object data)
 {
   report_file_type_error (errtype, lisp_strerror (errno), string, data);
 }
@@ -154,7 +154,7 @@
 /* signal a file error when errno contains a meaningful value. */
 
 DOESNT_RETURN
-report_file_error (const char *string, Lisp_Object data)
+report_file_error (const CBufbyte *string, Lisp_Object data)
 {
   report_error_with_errno (Qfile_error, string, data);
 }
--- a/src/linuxplay.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/linuxplay.c	Wed Jun 06 12:34:47 2001 +0000
@@ -55,6 +55,8 @@
 			       driver, so undefine this symbol at your
 			       discretion */
 
+#define DONT_ENCAPSULATE
+
 #include <config.h>
 #include "lisp.h"
 
--- a/src/lisp.h	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/lisp.h	Wed Jun 06 12:34:47 2001 +0000
@@ -329,8 +329,16 @@
    of Bufbytes, declared as follows. */
 
 typedef unsigned char Bufbyte;
-/* The following should only be used when you have to apply a stdlib
-   string function to internal data */
+
+/* The following should be used when you are working with internal data
+   but for whatever reason need to have it declared a "char *".  Examples
+   are function arguments whose values are most commonly literal strings,
+   or where you have to apply a stdlib string function to internal data.
+
+   In general, you should avoid this where possible and use Bufbyte instead,
+   for consistency.  For example, the new Mule workspace contains
+   Bufbyte versions of the stdlib string functions. */
+
 typedef char CBufbyte;
 
 /* The data representing a string in "external" format (binary or any
@@ -2325,9 +2333,9 @@
 extern EMACS_INT gc_generation_number[1];
 int c_readonly (Lisp_Object);
 int lisp_readonly (Lisp_Object);
-Lisp_Object build_string (const char *);
-Lisp_Object build_ext_string (const char *, Lisp_Object);
-Lisp_Object build_translated_string (const char *);
+Lisp_Object build_string (const CBufbyte *);
+Lisp_Object build_ext_string (const Extbyte *, Lisp_Object);
+Lisp_Object build_translated_string (const CBufbyte *);
 Lisp_Object make_string (const Bufbyte *, Bytecount);
 Lisp_Object make_ext_string (const Extbyte *, EMACS_INT, Lisp_Object);
 Lisp_Object make_uninit_string (Bytecount);
@@ -2365,7 +2373,7 @@
 
 /* Defined in bytecode.c */
 DECLARE_DOESNT_RETURN (invalid_byte_code
-		       (const char *reason, Lisp_Object frob));
+		       (const CBufbyte *reason, Lisp_Object frob));
 
 /* Defined in callproc.c */
 char *egetenv (const char *);
@@ -2467,51 +2475,52 @@
 			   Error_Behavior);
 Lisp_Object maybe_signal_continuable_error_1 (Lisp_Object, Lisp_Object,
 					      Lisp_Object, Error_Behavior);
-DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (signal_ferror (Lisp_Object,
-								 const char *,
-								 ...), 2, 3);
+DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (signal_ferror
+						  (Lisp_Object,
+						   const CBufbyte *,
+						   ...), 2, 3);
 void maybe_signal_ferror (Lisp_Object, Lisp_Object, Error_Behavior,
-			  const char *, ...) PRINTF_ARGS (4, 5);
-Lisp_Object signal_continuable_ferror (Lisp_Object, const char *, ...)
+			  const CBufbyte *, ...) PRINTF_ARGS (4, 5);
+Lisp_Object signal_continuable_ferror (Lisp_Object, const CBufbyte *, ...)
      PRINTF_ARGS (2, 3);
 Lisp_Object maybe_signal_continuable_ferror (Lisp_Object, Lisp_Object,
 					     Error_Behavior,
-					     const char *, ...)
+					     const CBufbyte *, ...)
      PRINTF_ARGS (4, 5);
 
-Lisp_Object build_error_data (const char *reason, Lisp_Object frob);
-DECLARE_DOESNT_RETURN (signal_error (Lisp_Object, const char *,
+Lisp_Object build_error_data (const CBufbyte *reason, Lisp_Object frob);
+DECLARE_DOESNT_RETURN (signal_error (Lisp_Object, const CBufbyte *,
 				     Lisp_Object));
-void maybe_signal_error (Lisp_Object, const char *, Lisp_Object,
+void maybe_signal_error (Lisp_Object, const CBufbyte *, Lisp_Object,
 			 Lisp_Object, Error_Behavior);
-Lisp_Object signal_continuable_error (Lisp_Object, const char *,
+Lisp_Object signal_continuable_error (Lisp_Object, const CBufbyte *,
 				      Lisp_Object);
-Lisp_Object maybe_signal_continuable_error (Lisp_Object, const char *,
+Lisp_Object maybe_signal_continuable_error (Lisp_Object, const CBufbyte *,
 					    Lisp_Object,
 					    Lisp_Object, Error_Behavior);
 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (signal_ferror_with_frob
 						  (Lisp_Object, Lisp_Object,
-						   const char *,
+						   const CBufbyte *,
 						   ...), 3, 4);
 void maybe_signal_ferror_with_frob (Lisp_Object, Lisp_Object, Lisp_Object,
 				    Error_Behavior,
-				    const char *, ...) PRINTF_ARGS (5, 6);
+				    const CBufbyte *, ...) PRINTF_ARGS (5, 6);
 Lisp_Object signal_continuable_ferror_with_frob (Lisp_Object, Lisp_Object,
-						 const char *,
+						 const CBufbyte *,
 						 ...) PRINTF_ARGS (3, 4);
 Lisp_Object maybe_signal_continuable_ferror_with_frob (Lisp_Object,
 						       Lisp_Object,
 						       Lisp_Object,
 						       Error_Behavior,
-						       const char *, ...)
+						       const CBufbyte *, ...)
      PRINTF_ARGS (5, 6);
-DECLARE_DOESNT_RETURN (signal_error_2 (Lisp_Object, const char *,
+DECLARE_DOESNT_RETURN (signal_error_2 (Lisp_Object, const CBufbyte *,
 				       Lisp_Object, Lisp_Object));
-void maybe_signal_error_2 (Lisp_Object, const char *, Lisp_Object,
+void maybe_signal_error_2 (Lisp_Object, const CBufbyte *, Lisp_Object,
 			   Lisp_Object, Lisp_Object, Error_Behavior);
-Lisp_Object signal_continuable_error_2 (Lisp_Object, const char *,
+Lisp_Object signal_continuable_error_2 (Lisp_Object, const CBufbyte *,
 					Lisp_Object, Lisp_Object);
-Lisp_Object maybe_signal_continuable_error_2 (Lisp_Object, const char *,
+Lisp_Object maybe_signal_continuable_error_2 (Lisp_Object, const CBufbyte *,
 					      Lisp_Object, Lisp_Object,
 					      Lisp_Object,
 					      Error_Behavior);
@@ -2522,58 +2531,60 @@
 DECLARE_DOESNT_RETURN (signal_circular_list_error (Lisp_Object));
 DECLARE_DOESNT_RETURN (signal_circular_property_list_error (Lisp_Object));
 
-DECLARE_DOESNT_RETURN (syntax_error (const char *reason, Lisp_Object frob));
-DECLARE_DOESNT_RETURN (syntax_error_2 (const char *reason, Lisp_Object frob1,
+DECLARE_DOESNT_RETURN (syntax_error (const CBufbyte *reason,
+				     Lisp_Object frob));
+DECLARE_DOESNT_RETURN (syntax_error_2 (const CBufbyte *reason,
+				       Lisp_Object frob1,
 				       Lisp_Object frob2));
-void maybe_syntax_error (const char *, Lisp_Object, Lisp_Object,
+void maybe_syntax_error (const CBufbyte *, Lisp_Object, Lisp_Object,
 			 Error_Behavior);
-DECLARE_DOESNT_RETURN (sferror (const char *reason, Lisp_Object frob));
-DECLARE_DOESNT_RETURN (sferror_2 (const char *reason, Lisp_Object frob1,
+DECLARE_DOESNT_RETURN (sferror (const CBufbyte *reason, Lisp_Object frob));
+DECLARE_DOESNT_RETURN (sferror_2 (const CBufbyte *reason, Lisp_Object frob1,
 				  Lisp_Object frob2));
-void maybe_sferror (const char *, Lisp_Object, Lisp_Object,
+void maybe_sferror (const CBufbyte *, Lisp_Object, Lisp_Object,
 		    Error_Behavior);
-DECLARE_DOESNT_RETURN (invalid_argument (const char *reason,
+DECLARE_DOESNT_RETURN (invalid_argument (const CBufbyte *reason,
 					 Lisp_Object frob));
-DECLARE_DOESNT_RETURN (invalid_argument_2 (const char *reason,
+DECLARE_DOESNT_RETURN (invalid_argument_2 (const CBufbyte *reason,
 					   Lisp_Object frob1,
 					   Lisp_Object frob2));
-void maybe_invalid_argument (const char *, Lisp_Object, Lisp_Object,
+void maybe_invalid_argument (const CBufbyte *, Lisp_Object, Lisp_Object,
 			     Error_Behavior);
-DECLARE_DOESNT_RETURN (invalid_operation (const char *reason,
+DECLARE_DOESNT_RETURN (invalid_operation (const CBufbyte *reason,
 					 Lisp_Object frob));
-DECLARE_DOESNT_RETURN (invalid_operation_2 (const char *reason,
+DECLARE_DOESNT_RETURN (invalid_operation_2 (const CBufbyte *reason,
 					   Lisp_Object frob1,
 					   Lisp_Object frob2));
-void maybe_invalid_operation (const char *, Lisp_Object, Lisp_Object,
+void maybe_invalid_operation (const CBufbyte *, Lisp_Object, Lisp_Object,
 			     Error_Behavior);
-DECLARE_DOESNT_RETURN (invalid_state (const char *reason,
+DECLARE_DOESNT_RETURN (invalid_state (const CBufbyte *reason,
 					 Lisp_Object frob));
-DECLARE_DOESNT_RETURN (invalid_state_2 (const char *reason,
+DECLARE_DOESNT_RETURN (invalid_state_2 (const CBufbyte *reason,
 					   Lisp_Object frob1,
 					   Lisp_Object frob2));
-void maybe_invalid_state (const char *, Lisp_Object, Lisp_Object,
-			     Error_Behavior);
-DECLARE_DOESNT_RETURN (invalid_change (const char *reason,
+void maybe_invalid_state (const CBufbyte *, Lisp_Object, Lisp_Object,
+			  Error_Behavior);
+DECLARE_DOESNT_RETURN (invalid_change (const CBufbyte *reason,
 					 Lisp_Object frob));
-DECLARE_DOESNT_RETURN (invalid_change_2 (const char *reason,
+DECLARE_DOESNT_RETURN (invalid_change_2 (const CBufbyte *reason,
 					   Lisp_Object frob1,
 					   Lisp_Object frob2));
-void maybe_invalid_change (const char *, Lisp_Object, Lisp_Object,
-			     Error_Behavior);
-DECLARE_DOESNT_RETURN (invalid_constant (const char *reason,
+void maybe_invalid_change (const CBufbyte *, Lisp_Object, Lisp_Object,
+			   Error_Behavior);
+DECLARE_DOESNT_RETURN (invalid_constant (const CBufbyte *reason,
 					 Lisp_Object frob));
-DECLARE_DOESNT_RETURN (invalid_constant_2 (const char *reason,
+DECLARE_DOESNT_RETURN (invalid_constant_2 (const CBufbyte *reason,
 					   Lisp_Object frob1,
 					   Lisp_Object frob2));
-void maybe_invalid_constant (const char *, Lisp_Object, Lisp_Object,
+void maybe_invalid_constant (const CBufbyte *, Lisp_Object, Lisp_Object,
 			     Error_Behavior);
-DECLARE_DOESNT_RETURN (wtaerror (const char *reason, Lisp_Object frob));
-DECLARE_DOESNT_RETURN (out_of_memory (const char *reason,
+DECLARE_DOESNT_RETURN (wtaerror (const CBufbyte *reason, Lisp_Object frob));
+DECLARE_DOESNT_RETURN (out_of_memory (const CBufbyte *reason,
 				      Lisp_Object frob));
-DECLARE_DOESNT_RETURN (stack_overflow (const char *reason,
+DECLARE_DOESNT_RETURN (stack_overflow (const CBufbyte *reason,
 				       Lisp_Object frob));
 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (printing_unreadable_object
-						  (const char *,
+						  (const CBufbyte *,
 						   ...), 1, 2);
 
 Lisp_Object signal_void_function_error (Lisp_Object);
@@ -2619,13 +2630,13 @@
 Lisp_Object eval_in_buffer (struct buffer *, Lisp_Object);
 Lisp_Object call0_with_handler (Lisp_Object, Lisp_Object);
 Lisp_Object call1_with_handler (Lisp_Object, Lisp_Object, Lisp_Object);
-Lisp_Object eval_in_buffer_trapping_errors (const char *, struct buffer *,
+Lisp_Object eval_in_buffer_trapping_errors (const CBufbyte *, struct buffer *,
 					    Lisp_Object);
-Lisp_Object run_hook_trapping_errors (const char *, Lisp_Object);
-Lisp_Object safe_run_hook_trapping_errors (const char *, Lisp_Object, int);
-Lisp_Object call0_trapping_errors (const char *, Lisp_Object);
-Lisp_Object call1_trapping_errors (const char *, Lisp_Object, Lisp_Object);
-Lisp_Object call2_trapping_errors (const char *,
+Lisp_Object run_hook_trapping_errors (const CBufbyte *, Lisp_Object);
+Lisp_Object safe_run_hook_trapping_errors (const CBufbyte *, Lisp_Object, int);
+Lisp_Object call0_trapping_errors (const CBufbyte *, Lisp_Object);
+Lisp_Object call1_trapping_errors (const CBufbyte *, Lisp_Object, Lisp_Object);
+Lisp_Object call2_trapping_errors (const CBufbyte *,
 				   Lisp_Object, Lisp_Object, Lisp_Object);
 Lisp_Object call_with_suspended_errors (lisp_fn_t, volatile Lisp_Object, Lisp_Object,
 					Error_Behavior, int, ...);
@@ -2644,7 +2655,7 @@
 void do_autoload (Lisp_Object, Lisp_Object);
 Lisp_Object un_autoload (Lisp_Object);
 void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object);
-void warn_when_safe (Lisp_Object, Lisp_Object, const char *,
+void warn_when_safe (Lisp_Object, Lisp_Object, const CBufbyte *,
 		     ...) PRINTF_ARGS (3, 4);
 
 
@@ -2670,13 +2681,13 @@
 void record_auto_save (void);
 void force_auto_save_soon (void);
 DECLARE_DOESNT_RETURN (report_error_with_errno (Lisp_Object errtype,
-						const char *string,
+						const CBufbyte *string,
 						Lisp_Object data));
 DECLARE_DOESNT_RETURN (report_file_type_error (Lisp_Object errtype,
 					       Lisp_Object oserrmess,
-					       const char *string,
+					       const CBufbyte *string,
 					       Lisp_Object data));
-DECLARE_DOESNT_RETURN (report_file_error (const char *, Lisp_Object));
+DECLARE_DOESNT_RETURN (report_file_error (const CBufbyte *, Lisp_Object));
 Lisp_Object lisp_strerror (int);
 Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object);
 ssize_t read_allowing_quit (int, void *, size_t);
--- a/src/miscplay.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/miscplay.c	Wed Jun 06 12:34:47 2001 +0000
@@ -20,6 +20,8 @@
 
 /* This file Mule-ized by Ben Wing, 5-15-01. */
 
+#define DONT_ENCAPSULATE
+
 #include <config.h>
 #include "lisp.h"
 
--- a/src/process-unix.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/process-unix.c	Wed Jun 06 12:34:47 2001 +0000
@@ -1591,7 +1591,7 @@
   retval = getaddrinfo (ext_host, NULL, &hints, &res);
   if (retval != 0)
     {
-      Bufbyte *gai_error;
+      CBufbyte *gai_error;
 
       EXTERNAL_TO_C_STRING (gai_strerror (retval), gai_error, Qnative);
       maybe_signal_error (Qio_error, gai_error, host,
@@ -1685,7 +1685,7 @@
     retval = getaddrinfo (ext_host, portstring, &hints, &res);
     if (retval != 0)
       {
-       Bufbyte *gai_error;
+	CBufbyte *gai_error;
 
 	EXTERNAL_TO_C_STRING (gai_strerror (retval), gai_error, Qnative);
 	signal_error (Qio_error, gai_error, list2 (host, service));
--- a/src/sgiplay.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/sgiplay.c	Wed Jun 06 12:34:47 2001 +0000
@@ -23,6 +23,8 @@
 
 /* This file Mule-ized by Ben Wing, 5-15-01. */
 
+#define DONT_ENCAPSULATE
+
 #include <config.h>
 #include "lisp.h"
 
@@ -31,6 +33,8 @@
 #include "sysfile.h"
 #include "sysproc.h" /* netinet/in.h for ntohl() etc. */
 
+#include <audio.h>
+
 /* Configuration options */
 
 /* ability to parse Sun/NeXT (.au or .snd) audio file headers.  The
@@ -173,7 +177,7 @@
 
 static Lisp_Object close_sound_file (Lisp_Object);
 static AudioContext audio_initialize (UChar_Binary *, int, int);
-static void play_internal (UChar_Binary *, int, AudioContext);
+static int play_internal (UChar_Binary *, int, AudioContext);
 static void drain_audio_port (AudioContext);
 static void write_mulaw_8_chunk (void *, void *, AudioContext);
 static void write_linear_chunk (void *, void *, AudioContext);
@@ -253,18 +257,20 @@
   return Qnil;
 }
 
-void
+int
 play_sound_data (UChar_Binary *data, int length, int volume)
 {
   int count = specpdl_depth ();
   AudioContext ac;
+  int result;
 
   ac = audio_initialize (data, length, volume);
   if (ac == (AudioContext) 0)
-    return;
-  play_internal (data, length, ac);
+    return 0;
+  result = play_internal (data, length, ac);
   drain_audio_port (ac);
   unbind_to (count, Qnil);
+  return result;
 }
 
 static AudioContext
@@ -311,12 +317,12 @@
   return ac;
 }
 
-static void
+static int
 play_internal (UChar_Binary *data, int length, AudioContext ac)
 {
   UChar_Binary * limit;
   if (ac == (AudioContext) 0)
-    return;
+    return 0;
 
   data = (UChar_Binary *) ac->ac_data;
   limit = data + ac->ac_size;
@@ -332,6 +338,8 @@
       (* ac->ac_write_chunk_function) (data, chunklimit, ac);
       data = chunklimit;
     }
+
+  return 1;
 }
 
 static void
--- a/src/sound.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/sound.c	Wed Jun 06 12:34:47 2001 +0000
@@ -273,6 +273,8 @@
 DEFUN ("play-sound", Fplay_sound, 1, 3, 0, /*
 Play a sound of the provided type.
 See the variable `sound-alist'.
+
+If the sound cannot be played in any other way, the standard "bell" will sound.
 */
        (sound, volume, device))
 {
--- a/src/sunplay.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/sunplay.c	Wed Jun 06 12:34:47 2001 +0000
@@ -17,6 +17,8 @@
 
 /* This file Mule-ized by Ben Wing, 5-15-01. */
 
+#define DONT_ENCAPSULATE
+
 #include <config.h>
 #include "lisp.h"
 #include "sound.h"
--- a/src/sysfile.h	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/sysfile.h	Wed Jun 06 12:34:47 2001 +0000
@@ -67,11 +67,12 @@
 #  undef MAX
 # endif /* HAVE_GTK */
 # include <sys/param.h>
-/* We used to conditionalize this on defined (NeXT) || defined (CYGWIN),
-   with the comment "what is needed from here?  Do others need it too?
-   O_BINARY is in here under cygwin." sunplay.c needed this, so let's
-   just include it always and fix any breakage (unlikely) that happens. */
-# include <sys/fcntl.h>
+/* As per Martin's recommendation, we do not include this.  There was
+   a comment stating that stuff from here was needed on NeXT, Cygwin,
+   and sunplay.c.  However, Cygwin includes this automatically from
+   fcntl.h, and Martin says that a "conforming" system should never
+   need this.  We will put it back if necessary on systems requiring it. */
+/* # include <sys/fcntl.h> */
 #endif
 
 #ifndef	STDERR_FILENO
--- a/src/tooltalk.c	Mon Jun 04 17:00:02 2001 +0000
+++ b/src/tooltalk.c	Wed Jun 06 12:34:47 2001 +0000
@@ -301,7 +301,7 @@
 {
   if (tt_is_err (st))
     {
-      Bufbyte *err;
+      CBufbyte *err;
 
       EXTERNAL_TO_C_STRING (tt_status_message (st), err, Qnative);
       signal_error (Qtooltalk_error, err, Qunbound);