#define DESCR_FIELD "Content-Description"
#define DISPO_FIELD "Content-Disposition"
-#define isatom(c) (!isspace (c) && !iscntrl (c) && (c) != '(' \
- && (c) != ')' && (c) != '<' && (c) != '>' \
- && (c) != '@' && (c) != ',' && (c) != ';' \
- && (c) != ':' && (c) != '\\' && (c) != '"' \
- && (c) != '.' && (c) != '[' && (c) != ']')
-
/*
** Test for valid characters used in "token"
** as defined in RFC2045
charset.c concat.c context_del.c \
context_find.c context_read.c \
context_replace.c context_save.c \
- cpydata.c cpydgst.c crawl_folders.c \
+ cpydata.c crawl_folders.c \
dtime.c dtimep.c \
error.c execprog.c ext_hook.c folder_addmsg.c folder_delmsgs.c \
folder_free.c folder_read.c \
Makefile: Makefile.in ../config.status
cd .. && ./config.status $(subdir)/$@
-
+++ /dev/null
-/*
-** cpydgst.c -- copy from one fd to another in encapsulating mode
-** -- (do dashstuffing of input data).
-**
-** This code is Copyright (c) 2002, by the authors of nmh. See the
-** COPYRIGHT file in the root directory of the nmh distribution for
-** complete copyright information.
-*/
-
-#include <sysexits.h>
-#include <unistd.h>
-#include <h/mh.h>
-
-/*
-** We want to perform the substitution
-**
-** \n(-.*)\n --> \n- \1\n
-**
-** This is equivalent to the sed substitution
-**
-** sed -e 's%^-%- -%' < ifile > ofile
-**
-** but the routine below is faster than the pipe, fork, and exec.
-*/
-
-#define S1 0
-#define S2 1
-
-#define output(c) if (bp >= dp) {flush(); *bp++ = c;} else *bp++ = c
-#define flush() if ((j = bp - outbuf) && write(out, outbuf, j) != j) \
- adios(EX_IOERR, ofile, "error writing"); \
- else \
- bp = outbuf
-
-
-void
-cpydgst(int in, int out, char *ifile, char *ofile)
-{
- int i, j, state;
- char *cp, *ep;
- char *bp, *dp;
- char buffer[BUFSIZ], outbuf[BUFSIZ];
-
- dp = (bp = outbuf) + sizeof outbuf;
- for (state = S1; (i = read(in, buffer, sizeof buffer)) > 0;)
- for (ep = (cp = buffer) + i; cp < ep; cp++) {
- if (*cp == '\0')
- continue;
- switch (state) {
- case S1:
- if (*cp == '-') {
- output('-');
- output(' ');
- }
- state = S2; /* fall */
-
- case S2:
- output(*cp);
- if (*cp == '\n')
- state = S1;
- break;
- }
- }
-
- if (i == -1)
- adios(EX_IOERR, ifile, "error reading");
- flush();
-}
"Saturday", NULL
};
-struct zone {
- char *std;
- char *dst;
- int shift;
-};
-
static int dmsize[] = {
31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
c == '/' || c == '=' || c == '_')
#define qpspecial(c) (c < ' ' || c == '=' || c == '?' || c == '_')
-#define base64len(n) ((((n) + 2) / 3) * 4) /* String len to base64 len */
-#define strbase64(n) ((n) / 4 * 3) /* Chars that fit in base64 */
-
#define ENCODELINELIMIT 76
static void unfold_header(char **, int);
int, int);
static int scanstring(const char *, int *, int *, int *);
static int utf8len(const char *);
-/*static int pref_encoding(int, int, int);*/
/*
** Encode a message header using RFC 2047 encoding. We make the assumption
return *eightbitchars > 0;
}
-
-#if 0
-
-/*
-** This function is to be used to decide which encoding algorithm we should
-** use if one is not given. Basically, we pick whichever one is the shorter
-** of the two.
-**
-** Arguments are:
-**
-** ascii - Number of ASCII characters in to-be-encoded string.
-** specials - Number of ASCII characters in to-be-encoded string that
-** still require encoding under quoted-printable. Note that
-** these are included in the "ascii" total.
-** eightbit - Eight-bit characters in the to-be-encoded string.
-**
-** Returns one of CE_BASE64 or CE_QUOTED.
-**/
-static int
-pref_encoding(int ascii, int specials, int eightbits)
-{
- /*
- ** The length of the q-p encoding is:
- **
- ** ascii - specials + (specials + eightbits) * 3.
- **
- ** The length of the base64 encoding is:
- **
- ** base64len(ascii + eightbits) (See macro for details)
- */
- return base64len(ascii + eightbits) < (ascii - specials +
- (specials + eightbits) * 3) ? CE_BASE64 : CE_QUOTED;
-}
-
-#endif
}
}
-void
-unset_unseen(struct msgs *mp, int msgnum)
-{
- assert_msg_range(mp, msgnum);
- mp->msgstats[msgnum - mp->lowoff] &= ~SELECT_UNSEEN;
-}
-
/*
** private/public sequences