annotate modules/zlib/zlib.c @ 5867:e0f1dfaa821e

Add the non-ASCII digit support, now #'parse-integer can handle it. lisp/ChangeLog addition: 2015-03-08 Aidan Kehoe <kehoea@parhasard.net> * mule/digit.el: New file, specifying integer weights for those decimal digits specified by Unicode, and for the Latin characters in ASCII. * dumped-lisp.el (preloaded-file-list): Dump this file, so those weights are available at runtime. tests/ChangeLog addition: 2015-03-16 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-tests.el: Extend the tests for #'parse-integer, #'digit-char, #'digit-char-p substantially, testing the Unicode decimal digits in detail. src/ChangeLog addition: 2015-03-08 Aidan Kehoe <kehoea@parhasard.net> * data.c (Fparse_integer): Document a complication that arises when a leading minus sign has a digit weight but is nonetheles interpreted as a minus.
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 16 Mar 2015 00:28:18 +0000
parents 308d34e9f07d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* zlib interface for XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1998 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
6 XEmacs is free software: you can redistribute it and/or modify it
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
8 Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
9 option) any later version.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 428
diff changeset
17 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 /* Synched up with: Not in FSF. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 /* Author: William Perry <wmperry@aventail.com> */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 #include <emodules.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 DEFUN ("compress", Fcompress, 1, 6, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 Return the compressed version of an object.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 OBJECT is either a string or a buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 Optional argument LEVEL specifies how much to compress - valid range is 0 - 9.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 Optional arguments START and END denote buffer positions for compressing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 a portion of OBJECT. The optional CODING argument specifies the coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 system the text is to be represented in while computing the digest. This only
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 has meaning with MULE, and defaults to the current format of the data.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 If ERROR-ME-NOT is nil, report an error if the coding system can't be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 determined. Else assume binary coding if all else fails.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 (object, level, start, end, coding, error_me_not))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 return(Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 DEFUN ("decompress", Fdecompress, 1, 5, 0, /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 Uncompress an object.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 OBJECT is either a string or a buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 Optional arguments START and END denote buffer positions for decompressing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 a portion of OBJECT. The optional CODING argument specifies the coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 system the text is to be represented in while computing the digest. This only
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 has meaning with MULE, and defaults to the current format of the data.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 If ERROR-ME-NOT is nil, report an error if the coding system can't be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 determined. Else assume binary coding if all else fails.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 (object, start, end, coding, error_me_not))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 return(Qnil);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 syms_of_zlib (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 DEFSUBR(Fcompress);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 DEFSUBR(Fdecompress);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 void
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 vars_of_zlib (void)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 Fprovide (intern ("zlib"));
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 }