annotate src/toolbar-gtk.c @ 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 308d34e9f07d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
714
02339d4ebed4 [xemacs-hg @ 2001-12-23 20:28:19 by wmperry]
wmperry
parents: 665
diff changeset
1 /* toolbar implementation -- GTK interface.
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
2 Copyright (C) 1995 Board of Trustees, University of Illinois.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
3 Copyright (C) 1995 Sun Microsystems, Inc.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
4 Copyright (C) 1995, 1996 Ben Wing.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
5 Copyright (C) 1996 Chuck Thompson.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
6
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
7 This file is part of XEmacs.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
8
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4917
diff changeset
9 XEmacs is free software: you can redistribute it and/or modify it
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
10 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: 4917
diff changeset
11 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: 4917
diff changeset
12 option) any later version.
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
13
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
14 XEmacs is distributed in the hope that it will be useful, but WITHOUT
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
17 for more details.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
18
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
19 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: 4917
diff changeset
20 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
21
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
22 /* Synched up with: Not in FSF. */
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
23
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
24 #include <config.h>
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
25 #include "lisp.h"
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 714
diff changeset
26
714
02339d4ebed4 [xemacs-hg @ 2001-12-23 20:28:19 by wmperry]
wmperry
parents: 665
diff changeset
27 #include "frame.h"
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 714
diff changeset
28
4917
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 2286
diff changeset
29 #include "toolbar-xlike.h"
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 714
diff changeset
30
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 714
diff changeset
31 #include "console-gtk-impl.h"
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
32
4917
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 2286
diff changeset
33 /* We should really create a 'xlike' console type and fill it with
714
02339d4ebed4 [xemacs-hg @ 2001-12-23 20:28:19 by wmperry]
wmperry
parents: 665
diff changeset
34 ** all the shared code. We would then just use
4917
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 2286
diff changeset
35 ** CONSOLE_INHERITS_METHOD(x,xlike,blah)
714
02339d4ebed4 [xemacs-hg @ 2001-12-23 20:28:19 by wmperry]
wmperry
parents: 665
diff changeset
36 */
4917
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 2286
diff changeset
37 #define gtk_output_frame_toolbars xlike_output_frame_toolbars
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 2286
diff changeset
38 #define gtk_output_toolbar_button xlike_output_toolbar_button
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 2286
diff changeset
39 #define gtk_redraw_exposed_toolbars xlike_redraw_exposed_toolbars
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 2286
diff changeset
40 #define gtk_redraw_frame_toolbars xlike_redraw_frame_toolbars
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 2286
diff changeset
41 #define gtk_clear_frame_toolbars xlike_clear_frame_toolbars
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
42
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
43
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
44 static void
2286
04bc9d2f42c7 [xemacs-hg @ 2004-09-20 19:18:55 by james]
james
parents: 905
diff changeset
45 gtk_initialize_frame_toolbars (struct frame *UNUSED (f))
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
46 {
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
47 }
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
48
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
49 /* This only calls one function but we go ahead and create this in
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
50 case we ever do decide that we need to do more work. */
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
51 static void
2286
04bc9d2f42c7 [xemacs-hg @ 2004-09-20 19:18:55 by james]
james
parents: 905
diff changeset
52 gtk_free_frame_toolbars (struct frame *UNUSED (f))
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
53 {
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
54 }
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
55
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
56
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
57 /************************************************************************/
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
58 /* initialization */
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
59 /************************************************************************/
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
60
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
61 void
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
62 console_type_create_toolbar_gtk (void)
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
63 {
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
64 CONSOLE_HAS_METHOD (gtk, output_frame_toolbars);
905
c15f25529e61 [xemacs-hg @ 2002-07-06 21:05:42 by andyp]
andyp
parents: 872
diff changeset
65 CONSOLE_HAS_METHOD (gtk, clear_frame_toolbars);
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
66 CONSOLE_HAS_METHOD (gtk, initialize_frame_toolbars);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
67 CONSOLE_HAS_METHOD (gtk, free_frame_toolbars);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
68 CONSOLE_HAS_METHOD (gtk, output_toolbar_button);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
69 CONSOLE_HAS_METHOD (gtk, redraw_exposed_toolbars);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
70 CONSOLE_HAS_METHOD (gtk, redraw_frame_toolbars);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
71 }