changeset 1097:26274e0d7794

[xemacs-hg @ 2002-11-11 16:03:12 by stephent] crash message <87of8wyy85.fsf@tleepslib.sk.tsukuba.ac.jp> nas 1.6 <87isz4yy0o.fsf@tleepslib.sk.tsukuba.ac.jp> warning fixes <87el9syvg4.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Mon, 11 Nov 2002 16:03:57 +0000
parents 2c2ff019dd33
children 25f567f6ab2a
files src/emacs.c src/nas.c
diffstat 2 files changed, 55 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/emacs.c	Mon Nov 11 15:56:21 2002 +0000
+++ b/src/emacs.c	Mon Nov 11 16:03:57 2002 +0000
@@ -3165,28 +3165,26 @@
 	("Your files have been auto-saved.\n"
 	 "Use `M-x recover-session' to recover them.\n"
 	 "\n"
-         "If you have access to the PROBLEMS file that came with your\n"
-         "version of XEmacs, please check to see if your crash is described\n"
-         "there, as there may be a workaround available.\n"
+         "Your version of XEmacs was distributed with a PROBLEMS file that  may describe\n"
+	 "your crash, and with luck a workaround.  Please check it first, but do report\n"
+	 "the crash anyway.  "
 #ifdef INFODOCK
-	 "Otherwise, please report this bug by selecting `Report-Bug'\n"
-         "in the InfoDock menu.\n"
+	 "\n\nPlease report this bug by selecting `Report-Bug' in the InfoDock menu.\n"
+	 "*BE SURE* to include the XEmacs configuration from M-x describe-installation,\n"
+	 "or the file Installation in the top directory of the build tree.\n"
 #else
-	 "Otherwise, please report this bug by running the send-pr\n"
-         "script included with XEmacs, or selecting `Send Bug Report'\n"
-         "from the help menu.\n"
-	 "As a last resort send ordinary email to `crashes@xemacs.org'.\n"
-#endif
-	 "*MAKE SURE* to include the information in the command\n"
-	 "M-x describe-installation.\n"
+	 "Please report this bug by invoking M-x report-emacs-bug,\n"
+	 "or by selecting `Send Bug Report' from the Help menu.  If necessary, send\n"
+	 "ordinary email to `crashes@xemacs.org'.  *MAKE SURE* to include the XEmacs\n"
+	 "configuration from M-x describe-installation, or equivalently the file\n"
+	 "Installation in the top of the build tree.\n"
+#endif
 #ifndef _MSC_VER
 	 "\n"
-	 "If at all possible, *please* try to obtain a C stack backtrace;\n"
-	 "it will help us immensely in determining what went wrong.\n"
-	 "To do this, locate the core file that was produced as a result\n"
-	 "of this crash (it's usually called `core' and is located in the\n"
-	 "directory in which you started the editor, or maybe in your home\n"
-	 "directory), and type\n"
+	 "*Please* try *hard* to obtain a C stack backtrace; without it, we are unlikely\n"
+	 "to be able to analyze the problem.  Locate the core file produced as a result\n"
+	 "of this crash (often called `core' or `core.<process-id>', and located in\n"
+	 "the directory in which you started XEmacs or your home directory), and type\n"
 	 "\n"
 	 "  gdb "
 #endif
@@ -3213,11 +3211,12 @@
 	  stderr_out ("%s%s", dir, name);
       }
       stderr_out
-	(" core\n\n"
-	 "then type `where' when the debugger prompt comes up.\n"
-	 "(If you don't have GDB on your system, you might have DBX,\n"
-	 "or XDB, or SDB.  A similar procedure should work for all of\n"
-	 "these.  Ask your system administrator if you need more help.)\n");
+	(" core\n"
+	 "\n"
+	 "then type `where' at the debugger prompt.  No GDB on your system?  You may\n"
+	 "have DBX, or XDB, or SDB.  (Ask your system administrator if you need help.)\n"
+	 "If no core file was produced, enable them (often with `ulimit -c unlimited'\n"
+	 "in case of future recurrance of the crash.\n");
 #endif /* _MSC_VER */
     }
 
--- a/src/nas.c	Mon Nov 11 15:56:21 2002 +0000
+++ b/src/nas.c	Mon Nov 11 16:03:57 2002 +0000
@@ -52,6 +52,12 @@
  *      4/11/94, rjc    Added wait_for_sounds to be called when user wants to
  *			be sure all play has finished.
  *      1998-10-01 rlt  Added support for WAVE files.
+ *      2002-10-16      Jon Trulson modifed this to work with NAS releases
+ *                      1.5f and higher.  We were using the private variable
+ *                      SoundFileInfo that doesn't exist anymore.  But preserve
+ *                      backward compatibility.  This will not work for some
+ *                      versions of NAS around 1.5b to 1.5f or so.  Known to
+ *                      work on 1.2p5 and 1.6.
  */
 
 #include <config.h>
@@ -960,13 +966,28 @@
 
 {
   Sound s;
+#if (AudioLibraryVersionMajor >= 2 ) && (AudioLibraryVersionMinor >= 3)
+  SoundFileInfoProc toProc;
+#endif
 
   if (!(s = (Sound) malloc (sizeof (SoundRec))))
     return NULL;
 
   if ((s->formatInfo = SndOpenDataForReading ((Char_Binary *) data, length)) != NULL)
     {
+#if (AudioLibraryVersionMajor >= 2 ) && (AudioLibraryVersionMinor >= 3)
+      if ((toProc = SoundFileGetProc(SoundFileFormatSnd, 
+				     SoundFileInfoProcTo)) == NULL)
+	{
+	  SndCloseFile ((SndInfo *) (s->formatInfo));
+	  free (s);
+
+	  return NULL;
+	}
+      if (!((*toProc)(s)))
+#else
       if (!((int(*)(Sound))(SoundFileInfo[SoundFileFormatSnd].toSound)) (s))
+#endif
 	{
 	  SndCloseFile ((SndInfo *) (s->formatInfo));
 	  free (s);
@@ -975,7 +996,19 @@
     }
   else if ((s->formatInfo = WaveOpenDataForReading ((Char_Binary *) data, length)) != NULL)
     {
+#if (AudioLibraryVersionMajor >= 2 ) && (AudioLibraryVersionMinor >= 3)
+      if ((toProc = SoundFileGetProc(SoundFileFormatWave, 
+				     SoundFileInfoProcTo)) == NULL)
+	{
+	  WaveCloseFile ((WaveInfo *) (s->formatInfo));
+	  free (s);
+
+	  return NULL;
+	}
+      if (!((*toProc)(s)))
+#else
       if (!((int(*)(Sound))(SoundFileInfo[SoundFileFormatWave].toSound)) (s))
+#endif
 	{
 	  WaveCloseFile ((WaveInfo *) (s->formatInfo));
 	  free (s);