mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-14 21:47:19 +02:00
version 0.2.1
This commit is contained in:
parent
3d637328c9
commit
9bf8ce27bc
35 changed files with 714 additions and 274 deletions
22
g10/g10.c
22
g10/g10.c
|
@ -116,7 +116,7 @@ wrong_args( const char *text)
|
|||
fputs(_("Usage: g10 [options] "),stderr);
|
||||
fputs(text,stderr);
|
||||
putc('\n',stderr);
|
||||
exit(2);
|
||||
g10_exit(2);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -150,14 +150,14 @@ set_cmd( enum cmd_values *ret_cmd, enum cmd_values new_cmd )
|
|||
cmd = aKModeC;
|
||||
else {
|
||||
log_error(_("conflicting commands\n"));
|
||||
exit(2);
|
||||
g10_exit(2);
|
||||
}
|
||||
|
||||
*ret_cmd = cmd;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
void
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
static ARGPARSE_OPTS opts[] = {
|
||||
|
@ -237,6 +237,8 @@ main( int argc, char **argv )
|
|||
enum cmd_values cmd = 0;
|
||||
|
||||
|
||||
secmem_init( 16384 );
|
||||
|
||||
i18n_init();
|
||||
opt.compress = -1; /* defaults to standard compress level */
|
||||
opt.def_cipher_algo = CIPHER_ALGO_BLOWFISH;
|
||||
|
@ -397,7 +399,7 @@ main( int argc, char **argv )
|
|||
errors++;
|
||||
}
|
||||
if( errors )
|
||||
exit(2);
|
||||
g10_exit(2);
|
||||
|
||||
|
||||
set_debug();
|
||||
|
@ -673,7 +675,17 @@ main( int argc, char **argv )
|
|||
/* cleanup */
|
||||
FREE_STRLIST(remusr);
|
||||
FREE_STRLIST(locusr);
|
||||
return log_get_errorcount(0)? 2:0;
|
||||
g10_exit(0);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
g10_exit( int rc )
|
||||
{
|
||||
if( opt.verbose )
|
||||
secmem_dump_stats();
|
||||
secmem_term();
|
||||
exit( rc? rc : log_get_errorcount(0)? 2:0 );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue