+ for (i = 4, j = 0; i < argc; i++, j++) {
+ if (!(mfiles[j] = fopen(argv[i], "r"))) {
+ fprintf(stderr, "Unable to open message file \"%s\""
+ ": %s\n", argv[i], strerror(errno));
+ exit(1);
+ }
+
+ /*
+ * POP wants the size of the maildrop in bytes, but
+ * with \r\n line endings. Calculate that.
+ */
+
+ octets[j] = 0;
+
+ while (fgets(line, sizeof(line), mfiles[j])) {
+ octets[j] += strlen(line);
+ if (strrchr(line, '\n'))
+ octets[j]++;
+ }
+
+ rewind(mfiles[j]);
+ }