<div dir="ltr">Hi Rob, List,<div><br></div><div>There are cases when the long options are of the format</div><div>abc-def. In current implementation FLAG_xxx macros are generated for</div><div>long options too. with __-__ sign in the macro, it will generate errors.</div>
<div><br></div><div>I am of the opinion that __-__ be converted to '_' for generating the FLAG_xxx</div><div>macros and be used in the command.</div><div><br></div><div>This will enable the user to 'abc-def', but be handled like 'abc_def' in code.</div>
<div><br></div><div>Use case for the same is in TAR</div><div><br></div><div>tar same-permissions ....</div><div><br></div><div>OR</div><div><br></div><div>tar no-same-owner ....</div><div><br></div><div>A patch modifying mkflags.c, to handle this is</div>
<div><br></div><div><div>--- a/scripts/mkflags.c<span class="" style="white-space:pre"> </span>2014-03-17 02:57:38.000000000 +0530</div><div>+++ b/scripts/mkflags.c<span class="" style="white-space:pre"> </span>2014-03-19 15:25:33.389610350 +0530</div>
<div>@@ -44,7 +44,7 @@</div><div> blank->lopt = new;</div><div> list = blank;</div><div> }</div><div>- while (*++string != ')'); // An empty longopt () would break this.</div><div>+ while (*++string != ')') if (*string == '-') *string = '_'; // An empty longopt () would break this.</div>
<div> *(string++) = 0;</div><div> continue;</div><div> }</div></div><div><br></div><div>Let me know your opinion on the same.</div><div><br></div><div>regards,</div><div>Ashwini</div></div>