projects
/
debian
/
gzip
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build using mingw-w64 instead of mingw32
[debian/gzip]
/
sample
/
sub.c
diff --git
a/sample/sub.c
b/sample/sub.c
index ec57ca4f232adf0f492a7f8ecf26caf90843b72a..a06cc9bef2fa239f41cfbfdfe4fa6b016e760f8b 100644
(file)
--- a/
sample/sub.c
+++ b/
sample/sub.c
@@
-33,7
+33,9
@@
gunzip < double.data.sgz | add > double.data
*/
gunzip < double.data.sgz | add > double.data
*/
+#include <config.h>
#include <stdio.h>
#include <stdio.h>
+#include <stdlib.h>
#define MAGIC1 'S' /* sub data */
#define MAGIC2 26 /* ^Z */
#define MAGIC1 'S' /* sub data */
#define MAGIC2 26 /* ^Z */
@@
-54,7
+56,7
@@
int main(argc, argv)
if (argc > 2)
{
fputs("sub: only one argument needed--# of differences\n", stderr);
if (argc > 2)
{
fputs("sub: only one argument needed--# of differences\n", stderr);
- exit(
1
);
+ exit(
EXIT_FAILURE
);
}
if (argc > 1)
n = atoi(argv[1]);
}
if (argc > 1)
n = atoi(argv[1]);
@@
-62,7
+64,7
@@
int main(argc, argv)
if (n < 0) n = -n; /* tolerate "sub -2" */
if (n == 0 || n > MAX_DIST) {
fputs("sub: incorrect distance\n", stderr);
if (n < 0) n = -n; /* tolerate "sub -2" */
if (n == 0 || n > MAX_DIST) {
fputs("sub: incorrect distance\n", stderr);
- exit(
1
);
+ exit(
EXIT_FAILURE
);
}
/* initialize last byte */
}
/* initialize last byte */
@@
-83,6
+85,6
@@
int main(argc, argv)
if (i == n) /* cycle on n differences */
i = 0;
}
if (i == n) /* cycle on n differences */
i = 0;
}
- exit(
0
);
+ exit(
EXIT_SUCCESS
);
return 0; /* avoid warning */
}
return 0; /* avoid warning */
}