[AC21.4] Fixed: usenet article freezes XEmacs
                
            
            
                13 years, 11 months
            
            
                
                    
                     
                    
                    
                    Vin Shelton
                
 
                
                    
                        
                            On Wed, Sep 23, 2009 at 10:15 AM, Stephen J. Turnbull
<stephen(a)xemacs.org> wrote:
> RECOMMEND 21.4
>
> Vin: the problem with this code almost certainly affects 21.4 (I don't
> get a crash on the Mac for some reason, and am not in a position to
> test on Linux immediately, but the incorrect display problem is
> verified).
APPROVE COMMIT 21.4
Thanks,
  Vin
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
                        
                     
                    
                 
             
         
        
        
            
        
        
            
                
                    
                    
                    [PATCH] Refactor out sequence-oriented builtins from fns.c to the new sequence.c.
                
            
            
                13 years, 11 months
            
            
                
                    
                     
                    
                    
                    Aidan Kehoe
                
 
                
                    
                        
                            
Actual changeset is compressed and attached, for the sake of avoid a 500k
mail. The changelog and commit message is in plain text.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1323024170 0
# Node ID 1a507c4c6c42c6bc3afdd33bffcbaa14dbd88b62
# Parent  7c383c5784edcea0694661cfebd7ae4e613d7e7b
Refactor out sequence-oriented builtins from fns.c to the new sequence.c.
src/ChangeLog addition:
2011-12-04  Aidan Kehoe  <kehoea(a)parhasard.net>
	* Makefile.in.in (objs):
	* depend:
	Add sequence.o to the list of objects and dependencies.
	* alloc.c:
	* alloc.c (mark_bit_vector):
	* alloc.c (print_bit_vector):
	* alloc.c (bit_vector_equal):
	* alloc.c (internal_bit_vector_equalp_hash):
	* alloc.c (bit_vector_hash):
	* alloc.c (init_alloc_once_early):
	Move the implementation of the bit vector type here from fns.c.
	* emacs.c (main_1):
	Call syms_of_sequence() here, now sequence.c is included.
	* fns.c (Fold_rassq):
	Move this together with the rest of the Fold_* functions.
	* fns.c:
	* fns.c (syms_of_fns):
	Move most functions dealing with sequences generally, and
	especially those taking key arguments, to a separate file,
	sequence.c.
	* general-slots.h:
	Qyes_or_no_p belong here, not fns.c.
	* lisp.h:
	Make Flist_length available here, it's used by sequence.c
	* sequence.c:
	* sequence.c (check_sequence_range):
	* sequence.c (Flength):
	* sequence.c (check_other_nokey):
	* sequence.c (check_other_key):
	* sequence.c (check_if_key):
	* sequence.c (check_match_eq_key):
	* sequence.c (check_match_eql_key):
	* sequence.c (check_match_equal_key):
	* sequence.c (check_match_equalp_key):
	* sequence.c (check_match_other_key):
	* sequence.c (check_lss_key):
	* sequence.c (check_lss_key_car):
	* sequence.c (check_string_lessp_key):
	* sequence.c (check_string_lessp_key_car):
	* sequence.c (get_check_match_function_1):
	* sequence.c (get_merge_predicate):
	* sequence.c (count_with_tail):
	* sequence.c (list_count_from_end):
	* sequence.c (string_count_from_end):
	* sequence.c (Fcount):
	* sequence.c (Fsubseq):
	* sequence.c (list_position_cons_before):
	* sequence.c (FmemberX):
	* sequence.c (Fadjoin):
	* sequence.c (FassocX):
	* sequence.c (FrassocX):
	* sequence.c (position):
	* sequence.c (Fposition):
	* sequence.c (Ffind):
	* sequence.c (delq_no_quit_and_free_cons):
	* sequence.c (FdeleteX):
	* sequence.c (FremoveX):
	* sequence.c (list_delete_duplicates_from_end):
	* sequence.c (Fdelete_duplicates):
	* sequence.c (Fremove_duplicates):
	* sequence.c (Fnreverse):
	* sequence.c (Freverse):
	* sequence.c (list_merge):
	* sequence.c (array_merge):
	* sequence.c (list_array_merge_into_list):
	* sequence.c (list_list_merge_into_array):
	* sequence.c (list_array_merge_into_array):
	* sequence.c (Fmerge):
	* sequence.c (list_sort):
	* sequence.c (array_sort):
	* sequence.c (FsortX):
	* sequence.c (Ffill):
	* sequence.c (mapcarX):
	* sequence.c (shortest_length_among_sequences):
	* sequence.c (Fmapconcat):
	* sequence.c (FmapcarX):
	* sequence.c (Fmapvector):
	* sequence.c (Fmapcan):
	* sequence.c (Fmap):
	* sequence.c (Fmap_into):
	* sequence.c (Fsome):
	* sequence.c (Fevery):
	* sequence.c (Freduce):
	* sequence.c (replace_string_range_1):
	* sequence.c (Freplace):
	* sequence.c (Fnsubstitute):
	* sequence.c (Fsubstitute):
	* sequence.c (subst):
	* sequence.c (sublis):
	* sequence.c (Fsublis):
	* sequence.c (nsublis):
	* sequence.c (Fnsublis):
	* sequence.c (Fsubst):
	* sequence.c (Fnsubst):
	* sequence.c (tree_equal):
	* sequence.c (Ftree_equal):
	* sequence.c (mismatch_from_end):
	* sequence.c (mismatch_list_list):
	* sequence.c (mismatch_list_string):
	* sequence.c (mismatch_list_array):
	* sequence.c (mismatch_string_array):
	* sequence.c (mismatch_string_string):
	* sequence.c (mismatch_array_array):
	* sequence.c (get_mismatch_func):
	* sequence.c (Fmismatch):
	* sequence.c (Fsearch):
	* sequence.c (venn):
	* sequence.c (nvenn):
	* sequence.c (Funion):
	* sequence.c (Fset_exclusive_or):
	* sequence.c (Fnset_exclusive_or):
	* sequence.c (syms_of_sequence):
	Add this file, containing those general functions that dealt with
	sequences that were in fns.c.
	* symsinit.h:
	Make syms_of_sequence() available here.
