Commit Graph

21 Commits

Author SHA1 Message Date
Jeffrey Altman
c3f6a65da2 slc: correct 'min_args' and 'max_args' processing
The 'min_args' and 'max_args' values were ignored whenever
an 'argument' value was not present as a child of the 'command'.
'argument' values are often specified as children of the 'option'
value when more than one 'option' is an argument.

This patchset counts the number of 'argument' values specified
under a 'command' regardless of the level at which it appears.
If there are any 'argument' values, the 'min_args' and 'max_args'
are used to generate validation code for the 'command'.

Change-Id: Idc6129b4ff29914ac990f693b4dba51a30bdc971
2011-07-27 19:55:28 -04:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
f5f9014c90 Warning fixes from Christos Zoulas
- shadowed variables
- signed/unsigned confusion
- const lossage
- incomplete structure initializations
- unused code
2011-04-29 20:25:05 -07:00
Love Hornquist Astrand
99bc078d46 better support for name in options 2010-11-24 16:21:26 -08:00
Asanka C. Herath
e84b73370c Avoid conflicting malloc/free declarations in Bison 2010-11-24 15:33:28 -05:00
Love Hörnquist Åstrand
1ee6bd7248 drop RCSID
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24357 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 00:30:49 +00:00
Love Hörnquist Åstrand
6937d41a02 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898 switch to utf8 encoding of all files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
58227c2f5f negative flags defaults to on
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23683 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-25 11:11:58 +00:00
Love Hörnquist Åstrand
b6bcedddb2 (main): also fclose yyin.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20767 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-01 11:24:52 +00:00
Johan Danielsson
9edd1cef2a use table lookup for types instead of inline list
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16678 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-31 16:49:08 +00:00
Love Hörnquist Åstrand
08e64c0d1b (gen_wrapper): use the generated version of name for function, if no
function is is used, also use the generated name for the structure
name.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15774 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-27 15:00:40 +00:00
Love Hörnquist Åstrand
ab59af8c86 fix a merge error
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15436 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-16 19:55:03 +00:00
Love Hörnquist Åstrand
20040163c5 rename optind to optidx, rename variables to avoid shadowing
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15431 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-16 19:30:18 +00:00
Love Hörnquist Åstrand
cb151443a9 include <config.h> since defines _GNU_SOURCE if needed, avoid asprintf warning
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14845 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-19 10:28:28 +00:00
Love Hörnquist Åstrand
6cf1196acf include <roken.h>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14520 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-21 09:10:57 +00:00
Love Hörnquist Åstrand
7da05fbefb cast argument to isalnum to unsigned char
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14508 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-09 04:23:58 +00:00
Johan Danielsson
cdef504282 add support for "strings" and "negative-flag" types, plus some
usability tweaks and bug fixes


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14251 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-09-22 16:09:19 +00:00
Johan Danielsson
ceae987caf add min_args/max_args checking
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14022 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-07-05 11:28:50 +00:00
Love Hörnquist Åstrand
8a986d309a pull in <stdlib.h> and <vers.h> to avoid warnings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13971 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-06-21 20:59:25 +00:00
Johan Danielsson
3cc8ea1b60 add simple command+option compiler
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13969 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-06-21 19:10:59 +00:00