aboutsummaryrefslogtreecommitdiff
path: root/toys/dirname.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-11-27 01:19:40 -0600
committerRob Landley <rob@landley.net>2007-11-27 01:19:40 -0600
commitb938705155af45d3cc2cd6c8583e496795e79c0d (patch)
tree44d0f52b40268cdb701d4c0ef45f95f0653defcd /toys/dirname.c
parent860902c175ba5d4965159b31e942e7f6c0933b50 (diff)
downloadtoybox-b938705155af45d3cc2cd6c8583e496795e79c0d.tar.gz
Add comment and very minor tweak.
Diffstat (limited to 'toys/dirname.c')
-rw-r--r--toys/dirname.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/toys/dirname.c b/toys/dirname.c
index 454a5d67..b33836b6 100644
--- a/toys/dirname.c
+++ b/toys/dirname.c
@@ -1,8 +1,14 @@
+/* vi: set sw=4 ts=4: */
+/* dirname.c - print directory portion of path, or "." if none.
+ *
+ * See http://www.opengroup.org/onlinepubs/009695399/utilities/dirname.html
+ */
+
#include "toys.h"
#include <libgen.h>
int dirname_main(void)
{
- puts(dirname(toys.optargs[0]));
+ puts(dirname(*toys.optargs));
return 0;
}