From 68771c00530622b5bc52438ae8010c7a6f429791 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 10 Jul 2015 14:23:00 -0500 Subject: More explanation of TOYBOX_DEBUG for option string checking. --- www/code.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/www/code.html b/www/code.html index a458b52c..a1c08efe 100644 --- a/www/code.html +++ b/www/code.html @@ -233,6 +233,18 @@ where execution of your command starts. Your command line options are already sorted into this.optflags, this.optargs, this.optc, and the GLOBALS() as appropriate by the time this function is called. (See get_optflags() for details.)

+ +
  • Switch on TOYBOX_DEBUG in menuconfig (toybox global settings menu) +the first time you build and run your new command. If anything is wrong +with your option string, that will give you error messages.

    + +

    Otherwise it'll just segfault without +explanation when it falls off the end because it didn't find a matching +end parantheses for a longopt, or you put a nonexistent option in a square +bracket grouping... Since these kind of errors can only be caused by a +developer, not by end users, we don't normally want runtime checks for +them. Once you're happy with your option string, you can switch TOYBOX_DEBUG +back off.

  • Headers.

    -- cgit v1.2.3