man/ChangeLog addition:
2011-12-04  Aidan Kehoe  <kehoea(a)parhasard.net>
	* internals/internals.texi (Basic Lisp Modules):
	Document sequence.c here too.
[...]
-- 
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
                        
                     
                    
                 
             
         
        
        
            
        
        
            
                
                    
                    
                    commit/XEmacs: kehoea: Refactor out sequence-oriented builtins from fns.c to the new sequence.c.
                
            
            
                13 years, 11 months
            
            
                
                    
                     
                    
                    
                    Bitbucket
                
 
                
                    
                        
                            1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/changeset/1a507c4c6c42/
changeset:   1a507c4c6c42
user:        kehoea
date:        2011-12-04 19:42:50
summary:     Refactor out sequence-oriented builtins from fns.c to the new sequence.c.
src/ChangeLog addition:
2011-12-04  Aidan Kehoe  <kehoea(a)parhasard.net>
	* Makefile.in.in (objs):
	* depend:
	Add sequence.o to the list of objects and dependencies.
	* alloc.c:
	* alloc.c (mark_bit_vector):
	* alloc.c (print_bit_vector):
	* alloc.c (bit_vector_equal):
	* alloc.c (internal_bit_vector_equalp_hash):
	* alloc.c (bit_vector_hash):
	* alloc.c (init_alloc_once_early):
	Move the implementation of the bit vector type here from fns.c.
	* emacs.c (main_1):
	Call syms_of_sequence() here, now sequence.c is included.
	* fns.c (Fold_rassq):
	Move this together with the rest of the Fold_* functions.
	* fns.c:
	* fns.c (syms_of_fns):
	Move most functions dealing with sequences generally, and
	especially those taking key arguments, to a separate file,
	sequence.c.
	* general-slots.h:
	Qyes_or_no_p belong here, not fns.c.
	* lisp.h:
	Make Flist_length available here, it's used by sequence.c
	* sequence.c:
	* sequence.c (check_sequence_range):
	* sequence.c (Flength):
	* sequence.c (check_other_nokey):
	* sequence.c (check_other_key):
	* sequence.c (check_if_key):
	* sequence.c (check_match_eq_key):
	* sequence.c (check_match_eql_key):
	* sequence.c (check_match_equal_key):
	* sequence.c (check_match_equalp_key):
	* sequence.c (check_match_other_key):
	* sequence.c (check_lss_key):
	* sequence.c (check_lss_key_car):
	* sequence.c (check_string_lessp_key):
	* sequence.c (check_string_lessp_key_car):
	* sequence.c (get_check_match_function_1):
	* sequence.c (get_merge_predicate):
	* sequence.c (count_with_tail):
	* sequence.c (list_count_from_end):
	* sequence.c (string_count_from_end):
	* sequence.c (Fcount):
	* sequence.c (Fsubseq):
	* sequence.c (list_position_cons_before):
	* sequence.c (FmemberX):
	* sequence.c (Fadjoin):
	* sequence.c (FassocX):
	* sequence.c (FrassocX):
	* sequence.c (position):
	* sequence.c (Fposition):
	* sequence.c (Ffind):
	* sequence.c (delq_no_quit_and_free_cons):
	* sequence.c (FdeleteX):
	* sequence.c (FremoveX):
	* sequence.c (list_delete_duplicates_from_end):
	* sequence.c (Fdelete_duplicates):
	* sequence.c (Fremove_duplicates):
	* sequence.c (Fnreverse):
	* sequence.c (Freverse):
	* sequence.c (list_merge):
	* sequence.c (array_merge):
	* sequence.c (list_array_merge_into_list):
	* sequence.c (list_list_merge_into_array):
	* sequence.c (list_array_merge_into_array):
	* sequence.c (Fmerge):
	* sequence.c (list_sort):
	* sequence.c (array_sort):
	* sequence.c (FsortX):
	* sequence.c (Ffill):
	* sequence.c (mapcarX):
	* sequence.c (shortest_length_among_sequences):
	* sequence.c (Fmapconcat):
	* sequence.c (FmapcarX):
	* sequence.c (Fmapvector):
	* sequence.c (Fmapcan):
	* sequence.c (Fmap):
	* sequence.c (Fmap_into):
	* sequence.c (Fsome):
	* sequence.c (Fevery):
	* sequence.c (Freduce):
	* sequence.c (replace_string_range_1):
	* sequence.c (Freplace):
	* sequence.c (Fnsubstitute):
	* sequence.c (Fsubstitute):
	* sequence.c (subst):
	* sequence.c (sublis):
	* sequence.c (Fsublis):
	* sequence.c (nsublis):
	* sequence.c (Fnsublis):
	* sequence.c (Fsubst):
	* sequence.c (Fnsubst):
	* sequence.c (tree_equal):
	* sequence.c (Ftree_equal):
	* sequence.c (mismatch_from_end):
	* sequence.c (mismatch_list_list):
	* sequence.c (mismatch_list_string):
	* sequence.c (mismatch_list_array):
	* sequence.c (mismatch_string_array):
	* sequence.c (mismatch_string_string):
	* sequence.c (mismatch_array_array):
	* sequence.c (get_mismatch_func):
	* sequence.c (Fmismatch):
	* sequence.c (Fsearch):
	* sequence.c (venn):
	* sequence.c (nvenn):
	* sequence.c (Funion):
	* sequence.c (Fset_exclusive_or):
	* sequence.c (Fnset_exclusive_or):
	* sequence.c (syms_of_sequence):
	Add this file, containing those general functions that dealt with
	sequences that were in fns.c.
	* symsinit.h:
	Make syms_of_sequence() available here.
