1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

See ChangeLog: Mon Jan 31 17:48:10 CET 2000 Werner Koch

This commit is contained in:
Werner Koch 2000-01-31 16:48:54 +00:00
parent 100fc8da59
commit f00d949f87
9 changed files with 51 additions and 25 deletions

View File

@ -1,3 +1,7 @@
Mon Jan 31 17:46:35 CET 2000 Werner Koch <wk@>
* Makefile.am: Re-added tools. By Rémi.
Mon Jan 31 16:37:34 CET 2000 Werner Koch <wk@gnupg.de>
* configure.in: Create a symlink for types.h in gcrypt/.

View File

@ -17,7 +17,7 @@ else
checks = checks
endif
SUBDIRS = intl zlib jnlib util mpi cipher ${gcrypt} g10 po doc ${checks}
SUBDIRS = intl zlib jnlib util mpi cipher ${gcrypt} g10 po tools doc ${checks}
EXTRA_DIST = README-alpha VERSION PROJECTS BUGS
# gettext never gets it right, so we take here care of deleting the
# symlink. my_clean_gcrypt is just a kludge until we can include

View File

@ -76,7 +76,7 @@ expect {
expect {
-exact "a test\r
\r \rYou selected this USER-ID:\r
\"Harry H. (a test) <hh@ddorf.de> (INSECURE!)\"\r
\"Harry H. (a test) <hh@ddorf.de>\"\r
\r
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? " { send -- "o\r" }
timeout { exit 1 } }

View File

@ -673,7 +673,7 @@ fi
dnl Temp workarounds:
GNUPG_LINK_FILES(gcrypt/gcrypt.h, gcrypt.h )
GNUPG_LINK_FILES(include/typtes.h, gcrypt/types.h )
GNUPG_LINK_FILES(include/types.h, gcrypt/types.h )
AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)

View File

@ -1,3 +1,9 @@
Mon Jan 31 17:46:35 CET 2000 Werner Koch <wk@>
* Makefile.am: Add libjnlib.
* bftest.c: Some minor hacks to let it compile.
* mpicalc.c: Ditto.
Thu Jul 8 16:21:27 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>

View File

@ -2,7 +2,8 @@
EXTRA_DIST = lspgpot
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl
needed_libs = ../util/libutil.la ../gcrypt/libgcrypt.la @INTLLIBS@
needed_libs = ../gcrypt/libgcrypt.la \
../util/libutil.la ../jnlib/libjnlib.la @INTLLIBS@
noinst_PROGRAMS = mpicalc bftest clean-sat mk-tdata shmtest

View File

@ -38,11 +38,6 @@ my_usage(void)
exit(1);
}
const char *
strusage( int level )
{
return default_strusage(level);
}
static void
i18n_init(void)
@ -53,7 +48,7 @@ i18n_init(void)
#else
setlocale( LC_ALL, "" );
#endif
bindtextdomain( PACKAGE, G10_LOCALEDIR );
bindtextdomain( PACKAGE, GNUPG_LOCALEDIR );
textdomain( PACKAGE );
#endif
}

View File

@ -28,9 +28,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <gcrypt.h>
#include "util.h"
#include "mpi.h"
#include "i18n.h"
#define STACKSIZE 100
@ -38,8 +38,8 @@ static MPI stack[STACKSIZE];
static int stackidx;
const char *
strusage( int level )
static const char *
my_strusage( int level )
{
const char *p;
switch( level ) {
@ -56,7 +56,7 @@ strusage( int level )
"\nSyntax: mpicalc [options] [files]\n"
"MPI RPN calculator\n";
break;
default: p = default_strusage(level);
default: p = NULL;
}
return p;
}
@ -71,11 +71,35 @@ i18n_init(void)
#else
setlocale( LC_ALL, "" );
#endif
bindtextdomain( PACKAGE, G10_LOCALEDIR );
bindtextdomain( PACKAGE, GNUPG_LOCALEDIR );
textdomain( PACKAGE );
#endif
}
int
mpi_print( FILE *fp, MPI a, int mode )
{
int n=0;
if( !a )
return fprintf(fp, "[MPI_NULL]");
if( !mode ) {
unsigned int n1;
n1 = gcry_mpi_get_nbits(a);
n += fprintf(fp, "[%u bits]", n1);
}
else {
int rc;
char *buffer;
rc = gcry_mpi_aprint( GCRYMPI_FMT_HEX, (void **)&buffer, NULL, a );
fputs( buffer, fp );
n += strlen(buffer);
gcry_free( buffer );
}
return n;
}
static void
do_add(void)
@ -233,6 +257,7 @@ main(int argc, char **argv)
pargs.argv = &argv;
pargs.flags = 0;
set_strusage( my_strusage );
i18n_init();
while( arg_parse( &pargs, opts) ) {
switch( pargs.r_opt ) {

View File

@ -15,6 +15,7 @@
#ifdef HAVE_SYS_SHM_H
#include <sys/shm.h>
#endif
#include <gcrypt.h>
#include "util.h"
#include "ttyio.h"
#include "i18n.h"
@ -36,12 +37,6 @@ my_usage(void)
exit(1);
}
const char *
strusage( int level )
{
return default_strusage(level);
}
static void
i18n_init(void)
{
@ -51,7 +46,7 @@ i18n_init(void)
#else
setlocale( LC_ALL, "" );
#endif
bindtextdomain( PACKAGE, G10_LOCALEDIR );
bindtextdomain( PACKAGE, GNUPG_LOCALEDIR );
textdomain( PACKAGE );
#endif
}
@ -77,7 +72,7 @@ do_get_string( int mode, const char *keyword, byte *area, size_t areasize )
memcpy( area+n+2, p, len );
area[n] = len >> 8;
area[n+1] = len;
m_free(p);
gcry_free(p);
}
else { /* bool */
area[n] = 0;
@ -112,7 +107,7 @@ main(int argc, char **argv)
for(n=0,i=1; i < argc; i++ )
n += strlen(argv[i]) + 1;
p = m_alloc( 100 + n );
p = gcry_xmalloc( 100 + n );
strcpy( p, "../g10/gpg --status-fd 1 --run-as-shm-coprocess 0");
for(i=1; i < argc; i++ ) {
strcat(p, " " );
@ -120,7 +115,7 @@ main(int argc, char **argv)
}
fp = popen( p, "r" );
m_free( p );
gcry_free( p );
if( !fp )
log_error("popen failed: %s\n", strerror(errno));