changeset 3545:2ba8b7a25429

[xemacs-hg @ 2006-08-06 16:37:31 by aidan] Add an informative assertion and comment to snarf-documentation.
author aidan
date Sun, 06 Aug 2006 16:37:33 +0000
parents 981a144e71fa
children 3231eba81466
files src/ChangeLog src/doc.c
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat Aug 05 08:30:36 2006 +0000
+++ b/src/ChangeLog	Sun Aug 06 16:37:33 2006 +0000
@@ -1,3 +1,10 @@
+2006-08-06  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* doc.c (Fsnarf_documentation):
+	Add an assertion and a comment, rather than crashing in the
+	76584th call of hash_string when someone's using a DOC file that
+	doesn't match the format. 
+	
 2006-08-05  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* syntax.c (complex_vars_of_syntax):
--- a/src/doc.c	Sat Aug 05 08:30:36 2006 +0000
+++ b/src/doc.c	Sun Aug 06 16:37:33 2006 +0000
@@ -742,6 +742,10 @@
       if (p != end)
 	{
 	  end = qxestrchr (p, '\n');
+	  /* If you trigger a failure with of this assertion, you probably
+	     configured with --quick-build and need to to rebuild your DOC
+	     file. */
+	  assert((end - p - 2) > -1);
 	  sym = oblookup (Vobarray, p + 2, end - p - 2);
 	  if (SYMBOLP (sym))
 	    {