aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog16
-rw-r--r--g10/g10.c9
-rw-r--r--g10/plaintext.c7
3 files changed, 27 insertions, 5 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 99d7e26f2..a70ee77b7 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,30 +1,36 @@
+Thu Jul 27 10:02:38 CEST 2000 Werner Koch <[email protected]>
+
+ * g10.c (main): Use setmode(O_BINARY) for MSDOS while generating random bytes
+ (print_mds): Likewise for stdin.
+ * plaintext.c (handle_plaintext): Likewise for stdout.
+
Mon Jul 24 10:30:17 CEST 2000 Werner Koch <[email protected]>
* keyedit.c (menu_expire): expire date for primary key can be set again.
-Wed Jul 19 11:26:43 CEST 2000 Werner Koch <wk@>
+Wed Jul 19 11:26:43 CEST 2000 Werner Koch <[email protected]>
* keylist.c (is_uid_valid): New.
(list_keyblock): Print validity information for all user IDs. Note, this
has to be done at other places too; for now we have only minimal support.
-Wed Jul 12 13:32:06 CEST 2000 Werner Koch <wk@>
+Wed Jul 12 13:32:06 CEST 2000 Werner Koch <[email protected]>
* helptext.c, pkclist.c: s/superseeded/superseded/
-Mon Jul 10 16:08:57 CEST 2000 Werner Koch <wk@>
+Mon Jul 10 16:08:57 CEST 2000 Werner Koch <[email protected]>
* parse-packet.c (enum_sig_subpkt): Fixed testing on crtitical bit in case
of a NULL buffer. Reported by Peter Marschall.
-Wed Jul 5 13:28:45 CEST 2000 Werner Koch <wk@>
+Wed Jul 5 13:28:45 CEST 2000 Werner Koch <[email protected]>
* keyedit.c, keyid.c: Add some _()
* argparse.c: Changed the flag to suppress --version handling to also
suppress --help.
-Wed Jun 28 11:54:44 CEST 2000 Werner Koch <wk@>
+Wed Jun 28 11:54:44 CEST 2000 Werner Koch <[email protected]>
* armor.c (armor_filter): Set sigclass to 0 in case of non-dash-escaped
clearsig. This makes this mode work again.
diff --git a/g10/g10.c b/g10/g10.c
index 7a59b71d3..98e56769c 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -25,6 +25,9 @@
#include <string.h>
#include <ctype.h>
#include <unistd.h>
+#ifdef HAVE_DOSISH_SYSTEM
+ #include <fcntl.h> /* for setmode() */
+#endif
#include "packet.h"
@@ -1392,6 +1395,9 @@ main( int argc, char **argv )
size_t n = !endless && count < 100? count : 100;
p = get_random_bits( n*8, level, 0);
+ #ifdef HAVE_DOSISH_SYSTEM
+ setmode ( fileno(stdout), O_BINARY );
+ #endif
fwrite( p, n, 1, stdout );
m_free(p);
if( !endless )
@@ -1590,6 +1596,9 @@ print_mds( const char *fname, int algo )
if( !fname ) {
fp = stdin;
+ #ifdef HAVE_DOSISH_SYSTEM
+ setmode ( fileno(fp) , O_BINARY );
+ #endif
pname = m_strdup("[stdin]: ");
}
else {
diff --git a/g10/plaintext.c b/g10/plaintext.c
index 4ab20278d..1510ed70b 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -24,6 +24,10 @@
#include <string.h>
#include <errno.h>
#include <assert.h>
+#ifdef HAVE_DOSISH_SYSTEM
+ #include <fcntl.h> /* for setmode() */
+#endif
+
#include "util.h"
#include "memory.h"
#include "options.h"
@@ -81,6 +85,9 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
else if( !*fname || (*fname=='-' && !fname[1])) {
/* no filename or "-" given; write to stdout */
fp = stdout;
+ #ifdef HAVE_DOSISH_SYSTEM
+ setmode ( fileno(fp) , O_BINARY );
+ #endif
}
else if( !overwrite_filep( fname ) ) {
rc = G10ERR_CREATE_FILE;