about summary refs log tree commit diff
path: root/Src/Zle/zle_main.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/Zle/zle_main.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/Zle/zle_main.c')
-rw-r--r--Src/Zle/zle_main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index e1429a0d0..1c45d120c 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -951,7 +951,7 @@ mod_export char *varedarg;
 
 /**/
 static int
-bin_vared(char *name, char **args, char *ops, int func)
+bin_vared(char *name, char **args, Options ops, int func)
 {
     char *s, *t, *ova = varedarg;
     struct value vbuf;
@@ -1012,11 +1012,11 @@ bin_vared(char *name, char **args, char *ops, int func)
 		break;
 	    case 'h':
 		/* -h option -- enable history */
-		ops['h'] = 1;
+		ops->ind['h'] = 1;
 		break;
 	    case 'e':
 		/* -e option -- enable EOF */
-		ops['e'] = 1;
+		ops->ind['e'] = 1;
 		break;
 	    default:
 		/* unrecognised option character */
@@ -1113,14 +1113,14 @@ bin_vared(char *name, char **args, char *ops, int func)
 
     varedarg = *args;
     ifl = isfirstln;
-    if (ops['h'])
+    if (OPT_ISSET(ops,'h'))
 	hbegin(2);
-    isfirstln = ops['e'];
+    isfirstln = OPT_ISSET(ops,'e');
     ieof = opts[IGNOREEOF];
     opts[IGNOREEOF] = 0;
-    t = (char *) zleread(p1, p2, ops['h'] ? ZLRF_HISTORY : 0);
+    t = (char *) zleread(p1, p2, OPT_ISSET(ops,'h') ? ZLRF_HISTORY : 0);
     opts[IGNOREEOF] = ieof;
-    if (ops['h'])
+    if (OPT_ISSET(ops,'h'))
 	hend(NULL);
     isfirstln = ifl;
     varedarg = ova;