aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2000-03-02 14:36:39 +0000
committerWerner Koch <[email protected]>2000-03-02 14:36:39 +0000
commit97f82721dfd306ee32f8b2080a6e6cfa91544582 (patch)
tree193882ca922035565222312945998dbfaa3f32e0
parentSee ChangeLog: Wed Feb 23 10:07:57 CET 2000 Werner Koch (diff)
downloadgnupg-97f82721dfd306ee32f8b2080a6e6cfa91544582.tar.gz
gnupg-97f82721dfd306ee32f8b2080a6e6cfa91544582.zip
See ChangeLog: Thu Mar 2 15:37:46 CET 2000 Werner Koch
-rw-r--r--ChangeLog4
-rw-r--r--NOTES3
-rw-r--r--THANKS1
-rw-r--r--cipher/ChangeLog14
-rw-r--r--cipher/random.c12
-rw-r--r--cipher/rndunix.c8
-rw-r--r--cipher/sha1.c4
-rw-r--r--configure.in2
-rw-r--r--g10/ChangeLog10
-rw-r--r--g10/g10.c16
-rw-r--r--g10/keyedit.c2
-rw-r--r--g10/pubkey-enc.c4
-rw-r--r--include/ttyio.h1
-rw-r--r--scripts/ChangeLog5
-rwxr-xr-xscripts/config.guess185
-rwxr-xr-xscripts/config.sub41
-rw-r--r--scripts/gnupgbug185
-rw-r--r--util/ChangeLog4
-rw-r--r--util/ttyio.c19
19 files changed, 391 insertions, 129 deletions
diff --git a/ChangeLog b/ChangeLog
index 3345c4b25..a5dcb4075 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Mar 2 15:37:46 CET 2000 Werner Koch <[email protected]>
+
+ * configure.in: Add check for clock_gettime
+
Wed Feb 23 10:07:57 CET 2000 Werner Koch <[email protected]>
* configure.in (ALL_LINGUAS): Add nl.
diff --git a/NOTES b/NOTES
index 47a69df47..004cfa432 100644
--- a/NOTES
+++ b/NOTES
@@ -11,3 +11,6 @@ Some other reported cpu-vendor-os strings:
sparc-sun-sunos4.1.2
i386-pc-sysv4.2 (USL Unixware v1.1.2)
+gpg 1.0.1 okay with MP-RAS 3.02.01 Edition 5 using gcc 2.95.2 and EGD
+
diff --git a/THANKS b/THANKS
index f23e7c081..7920f3c57 100644
--- a/THANKS
+++ b/THANKS
@@ -96,6 +96,7 @@ Richard Outerbridge [email protected]
Roddy Strachan [email protected]
Roland Rosenfeld [email protected]
Ross Golder [email protected]
+Sam Roberts [email protected]
Serge Munhoven [email protected]
Stefan Karrmann [email protected]
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index e0e8f917c..4cd2a0490 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,17 @@
+Thu Mar 2 15:37:46 CET 2000 Werner Koch <[email protected]>
+
+ * random.c (fast_random_poll): Add clock_gettime() as fallback for
+ system which support this POSIX.4 fucntion. By Sam Roberts.
+
+ * rndunix.c: Add some more headers for QNX. By Sam Roberts.
+
+ * random.c (read_seed_file): Removed the S_ISLNK test becuase it
+ is already covered by !S_ISREG and is not defined in Unixware.
+ Reported by Dave Dykstra.
+
+ * sha1.c (sha1_get_info): Removed those stupid double lines. Dave
+ is really a good lint.
+
Wed Feb 23 10:07:57 CET 2000 Werner Koch <[email protected]>
* twofish.c (twofish_get_info): Add some const to the casts. By Martin
diff --git a/cipher/random.c b/cipher/random.c
index 852936dba..f047f6829 100644
--- a/cipher/random.c
+++ b/cipher/random.c
@@ -43,6 +43,9 @@
#ifdef HAVE_GETTIMEOFDAY
#include <sys/times.h>
#endif
+#ifdef HAVE_CLOCK_GETTIME
+ #include <time.h>
+#endif
#ifdef HAVE_GETRUSAGE
#include <sys/resource.h>
#endif
@@ -306,7 +309,7 @@ read_seed_file()
close(fd);
return 0;
}
- if( !S_ISREG(sb.st_mode) || S_ISLNK(sb.st_mode) ) {
+ if( !S_ISREG(sb.st_mode) ) {
log_info(_("`%s' is not a regular file - ignored\n"), seed_file_name );
close(fd);
return 0;
@@ -557,6 +560,13 @@ fast_random_poll()
add_randomness( &tv.tv_sec, sizeof(tv.tv_sec), 1 );
add_randomness( &tv.tv_usec, sizeof(tv.tv_usec), 1 );
}
+ #elif HAVE_CLOCK_GETTIME
+ { struct timespec tv;
+ if( clock_gettime( CLOCK_REALTIME, &tv ) == -1 )
+ BUG();
+ add_randomness( &tv.tv_sec, sizeof(tv.tv_sec), 1 );
+ add_randomness( &tv.tv_nsec, sizeof(tv.tv_nsec), 1 );
+ }
#else /* use times */
#ifndef HAVE_DOSISH_SYSTEM
{ struct tms buf;
diff --git a/cipher/rndunix.c b/cipher/rndunix.c
index 9f60b3cf8..59a924e00 100644
--- a/cipher/rndunix.c
+++ b/cipher/rndunix.c
@@ -75,9 +75,9 @@
#ifndef __QNX__
#include <sys/resource.h>
#endif /* __QNX__ */
-#ifdef _AIX
+#if defined( _AIX ) || defined( __QNX__ )
#include <sys/select.h>
-#endif /* _AIX */
+#endif /* _AIX || __QNX__ */
#ifndef __QNX__
#include <sys/shm.h>
#include <sys/signal.h>
@@ -89,6 +89,10 @@
#endif /* __hpux 9.x, after that it's in unistd.h */
#include <sys/wait.h>
/* #include <kitchensink.h> */
+#ifdef __QNX__
+#include <signal.h>
+#include <process.h>
+#endif /* __QNX__ */
#include <errno.h>
#include "types.h" /* for byte and u32 typedefs */
diff --git a/cipher/sha1.c b/cipher/sha1.c
index e47cc5e60..2c2a10a7b 100644
--- a/cipher/sha1.c
+++ b/cipher/sha1.c
@@ -337,10 +337,6 @@ sha1_get_info( int algo, size_t *contextsize,
*r_asnoid = asn;
*r_asnlen = DIM(asn);
*r_mdlen = 20;
- *r_init = (void (*)(void *))sha1_init;
- *r_write = (void (*)(void *, byte*, size_t))sha1_write;
- *r_final = (void (*)(void *))sha1_final;
- *r_read = (byte *(*)(void *))sha1_read;
*(void (**)(SHA1_CONTEXT *))r_init = sha1_init;
*(void (**)(SHA1_CONTEXT *, byte*, size_t))r_write = sha1_write;
*(void (**)(SHA1_CONTEXT *))r_final = sha1_final;
diff --git a/configure.in b/configure.in
index 1e906ec47..1d14d3b3e 100644
--- a/configure.in
+++ b/configure.in
@@ -392,7 +392,7 @@ fi
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strerror stpcpy strlwr stricmp tcgetattr rand strtoul mmap)
-AC_CHECK_FUNCS(memmove gettimeofday getrusage gethrtime setrlimit)
+AC_CHECK_FUNCS(memmove gettimeofday getrusage gethrtime setrlimit clock_gettime)
AC_CHECK_FUNCS(memicmp atexit raise getpagesize strftime nl_langinfo)
GNUPG_CHECK_MLOCK
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 40f2cd0a6..ac7e6c846 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,13 @@
+Thu Mar 2 15:37:46 CET 2000 Werner Koch <[email protected]>
+
+ * pubkey-enc.c (get_it): Print a note about unknown cipher algos.
+
+ * g10.c (opts): Add a note to the help listing about the man page
+ and removed some options from the help listing.
+
+ * keyedit.c (print_and_check_one_sig): Use a new function to truncate
+ the output of the user ID. Suggested by Jan-Benedict Glaw.
+
Wed Feb 23 10:07:57 CET 2000 Werner Koch <[email protected]>
* helptext.c: typo fix.
diff --git a/g10/g10.c b/g10/g10.c
index 548180c7f..ae04184b9 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -276,12 +276,12 @@ static ARGPARSE_OPTS opts[] = {
{ oCharset, "charset" , 2, N_("|NAME|set terminal charset to NAME") },
{ oOptions, "options" , 2, N_("read options from file")},
- { oDebug, "debug" ,4|16, N_("set debugging flags")},
- { oDebugAll, "debug-all" ,0, N_("enable full debugging")},
+ { oDebug, "debug" ,4|16, "@"},
+ { oDebugAll, "debug-all" ,0, "@"},
{ oStatusFD, "status-fd" ,1, N_("|FD|write status info to this FD") },
- { oNoComment, "no-comment", 0, N_("do not write comment packets")},
- { oCompletesNeeded, "completes-needed", 1, N_("(default is 1)")},
- { oMarginalsNeeded, "marginals-needed", 1, N_("(default is 3)")},
+ { oNoComment, "no-comment", 0, "@"},
+ { oCompletesNeeded, "completes-needed", 1, "@"},
+ { oMarginalsNeeded, "marginals-needed", 1, "@"},
{ oMaxCertDepth, "max-cert-depth", 1, "@" },
{ oLoadExtension, "load-extension" ,2, N_("|FILE|load extension module FILE")},
{ oRFC1991, "rfc1991", 0, N_("emulate the mode described in RFC1991")},
@@ -297,7 +297,11 @@ static ARGPARSE_OPTS opts[] = {
{ oThrowKeyid, "throw-keyid", 0, N_("throw keyid field of encrypted packets")},
{ oNotation, "notation-data", 2, N_("|NAME=VALUE|use this notation data")},
- { 302, NULL, 0, N_("@\nExamples:\n\n"
+ { 302, NULL, 0, N_(
+ "@\n(See the man page for a complete listing of all commands and options)\n"
+ )},
+
+ { 303, NULL, 0, N_("@\nExamples:\n\n"
" -se -r Bob [file] sign and encrypt for user Bob\n"
" --clearsign [file] make a clear text signature\n"
" --detach-sign [file] make a detached signature\n"
diff --git a/g10/keyedit.c b/g10/keyedit.c
index affe3b49b..d2f91c421 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -158,7 +158,7 @@ print_and_check_one_sig( KBNODE keyblock, KBNODE node,
else {
size_t n;
char *p = get_user_id( sig->keyid, &n );
- tty_print_utf8_string( p, n > 40? 40 : n );
+ tty_print_utf8_string2( p, n, 40 );
m_free(p);
}
tty_printf("\n");
diff --git a/g10/pubkey-enc.c b/g10/pubkey-enc.c
index af77a1e52..77bdc4b19 100644
--- a/g10/pubkey-enc.c
+++ b/g10/pubkey-enc.c
@@ -152,6 +152,10 @@ get_it( PKT_pubkey_enc *k, DEK *dek, PKT_secret_key *sk, u32 *keyid )
write_status(STATUS_RSA_OR_IDEA);
rc = check_cipher_algo( dek->algo );
if( rc ) {
+ if( !opt.quiet && rc == G10ERR_CIPHER_ALGO ) {
+ log_info(_("cipher algorithm %d is unknown or disabled\n"),
+ dek->algo);
+ }
dek->algo = 0;
goto leave;
}
diff --git a/include/ttyio.h b/include/ttyio.h
index 7992d85e8..3864e2440 100644
--- a/include/ttyio.h
+++ b/include/ttyio.h
@@ -24,6 +24,7 @@ int tty_batchmode( int onoff );
void tty_printf( const char *fmt, ... );
void tty_print_string( byte *p, size_t n );
void tty_print_utf8_string( byte *p, size_t n );
+void tty_print_utf8_string2( byte *p, size_t n, size_t max_n );
char *tty_get( const char *prompt );
char *tty_get_hidden( const char *prompt );
void tty_kill_prompt(void);
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
index e9791e45c..29d8a55b6 100644
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,8 @@
+Thu Mar 2 15:37:46 CET 2000 Werner Koch <[email protected]>
+
+ * config.guess: Add support for QNX. By Sam Roberts.
+ * config.sub: Ditto.
+
Thu Sep 23 09:49:25 1999 Werner Koch ([email protected])
* commit: Remove leading and trailing empty lines when copying
diff --git a/scripts/config.guess b/scripts/config.guess
index 46b3ea319..a5674cd10 100755
--- a/scripts/config.guess
+++ b/scripts/config.guess
@@ -10,7 +10,7 @@
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
@@ -68,6 +68,9 @@ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:QNX:*:*)
+ echo i386-pc-qnx
+ exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -226,30 +229,30 @@ EOF
exit 0 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
+ # "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit 0 ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit 0 ;;
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
@@ -272,8 +275,8 @@ EOF
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
macppc:NetBSD:*:*)
- echo powerpc-apple-netbsd${UNAME_RELEASE}
- exit 0 ;;
+ echo powerpc-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit 0 ;;
@@ -287,7 +290,7 @@ EOF
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
int main (int argc, char *argv[]) {
#else
@@ -326,19 +329,19 @@ EOF
echo m88k-motorola-sysv3
exit 0 ;;
AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
echo m88k-dg-dgux${UNAME_RELEASE}
else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
- else echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit 0 ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ else echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit 0 ;;
M88*:*:R3*:*)
@@ -356,13 +359,13 @@ EOF
exit 0 ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h>
main()
@@ -402,9 +405,9 @@ EOF
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit 0 ;; # report: romp-ibm BSD 4.3
+ exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit 0 ;;
@@ -419,39 +422,39 @@ EOF
exit 0 ;;
9000/[34678]??:HP-UX:*:*)
case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
- sed 's/^ //' << EOF >$dummy.c
- #include <stdlib.h>
- #include <unistd.h>
+ sed 's/^ //' << EOF >$dummy.c
+ #include <stdlib.h>
+ #include <unistd.h>
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
EOF
($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
rm -f $dummy.c $dummy
@@ -460,7 +463,7 @@ EOF
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
main ()
@@ -468,7 +471,7 @@ EOF
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
+ results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
@@ -519,25 +522,25 @@ EOF
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit 0 ;;
+ exit 0 ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit 0 ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit 0 ;;
+ exit 0 ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit 0 ;;
+ exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit 0 ;;
+ exit 0 ;;
CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
- exit 0 ;;
+ exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE}
exit 0 ;;
@@ -554,12 +557,12 @@ EOF
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
- exit 0 ;;
+ exit 0 ;;
F300:UNIX_System_V:*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
F301:UNIX_System_V:*:*)
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
exit 0 ;;
@@ -631,11 +634,11 @@ EOF
ld_help_string=`cd /; ld --help 2>&1`
ld_supported_emulations=`echo $ld_help_string \
| sed -ne '/supported emulations:/!d
- s/[ ][ ]*/ /g
+ s/[ ][ ]*/ /g
s/.*supported emulations: *//
s/ .*//
p'`
- case "$ld_supported_emulations" in
+ case "$ld_supported_emulations" in
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
@@ -668,13 +671,13 @@ EOF
if test "$?" = 0 ; then
LIBC="libc1"
fi
- fi
+ fi
rm -f $dummy.c $dummy
echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
- sed 's/^ //' <<EOF >$dummy.s
+ sed 's/^ //' <<EOF >$dummy.s
.globl main
.ent main
main:
@@ -789,11 +792,11 @@ EOF
echo i386-sequent-sysv4
exit 0 ;;
i?86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
@@ -830,10 +833,10 @@ EOF
fi
exit 0 ;;
pc:*:*:*)
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
- exit 0 ;;
+ exit 0 ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit 0 ;;
@@ -862,8 +865,8 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4 && exit 0 ;;
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
m68*:LynxOS:2.*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -897,9 +900,9 @@ EOF
fi
exit 0 ;;
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- echo i586-unisys-sysv4
- exit 0 ;;
+ echo i586-unisys-sysv4
+ exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <[email protected]>.
# How about differentiating between stratus architectures? -djm
@@ -917,11 +920,11 @@ EOF
exit 0 ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv${UNAME_RELEASE}
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit 0 ;;
+ exit 0 ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit 0 ;;
@@ -964,11 +967,11 @@ main ()
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
- "4"
+ "4"
#else
""
#endif
- ); exit (0);
+ ); exit (0);
#endif
#endif
@@ -1046,7 +1049,7 @@ main ()
#endif
#if defined(__EMX__)
- printf ("i386-pc-os2_emx"); exit(0);
+ printf ("i386-pc-os2_emx"); exit(0);
#endif
exit (1);
diff --git a/scripts/config.sub b/scripts/config.sub
index 2436b4534..38eca7645 100755
--- a/scripts/config.sub
+++ b/scripts/config.sub
@@ -12,7 +12,7 @@
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
@@ -34,7 +34,7 @@
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
+# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
@@ -600,7 +600,7 @@ case $basic_machine in
pbb)
basic_machine=m68k-tti
;;
- pc532 | pc532-*)
+ pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexen)
@@ -627,12 +627,12 @@ case $basic_machine in
power) basic_machine=rs6000-ibm
;;
ppc) basic_machine=powerpc-unknown
- ;;
+ ;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
- ;;
+ ;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
@@ -756,8 +756,8 @@ case $basic_machine in
os=-vms
;;
vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
+ basic_machine=f301-fujitsu
+ ;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
@@ -782,7 +782,7 @@ case $basic_machine in
basic_machine=xmp-cray
os=-unicos
;;
- xps | xps100)
+ xps | xps100)
basic_machine=xps100-honeywell
;;
z8k-*-coff)
@@ -830,7 +830,7 @@ case $basic_machine in
sparc | sparcv9)
basic_machine=sparc-sun
;;
- cydra)
+ cydra)
basic_machine=cydra-cydrome
;;
orion)
@@ -872,8 +872,8 @@ esac
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
+ # First match some system type aliases
+ # that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -881,6 +881,9 @@ case $os in
-solaris)
os=-solaris2
;;
+ -qnx)
+ os=-qnx
+ ;;
-svr4*)
os=-sysv4
;;
@@ -948,7 +951,7 @@ case $os in
os=-sysv
;;
-ns2 )
- os=-nextstep2
+ os=-nextstep2
;;
# Preserve the version number of sinix5.
-sinix5.*)
@@ -984,8 +987,8 @@ case $os in
-xenix)
os=-xenix
;;
- -*mint | -*MiNT)
- os=-mint
+ -*mint | -*MiNT)
+ os=-mint
;;
-none)
;;
@@ -1018,7 +1021,7 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- pdp11-*)
+ pdp11-*)
os=-none
;;
*-dec | vax-*)
@@ -1108,19 +1111,19 @@ case $basic_machine in
*-next)
os=-nextstep3
;;
- *-gould)
+ *-gould)
os=-sysv
;;
- *-highlevel)
+ *-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
- *-sgi)
+ *-sgi)
os=-irix
;;
- *-siemens)
+ *-siemens)
os=-sysv4
;;
*-masscomp)
diff --git a/scripts/gnupgbug b/scripts/gnupgbug
new file mode 100644
index 000000000..7cde6aa16
--- /dev/null
+++ b/scripts/gnupgbug
@@ -0,0 +1,185 @@
+#!/bin/sh
+
+#
+# File a bug against the GNU Privacy Guard.
+#
+
+#
+# Copyright (c) 2000 Thomas Roessler <[email protected]>
+#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+DEBIAN_SUBMIT="[email protected]"
+
+
+include_file ()
+{
+ echo
+ echo "--- Begin $1"
+ sed -e 's/^-/- -/' $1 | egrep -v '^[ ]*(#|$)'
+ echo "--- End $1"
+ echo
+}
+
+case `echo -n` in
+"") n=-n; c= ;;
+ *) n=; c='\c' ;;
+esac
+
+
+exec > /dev/tty
+exec < /dev/tty
+
+SCRATCH=${TMPDIR-/tmp}/`basename $0`.`hostname`.$$
+
+mkdir ${SCRATCH} || \
+{
+ echo "`basename $0`: Can't create temporary directory." >& 2 ;
+ exit 1 ;
+}
+
+trap "rm -r -f ${SCRATCH} ; trap '' 0 ; exit" 0 1 2
+
+TEMPLATE=${SCRATCH}/template.txt
+
+echo "Please enter a one-line description of the problem you experience:"
+echo $n "> $c"
+read SUBJECT
+
+echo $n "Do you want to include your personal GnuPG configuration files? [Y|n]$c"
+read personal
+case "$personal" in
+[nN]*) personal=no ;;
+ *) personal=yes ;;
+esac
+
+if test -f /etc/debian_version ; then
+ DEBIAN=yes
+ echo $n "Checking whether GnuPG has been installed as a package... $c"
+ GNUPGVERSION="`dpkg -l gnupg | grep ^i | awk '{print $3}'`" 2> /dev/null
+ if test "$GNUPGVERSION" ; then
+ DPKG=yes
+ else
+ DPKG=no
+ fi
+ echo "$DPKG"
+ if test "$DPKG" = "no" ; then
+ echo $n "File this bug with Debian? [Y|n]$c"
+ read $DPKG
+ case "$DPKG" in
+ [nN]) DPKG=no ;;
+ *) DPKG=yes ;;
+ esac
+ fi
+else
+ DEBIAN=no
+ DPKG=no
+fi
+
+test "$MUTTVERSION" || MUTTVERSION="`mutt -v | head -1 | awk '{print $2}' | tr -d i`"
+test "$DPKG" = "yes" && SUBMIT="$SUBMIT, $DEBIAN_SUBMIT"
+
+
+exec > ${TEMPLATE}
+
+echo "Subject: mutt-$MUTTVERSION: $SUBJECT"
+echo "To: $SUBMIT"
+echo "Cc: $LOGNAME"
+echo
+echo "Package: mutt"
+echo "Version: $MUTTVERSION"
+echo
+echo "-- Please type your report below this line"
+echo
+echo
+echo
+
+if test "$DEBIAN" = "yes" ; then
+ echo "Obtaining Debian-specific information..." > /dev/tty
+ bug -p -s dummy mutt | \
+ sed -n -e "/^-- System Information/,/^---/p" | \
+ grep -v '^---'
+fi
+
+echo
+echo "-- Mutt Version Information"
+echo
+mutt -v
+
+if test "$personal" = "yes" ; then
+ CANDIDATES=".muttrc-${MUTTVERSION} .muttrc .mutt/muttrc-${MUTTVERSION} .mutt/muttrc"
+ MATCHED="none"
+ for f in $CANDIDATES; do
+ if test -f "${HOME}/$f" ; then
+ MATCHED="${HOME}/$f"
+ break
+ fi
+ done
+
+ if test "$MATCHED" = "none" ; then
+ echo "Warning: Can't find your personal .muttrc." >&2
+ else
+ include_file $MATCHED
+ fi
+fi
+
+if test "$global" = "yes" ; then
+ CANDIDATES="Muttrc-${MUTTVERSION} Muttrc"
+ DIRECTORIES="/etc /usr/local/share/mutt"
+ MATCHED="none"
+ for d in $DIRECTORIES ; do
+ for f in $CANDIDATES; do
+ if test -f $d/$f ; then
+ MATCHED="$d/$f"
+ break
+ fi
+ done
+ test "$MATCHED" = "none" || break
+ done
+
+ if test "$MATCHED" = "none" ; then
+ echo "Warning: Can't find global Muttrc." >&2
+ else
+ include_file $MATCHED
+ fi
+fi
+
+exec > /dev/tty
+
+cp $TEMPLATE $SCRATCH/mutt-bug.txt
+
+input="e"
+while : ; do
+ if test "$input" = "e" ; then
+ ${VISUAL-vi} $SCRATCH/mutt-bug.txt
+ if cmp $SCRATCH/mutt-bug.txt ${TEMPLATE} > /dev/null ; then
+ echo "Warning: Bug report was not modified!"
+ fi
+ fi
+
+ echo $n "Submit, Edit, Print, Quit? [S|e|p|q]$c"
+ read _input
+ input="`echo $_input | tr EPSQ epsq`"
+ case $input in
+ e*) ;;
+ p*) ${PAGER-more} $SCRATCH/mutt-bug.txt ;;
+ s*|"") /usr/sbin/sendmail -t < $SCRATCH/mutt-bug.txt ; exit ;;
+ q*) exit
+ esac
+done
+
diff --git a/util/ChangeLog b/util/ChangeLog
index 4b568949c..72a7f5d5f 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,7 @@
+Thu Mar 2 15:37:46 CET 2000 Werner Koch <[email protected]>
+
+ * ttyio.c (tty_print_utf8_string2): New to allow a max output size.
+
Wed Feb 23 10:07:57 CET 2000 Werner Koch <[email protected]>
* miscutil.c (asctimestamp): Fix for possible buffer overflow by
diff --git a/util/ttyio.c b/util/ttyio.c
index 35e0d318f..e2c1f8496 100644
--- a/util/ttyio.c
+++ b/util/ttyio.c
@@ -236,7 +236,7 @@ tty_print_string( byte *p, size_t n )
}
void
-tty_print_utf8_string( byte *p, size_t n )
+tty_print_utf8_string2( byte *p, size_t n, size_t max_n )
{
size_t i;
char *buf;
@@ -251,15 +251,26 @@ tty_print_utf8_string( byte *p, size_t n )
}
if( i < n ) {
buf = utf8_to_native( p, n );
+ if( strlen( buf ) > max_n ) {
+ buf[max_n] = 0;
+ }
+ /*(utf8 conversion already does the control character quoting)*/
tty_printf("%s", buf );
m_free( buf );
}
- else
+ else {
+ if( n > max_n ) {
+ n = max_n;
+ }
tty_print_string( p, n );
+ }
}
-
-
+void
+tty_print_utf8_string( byte *p, size_t n )
+{
+ tty_print_utf8_string( p, n, n )
+}
static char *