| 1138 | } |
| 1139 | |
| 1140 | static void output_header_lines(FILE *fout, const char *hdr, const struct strbuf *data) |
| 1141 | { |
| 1142 | const char *sp = data->buf; |
| 1143 | while (1) { |
| 1144 | const char *ep = strchr(sp, '\n'); |
| 1145 | int len; |
| 1146 | if (!ep) |
| 1147 | len = strlen(sp); |
| 1148 | else |
| 1149 | len = ep - sp; |
| 1150 | fprintf(fout, "%s: %.*s\n", hdr, len, sp); |
| 1151 | if (!ep) |
| 1152 | break; |
| 1153 | sp = ep + 1; |
| 1154 | } |
| 1155 | } |
| 1156 | |
| 1157 | static void handle_info(struct mailinfo *mi) |
| 1158 | { |