do our own upcasing to allow backend debugging in Turkish.

merge-requests/1/head
m. allan noah 2013-09-17 20:53:07 -04:00
rodzic 9229049d4d
commit 3fdf42fe7b
2 zmienionych plików z 18 dodań i 1 usunięć

Wyświetl plik

@ -1,3 +1,7 @@
2013-09-17 m. allan noah <kitno455 at gmail dot com>
* sanei/sanei_init_debug.c: do our own upcasing to allow backend
debugging in Turkish. Revert prior set_locale() patch.
2013-09-16 Gerhard Jaeger <gerhard@gjaeger.de>
* backend/plustek-usbdevs.c: Tweaked motor settings for CanoScan N650U
* backend/plustek.c: Bumped build number

Wyświetl plik

@ -67,6 +67,19 @@
#define BACKEND_NAME sanei_debug
#include "../include/sane/sanei_debug.h"
/* If a frontend enables translations, the system toupper()
* call will use the LANG env var. We need to use ascii
* instead, so the debugging env var name matches the docs.
* This is a particular problem in Turkish, where 'i' does
* not capitalize to 'I' */
char
toupper_ascii (int c)
{
if(c > 0x60 && c < 0x7b)
return c - 0x20;
return c;
}
void
sanei_init_debug (const char * backend, int * var)
{
@ -80,7 +93,7 @@ sanei_init_debug (const char * backend, int * var)
{
if (i >= sizeof (buf) - 1)
break;
buf[i] = toupper(ch);
buf[i] = toupper_ascii(ch);
}
buf[i] = '\0';