From 1864b27857c71b998dd201acaaa3c8664b8be960 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 11 Jul 2005 07:43:36 +0000 Subject: r8317: convert the example scripts over to the new GetOptions() call (This used to be commit 5f079d74630cf6431ec8af7240f60054cf8b9ab7) --- testprogs/ejs/argv.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'testprogs/ejs/argv.js') diff --git a/testprogs/ejs/argv.js b/testprogs/ejs/argv.js index 2f8dc74174..093123014a 100644 --- a/testprogs/ejs/argv.js +++ b/testprogs/ejs/argv.js @@ -1,7 +1,18 @@ /* - demonstrate use of argv + demonstrate use of GetOptions */ +var ok; +var options = new Object(); + +ok = GetOptions(ARGV, options, + "POPT_AUTOHELP", + "POPT_COMMON_SAMBA", + "myopt=s", + "intopt=i", + "noopt"); +printVars(ok); + println("You called this script with arguments:"); -printVars(ARGV); +printVars(options); -- cgit