From 9cfa958b042845062963a0f8bdedef45a0eaf34d Mon Sep 17 00:00:00 2001
From: vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>
Date: Sun, 3 Sep 2006 12:27:25 +0000
Subject: zcip: getopt -> bb_getopt_ulflags

git-svn-id: svn://busybox.net/trunk/busybox@16037 69ca8d6d-28ef-0310-b511-8ec308f3f277
---
 libbb/getopt_ulflags.c | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'libbb')

diff --git a/libbb/getopt_ulflags.c b/libbb/getopt_ulflags.c
index 19c96914d..e0dc1371f 100644
--- a/libbb/getopt_ulflags.c
+++ b/libbb/getopt_ulflags.c
@@ -36,6 +36,13 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
 	and so on.  You can also look at the return value as a bit
 	field and each option sets one bit.
 
+	On exit, global variable optind is set so that if you
+	will do argc -= optind; argv += optind; then
+	argc will be equal to number of remaining non-option
+	arguments, first one would be in argv[0], next in argv[1] and so on
+	(options and their parameters will be moved into argv[]
+	positions prior to argv[optind]).
+
  ":"    If one of the options requires an argument, then add a ":"
 	after the char in applet_opts and provide a pointer to store
 	the argument.  For example:
-- 
cgit v1.2.3-55-g6feb