int forwsw = 1;
int inplace = 1;
int pushsw = 0;
-int unique = 0;
int verbsw = 0;
char *altmsg = NULL; /* .. */
sendsbr(char **vec, int vecp, char *drft, struct stat *st, int rename_drft)
{
int status;
- char buffer[BUFSIZ], file[BUFSIZ];
+ char buffer[BUFSIZ];
char *original_draft; /* name of original draft file */
char *p; /* string pointer for building file name */
done=armed_done;
switch (setjmp(env)) {
case OK:
- /*
- ** If given -push and -unique (which is undocumented), then
- ** rename the draft file. I'm not quite sure why.
- */
- if (pushsw && unique) {
- char *cp = m_mktemp2(drft, invo_name, NULL, NULL);
- if (cp == NULL) {
- adios("sendsbr", "unable to create temporary file");
- }
- if (rename(drft, strncpy(file, cp, sizeof(file)))
- == NOTOK)
- adios(file, "unable to rename %s to", drft);
- drft = file;
- }
-
status = sendaux(vec, vecp, drft, st) ? NOTOK : OK;
-
/* rename the original draft */
if (rename_drft && status == OK &&
rename(original_draft, strncpy(buffer,
{
pid_t child_id;
int i, status, fd, fd2;
- char backup[BUFSIZ], buf[BUFSIZ];
+ char backup[BUFSIZ];
fd = pushsw ? tmp_fd() : NOTOK;
fd2 = NOTOK;
vec[vecp++] = drft;
- if (annotext) {
- if ((fd2 = tmp_fd()) != NOTOK) {
- vec[vecp++] = "-idanno";
- snprintf(buf, sizeof(buf), "%d", fd2);
- vec[vecp++] = buf;
- } else {
- admonish(NULL, "unable to create file for annotation list");
- }
+ if (annotext && (fd2 = tmp_fd()) == NOTOK) {
+ admonish(NULL, "unable to create file for annotation list");
}
if (distfile && distout(drft, distfile, backup) == NOTOK)
done(1);
if (is_selected(mp, msgnum)) {
if (debugsw)
advise(NULL, "annotate message %d", msgnum);
- annotate(m_name (msgnum), annotext, cp, inplace,
+ annotate(m_name(msgnum), annotext, cp, inplace,
1, -2, 0);
}
}