mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
some cleanups
This commit is contained in:
parent
98211af4a7
commit
6b91e7762c
49 changed files with 1737 additions and 452 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Mar 19 11:29:03 1998 Werner Koch (wk@isil.d.shuttle.de)
|
||||
|
||||
* strgutil.c (memistr): Add const to return and first arg.
|
||||
|
||||
Sat Mar 7 11:54:35 1998 Werner Koch (wk@isil.d.shuttle.de)
|
||||
|
||||
* miscutil.c (print_string): New arg delim; changed all callers.
|
||||
|
|
|
@ -71,6 +71,7 @@ g10_errstr( int err )
|
|||
X(RENAME_FILE ,"File rename error")
|
||||
X(DELETE_FILE ,"File delete error")
|
||||
X(UNEXPECTED ,"Unexpected data")
|
||||
X(TIME_CONFLICT ,"Timestamp conflict")
|
||||
|
||||
default: p = buf; sprintf(buf, "g10err=%d", err); break;
|
||||
}
|
||||
|
|
|
@ -77,15 +77,15 @@ strlist_last( STRLIST node )
|
|||
* substring in BUF or NULL if not found.
|
||||
* Comparison is case-in-sensitive.
|
||||
*/
|
||||
char *
|
||||
memistr( char *buf, size_t buflen, const char *sub )
|
||||
const char *
|
||||
memistr( const char *buf, size_t buflen, const char *sub )
|
||||
{
|
||||
const byte *t, *s ;
|
||||
size_t n;
|
||||
|
||||
for( t=buf, n=buflen, s=sub ; n ; t++, n-- )
|
||||
if( toupper(*t) == toupper(*s) ) {
|
||||
for( buf=(char*)t++, buflen = n--, s++;
|
||||
for( buf=t++, buflen = n--, s++;
|
||||
n && toupper(*t) == toupper(*s); t++, s++, n-- )
|
||||
;
|
||||
if( !*s )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue