mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
edit-key is now complete
This commit is contained in:
parent
1a80de41a5
commit
5ae562b41d
48 changed files with 2044 additions and 984 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Jul 29 14:53:34 1998 Werner Koch (wk@(none))
|
||||
|
||||
* ttyio.c (tty_get_answer_is_yes): New.
|
||||
|
||||
Tue Jul 21 10:35:48 1998 Werner Koch (wk@(none))
|
||||
|
||||
* argparse.c: New option flag to distinguish options and commands.
|
||||
|
|
|
@ -91,3 +91,4 @@ answer_is_yes( const char *s )
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ secmem_malloc( size_t size )
|
|||
}
|
||||
/* allocate a new block */
|
||||
if( (poollen + size <= poolsize) ) {
|
||||
mb = pool + poollen;
|
||||
mb = (void*)((char*)pool + poollen);
|
||||
poollen += size;
|
||||
mb->size = size;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ secmem_realloc( void *p, size_t newsize )
|
|||
return p; /* it is easier not to shrink the memory */
|
||||
a = secmem_malloc( newsize );
|
||||
memcpy(a, p, size);
|
||||
memset(a+size, 0, newsize-size);
|
||||
memset((char*)a+size, 0, newsize-size);
|
||||
secmem_free(p);
|
||||
return a;
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ secmem_free( void *a )
|
|||
int
|
||||
m_is_secure( const void *p )
|
||||
{
|
||||
return p >= pool && p < (pool+poolsize);
|
||||
return p >= pool && p < ((char*)pool+poolsize);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
12
util/ttyio.c
12
util/ttyio.c
|
@ -328,3 +328,15 @@ tty_kill_prompt()
|
|||
last_prompt_len = 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
tty_get_answer_is_yes( const char *prompt )
|
||||
{
|
||||
int yes;
|
||||
char *p = tty_get( prompt );
|
||||
tty_kill_prompt();
|
||||
yes = answer_is_yes(p);
|
||||
m_free(p);
|
||||
return yes;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue