Commit Graph

57 Commits

Author SHA1 Message Date
Love Hörnquist Åstrand
0d31d3d686 drop rcsid
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24356 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 00:30:37 +00:00
Love Hörnquist Åstrand
9d9b7c7ed7 if i18n function, default to builtin (no i18n).
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23821 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:44:33 +00:00
Love Hörnquist Åstrand
e3ccedbfa9 provide arg_printusage_i18n
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23817 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:43:44 +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
2e4f85e4fb don't need to store the last col =
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23660 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-25 02:30:17 +00:00
Love Hörnquist Åstrand
5cd0815781 use "roken.h" consitantly
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21005 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-08 01:54:35 +00:00
Love Hörnquist Åstrand
9df9f6a9da revert 21003
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21004 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-08 01:53:10 +00:00
Love Hörnquist Åstrand
12df8538af use "roken.h" consitantly
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21003 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-08 01:42:05 +00:00
Love Hörnquist Åstrand
709aa58c74 define ROKEN_LIB_FUNCTION on all exported functions
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14773 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-12 11:29:18 +00:00
Love Hörnquist Åstrand
6806ed574f (add_string): catch error from realloc
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13381 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-02-17 12:07:42 +00:00
Johan Danielsson
86ae7dc7d0 don't put Ns before comma
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11173 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-20 16:23:07 +00:00
Johan Danielsson
f676ed55e4 rename optind and optarg to avoid some gcc warnings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10906 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-04-18 08:50:08 +00:00
Assar Westerlund
063d6c1041 add missing parenthesis
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10680 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-09-10 13:22:43 +00:00
Assar Westerlund
20be9e286b use more randomness (arc4random + srandomdev)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10676 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-09-09 20:27:25 +00:00
Assar Westerlund
68afa70fbc (arg_match_long): fix parsing of arg_counter optional argument
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10381 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-07-23 04:30:11 +00:00
Johan Danielsson
fbf3aa3ff5 Grog tries to figure out if to use mdoc.old instead of mdoc by looking
at some macros that were only present in the old version, and by
looking at the number of .Oo's present. In mdoc.old .Oo was a toggle,
but in mdoc it's closed by .Oc, so if the number of .Oo's is bigger
than the number of .Oc's, it figures it must be mdoc.old. This doesn't
however account for called Oc's, and thus grog thinks that valid pages
are mdoc.old when they infact are mdoc. So let's make sure that Oc's
are not called by other macros.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10031 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-06-08 21:39:56 +00:00
Assar Westerlund
c4d8393ea2 (free_getarg_strings): add function
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9816 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-04-25 12:06:10 +00:00
Johan Danielsson
5381d88f33 pack short flag options togther, to shorten the usage string
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9799 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-04-21 16:04:50 +00:00
Assar Westerlund
67422a6b02 s/[gs]et_progname/[gs]etprogname/
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9704 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-02-20 01:44:56 +00:00
Assar Westerlund
946da5d4b2 (print_arg): add a case for arg_strings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9412 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-12-25 17:03:15 +00:00
Assar Westerlund
081ad8ccd6 add stdlib.h and string.h
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8565 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-06 22:15:04 +00:00
Assar Westerlund
41c126a7ce (arg_match_short): backup optind when there's a missing argument so
that the error can point at the flag and not the non-existant argument


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8026 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-03-09 07:49:35 +00:00
Assar Westerlund
1852dc267f (mandoc_template): also fix no- prefix in .Sh OPTIONS
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7941 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-02-13 21:06:43 +00:00
Assar Westerlund
60e3154876 (mandoc_template): better man-stuff for negative options
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7938 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-02-13 20:50:13 +00:00
Johan Danielsson
3ca5f8150f remove advertising clause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7463 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 16:58:55 +00:00
Assar Westerlund
6e2f0bddfe add a new type of argument: `arg_counter'
re-organize the code somewhat


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7351 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-11-12 15:34:51 +00:00
Johan Danielsson
a8827e2cb4 change the way arg_collect works; it's still quite horrible though
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7184 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-10-18 17:13:43 +00:00
Assar Westerlund
8f1b20431e (getarg): also set optind when returning error
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7112 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-10-05 22:43:28 +00:00
Johan Danielsson
014b3527e7 add a callback type to do more complicated processing
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7023 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-24 14:47:56 +00:00
Johan Danielsson
5486efe053 add floating point support
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7022 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-24 12:59:53 +00:00
Assar Westerlund
8e441f1158 strc{py,at}_truncate -> strlc{py,at}
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6983 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-16 20:06:06 +00:00
Assar Westerlund
66b3034e8e more braces
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5226 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-11-22 09:45:42 +00:00
Assar Westerlund
3719f25eed (arg_printusage): new parameter `progname'. NULL means __progname.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5125 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-08-18 20:25:47 +00:00
Johan Danielsson
a5f54865d4 merge strcpy_truncate branch
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5027 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-06-09 19:25:40 +00:00
Johan Danielsson
590817e798 (mandoc_template): Put short and long options in SYNOPSIS within the
same [ ] pair.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4997 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-31 01:24:01 +00:00
Johan Danielsson
052559a46f (arg_printusage): try to keep options shorter than column width
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4990 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-29 22:14:08 +00:00
Johan Danielsson
ea1a268a98 (mandoc_template): Put short and long options in DESCRIPTION on the
same line.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4976 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-28 23:19:12 +00:00
Johan Danielsson
c62e897e69 (arg_match_long): make sure you only get an exact match if the strings
are the same length


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4972 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-28 22:04:57 +00:00
Johan Danielsson
9d2c40aa7a Fix long form of negative flags.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4342 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-01-22 20:23:16 +00:00
Assar Westerlund
aa6cce306f (print_arg): take care of impossible case.
(arg_match_long): initialize variables to get rid of warnings.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4201 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-12-15 00:01:19 +00:00
Assar Westerlund
9b7dd54006 removed unused variable
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4089 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-12-04 03:37:17 +00:00
Johan Danielsson
aae2360a45 Add mandoc help back-end to getarg.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4080 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-11-30 13:56:51 +00:00
Johan Danielsson
96529dcd8d Add strings option.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2821 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-08 22:40:17 +00:00
Johan Danielsson
fb5c1e4044 Add statement after `out' label.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2656 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-27 16:19:51 +00:00
Assar Westerlund
358e048a00 fix bug parsing `no'
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2634 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-25 15:36:06 +00:00
Johan Danielsson
60088b2061 Handle `-f arg' correctly.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2579 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-24 06:13:56 +00:00
Assar Westerlund
8870be78cb clearer code
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2454 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-19 01:25:13 +00:00
Assar Westerlund
48ef709a3f n -> number, s -> string
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2453 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-19 01:18:42 +00:00
Assar Westerlund
3daaa8484a support a string for the argument name
print negative flags with `no-'


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2452 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-19 01:12:42 +00:00