Mercurial > hg > xemacs-beta
annotate src/m/sparc.h @ 5908:6174848f3e6c
Use parse_integer() in read_atom(); support bases with ratios like integers
src/ChangeLog addition:
2015-05-08 Aidan Kehoe <kehoea@parhasard.net>
* data.c (init_errors_once_early):
Move the Qunsupported_type here from numbers.c, so it's available
when the majority of our types are not supported.
* general-slots.h: Add it here, too.
* number.c: Remove the definition of Qunsupported_type from here.
* lread.c (read_atom):
Check if the first character could reflect a rational, if so, call
parse_integer(), don't check the syntax of the other
characters. This allows us to accept the non-ASCII digit
characters too.
If that worked partially, but not completely, and the next char is
a slash, try to parse as a ratio.
If that fails, try isfloat_string(), but only if the first
character could plausibly be part of a float.
Otherwise, treat as a symbol.
* lread.c (read_rational):
Rename from read_integer. Handle ratios with the same radix
specification as was used for integers.
* lread.c (read1):
Rename read_integer in this function. Support the Common Lisp
#NNNrMMM syntax for parsing a number MMM of arbitrary radix NNN.
man/ChangeLog addition:
2015-05-08 Aidan Kehoe <kehoea@parhasard.net>
* lispref/numbers.texi (Numbers):
Describe the newly-supported arbitrary-base syntax for rationals
(integers and ratios). Describe that ratios can take the same base
specification as integers, something also new.
tests/ChangeLog addition:
2015-05-08 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-reader-tests.el:
Check the arbitrary-base integer reader syntax support, just
added. Check the reader base support for ratios, just added.
Check the non-ASCII-digit support in the reader, just added.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 09 May 2015 00:40:57 +0100 |
parents | 1f0b15040456 |
children |
rev | line source |
---|---|
428 | 1 /* machine description file for Sun 4 SPARC. |
2 Copyright (C) 1987, 1994 Free Software Foundation, Inc. | |
3 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
442
diff
changeset
|
4 This file is part of XEmacs. |
428 | 5 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
442
diff
changeset
|
6 XEmacs is free software: you can redistribute it and/or modify it |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
442
diff
changeset
|
7 under the terms of the GNU General Public License as published by the |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
442
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:
442
diff
changeset
|
9 option) any later version. |
428 | 10 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
442
diff
changeset
|
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
442
diff
changeset
|
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
442
diff
changeset
|
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
442
diff
changeset
|
14 for more details. |
428 | 15 |
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:
442
diff
changeset
|
17 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
428 | 18 |
19 /* Synched up with: FSF 19.31. */ | |
20 | |
21 /* The following line tells the configuration script what sort of | |
22 operating system this machine is likely to run. | |
23 USUAL-OPSYS="note" | |
24 | |
25 NOTE-START | |
26 Use -opsystem=sunos4 for operating system version 4, and | |
27 -opsystem=bsd4-2 for earlier versions. | |
28 NOTE-END */ | |
29 | |
30 /* XEmacs change */ | |
31 /* Say this machine is a sparc if we are not generating the Makefiles. | |
32 In that case say we are a SPARC. Otherwise people who have sparc | |
33 in a path will not be happy. */ | |
34 | |
35 #ifdef NOT_C_CODE | |
36 # define SPARC | |
37 #else | |
38 # ifndef sparc | |
39 # define sparc | |
40 # endif | |
41 #endif | |
42 | |
43 /* Mask for address bits within a memory segment */ | |
44 | |
45 #define SEGMENT_MASK (SEGSIZ - 1) | |
46 | |
47 #if ! defined (__NetBSD__) && ! defined (__linux__) && !defined (__OpenBSD__) | |
48 /* This really belongs in s/sun.h. */ | |
49 | |
5494
861f2601a38b
Sync s/ files with GNU 23.1.92, delete obsolete stuff, simplify other stuff
Ben Wing <ben@xemacs.org>
parents:
442
diff
changeset
|
50 #ifdef ENABLE_SM_FILE_DECLS_OF_LOADAVG_STUFF |
861f2601a38b
Sync s/ files with GNU 23.1.92, delete obsolete stuff, simplify other stuff
Ben Wing <ben@xemacs.org>
parents:
442
diff
changeset
|
51 |
428 | 52 /* Data type of load average, as read out of kmem. */ |
53 | |
54 #define LOAD_AVE_TYPE long | |
55 | |
56 /* Convert that into an integer that is 100 for a load average of 1.0 */ | |
57 | |
58 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) | |
59 | |
5494
861f2601a38b
Sync s/ files with GNU 23.1.92, delete obsolete stuff, simplify other stuff
Ben Wing <ben@xemacs.org>
parents:
442
diff
changeset
|
60 #endif /* ENABLE_SM_FILE_DECLS_OF_LOADAVG_STUFF */ |
861f2601a38b
Sync s/ files with GNU 23.1.92, delete obsolete stuff, simplify other stuff
Ben Wing <ben@xemacs.org>
parents:
442
diff
changeset
|
61 |
428 | 62 /* Say that the text segment of a.out includes the header; |
63 the header actually occupies the first few bytes of the text segment | |
64 and is counted in hdr.a_text. */ | |
65 | |
66 #define A_TEXT_OFFSET(HDR) sizeof (HDR) | |
67 | |
68 /* This is the offset of the executable's text, from the start of the file. */ | |
69 | |
70 #define A_TEXT_SEEK(HDR) (N_TXTOFF (hdr) + sizeof (hdr)) | |
71 | |
72 #endif /* not Linux or NetBSD or OpenBSD */ |