]> andersk Git - moira.git/commitdiff
Don't upcase the next character if we're looking at a character with the high bit set.
authorzacheiss <zacheiss>
Sun, 15 Feb 2004 01:54:32 +0000 (01:54 +0000)
committerzacheiss <zacheiss>
Sun, 15 Feb 2004 01:54:32 +0000 (01:54 +0000)
include/moira.h
lib/fixname.c

index 593877ccc2a15b833fd8894cb0272dc024954d58..658b67f596c0c20ec1698f408caf58711131bd90 100644 (file)
@@ -90,7 +90,7 @@ char *canonicalize_hostname(char *s);
 
 /* prototypes from fixname.c */
 void FixName(char *ilnm, char *ifnm, char *last, char *first, char *middle);
-void FixCase(char *p);
+void FixCase(unsigned char *p);
 void LookForJrAndIII(char *nm, int *pends_jr, int *pends_sr,
                     int *pends_ii, int *pends_iii,
                     int *pends_iv, int *pends_v);
index dc37c0e597c0a65167962cc11c8136775ff95fb6..d77bf37afb17179058a4fe4594ba401c4f79ec20 100644 (file)
@@ -48,7 +48,7 @@ void FixName(char *ilnm, char *ifnm, char *last, char *first, char *middle)
   strncpy(first, ifnm, FIRST_LEN);
 }
 
-void FixCase(char *p)
+void FixCase(unsigned char *p)
 {
   int up;      /* Should next letter be uppercase */
   int pos;     /* Position within word */
@@ -69,6 +69,8 @@ void FixCase(char *p)
        }
       else if (*p == '\'')     /* If ', next letter should be upper only */
        up = (pos == 2);        /* if the ' is the 2nd char in the name */
+      else if (*p >= 0x80)      /* If the high bit is set, don't touch it. */
+       up = 0;
       else
        up = 1;                 /* If other punctuation (eg, -), upper */
     }
This page took 2.344007 seconds and 5 git commands to generate.