sm_get_pass(sasl_conn_t *conn, void *context, int id,
sasl_secret_t **psecret)
{
- NMH_UNUSED (conn);
-
char **pw_context = (char **) context;
char *pass = NULL;
int len;
+ NMH_UNUSED (conn);
+
if (! psecret || id != SASL_CB_PASS)
return SASL_BADPARAM;
static char **
nmh_completion(const char *text, int start, int end)
{
- NMH_UNUSED (end);
-
char **matches;
+ NMH_UNUSED (end);
+
matches = (char **) NULL;
if (start == 0)
static char *
get_temp_dir()
{
- // Ignore envvars if we are setuid
+ /* Ignore envvars if we are setuid */
if ((getuid()==geteuid()) && (getgid()==getegid())) {
char *tmpdir = NULL;
tmpdir = getenv("MHTMPDIR");
}
if (cp != NULL && *cp != '\0') {
if (ce->ce_unlink) {
- // Temporary file already exists, so we rename to
- // version with extension.
+ /* Temporary file already exists, so we rename to
+ version with extension. */
char *file_org = strdup(ce->ce_file);
ce->ce_file = add (cp, ce->ce_file);
if (rename(file_org, ce->ce_file)) {
}
if (cp != NULL && *cp != '\0') {
if (ce->ce_unlink) {
- // Temporary file already exists, so we rename to
- // version with extension.
+ /* Temporary file already exists, so we rename to
+ version with extension. */
char *file_org = strdup(ce->ce_file);
ce->ce_file = add (cp, ce->ce_file);
if (rename(file_org, ce->ce_file)) {
}
if (cp != NULL && *cp != '\0') {
if (ce->ce_unlink) {
- // Temporary file already exists, so we rename to
- // version with extension.
+ /* Temporary file already exists, so we rename to
+ version with extension. */
char *file_org = strdup(ce->ce_file);
ce->ce_file = add (cp, ce->ce_file);
if (rename(file_org, ce->ce_file)) {
static char linebuf[LBSIZE + 1];
/* the magic array for case-independence */
-static char cc[] = {
+static unsigned char cc[] = {
0000,0001,0002,0003,0004,0005,0006,0007,
0010,0011,0012,0013,0014,0015,0016,0017,
0020,0021,0022,0023,0024,0025,0026,0027,
static int
sasl_get_pass(sasl_conn_t *conn, void *context, int id, sasl_secret_t **psecret)
{
- NMH_UNUSED (conn);
-
struct pass_context *p_context = (struct pass_context *) context;
char *pass = NULL;
int len;
+ NMH_UNUSED (conn);
+
if (! psecret || id != SASL_CB_PASS)
return SASL_BADPARAM;
} else {
/* Suppress Content-Id, insert simple Content-Disposition
and Content-Description with filename. */
+ p = strrchr(file_name, '/');
(void) fprintf (composition_file,
- "#%1$s; name=\"%2$s\" <> [%2$s]{attachment}",
+ "#%s; name=\"%s\" <> [%s]{attachment}",
content_type,
- ((p = strrchr(file_name, '/')) == (char *)0) ? file_name : p + 1);
+ (p == (char *)0) ? file_name : p + 1,
+ (p == (char *)0) ? file_name : p + 1);
}
break;
} else {
/* Suppress Content-Id, insert Content-Disposition with
modification date and Content-Description wtih filename. */
+ p = strrchr(file_name, '/');
(void) fprintf (composition_file,
- "#%1$s; name=\"%2$s\" <>[%2$s]{attachment; modification-date=\"%3$s\"}",
+ "#%s; name=\"%s\" <>[%s]{attachment; modification-date=\"%s\"}",
content_type,
- ((p = strrchr(file_name, '/')) == (char *)0) ? file_name : p + 1,
+ (p == (char *)0) ? file_name : p + 1,
+ (p == (char *)0) ? file_name : p + 1,
dtime (&st.st_mtime, 0));
}