Mercurial > hg > xemacs-beta
comparison nt/minitar.c @ 1782:f5967016f79a
[xemacs-hg @ 2003-11-06 22:53:31 by adrian]
xemacs-21.5: Minor cleanup of nt\minitar.c
-------------------- ChangeLog entries follow: --------------------
nt/ChangeLog addition:
2003-11-06 Adrian Aichner <adrian@xemacs.org>
* minitar.c (Usage): Change return type to void.
* minitar.c (main): Fix inconsistent indentation, use return
instead of exit to fix compiler warning.
author | adrian |
---|---|
date | Thu, 06 Nov 2003 22:53:31 +0000 |
parents | d4c017f833e2 |
children | b694dfd2f40e |
comparison
equal
deleted
inserted
replaced
1781:a2f99e9147b9 | 1782:f5967016f79a |
---|---|
21 # include <direct.h> /* For mkdir */ | 21 # include <direct.h> /* For mkdir */ |
22 #endif | 22 #endif |
23 | 23 |
24 #include <zlib.h> | 24 #include <zlib.h> |
25 | 25 |
26 static int | 26 static void |
27 Usage (char *name) | 27 Usage (char *name) |
28 { | 28 { |
29 fprintf (stderr, "Usage: %s file.tar.gz [base-dir]\n", name); | 29 fprintf (stderr, "Usage: %s file.tar.gz [base-dir]\n", name); |
30 fprintf (stderr, "\tExtracts the contents compressed tar file to base-dir\n"); | 30 fprintf (stderr, "\tExtracts the contents compressed tar file to base-dir\n"); |
31 exit (-1); | 31 exit (-1); |
32 return 0; | |
33 } | 32 } |
34 | 33 |
35 | 34 |
36 #define BLOCKSIZE 512 | 35 #define BLOCKSIZE 512 |
37 #define MAXNAMELEN 1024 | 36 #define MAXNAMELEN 1024 |
221 exit (-2); | 220 exit (-2); |
222 } | 221 } |
223 if (size==0) /* file of size 0 is done */ | 222 if (size==0) /* file of size 0 is done */ |
224 in_block = 0; | 223 in_block = 0; |
225 } | 224 } |
226 } else { /* write or continue writing file contents */ | 225 } |
226 else | |
227 { /* write or continue writing file contents */ | |
227 nbytes = size>512? 512:size; | 228 nbytes = size>512? 512:size; |
228 | 229 |
229 nwritten = fwrite (block, 1, nbytes, outfile); | 230 nwritten = fwrite (block, 1, nbytes, outfile); |
230 if (nwritten != nbytes) | 231 if (nwritten != nbytes) |
231 { | 232 { |