Deleted Added
full compact
rand.c (59191) rand.c (68651)
1/* apps/rand.c */
2
3#include "apps.h"
4
5#include <ctype.h>
6#include <stdio.h>
7#include <string.h>
8

--- 48 unchanged lines hidden (view full) ---

57 }
58 else if (strcmp(argv[i], "-base64") == 0)
59 {
60 if (!base64)
61 base64 = 1;
62 else
63 badopt = 1;
64 }
1/* apps/rand.c */
2
3#include "apps.h"
4
5#include <ctype.h>
6#include <stdio.h>
7#include <string.h>
8

--- 48 unchanged lines hidden (view full) ---

57 }
58 else if (strcmp(argv[i], "-base64") == 0)
59 {
60 if (!base64)
61 base64 = 1;
62 else
63 badopt = 1;
64 }
65 else if (isdigit(argv[i][0]))
65 else if (isdigit((unsigned char)argv[i][0]))
66 {
67 if (num < 0)
68 {
69 r = sscanf(argv[i], "%d", &num);
70 if (r == 0 || num < 0)
71 badopt = 1;
72 }
73 else

--- 22 unchanged lines hidden (view full) ---

96 app_RAND_load_files(inrand));
97
98 out = BIO_new(BIO_s_file());
99 if (out == NULL)
100 goto err;
101 if (outfile != NULL)
102 r = BIO_write_filename(out, outfile);
103 else
66 {
67 if (num < 0)
68 {
69 r = sscanf(argv[i], "%d", &num);
70 if (r == 0 || num < 0)
71 badopt = 1;
72 }
73 else

--- 22 unchanged lines hidden (view full) ---

96 app_RAND_load_files(inrand));
97
98 out = BIO_new(BIO_s_file());
99 if (out == NULL)
100 goto err;
101 if (outfile != NULL)
102 r = BIO_write_filename(out, outfile);
103 else
104 {
104 r = BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
105 r = BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
106#ifdef VMS
107 {
108 BIO *tmpbio = BIO_new(BIO_f_linebuffer());
109 out = BIO_push(tmpbio, out);
110 }
111#endif
112 }
105 if (r <= 0)
106 goto err;
107
108 if (base64)
109 {
110 BIO *b64 = BIO_new(BIO_f_base64());
111 if (b64 == NULL)
112 goto err;

--- 28 unchanged lines hidden ---
113 if (r <= 0)
114 goto err;
115
116 if (base64)
117 {
118 BIO *b64 = BIO_new(BIO_f_base64());
119 if (b64 == NULL)
120 goto err;

--- 28 unchanged lines hidden ---