1/* 2 * Accept one (or more) ASCII encoded chunks that together make a compressed 3 * CTM delta. Decode them and reconstruct the deltas. Any completed 4 * deltas may be passed to ctm for unpacking. 5 * 6 * Author: Stephen McKay 7 * 8 * NOTICE: This is free software. I hope you get some use from this program. 9 * In return you should think about all the nice people who give away software. 10 * Maybe you should write some free software too. 11 */ 12 13#include <stdio.h> 14#include <stdlib.h> |
15#include <strings.h> 16#include <ctype.h> |
17#include <errno.h> 18#include <unistd.h> 19#include <sys/types.h> 20#include <sys/stat.h> 21#include <fcntl.h> 22#include <limits.h> 23#include "error.h" 24#include "options.h" --- 244 unchanged lines hidden (view full) --- 269 return 1; 270 } 271 272 while (fgets(line, sizeof(line), ifp) != NULL) 273 { 274 line_no++; 275 276 /* |
277 * Remove all trailing white space. 278 */ 279 i = strlen(line) - 1; 280 while (i > 0 && isspace(line[i])) 281 line[--i] = '\0'; 282 283 /* |
284 * Look for the beginning of an encoded piece. 285 */ 286 if (!decoding) 287 { 288 char *s; 289 290 if (sscanf(line, "CTM_MAIL BEGIN %s %d %d %c", 291 delta, &pce, &npieces, junk) != 3) --- 364 unchanged lines hidden --- |