From: markus schnalke Date: Wed, 21 Mar 2012 13:25:55 +0000 (+0100) Subject: Renamed the mbx_* functions to mbox_*, because mbx is another mail box format. X-Git-Tag: mmh-thesis-end~277 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=39d862d5f0ba0258707ef5a74cff63243f58e425;p=mmh Renamed the mbx_* functions to mbox_*, because mbx is another mail box format. --- diff --git a/h/dropsbr.h b/h/dropsbr.h index c80770a..f3270be 100644 --- a/h/dropsbr.h +++ b/h/dropsbr.h @@ -5,6 +5,6 @@ /* ** prototypes */ -int mbx_open(char *, uid_t, gid_t, mode_t); -int mbx_copy(int, int); -int mbx_close(char *, int); +int mbox_open(char *, uid_t, gid_t, mode_t); +int mbox_copy(int, int); +int mbox_close(char *, int); diff --git a/uip/dropsbr.c b/uip/dropsbr.c index f093c2f..6a7eb78 100644 --- a/uip/dropsbr.c +++ b/uip/dropsbr.c @@ -25,7 +25,7 @@ ** a file or maildrop. */ int -mbx_open(char *file, uid_t uid, gid_t gid, mode_t mode) +mbox_open(char *file, uid_t uid, gid_t gid, mode_t mode) { int i, count, fd; struct stat st; @@ -102,7 +102,7 @@ mbx_open(char *file, uid_t uid, gid_t gid, mode_t mode) ** Append message to end of mbox. */ int -mbx_copy(int to, int from) +mbox_copy(int to, int from) { int i; char buffer[BUFSIZ]; @@ -194,7 +194,7 @@ mbx_copy(int to, int from) ** Close and unlock file/maildrop. */ int -mbx_close(char *mailbox, int md) +mbox_close(char *mailbox, int md) { if (lkclose(md, mailbox) == 0) return OK; diff --git a/uip/packf.c b/uip/packf.c index 70065c0..23ee335 100644 --- a/uip/packf.c +++ b/uip/packf.c @@ -103,7 +103,7 @@ main(int argc, char **argv) admonish(msgnam, "unable to read message"); break; } - if (mbx_copy(fileno(stdout), fd) == NOTOK) { + if (mbox_copy(fileno(stdout), fd) == NOTOK) { adios(NULL, "error writing to stdout"); } close(fd); diff --git a/uip/rcvpack.c b/uip/rcvpack.c index 827373f..e00e1fd 100644 --- a/uip/rcvpack.c +++ b/uip/rcvpack.c @@ -67,7 +67,7 @@ main(int argc, char **argv) /* copy stdin to stdout, converting rfc822 message to mbox */ if (!file) { - if (mbx_copy(fileno(stdout), fileno(stdin)) == NOTOK) { + if (mbox_copy(fileno(stdout), fileno(stdin)) == NOTOK) { done(RCV_MBX); } done(RCV_MOK); @@ -75,18 +75,18 @@ main(int argc, char **argv) } /* open and lock the file */ - if ((md = mbx_open(file, getuid(), getgid(), m_gmprot())) + if ((md = mbox_open(file, getuid(), getgid(), m_gmprot())) == NOTOK) done(RCV_MBX); /* append the message */ - if (mbx_copy(md, fileno(stdin)) == NOTOK) { - mbx_close(file, md); + if (mbox_copy(md, fileno(stdin)) == NOTOK) { + mbox_close(file, md); done(RCV_MBX); } /* close and unlock the file */ - if (mbx_close(file, md) == NOTOK) + if (mbox_close(file, md) == NOTOK) done(RCV_MBX); done(RCV_MOK); diff --git a/uip/slocal.c b/uip/slocal.c index 6b78c1e..4e8c30d 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -1033,7 +1033,7 @@ usr_file(int fd, char *mailbox) verbose_printf(" (mbox style)"); /* open and lock the file */ - if ((md = mbx_open(mailbox, pw->pw_uid, pw->pw_gid, + if ((md = mbox_open(mailbox, pw->pw_uid, pw->pw_gid, m_gmprot())) == -1) { if (verbose) adorn("", "unable to open:"); @@ -1043,14 +1043,14 @@ usr_file(int fd, char *mailbox) lseek(fd, (off_t) 0, SEEK_SET); /* append message to file */ - if (mbx_copy(md, fd) == -1) { + if (mbox_copy(md, fd) == -1) { if (verbose) adorn("", "error writing to:"); return -1; } /* close and unlock file */ - if (mbx_close(mailbox, md) == NOTOK) { + if (mbox_close(mailbox, md) == NOTOK) { if (verbose) adorn("", "error closing:"); return -1;