1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 16:50:58 +01:00

17582: Improved option argument handling.

unposted: Updated version to 4.1.0-dev-6 because of interface change.
This commit is contained in:
Peter Stephenson 2002-08-27 21:10:30 +00:00
parent 043c302261
commit 9634760d5e
38 changed files with 1023 additions and 662 deletions

View file

@ -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;