From 1e103ebef330694fe94889127df2c166aa4804a1 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Sun, 16 Dec 2001 20:53:44 +0000 Subject: 16345: (n) flag to remove duplicate array values during expansion. --- Src/params.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Src/params.c') diff --git a/Src/params.c b/Src/params.c index 22346896d..cb08b4e6a 100644 --- a/Src/params.c +++ b/Src/params.c @@ -2490,6 +2490,23 @@ uniqarray(char **x) } } +/**/ +void +zhuniqarray(char **x) +{ + char **t, **p = x; + + if (!x || !*x) + return; + while (*++p) + for (t = x; t < p; t++) + if (!strcmp(*p, *t)) { + *p = NULL; + for (t = p--; (*t = t[1]) != NULL; t++); + break; + } +} + /* Function to get value of special parameter `#' and `ARGC' */ /**/ -- cgit 1.4.1