chiark
/
gitweb
/
~ian
/
chiark-tcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hbytes compiles
[chiark-tcl.git]
/
base
/
tcmdifgen
diff --git
a/base/tcmdifgen
b/base/tcmdifgen
index d5e662234ddba0951fb59b300469b22a3e9821d3..4b675968217e6d0f09dc6dfa2339749551db37d9 100755
(executable)
--- a/
base/tcmdifgen
+++ b/
base/tcmdifgen
@@
-56,7
+56,7
@@
# Arranges for generated .h files to #include the specified
# file. C-INCLUDE-SPECIFIER should include the <..> or "..".
#
# Arranges for generated .h files to #include the specified
# file. C-INCLUDE-SPECIFIER should include the <..> or "..".
#
-# Table TABLENAME C-ENTRY-TYPE
+# Table
[*]
TABLENAME C-ENTRY-TYPE
# Starts a table of commands or subcommands. The generated .h
# will contain a definition of C-ENTRY-TYPE containing
# const char *name;
# Starts a table of commands or subcommands. The generated .h
# will contain a definition of C-ENTRY-TYPE containing
# const char *name;
@@
-89,6
+89,10
@@
# arguments, processes the command, and sets any result, as
# applicable.
#
# arguments, processes the command, and sets any result, as
# applicable.
#
+# `*' should be used if the table name is not useful for error
+# messages. It suppresses `TABLENAME ' from the front of the
+# autogenerated argument parsing error strings.
+#
# ExtraEntry C-ENTRY-TYPE
# Introduces a section of additional C code which will be inserted
# into the definition of C-ENTRY-TYPE by `Table'. The C
# ExtraEntry C-ENTRY-TYPE
# Introduces a section of additional C code which will be inserted
# into the definition of C-ENTRY-TYPE by `Table'. The C
@@
-178,11
+182,12
@@
sub parse ($$) {
unshift @i, $this_indent;
}
unshift @i, $this_indent;
}
- if (@i==0 && m/^Table\s+(\w+)\s+(\w+)$/) {
+ if (@i==0 && m/^Table\s+(\
*?)(\
w+)\s+(\w+)$/) {
zilch();
zilch();
- $c_table= $1;
- $table_x{$c_table}{C}= $2;
- $entrytype_x{$2}= '' unless exists $entrytype_x{$2};
+ $c_table= $2;
+ $table_x{$c_table}{T}= $1;
+ $table_x{$c_table}{C}= $3;
+ $entrytype_x{$3}= '' unless exists $entrytype_x{$3};
} elsif (@i==0 && m/^Untabled$/) {
zilch();
$c_table= '';
} elsif (@i==0 && m/^Untabled$/) {
zilch();
$c_table= '';
@@
-291,7
+296,8
@@
foreach $c_table (sort keys %tables) {
$any_eerr= 0;
$any_eargc= 0;
$pa_hint= '';
$any_eerr= 0;
$any_eargc= 0;
$pa_hint= '';
- $pa_hint .= "$c_table " if length $c_table;
+ $pa_hint .= "$c_table " if length $c_table &&
+ !length $table_x{$c_table}{T};
$pa_hint.= $c_entry;
foreach $arg (@{ $r_entry->{A} }) {
$n= $arg->{N};
$pa_hint.= $c_entry;
foreach $arg (@{ $r_entry->{A} }) {
$n= $arg->{N};