Skip to content

Commit 779d891

Browse files
committed
Microprojects: Add idea: option macros with no --no-xxx form
Suggested-by: Duy Nguyen <pclouds@gmail.com>
1 parent cf1557c commit 779d891

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

SoC-2014-Microprojects.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,13 @@ too ambitious and not get it done.
148148
more readable than `starts_with()`?</s> **taken**
149149

150150
11. Find places where we scan a string twice unnecessarily, once with
151-
`strchr()` and then with `strlen()`, and rewrite such a pattern
152-
using `strchrnul()` as appropriate.
151+
`strchr()` and then with `strlen()`, and rewrite these sites using
152+
`strchrnul()` when appropriate.
153+
154+
12. Currently in order to disallow the `--[no]-xxx` form of a
155+
command-line option, we have to initialize the option's full
156+
`struct option` explicitly. It'd be nice to have a set of OPT_*
157+
macros with PARSE_OPT_NONEG set. Find and update all `struct
158+
option []` declarations with the new macros (including ones that
159+
should never accept `--no-xxx` form, but do anyway). *Warning:
160+
this is more a milliproject than a microproject.*

0 commit comments

Comments
 (0)