[EXIM] new wishlist: uc

Top Page
Delete this message
Reply to this message
Author: albast
Date:  
To: exim-users
Subject: [EXIM] new wishlist: uc
Hi,

What about adding expansion to uppercase, in addition to lowercase?


--- expand.c.orig       Sun Aug  9 13:45:45 1998
+++ expand.c    Sun Aug  9 13:46:13 1998
@@ -1441,13 +1441,16 @@
       continue;
       }


-    /* lc lowercases */
+    /* lc lowercases; uc uppercases */


-    if (strcmp(name, "lc") == 0)
+    if (strcmp(name, "lc") == 0 || strcmp(name, "uc") == 0)
       {
       int count = 0;
       char *t = sub - 1;
-      while (*(++t) != 0) { *t = tolower(*t); count++; }
+      if (strcmp(name, "lc") == 0)
+        { while (*(++t) != 0) { *t = tolower(*t); count++; } }
+      else
+        { while (*(++t) != 0) { *t = toupper(*t); count++;} }
       yield = string_cat(yield, &size, &ptr, sub, count);
       continue;
       }



Regards,
--
     Jeroen Hogeveen  //   Users to the left of me, bosses to the right;
    albast@???  //   here I am -- stuck in the middle with root.


Any opinions expressed herein are not those of present nor past employers.

--
*** Exim information can be found at http://www.exim.org/ ***