Deleted Added
full compact
fio.c (1591) fio.c (27643)
1/*
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 56 unchanged lines hidden (view full) ---

65 off_t offset;
66 int maybe, inhead;
67 char linebuf[LINESIZE];
68
69 /* Get temporary file. */
70 (void)sprintf(linebuf, "%s/mail.XXXXXX", tmpdir);
71 if ((c = mkstemp(linebuf)) == -1 ||
72 (mestmp = Fdopen(c, "r+")) == NULL) {
1/*
2 * Copyright (c) 1980, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 56 unchanged lines hidden (view full) ---

65 off_t offset;
66 int maybe, inhead;
67 char linebuf[LINESIZE];
68
69 /* Get temporary file. */
70 (void)sprintf(linebuf, "%s/mail.XXXXXX", tmpdir);
71 if ((c = mkstemp(linebuf)) == -1 ||
72 (mestmp = Fdopen(c, "r+")) == NULL) {
73 (void)fprintf(stderr, "mail: can't open %s\n", linebuf);
74 exit(1);
73 errx(1, "can't open %s", linebuf);
75 }
76 (void)unlink(linebuf);
77
78 msgCount = 0;
79 maybe = 1;
80 inhead = 0;
81 offset = 0;
82 this.m_flag = MUSED|MNEW;

--- 106 unchanged lines hidden (view full) ---

189FILE *
190setinput(mp)
191 register struct message *mp;
192{
193
194 fflush(otf);
195 if (fseek(itf, (long)positionof(mp->m_block, mp->m_offset), 0) < 0) {
196 perror("fseek");
74 }
75 (void)unlink(linebuf);
76
77 msgCount = 0;
78 maybe = 1;
79 inhead = 0;
80 offset = 0;
81 this.m_flag = MUSED|MNEW;

--- 106 unchanged lines hidden (view full) ---

188FILE *
189setinput(mp)
190 register struct message *mp;
191{
192
193 fflush(otf);
194 if (fseek(itf, (long)positionof(mp->m_block, mp->m_offset), 0) < 0) {
195 perror("fseek");
197 panic("temporary file seek");
196 panic("Temporary file seek");
198 }
199 return (itf);
200}
201
202/*
203 * Take the data out of the passed ghost file and toss it into
204 * a dynamically allocated message structure.
205 */

--- 226 unchanged lines hidden ---
197 }
198 return (itf);
199}
200
201/*
202 * Take the data out of the passed ghost file and toss it into
203 * a dynamically allocated message structure.
204 */

--- 226 unchanged lines hidden ---