diff options
Diffstat (limited to 'g10')
-rw-r--r-- | g10/ChangeLog | 10 | ||||
-rw-r--r-- | g10/armor.c | 4 | ||||
-rw-r--r-- | g10/g10.c | 7 | ||||
-rw-r--r-- | g10/getkey.c | 7 | ||||
-rw-r--r-- | g10/keyedit.c | 2 | ||||
-rw-r--r-- | g10/keygen.c | 12 | ||||
-rw-r--r-- | g10/openfile.c | 2 | ||||
-rw-r--r-- | g10/ringedit.c | 4 |
8 files changed, 27 insertions, 21 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 2b56b82a2..03a52b153 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,13 @@ +2001-06-12 Werner Koch <[email protected]> + + * getkey.c (compare_name): Use ascii_memistr(), ascii_memcasecmp() + * keyedit.c (keyedit_menu): Use ascii_strcasecmp(). + * armor.c (radix64_read): Use ascii_toupper(). + * ringedit.c (do_bm_search): Ditto. + * keygen.c (read_parameter_file): Ditto. + * openfile.c (CMP_FILENAME): Ditto. + * g10.c (i18n_init): We can now use just LC_ALL. + 2001-05-29 Werner Koch <[email protected]> * keygen.c (generate_subkeypair): Print a warning if a subkey is diff --git a/g10/armor.c b/g10/armor.c index 8ffa5e6ea..a9c520ab5 100644 --- a/g10/armor.c +++ b/g10/armor.c @@ -649,9 +649,9 @@ radix64_read( armor_filter_context_t *afx, IOBUF a, size_t *retn, if( isxdigit(cc1) && isxdigit(cc2) && strchr( "=\n\r\t ", cc3 )) { /* well it seems to be the case - adjust */ - c = isdigit(cc1)? (cc1 - '0'): (toupper(cc1)-'A'+10); + c = isdigit(cc1)? (cc1 - '0'): (ascii_toupper(cc1)-'A'+10); c <<= 4; - c |= isdigit(cc2)? (cc2 - '0'): (toupper(cc2)-'A'+10); + c |= isdigit(cc2)? (cc2 - '0'): (ascii_toupper(cc2)-'A'+10); afx->buffer_pos += 2; afx->qp_detected = 1; goto again; @@ -513,12 +513,7 @@ i18n_init(void) set_gettext_file( PACKAGE ); #else #ifdef ENABLE_NLS - #ifdef HAVE_LC_MESSAGES - setlocale( LC_TIME, "" ); - setlocale( LC_MESSAGES, "" ); - #else - setlocale( LC_ALL, "" ); - #endif + setlocale( LC_ALL, "" ); bindtextdomain( PACKAGE, G10_LOCALEDIR ); textdomain( PACKAGE ); #endif diff --git a/g10/getkey.c b/g10/getkey.c index f2f831b9b..bd21f956f 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -1273,7 +1273,7 @@ compare_name( const char *uid, size_t uidlen, const char *name, int mode ) return 0; /* found */ } else if( mode == 2 ) { /* case insensitive substring */ - if( memistr( uid, uidlen, name ) ) + if( ascii_memistr( uid, uidlen, name ) ) return 0; } else if( mode >= 3 && mode <= 5 ) { /* look at the email address */ @@ -1287,11 +1287,12 @@ compare_name( const char *uid, size_t uidlen, const char *name, int mode ) if( i < uidlen ) { i = se - s; if( mode == 3 ) { /* exact email address */ - if( strlen(name)-2 == i && !memicmp( s, name+1, i) ) + if( strlen(name)-2 == i + && !ascii_memcasecmp( s, name+1, i) ) return 0; } else if( mode == 4 ) { /* email substring */ - if( memistr( s, i, name ) ) + if( ascii_memistr( s, i, name ) ) return 0; } else { /* email from end */ diff --git a/g10/keyedit.c b/g10/keyedit.c index ca141b4a4..1a948d038 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -721,7 +721,7 @@ keyedit_menu( const char *username, STRLIST locusr, STRLIST commands, } for(i=0; cmds[i].name; i++ ) { - if( !stricmp( answer, cmds[i].name ) ) + if( !ascii_strcasecmp( answer, cmds[i].name ) ) break; } if( sign_mode && !cmds[i].signmode ) diff --git a/g10/keygen.c b/g10/keygen.c index 2639ac07f..c3e44b553 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -1292,17 +1292,17 @@ read_parameter_file( const char *fname ) ; value = p; trim_trailing_ws( value, strlen(value) ); - if( !stricmp( keyword, "%echo" ) ) + if( !ascii_strcasecmp( keyword, "%echo" ) ) log_info("%s\n", value ); - else if( !stricmp( keyword, "%dry-run" ) ) + else if( !ascii_strcasecmp( keyword, "%dry-run" ) ) outctrl.dryrun = 1; - else if( !stricmp( keyword, "%commit" ) ) { + else if( !ascii_strcasecmp( keyword, "%commit" ) ) { outctrl.lnr = lnr; proc_parameter_file( para, fname, &outctrl ); release_parameter_list( para ); para = NULL; } - else if( !stricmp( keyword, "%pubring" ) ) { + else if( !ascii_strcasecmp( keyword, "%pubring" ) ) { if( outctrl.pub.fname && !strcmp( outctrl.pub.fname, value ) ) ; /* still the same file - ignore it */ else { @@ -1311,7 +1311,7 @@ read_parameter_file( const char *fname ) outctrl.use_files = 1; } } - else if( !stricmp( keyword, "%secring" ) ) { + else if( !ascii_strcasecmp( keyword, "%secring" ) ) { if( outctrl.sec.fname && !strcmp( outctrl.sec.fname, value ) ) ; /* still the same file - ignore it */ else { @@ -1344,7 +1344,7 @@ read_parameter_file( const char *fname ) trim_trailing_ws( value, strlen(value) ); for(i=0; keywords[i].name; i++ ) { - if( !stricmp( keywords[i].name, keyword ) ) + if( !ascii_strcasecmp( keywords[i].name, keyword ) ) break; } if( !keywords[i].name ) { diff --git a/g10/openfile.c b/g10/openfile.c index f207dd2bb..99b81fe7b 100644 --- a/g10/openfile.c +++ b/g10/openfile.c @@ -43,7 +43,7 @@ #endif #ifdef HAVE_DRIVE_LETTERS - #define CMP_FILENAME(a,b) stricmp( (a), (b) ) + #define CMP_FILENAME(a,b) ascii_strcasecmp( (a), (b) ) #else #define CMP_FILENAME(a,b) strcmp( (a), (b) ) #endif diff --git a/g10/ringedit.c b/g10/ringedit.c index 5e9102477..f89bda35d 100644 --- a/g10/ringedit.c +++ b/g10/ringedit.c @@ -1000,8 +1000,8 @@ do_bm_search( const byte *buf, size_t buflen, int c, c1; for( i = --patlen; i < buflen; i += dist[c1] ) - for( j=patlen, k=i, c1=c=toupper(buf[k]); c == pat[j]; - j--, k--, c=toupper(buf[k]) ) { + for( j=patlen, k=i, c1=c=ascii_toupper(buf[k]); c == pat[j]; + j--, k--, c=ascii_toupper(buf[k]) ) { if( !j ) return buf+k; } |