Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Sunday, November 8, 2026
About Us
Magazine
Open Source
CVS
Services
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.
 

Bug History
Date Modified Username Field Change
2003-01-12 17:10 rajo New Bug
2003-01-12 19:30 nepto Bugnote Added: 0000008
2003-01-21 19:06 nepto Steps to Reproduce Updated
2003-01-21 19:06 nepto summary can't use both CFG_LINE_SHORT_OPTION_PREFIX="" and CFG_LINE_LONG_OPTION_PREFIX="" => can't use both CFG_LINE_SHORT_OPTION_PREFIX=
2003-01-31 16:07 nepto Bugnote Added: 0000026
2003-01-31 16:07 nepto handler_id => nepto
2003-01-31 16:07 nepto resolution open => not a bug
2003-01-31 16:07 nepto status new => resolved
2003-04-26 03:00 nepto category website / homepage => library core

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy