use the pedantically correct compiler for preprocessing
[oweals/busybox.git] / docs / new-applet-HOWTO.txt
index c27aef828cd6d308ba4207b520a49971d346ff9c..1f5c3ebd5318e772d50f3d423ee129394e4a4ca9 100644 (file)
@@ -61,34 +61,44 @@ int mu_main(int argc, char **argv)
 
 ----end example code------
 
+
+Coding Style
+------------
+
+Before you submit your applet for inclusion in BusyBox, (or better yet, before
+you _write_ your applet) please read through the style guide in the docs
+directory and make your program compliant.
+
+
+Some Words on libbb
+-------------------
+
 As you are writing your applet, please be aware of the body of pre-existing
-useful functions in utility.c. Use these instead of reinventing the wheel.
+useful functions in libbb. Use these instead of reinventing the wheel.
+
 Additionally, if you have any useful, general-purpose functions in your
 program that could be useful in another program, consider putting them in
-utility.c.
-
-Furthermore, please read through the style guide in the docs directory and
-make your program compliant.
+libbb.
 
 
 Usage String(s)
 ---------------
 
-Next, add usage information for you applet to usage.c. This should look like
+Next, add usage information for you applet to usage.h. This should look like
 the following:
 
-       #if defined BB_MU
-       const char mu_usage[] =
-               "mu\n"
-       #ifndef BB_FEATURE_TRIVIAL_HELP
-               "\nReturns an indeterminate value.\n"
-       #endif
-               ;
+       #define mu_trivial_usage \
+               "-[abcde] FILES"
+       #define mu_full_usage \
+               "Returns an indeterminate value.\n\n" \
+               "Options:\n" \
+               "\t-a\t\tfirst function\n" \
+               "\t-b\t\tsecond function\n" \
 
 If your program supports flags, the flags should be mentioned on the first
-line (mu -[bcRovma]) and a detailed description of each flag should go in the
-BB_FEATURE_TRIVIAL_HELP section, one flag per line. (Numerous examples of this
-currently exist in utility.c.)
+line (-[abcde]) and a detailed description of each flag should go in the
+mu_full_usage section, one flag per line. (Numerous examples of this
+currently exist in usage.h.)
 
 
 Header Files