projects
/
debian
/
gzip
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 1.3.14
[debian/gzip]
/
vms
/
vms.c
diff --git
a/vms/vms.c
b/vms/vms.c
index 51b891a22fbc17c5a42ab09e2d12d0e21871d101..3383ee9a4e7f78bda48c31ee7917d18d2d81f1ad 100644
(file)
--- a/
vms/vms.c
+++ b/
vms/vms.c
@@
-6,6
+6,7
@@
* and updated by Jean-loup Gailly.
*/
* and updated by Jean-loup Gailly.
*/
+#include <config.h>
#include <stdio.h>
static char **vms_argv = NULL;
#include <stdio.h>
static char **vms_argv = NULL;
@@
-25,8
+26,8
@@
vms_expand_args(old_argc, argv)
int new_argc = 0;
int context, status;
char buf[255], *p;
int new_argc = 0;
int context, status;
char buf[255], *p;
-
- vms_argv =
(char**)
xmalloc((max_files+1)*sizeof(char*));
+
+ vms_argv = xmalloc((max_files+1)*sizeof(char*));
vms_argv[new_argc++] = **argv;
vms_argv[new_argc++] = **argv;
@@
-38,7
+39,7
@@
vms_expand_args(old_argc, argv)
} else { /* Files */
context = 0;
if (find_file_c(argv[0][i], buf, sizeof(buf), &context) & 1 != 1) {
} else { /* Files */
context = 0;
if (find_file_c(argv[0][i], buf, sizeof(buf), &context) & 1 != 1) {
- /*
+ /*
* Wrong file ?
* forward it to gzip
*/
* Wrong file ?
* forward it to gzip
*/
@@
-46,14
+47,14
@@
vms_expand_args(old_argc, argv)
vms_argv[new_argc++] = argv[0][i];
}
} else {
vms_argv[new_argc++] = argv[0][i];
}
} else {
- p =
(char*)
xmalloc(strlen(buf)+1);
+ p = xmalloc(strlen(buf)+1);
strcpy(p, buf);
if (new_argc < max_files) {
vms_argv[new_argc++] = p;
}
strcpy(p, buf);
if (new_argc < max_files) {
vms_argv[new_argc++] = p;
}
- while (find_file_c(argv[0][i], buf,
+ while (find_file_c(argv[0][i], buf,
sizeof(buf), &context) & 1 == 1) {
sizeof(buf), &context) & 1 == 1) {
- p =
(char*)
xmalloc(strlen(buf)+1);
+ p = xmalloc(strlen(buf)+1);
strcpy(p, buf);
if (new_argc < max_files) {
vms_argv[new_argc++] = p;
strcpy(p, buf);
if (new_argc < max_files) {
vms_argv[new_argc++] = p;
@@
-83,13
+84,13
@@
int find_file_c(in,out,out_len,context)
struct Str_desc in_desc,out_desc;
int status;
char *p;
struct Str_desc in_desc,out_desc;
int status;
char *p;
-
+
in_desc.addr = in;
in_desc.length = strlen(in);
in_desc.addr = in;
in_desc.length = strlen(in);
-
+
out_desc.addr = out;
out_desc.length = out_len;
out_desc.addr = out;
out_desc.length = out_len;
-
+
status = lib$find_file(&in_desc,&out_desc,context);
p = out_desc.addr;
status = lib$find_file(&in_desc,&out_desc,context);
p = out_desc.addr;
@@
-97,6
+98,6
@@
int find_file_c(in,out,out_len,context)
p++;
}
*p = 0;
p++;
}
*p = 0;
-
+
return status;
}
return status;
}