1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

See ChangeLog: Mon Aug 30 20:38:33 CEST 1999 Werner Koch

This commit is contained in:
Werner Koch 1999-08-30 18:48:57 +00:00
parent 28c861268d
commit c2c397bedf
30 changed files with 2129 additions and 1414 deletions

View file

@ -1,3 +1,13 @@
Mon Aug 30 20:38:33 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
* secmem.c (pool_okay): declared volatile.
* miscutil.c (answer_is_yes): Always check for plain "yes".
(answer_is_yes_no_quit): Likewise.
* dotlock.c (create_dotlock): Fixed segv during cleanup.
Mon Jul 12 14:55:34 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>

View file

@ -123,6 +123,7 @@ create_dotlock( const char *file_to_lock )
S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR );
} while( fd == -1 && errno == EINTR );
if( fd == -1 ) {
all_lockfiles = h->next;
log_error( "failed to create temporary file `%s': %s\n",
h->tname, strerror(errno));
m_free(h->tname);

View file

@ -253,11 +253,23 @@ answer_is_yes( const char *s )
{
char *long_yes = _("yes");
char *short_yes = _("yY");
char *long_no = _("no");
char *short_no = _("nN");
if( !stricmp(s, long_yes ) )
return 1;
if( strchr( short_yes, *s ) && !s[1] )
return 1;
/* test for no strings to catch ambiguities for the next test */
if( !stricmp(s, long_no ) )
return 0;
if( strchr( short_no, *s ) && !s[1] )
return 0;
/* test for the english version (for those who are used to type yes) */
if( !stricmp(s, "yes" ) )
return 1;
if( strchr( "yY", *s ) && !s[1] )
return 1;
return 0;
}
@ -269,18 +281,32 @@ int
answer_is_yes_no_quit( const char *s )
{
char *long_yes = _("yes");
char *long_no = _("no");
char *long_quit = _("quit");
char *short_yes = _("yY");
char *short_no = _("nN");
char *short_quit = _("qQ");
if( !stricmp(s, long_yes ) )
return 1;
if( !stricmp(s, long_no ) )
return 0;
if( !stricmp(s, long_quit ) )
return -1;
if( strchr( short_yes, *s ) && !s[1] )
return 1;
if( strchr( short_no, *s ) && !s[1] )
return 0;
if( strchr( short_quit, *s ) && !s[1] )
return -1;
if( !stricmp(s, "yes" ) )
return 1;
if( !stricmp(s, "quit" ) )
return -1;
if( strchr( "yY", *s ) && !s[1] )
return 1;
if( strchr( "qQ", *s ) && !s[1] )
return -1;
return 0;
}

View file

@ -57,7 +57,7 @@ struct memblock_struct {
static void *pool;
static int pool_okay;
static volatile int pool_okay; /* may be checked in an atexit function */
static int pool_is_mmapped;
static size_t poolsize; /* allocated length */
static size_t poollen; /* used length */