Deleted Added
full compact
14a15
> #include <unistd.h>
48a50,51
>
> int
64c67
< if (delta_dir == NULL || piece_dir == NULL && (base_dir == NULL || argc>1))
---
> if (delta_dir == NULL)
66a70,72
> if (piece_dir == NULL && (base_dir == NULL || argc>1))
> usage();
>
200c206
< FILE *ifp, *ofp;
---
> FILE *ifp, *ofp = 0;
206c212
< unsigned short cksum;
---
> unsigned short cksum = 0;
229,231c235
< if (sscanf(line, "CTM_MAIL BEGIN %s %d %d %c", delta, &pce, &npieces, junk) == 3)
< {
< char *s;
---
> char *s;
233,234c237,239
< while ((s = strchr(delta, '/')) != NULL)
< *s = '_';
---
> if (sscanf(line, "CTM_MAIL BEGIN %s %d %d %c",
> delta, &pce, &npieces, junk) != 3)
> continue;
236,242c241,242
< mk_piece_name(pname, delta, pce, npieces);
< if ((ofp = fopen(pname, "w")) == NULL)
< {
< err("cannot open '%s' for writing", pname);
< status++;
< continue;
< }
---
> while ((s = strchr(delta, '/')) != NULL)
> *s = '_';
244,245c244,249
< cksum = 0xffff;
< decoding++;
---
> mk_piece_name(pname, delta, pce, npieces);
> if ((ofp = fopen(pname, "w")) == NULL)
> {
> err("cannot open '%s' for writing", pname);
> status++;
> continue;
246a251,253
>
> cksum = 0xffff;
> decoding++;