man/ChangeLog addition:
2011-12-04  Aidan Kehoe  <kehoea(a)parhasard.net>
	* internals/internals.texi (Basic Lisp Modules):
	Document sequence.c here too.
affected #:  12 files
Repository URL: https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
                        
                     
                    
                 
             
         
        
        
            
        
        
            
                
                    
                    
                    Re: [Q] Refactor out sequence-oriented builtins from fns.c to the new sequence.c.
                
            
            
                13 years, 11 months
            
            
                
                    
                     
                    
                    
                    Aidan Kehoe
                
 
                
                    
                        
                            
 Ar an cúigiú lá de mí na Nollaig, scríobh Stephen J. Turnbull: 
 > QUERY
 > 
 > Aidan Kehoe writes:
 >  > 
 >  > Actual changeset is compressed and attached, for the sake of avoid a 500k
 >  > mail. The changelog and commit message is in plain text.
 >  > 
 >  > # HG changeset patch
 >  > # User Aidan Kehoe <kehoea(a)parhasard.net>
 >  > # Date 1323024170 0
 >  > # Node ID 1a507c4c6c42c6bc3afdd33bffcbaa14dbd88b62
 >  > # Parent  7c383c5784edcea0694661cfebd7ae4e613d7e7b
 >  > Refactor out sequence-oriented builtins from fns.c to the new sequence.c.
 > 
 > Have you considered whether our code varies enough from GNU that
 > future synchs of the sequence code won't be impaired by this change
 > (ie, they would have to be done by hand anyway?)
