From 55af8e49668b32bdfee8a8bc8a9440673ad7f367 Mon Sep 17 00:00:00 2001 From: axel Date: Wed, 31 Jan 2007 06:43:44 +1000 Subject: [PATCH] Add support for checking the existance of specific variable array elements darcs-hash:20070130204344-ac50b-d006de7693722677d052f7559923753acd27a4a2.gz --- builtin_set.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/builtin_set.c b/builtin_set.c index 0ef50d0ec..2bf1ef3ac 100644 --- a/builtin_set.c +++ b/builtin_set.c @@ -621,10 +621,55 @@ static int builtin_set( wchar_t **argv ) int i; for( i=woptind; i al_get_count( &result ) ) + { + retcode++; + } + } + } + else + { + if( !env_exist( arg, scope ) ) + { + retcode++; + } + } + + free( dest ); } return retcode;