Hindi was missing in docs! Attempting wide-string uppercasing.

This commit is contained in:
William Kendrick 2004-09-14 07:42:38 +00:00
parent c34f0fd02c
commit 197b401549
3 changed files with 62 additions and 4 deletions

View file

@ -9,7 +9,7 @@
[2]bill@newbreedsoftware.com
[3]http://www.newbreedsoftware.com/tuxpaint/
June 14, 2002 - September 13, 2004
June 14, 2002 - September 14, 2004
---------------------------------------------------------------------------
@ -408,6 +408,8 @@ Options
|----------------------+--------------------+-----------|
|hebrew | | |
|----------------------+--------------------+-----------|
|hindi | | |
|----------------------+--------------------+-----------|
|hungarian |magyar | |
|----------------------+--------------------+-----------|
|icelandic |islenska | |
@ -653,6 +655,8 @@ Options
|---------------+-------------------+---------------------|
|he_IL (*) | |Hebrew |
|---------------+-------------------+---------------------|
|hi_IN (*) | |Hindi |
|---------------+-------------------+---------------------|
|hr_HR |Hrvatski |Croatian |
|---------------+-------------------+---------------------|
|hu_HU |Magyar |Hungarian |

View file

@ -23,7 +23,7 @@ New Breed Software</p>
<p><a href="mailto:bill@newbreedsoftware.com">bill@newbreedsoftware.com</a><br>
<a href="http://www.newbreedsoftware.com/tuxpaint/">http://www.newbreedsoftware.com/tuxpaint/</a></p>
<p>June 14, 2002 - September 13, 2004</p>
<p>June 14, 2002 - September 14, 2004</p>
</center>
<hr size=2 noshade>
@ -571,6 +571,11 @@ New Breed Software</p>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><code>hindi</code></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><code>hungarian</code></td>
<td><code>magyar</code></td>
@ -997,6 +1002,11 @@ New Breed Software</p>
<td>&nbsp;</td>
<td>Hebrew</td>
</tr>
<tr>
<td><code>hi_IN</code> (*)</td>
<td>&nbsp;</td>
<td>Hindi</td>
</tr>
<tr>
<td><code>hr_HR</code></td>
<td>Hrvatski</td>

View file

@ -21,7 +21,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
June 14, 2002 - September 13, 2004
June 14, 2002 - September 14, 2004
*/
@ -11621,6 +11621,8 @@ void loadfonts(char * dir, int fatal)
/* Return string as uppercase if that option is set: */
#ifdef OLD_UPPERCASE_CODE
char * uppercase(char * str)
{
char * ustr;
@ -11633,7 +11635,7 @@ char * uppercase(char * str)
for (i = 0; i < strlen(ustr); i++)
ustr[i] = toupper(ustr[i]);
}
#ifdef DEBUG
printf(" ORIGINAL: %s\n"
"UPPERCASE: %s\n\n", str, ustr);
@ -11642,6 +11644,48 @@ char * uppercase(char * str)
return (ustr);
}
#else
char * uppercase(char * str)
{
int i, sz;
wchar_t * dest;
char * ustr;
if (only_uppercase)
{
sz = sizeof(wchar_t) * (strlen(str) + 1);
dest = (wchar_t *) malloc(sz);
ustr = (char *) malloc(sizeof(char) * (strlen(str) + 1));
if (dest != NULL)
{
mbstowcs(dest, str, sz);
for (i = 0; i < strlen(str); i++)
{
dest[i] = towupper(dest[i]);
}
wcstombs(ustr, dest, sizeof(char) * (strlen(str) + 1));
free(dest);
}
printf(" ORIGINAL: %s\n"
"UPPERCASE: %s\n\n", str, ustr);
}
else
{
ustr = strdup(str);
}
return(ustr);
}
#endif
/* Return string in right-to-left mode, if necessary: */