The two fns.c files are very different at this point; especially, their
exposing of the multibyte implementation to Lisp means the bulk of the code
that deals with strings is not useful to us. Remember also that most of the
functions that deal with sequences currently in our fns.c were moved there
from cl-seq.el, and there’s no prospect of GNU ever having those in C.
-- 
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
                        
                     
                    
                 
             
         
        
        
            
        
        
            
                
                    
                    
                    COMMIT - Update website development instructions
                
            
            
                13 years, 11 months
            
            
                
                    
                     
                    
                    
                    Vin Shelton
                
 
                
                    
                        
                            I wanted to correct some of the glaring factual errors on the
website's development instructions.
  - Vin
diff -r e77ced97bd3a Develop/ChangeLog
--- a/Develop/ChangeLog Thu Oct 13 09:01:48 2011 +0000
+++ b/Develop/ChangeLog Sat Dec 03 21:54:49 2011 -0500
@@ -1,3 +1,9 @@
+2011-12-03  Vin Shelton  <acs(a)xemacs.org>
+
+       * hgaccess.content: The hg repositories have moved from debian to
+       bitbucket.
+       * index.content: All the repositories are under hg now.
+
 2011-05-09  Stephen J. Turnbull  <stephen(a)xemacs.org>
        * hgaccess.content: Point to 'xemacs' repo by preference.  Also:
diff -r e77ced97bd3a Develop/hgaccess.content
--- a/Develop/hgaccess.content  Thu Oct 13 09:01:48 2011 +0000
+++ b/Develop/hgaccess.content  Sat Dec 03 21:54:49 2011 -0500
@@ -9,25 +9,13 @@
     <h1>XEmacs Mercurial Repository</h1>
-    <p>Debian has upgraded Mercurial, and security tightened somewhat.
-       <a href="#trusted-users">How to tell Mercurial to trust a
-       developer.</a></p>
-
-    <p>As of 5 December 2007, the development mainline (aka version
-      21.5) has been moved to a
+    <p>As of October, 2011, all the XEmacs repositories have moved to
       <a href="http://hgbook.red-bean.com/hgbook.html">Mercurial</a>
-      repository on <code>hg.debian.org</code> from which you may
-      <a href="http://hg.debian.org/hg/xemacs/xemacs">browse</a> the
+      repositories on <code>bitbucket.org</code> from which you may
+      <a href="https://bitbucket.org/xemacs/xemacs/src">browse</a> the
       latest checked-in code.  This page describes access to those
       resources.</p>
-    <p>Other XEmacs repositories, including the 21.4 branch, the
-      packages, and the sources for this website, continue to be
-      provided by the CVS repository on <code>cvs.alioth.debian.org</code>,
-      hosted by our friends at <code>Alioth.debian.org</code>.  Please see the
-      introduction to the <a href="cvsaccess.html">XEmacs CVS
-       Repository</a> for instructions on its use.</p>
-
     <p><strong>Please note:</strong> This page was hacked up quickly
       by copying and editing the corresponding page for CVS.  If you
       spot any CVS-isms or other statements that are not correct for
@@ -68,7 +56,7 @@
     <p>
       To get the official (21.5) development sources, do:</p>
     <pre xml:space="preserve">
-      <strong>hg clone http://hg.debian.org/hg/xemacs/xemacs</strong>
+      <strong>hg clone https://bitbucket.org/xemacs/xemacs</strong>
     </pre>
     <p>
       This may include a few bleeding edge patches that are still under
@@ -78,17 +66,6 @@
       reasonably stable.
     </p>
     <p>
