about summary refs log tree commit diff
path: root/Src/Modules/socket.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-08-27 21:10:30 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-08-27 21:10:30 +0000
commit9634760d5eae4e8618e4b9ed9752d7305b3695a9 (patch)
treefc717bec9a623d6e80f2c4544cec14b8b8eb07da /Src/Modules/socket.c
parent043c302261dfee52e54e9a6c42b4ebcc2f7ccd33 (diff)
downloadzsh-9634760d5eae4e8618e4b9ed9752d7305b3695a9.tar.gz
zsh-9634760d5eae4e8618e4b9ed9752d7305b3695a9.tar.xz
zsh-9634760d5eae4e8618e4b9ed9752d7305b3695a9.zip
17582: Improved option argument handling.
unposted: Updated version to 4.1.0-dev-6 because of interface change.
Diffstat (limited to 'Src/Modules/socket.c')
-rw-r--r--Src/Modules/socket.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Src/Modules/socket.c b/Src/Modules/socket.c
index b676e2d36..2b70eba6d 100644
--- a/Src/Modules/socket.c
+++ b/Src/Modules/socket.c
@@ -58,7 +58,7 @@
 #endif
 
 static int
-bin_zsocket(char *nam, char **args, char *ops, int func)
+bin_zsocket(char *nam, char **args, Options ops, int func)
 {
     int err=1, verbose=0, test=0, targetfd=0;
     SOCKLEN_T len;
@@ -66,13 +66,13 @@ bin_zsocket(char *nam, char **args, char *ops, int func)
     struct sockaddr_un soun;
     int sfd;
 
-    if (ops['v'])
+    if (OPT_ISSET(ops,'v'))
 	verbose = 1;
 
-    if (ops['t'])
+    if (OPT_ISSET(ops,'t'))
 	test = 1;
 
-    if (ops['d']) {
+    if (OPT_ISSET(ops,'d')) {
 	targetfd = atoi(args[0]);
 	dargs = args + 1;
 	if (!targetfd) {
@@ -84,7 +84,7 @@ bin_zsocket(char *nam, char **args, char *ops, int func)
 	dargs = args;
 
 
-    if (ops['l']) {
+    if (OPT_ISSET(ops,'l')) {
 	char *localfn;
 
 	if (!dargs[0]) {
@@ -135,7 +135,7 @@ bin_zsocket(char *nam, char **args, char *ops, int func)
 	return 0;
 
     }
-    else if (ops['a'])
+    else if (OPT_ISSET(ops,'a'))
     {
 	int lfd, rfd;