OSDN Git Service

Rename test_*.c to demo_*.c (because "make test_$CMD" means something already),
authorRob Landley <rob@landley.net>
Tue, 31 Oct 2017 20:51:02 +0000 (15:51 -0500)
committerRob Landley <rob@landley.net>
Tue, 31 Oct 2017 20:51:02 +0000 (15:51 -0500)
fluff out README, and add a comment to hostid explaining its deprecation.

toys/example/README
toys/example/demo_human_readable.c [moved from toys/example/test_human_readable.c with 100% similarity]
toys/example/demo_many_options.c [moved from toys/example/test_many_options.c with 100% similarity]
toys/example/demo_scankey.c [moved from toys/example/test_scankey.c with 100% similarity]
toys/example/demo_utf8towc.c [moved from toys/example/test_utf8towc.c with 100% similarity]
toys/example/hostid.c

index d0f6631..a3af851 100644 (file)
@@ -2,3 +2,13 @@ Example commands
 
 You probably don't want to deploy this, but it shows how to use the
 toybox infrastructure and provides templates for new commands.
+
+The hello.c and skeleton.c commands provide templates: hello.c is clean and
+simple, skeleton.c demonstrates the option parsing infrastructure and having
+multiple commands per file. When writing a new command, copying hello.c or
+skeleton.c to the new name may provide a good starting point.
+
+The demo_* commands demonstrate infrastructure.
+
+Other commands in here are obsolete versions still in some recent Linux systems
+(and often still in posix), but not really useful on modern systems.
index feef61b..3d7a8a8 100644 (file)
@@ -3,6 +3,9 @@
  * Copyright 2015 Ranjan Kumar <ranjankumar.bth@gmail.com>
  *
  * No Standard.
+ *
+ * This is still in coreutils and gethostid() in posix, but a "globally unique
+ * 32 bit identifier" is a concept the Linux world has outgrown.
 
 USE_HOSTID(NEWTOY(hostid, ">0", TOYFLAG_USR|TOYFLAG_BIN))