From 5340de2a2eec44a58e978ff51bcd096d7f45425f Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Thu, 12 Jan 2006 21:09:58 +0000 Subject: [PATCH] more fixes to utitle git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8393 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Swig/misc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/SWIG/Source/Swig/misc.c b/SWIG/Source/Swig/misc.c index 19f99c15a..b05d28c32 100644 --- a/SWIG/Source/Swig/misc.c +++ b/SWIG/Source/Swig/misc.c @@ -195,11 +195,13 @@ String *Swig_string_utitle(String *s) { Seek(s,0,SEEK_SET); while ((c = Getc(s)) != EOF) { - if (isupper(c)) { - if (first) Putc('_',ns); - first = 0; - } else { - first = 1; + if (isalpha(c)) { + if (isupper(c)) { + if (first) Putc('_',ns); + first = 0; + } else { + first = 1; + } } Putc(tolower(c),ns); }