| Index
» Projects
» libcfg+
» Bug list
» Bug #14 |
 |
|
Viewing Bug Advanced Details |
[ Jump to Bugnotes ]
[ Bug History ]
[ Print ]
|
|
ID |
Category |
Severity |
Reproducibility |
Date Submitted |
Last Update |
|
0000014 |
library core |
feature |
always |
2003-01-12 17:10 |
2003-04-26 03:00 |
|
|
|
Reporter |
rajo |
View Status |
public |
|
|
Assigned To |
nepto |
|
Priority |
normal |
Resolution |
not a bug |
Platform |
|
|
Status |
resolved |
Duplicate ID |
|
OS |
|
|
Projection |
none |
|
Version |
|
|
ETA |
none |
|
Product Version |
current from CVS |
|
|
Product Build |
|
|
|
Votes |
1 |
|
|
|
Summary |
can't use both CFG_LINE_SHORT_OPTION_PREFIX= |
|
Description |
It is not possible mix empty CFG_LINE_SHORT_OPTION_PREFIX and CFG_LINE_LONG_OPTION_PREFIX.
|
|
Steps To Reproduce |
Aply this patch:
---BEGIN OF PATCH---
<code>
--- cfg+.c.orig Sun Jan 12 16:53:56 2003
+++ cfg+.c Sun Jan 12 17:00:39 2003
@@ -542,6 +542,14 @@
con = cfg_get_context(options);
+ cfg_clear_property(con, CFG_LINE_SHORT_OPTION_PREFIX);
+ cfg_add_properties(con, CFG_LINE_SHORT_OPTION_PREFIX, "", CFG_EOT);
+ cfg_clear_property(con, CFG_LINE_LONG_OPTION_PREFIX);
+ cfg_add_properties(con, CFG_LINE_LONG_OPTION_PREFIX, "", CFG_EOT);
+ /*
+ */
+
+
for (i = 0; ; i++) {
/* This is powerful testing stuff :)
</code>
---END OF PATCH---
Then compile:
<pre>
17:03 amd2 [~/prog/cvs/libcfg+/src]: gcc -DHAVE_CONFIG_H -I. -I. -I..
-O2 -Wall -Wno-shadow -DSELF_CFG *.c platon/str/charsets.c
platon/str/colors.c platon/str/dynfgets.c platon/str/strconv.c
platon/str/strctype.c platon/str/strdyn.c platon/str/strplus.c
</pre>
And run:
<pre>
17:03 amd2 [~/prog/cvs/libcfg+/src]: ./a.out int 4
+------------------+
| Error printing |
+------------------+
***** argument 'nt' for option 'i' could not be converted to appropriate numeric type at position 2 on command line
***** cmdline error -5 at 1: option could not be converted to appropriate numeric type
***** opt = 'i', arg = 'nt', idx = 1, argv[idx] = 'int'
<pre> |
|
Additional Information / Solution |
|
|
Attached Files |
|
|
|
|
Bug Notes |
nepto
2003-01-12 19:30
|
This is known issue. Parser cannot determine, if the empty prefix belongs to short or long option. Use empty prefix only for long options to get the desirable behaviour. |
|
|
nepto
2003-01-31 16:07
|
As it was already written, this behaviour is not a bug. |
|
|
|
|