IMO, this distracts from the important without being much worth.
adios(NULL, "Your `%s' profile file does not contain a valid path entry.", defpath);
if (*cp != '/')
- (void)snprintf(nd = buf, sizeof(buf), "%s/%s", mypath, cp);
+ snprintf(nd = buf, sizeof(buf), "%s/%s", mypath, cp);
else
nd = cp;
if (link(msgfile, newmsg) != -1) {
if (deleting) {
- (void)snprintf(oldmsg, sizeof (oldmsg), "%s/%s", from_dir, msgfile);
- (void)ext_hook("ref-hook", oldmsg, newmsg);
+ snprintf(oldmsg, sizeof (oldmsg), "%s/%s",
+ from_dir, msgfile);
+ ext_hook("ref-hook", oldmsg, newmsg);
} else
- (void)ext_hook("add-hook", newmsg, (char *)0);
+ ext_hook("add-hook", newmsg, (char *)0);
return msgnum;
} else {
close(outfd);
if (deleting) {
- (void)snprintf(oldmsg, sizeof (oldmsg), "%s/%s", from_dir, msgfile);
- (void)ext_hook("ref-hook", oldmsg, newmsg);
+ snprintf(oldmsg, sizeof oldmsg,
+ "%s/%s",
+ from_dir,
+ msgfile);
+ ext_hook("ref-hook", oldmsg, newmsg);
} else
- (void)ext_hook("add-hook", newmsg, (char *)0);
+ ext_hook("add-hook", newmsg, (char *)0);
return msgnum;
}
*/
if (!nohook) {
- (void)snprintf(msgpath, sizeof (msgpath), "%s/%d", mp->foldpath, msgnum);
- (void)ext_hook("del-hook", msgpath, (char *)0);
+ snprintf(msgpath, sizeof (msgpath), "%s/%d",
+ mp->foldpath, msgnum);
+ ext_hook("del-hook", msgpath, (char *)0);
}
dp = m_name(msgnum);
** old message file is around for the hook.
*/
- (void)snprintf(oldmsg, sizeof (oldmsg), "%s/%d", mp->foldpath, msgnum);
- (void)snprintf(newmsg, sizeof (newmsg), "%s/%d", mp->foldpath, hole);
+ snprintf(oldmsg, sizeof (oldmsg), "%s/%d",
+ mp->foldpath, msgnum);
+ snprintf(newmsg, sizeof (newmsg), "%s/%d",
+ mp->foldpath, hole);
ext_hook("ref-hook", oldmsg, newmsg);
/* move the message file */
fout = stderr;
fin = stdin;
} else { /* Reading directly from terminal here */
- (void)tcgetattr(fileno(fin), &oterm);
+ tcgetattr(fileno(fin), &oterm);
term = oterm; /* Save original info */
term.c_lflag &= ~ECHO;
- (void)fputs(prompt, fout);
+ fputs(prompt, fout);
rewind(fout); /* implied flush */
- (void)tcsetattr(fileno(fin), TCSANOW, &term);
+ tcsetattr(fileno(fin), TCSANOW, &term);
}
for (p = buf; (ch = getc(fin)) != EOF && ch != '\n' &&
*p = '\0';
if (istty) {
- (void)tcsetattr(fileno(fin), TCSANOW, &oterm);
+ tcsetattr(fileno(fin), TCSANOW, &oterm);
rewind(fout);
- (void)fputc('\n', fout);
- (void)fclose(fin);
+ fputc('\n', fout);
+ fclose(fin);
}
return buf;
}
for (n = 0, cp = field; (c = getc(fp)) != EOF; *cp++ = c) {
if (c == '\n' && (c = getc(fp)) != ' ' && c != '\t') {
- (void)ungetc(c, fp);
+ ungetc(c, fp);
c = '\n';
break;
}
;
if (number)
- (void)printf("%d\t", ++count);
+ printf("%d\t", ++count);
if (text == (char *)0 && (sp = strrchr(cp, '/')) != (char *)0)
cp = sp + 1;
- (void)printf("%s\n", cp);
+ printf("%s\n", cp);
}
} while (*field != '\0' && *field != '-');
/* Clean up. */
free(field);
- (void)fclose(fp);
+ fclose(fp);
return;
}
for (n = 0, cp = field; (c = getc(fp)) != EOF; *cp++ = c) {
if (c == '\n' && (c = getc(fp)) != ' ' && c != '\t') {
- (void)ungetc(c, fp);
+ ungetc(c, fp);
c = '\n';
break;
}
rewind(fp);
else {
- (void)putc(c, tmp);
+ putc(c, tmp);
while ((c = getc(fp)) != EOF) {
- (void)putc(c, tmp);
+ putc(c, tmp);
if (c == '\n') {
- (void)ungetc(c = getc(fp), fp);
+ ungetc(c = getc(fp), fp);
if (c == '\n' || c == '-')
break;
*/
if (delete >= -1)
- (void)fclose(fp);
+ fclose(fp);
return 0;
}
if (rename(f1, f3) == NOTOK)
admonish(f3, "unable to rename %s to", f1);
- (void)snprintf(f3, sizeof (f3), "%s/%d", maildir, i);
+ snprintf(f3, sizeof (f3), "%s/%d", maildir, i);
ext_hook("del-hook", f3, (char *)0);
}
if (rename(f2, f1) == NOTOK)
admonish(f1, "unable to rename %s to", f2);
- (void)snprintf(f3, sizeof (f3), "%s/%d", maildir, i);
+ snprintf(f3, sizeof (f3), "%s/%d", maildir, i);
ext_hook("add-hook", f3, (char *)0);
copy_msg_flags(mp, i, msgnum);
if (incerr < 0) { /* error */
if (locked) {
GETGROUPPRIVS(); /* Be sure we can unlock mail file */
- (void) lkfclose(in, newmail); in = NULL;
+ lkfclose(in, newmail); in = NULL;
DROPGROUPPRIVS(); /*
** And then return us to normal
** privileges
*/
if (locked) {
GETGROUPPRIVS(); /* Be sure we can unlock mail file */
- (void) lkfclose(in, newmail); in = NULL;
+ lkfclose(in, newmail); in = NULL;
DROPGROUPPRIVS(); /* And then return us to normal privileges */
} else {
fclose(in); in = NULL;
}
if (!autof && gans("Do you want help? ", anoyes)) {
- (void)printf(
- "\n"
+ printf("\n"
"Prior to using nmh, it is necessary to have a file in your login\n"
"directory (%s) named %s which contains information\n"
"to direct certain nmh operations. The only item which is required\n"
** Run the external delete hook program.
*/
- (void)ext_hook("del-hook", maildir, (char *)0);
+ ext_hook("del-hook", maildir, (char *)0);
j = strlen(backup_prefix);
while ((dp = readdir(dd))) {
else
p++;
- (void)strcpy(body_file_name, p);
+ strcpy(body_file_name, p);
*p++ = ',';
- (void)strcpy(p, body_file_name);
- (void)strcat(p, ".orig");
+ strcpy(p, body_file_name);
+ strcat(p, ".orig");
- (void)unlink(composition_file_name);
+ unlink(composition_file_name);
}
}
** Make names for the temporary files.
*/
- (void)strncpy(body_file_name,
+ strncpy(body_file_name,
m_mktemp(toabsdir(invo_name), NULL, NULL),
sizeof (body_file_name));
- (void)strncpy(composition_file_name,
+ strncpy(composition_file_name,
m_mktemp(toabsdir(invo_name), NULL, NULL),
sizeof (composition_file_name));
while (get_line() != EOF && *field != '\0' && *field != '-')
if (strncasecmp(field, attachment_header_field_name, length)
!= 0 || field[length] != ':')
- (void)fprintf(composition_file, "%s\n", field);
+ fprintf(composition_file, "%s\n", field);
- (void)fputs("--------\n", composition_file);
+ fputs("--------\n", composition_file);
/*
** Copy the message body to a temporary file.
while ((c = getc(draft_file)) != EOF)
putc(c, body_file);
- (void)fclose(body_file);
+ fclose(body_file);
}
/*
}
}
- (void)fclose(composition_file);
+ fclose(composition_file);
/*
** We're ready to roll! Run mhbuild on the composition file.
** Note that mhbuild is in the context as buildmimeproc.
*/
- (void)sprintf(buf, "%s %s", buildmimeproc, composition_file_name);
+ sprintf(buf, "%s %s", buildmimeproc, composition_file_name);
if (system(buf) != 0) {
clean_up_temporary_files();
static void
clean_up_temporary_files(void)
{
- (void)unlink(body_file_name);
- (void)unlink(composition_file_name);
+ unlink(body_file_name);
+ unlink(composition_file_name);
return;
}
for (n = 0, p = field; (c = getc(draft_file)) != EOF; *p++ = c) {
if (c == '\n' && (c = getc(draft_file)) != ' ' && c != '\t') {
- (void)ungetc(c, draft_file);
+ ungetc(c, draft_file);
c = '\n';
break;
}
}
}
- (void)fclose(fp);
+ fclose(fp);
content_type = binary ?
"application/octet-stream" : "text/plain";
switch (attachformat) {
case 0:
/* Insert name, file mode, and Content-Id. */
- (void)fprintf(composition_file,
+ fprintf(composition_file,
"#%s; name=\"%s\"; x-unix-mode=0%.3ho",
content_type, ((p = strrchr(file_name, '/'))
== (char *)0) ? file_name : p + 1,
file_name);
}
- (void)sprintf(cmd, "file '%s'", file_name);
+ sprintf(cmd, "file '%s'", file_name);
if ((fp = popen(cmd, "r")) != (FILE *)0 &&
fgets(cmd, sizeof (cmd), fp) != (char *)0) {
if (*p != '\0')
/* Insert Content-Description. */
- (void)fprintf(composition_file, " [ %s ]", p);
+ fprintf(composition_file, " [ %s ]", p);
- (void)pclose(fp);
+ pclose(fp);
}
break;
** Finish up with the file name.
*/
- (void)fprintf(composition_file, " %s\n", file_name);
+ fprintf(composition_file, " %s\n", file_name);
return;
}
** messages in the folder.
*/
- (void)snprintf(f1, sizeof (f1), "%s/%d", mp->foldpath, old);
- (void)snprintf(newbuf, sizeof (newbuf), "%s/%d",
+ snprintf(f1, sizeof (f1), "%s/%d", mp->foldpath, old);
+ snprintf(newbuf, sizeof (newbuf), "%s/%d",
mp->foldpath, mp->hghmsg + 1);
ext_hook("ref-hook", f1, newbuf);
** to the real place.
*/
- (void)snprintf(f1, sizeof (f1), "%s/%d", mp->foldpath, new);
+ snprintf(f1, sizeof (f1), "%s/%d", mp->foldpath, new);
ext_hook("ref-hook", newbuf, f1);
if (rename(tmpfil, m_name(new)) == NOTOK)
*/
if (*(argp+1) == (char *)0) {
- (void)sprintf(buf, "$SHELL -c \"cd;pwd\"");
+ sprintf(buf, "$SHELL -c \"cd;pwd\"");
} else {
writesomecmd(buf, BUFSIZ, "cd", "pwd", argp);
}
** accustomed to.
*/
writelscmd(buf, sizeof(buf), argp);
- (void)system_in_dir(cwd, buf);
+ system_in_dir(cwd, buf);
break;
case ALISTCMDSW:
if (atoi(*argp) == 1)
*argp = "";
else
- (void)sprintf(*argp, "%d", atoi(*argp) - 1);
+ sprintf(*argp, "%d", atoi(*argp) - 1);
}
}
}