-      If you have problems, you can try the 'xemacs-beta' branch with
-    <pre xml:space="preserve">
-      <strong>hg clone http://hg.debian.org/hg/xemacs/xemacs-beta</strong>
-    </pre>
-    <p>
-      instead, but it frequently lags the mainline by several days
-      (that's what it is for!) or even weeks.  If you consistently
-      experience build problems with the mainline, please let us know
-      on the xemacs-beta mailing list, and we'll consider stepping up
-      the frequency of updates for this branch.</p>
-    <p>
       The XEmacs Lisp packages are now unbundled, and are
       available from the <a href="cvsaccess.html">CVS repository</a>.
       Older versions of XEmacs, including the currently stable version
diff -r e77ced97bd3a Develop/index.content
--- a/Develop/index.content     Thu Oct 13 09:01:48 2011 +0000
+++ b/Develop/index.content     Sat Dec 03 21:54:49 2011 -0500
@@ -8,21 +8,18 @@
   <h2 id="xemacs">XEmacs Development</h2>
-  <p>As of 5 December 2007, the development mainline (aka version
-    21.5) has been moved to a
+    <p>As of October, 2011, all the XEmacs repositories have moved to
     <a href="http://hgbook.red-bean.com/hgbook.html">Mercurial</a>
-    repository on <code>hg.debian.org</code> from which you may
-    <a href="http://hg.debian.org/hg/xemacs/xemacs">browse</a> the
-    latest checked-in code.  Please see the introduction to the
-    <a href="hgaccess.html">XEmacs Mercurial Repository</a> for
-    instructions on its use.</p>
-
-  <p>Other XEmacs repositories, including the 21.4 branch, the
-    packages, and the sources for this website, continue to be
-    provided by the CVS repository, which moved from
-    <code>cvs.xemacs.org</code>, hosted by our friends at
-    <code>dotsrc.org</code>, to <code>Alioth.debian.org</code> in
-    November 2009.</p>
+    repositories on <code>bitbucket.org</code>.  You may browse the
+    latest beta (21.5) sources online
+    <a href="https://bitbucket.org/xemacs/xemacs/src">here</a>.  The
+    stable (21.4) sources are
+    <a href="https://bitbucket.org/xemacs/xemacs-21.4/src">here</a>
+    and the packages sources are
+    <a href="https://bitbucket.org/xemacs/xemacs-packages/src">here</a>.
+    Please see the introduction to the
+      <a href="hgaccess.html">XEmacs Mercurial Repository</a> for
+      instructions on accessing and using the repository.</p>
   <p>
     If you'd like to help with the XEmacs development effort, do the
@@ -33,16 +30,12 @@
       <p>
         <a href="<!-- _GP_ relPath(qq{Download/index.html}) -->">Download</a>
        the latest releases of 21.4 (the stable branch) or 21.5 (the
-       development mainline, or (better) get the most up-to-date
-       sources from the source repositories.  For 21.5, see the
-       introduction to the
+       development mainline), or (better) get the most up-to-date
+       sources from the source repositories.  To get code from the
+       source repositories (either XEmacs 21.4, XEmacs 21.5 or any of
+       the XEmacs Packages, see the introduction to the
        <a href="hgaccess.html">XEmacs Mercurial Repository</a> and
-       follow the instructions to get an up-to-date tree of the
-       XEmacs 21.5 source.  For other resources, such as the 21.4
-       stable tree, the package tree and the source to this website,
-       see the introduction to the
-       <a href="cvsaccess.html">XEmacs CVS Repository</a> and follow
-       the instructions to get an up-to-date trees of those resources.</p>
+       follow the instructions.</p>
     </li>
     <li>
       <p>
@@ -79,15 +72,11 @@
          web version</a>.
       </p>
-      <p>
-        You may find the <a
-        href="http://alioth.debian.org/scm/viewvc.php/XEmacs/xemacs-builds/ben/cv...>
-        perl script useful to create your patches.</p>
       <p>
         No matter whether you are just getting involved with creating
         patches or you generate huge amounts of them, <a
-        href="http://alioth.debian.org/scm/viewvc.php/XEmacs/packages/xemacs-pack...>
+        href="https://bitbucket.org/xemacs/xemacs-devel/src">patcher</a>
         is for you.  Please install the <a href="<!-- _GP_
         relPath(qq{Develop/packages.html#xemacs-devel})
         -->">xemacs-devel</a> package which it is part of.  Read its
@@ -102,7 +91,7 @@
   <p>
     The development of XEmacs Packages is supported by hourly builds
-    from latest CVS sources.  <a
+    from latest sources.  <a
     href="http://www.contactor.se/~matsl/smoketest/">XEmacs
     Package Smoketest</a> results are readily available.</p>
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
                        
                     
                    
                 
             
         
        
        
            
        
        
            
                
                    
                    
                    [COMMIT] Zero-terminate when passing strings to parse_integer(), lread.c
                
            
            
                13 years, 11 months
            
            
                
                    
                     
                    
                    
                    Aidan Kehoe
                
 
                
                    
                        
                            
APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1322927714 0
# Node ID 7c383c5784edcea0694661cfebd7ae4e613d7e7b
# Parent  cc7f8a0e569aefdf14d87009e97ea7168be2259e
Zero-terminate when passing strings to parse_integer(), lread.c
src/ChangeLog addition:
2011-12-03  Aidan Kehoe  <kehoea(a)parhasard.net>
	* lread.c (read1):
	Zero-terminate what we're giving to parse_integer(), it needs it
	if it's calling bignum_set_string().
diff -r cc7f8a0e569a -r 7c383c5784ed src/ChangeLog
--- a/src/ChangeLog	Sat Dec 03 15:13:55 2011 +0000
+++ b/src/ChangeLog	Sat Dec 03 15:55:14 2011 +0000
@@ -1,3 +1,9 @@
+2011-12-03  Aidan Kehoe  <kehoea(a)parhasard.net>
+
+	* lread.c (read1):
+	Zero-terminate what we're giving to parse_integer(), it needs it
+	if it's calling bignum_set_string().
+
 2011-12-03  Aidan Kehoe  <kehoea(a)parhasard.net>
 
 	* lread.c (read1):
diff -r cc7f8a0e569a -r 7c383c5784ed src/lread.c
--- a/src/lread.c	Sat Dec 03 15:13:55 2011 +0000
+++ b/src/lread.c	Sat Dec 03 15:55:14 2011 +0000
@@ -2711,13 +2711,15 @@
 		}
 
 	      Lstream_flush (XLSTREAM (Vread_buffer_stream));
+	      /* blasted terminating 0 */
+	      Lstream_put_ichar (XLSTREAM (Vread_buffer_stream), 0);
 
 	      parsed
 		= parse_integer (resizing_buffer_stream_ptr
 				 (XLSTREAM (Vread_buffer_stream)),
 				 Lstream_byte_count (XLSTREAM
-						     (Vread_buffer_stream)),
-				 10);
+						     (Vread_buffer_stream))
+				 - 1, 10);
 
 	      found = assoc_no_quit (parsed, Vread_objects);
 	      if (c == '=')
-- 
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
                        
                     
                    
                 
             
         
        
        
            
        
        
        
        
            
        
        
            
                
                    
                    
                    [COMMIT] Accept bignums unambiguously in the syntax for object labels, lread.c.
                
            
            
                13 years, 11 months
            
            
                
                    
                     
                    
                    
                    Aidan Kehoe
                
 
                
                    
                        
                            
APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1322925235 0
# Node ID cc7f8a0e569aefdf14d87009e97ea7168be2259e
# Parent  e9f58d024c3ce7ea82f7061ac3ac30cd0ae26419
Accept bignums unambiguously in the syntax for object labels, lread.c.
src/ChangeLog addition:
2011-12-03  Aidan Kehoe  <kehoea(a)parhasard.net>
	* lread.c (read1):
	Don't wrap when reading expressions that use bignums as object
	labels, that can lead to ambiguity and it's not actually that hard
	to use parse_integer() to avoid it.
tests/ChangeLog addition:
2011-12-03  Aidan Kehoe  <kehoea(a)parhasard.net>
	* automated/lisp-reader-tests.el:
	Check that integer object labels (using the #N=... syntax) treat
	bignums as such, rather than as fixnums that have wrapped.
diff -r e9f58d024c3c -r cc7f8a0e569a src/ChangeLog
--- a/src/ChangeLog	Tue Nov 29 16:19:53 2011 +0100
+++ b/src/ChangeLog	Sat Dec 03 15:13:55 2011 +0000
@@ -1,3 +1,10 @@
+2011-12-03  Aidan Kehoe  <kehoea(a)parhasard.net>
+
+	* lread.c (read1):
+	Don't wrap when reading expressions that use bignums as object
+	labels, that can lead to ambiguity and it's not actually that hard
+	to use parse_integer() to avoid it.
+
 2011-11-26  Aidan Kehoe  <kehoea(a)parhasard.net>
 
 	* number-mp.c (bignum_to_string):
diff -r e9f58d024c3c -r cc7f8a0e569a src/lread.c
--- a/src/lread.c	Tue Nov 29 16:19:53 2011 +0100
+++ b/src/lread.c	Sat Dec 03 15:13:55 2011 +0000
@@ -2697,20 +2697,29 @@
 	  case '5': case '6': case '7': case '8': case '9':
 	    /* Reader forms that can reuse previously read objects.  */
 	    {
-	      int n = 0;
-	      Lisp_Object found;
+	      Lisp_Object parsed, found;
+
+	      Lstream_rewind (XLSTREAM (Vread_buffer_stream));
 
 	      /* Using read_integer() here is impossible, because it
-                 chokes on `='.  Using parse_integer() is too hard.
-                 So we simply read it in, and ignore overflows, which
-                 is safe.  */
+                 chokes on `='. */
 	      while (c >= '0' && c <= '9')
 		{
-		  n *= 10;
-		  n += c - '0';
+		  Lstream_put_ichar (XLSTREAM (Vread_buffer_stream), c);
+		  QUIT;
 		  c = readchar (readcharfun);
 		}
-	      found = assq_no_quit (make_fixnum (n), Vread_objects);
+
+	      Lstream_flush (XLSTREAM (Vread_buffer_stream));
+
+	      parsed
+		= parse_integer (resizing_buffer_stream_ptr
+				 (XLSTREAM (Vread_buffer_stream)),
+				 Lstream_byte_count (XLSTREAM
+						     (Vread_buffer_stream)),
+				 10);
+
+	      found = assoc_no_quit (parsed, Vread_objects);
 	      if (c == '=')
 		{
 		  /* #n=object returns object, but associates it with
@@ -2720,13 +2729,13 @@
                       return Fsignal (Qinvalid_read_syntax,
                                       list2 (build_msg_string
                                              ("Multiply defined object label"),
-                                             make_fixnum (n)));
+                                             parsed));
                     }
                   else
                     {
                       Lisp_Object object;
 
-                      found = Fcons (make_fixnum (n), Qnil);
+                      found = Fcons (parsed, Qnil);
                       /* Make FOUND a placeholder for the object that will
                          be read. (We've just consed it, and it's not
                          visible from Lisp, so there's no possibility of
@@ -2751,7 +2760,7 @@
 		    return Fsignal (Qinvalid_read_syntax,
 				    list2 (build_msg_string
 					   ("Undefined symbol label"),
-					   make_fixnum (n)));
+					   parsed));
 		}
 	      return Fsignal (Qinvalid_read_syntax,
 			      list1 (build_ascstring ("#")));
diff -r e9f58d024c3c -r cc7f8a0e569a tests/ChangeLog
--- a/tests/ChangeLog	Tue Nov 29 16:19:53 2011 +0100
+++ b/tests/ChangeLog	Sat Dec 03 15:13:55 2011 +0000
@@ -1,3 +1,9 @@
+2011-12-03  Aidan Kehoe  <kehoea(a)parhasard.net>
+
+	* automated/lisp-reader-tests.el:
+	Check that integer object labels (using the #N=... syntax) treat 
+	bignums as such, rather than as fixnums that have wrapped.
+
 2011-11-09  Aidan Kehoe  <kehoea(a)parhasard.net>
 
 	Update some tests that have started failing because of some
diff -r e9f58d024c3c -r cc7f8a0e569a tests/automated/lisp-reader-tests.el
--- a/tests/automated/lisp-reader-tests.el	Tue Nov 29 16:19:53 2011 +0100
+++ b/tests/automated/lisp-reader-tests.el	Sat Dec 03 15:13:55 2011 +0000
@@ -150,3 +150,8 @@
               (car (get-range-table #x1001 deserialized-range-table)))
           "checking the lisp reader handles deserialization identity, mixed"))
 
+(when (featurep 'bignum)
+  (Assert (null (list-length (read (format "#%d=(1 #1=(5) 3 4 . #%d#)"
+					   (+ most-positive-fixnum 2)
+					   (+ most-positive-fixnum 2)))))
+	  "checking bignum object labels don't wrap on reading"))
-- 
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches