int peekc(FILE *ib);
int pidwait (pid_t, int);
int pidstatus (int, FILE *, char *);
+char *pluspath(char *);
void print_help (char *, struct swit *, int);
void print_sw (char *, struct swit *, char *);
void print_version (char *);
static char *expath(char *,int);
static void compath(char *);
+char *
+pluspath(char *name)
+{
+ return path(name + 1, *name == '+' ? TFOLDER : TSUBCWF);
+}
char *
path(char *name, int flag)
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else {
msgs[msgp++] = cp;
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else {
if (msg)
adios (NULL, "only one message at a time!");
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else {
if (msg)
adios (NULL, "only one message at a time!");
}
if (*cp == '+' || *cp == '@') {
foldersToDo[numfolders++] =
- path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ pluspath (cp);
} else
foldersToDo[numfolders++] = cp;
}
if (argfolder)
adios (NULL, "only one folder at a time!");
else
- argfolder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ argfolder = pluspath (cp);
} else {
if (msg)
adios (NULL, "only one (current) message at a time!");
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else {
msgs[msgp++] = cp;
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else {
adios (NULL, "usage: %s [+folder] [switches]", invo_name);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder per #forw directive");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
}
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
/* Get the folder name */
if (cp[1])
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
else
folder = getfolder (1);
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
}
else
if (file)
if (cwd == NULL)
cwd = getcpy (pwd ());
chdir (m_maildir (""));
- cp = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ cp = pluspath (cp);
if (access (m_maildir (cp), F_OK) == NOTOK)
result = OK;
free (cp);
return;
}
else
- folder = fmsh ? path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF)
+ folder = fmsh ? pluspath (cp)
: cp + 1;
}
else
if (*cp == '+' || *cp == '@') {
if (folder)
adios (NULL, "only one folder at a time!");
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
}
else
adios (NULL, "usage: %s [+folder] [switches]", invo_name);
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else {
adios (NULL, "usage: %s [+folder] [switches]", invo_name);
}
if (foldp > NFOLDERS)
adios (NULL, "only %d folders allowed!", NFOLDERS);
folders[foldp++].f_name =
- path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else {
if (msg)
adios (NULL, "only one message at a time!");
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else {
adios (NULL, "usage: %s [+folder] [switches]", invo_name);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else {
if (mode != SHOW)
goto usage;
if (folder)
adios (NULL, "only one folder at a time!");
else
- folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF);
+ folder = pluspath (cp);
} else
app_msgarg(&msgs, cp);
}