diff -uNr mutt-1.0.1/Makefile.am mutt-1.0.1.new/Makefile.am --- mutt-1.0.1/Makefile.am Sat Oct 16 08:19:07 1999 +++ mutt-1.0.1.new/Makefile.am Thu Feb 24 12:39:33 2000 @@ -17,21 +17,21 @@ main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \ postpone.c query.c recvattach.c rfc822.c \ rfc1524.c rfc2047.c score.c send.c sendlib.c signal.c sort.c \ - status.c system.c thread.c charset.c history.c lib.c + status.c system.c thread.c charset.c history.c lib.c khenkan.c mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(INTLLIBS) mutt_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(INTLDEPS) DEFS=-DSHAREDIR=\"$(sharedir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \ -DHAVE_CONFIG_H=1 -INCLUDES=-I. -I$(includedir) +INCLUDES=-I. -I$(includedir) -DKANJI non_us_sources = pgp.c pgpinvoke.c pgpkey.c pgppubring.c sha1dgst.c \ gnupgparse.c sha.h sha_locl.h \ doc/language.txt doc/language50.txt OPS.PGP doc/PGP-Notes.txt EXTRA_mutt_SOURCES = pgp.c pgpinvoke.c pgpkey.c pgppubring.c sha1dgst.c \ - gnupgparse.c resize.c dotlock.c pop.c imap.c socket.c + gnupgparse.c resize.c dotlock.c pop.c md5c.c md5ify.c imap.c socket.c EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP TODO configure acconfig.h attach.h \ buffy.h charset.h config.h copy.h dotlock.h functions.h gen_defs \ diff -uNr mutt-1.0.1/commands.c mutt-1.0.1.new/commands.c --- mutt-1.0.1/commands.c Thu Jan 6 03:55:03 2000 +++ mutt-1.0.1.new/commands.c Thu Feb 24 12:39:33 2000 @@ -46,6 +46,10 @@ +#ifdef KANJI +#include "khenkan.h" +#endif + #include #include #include @@ -120,8 +124,13 @@ fputs ("\n\n", fpout); } +#ifdef KANJI + if (mutt_copy_message (fpout, Context, cur, cmflags, + (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_KDECODE) == -1) +#else if (mutt_copy_message (fpout, Context, cur, cmflags, (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM) == -1) +#endif { fclose (fpout); unlink (tempfile); @@ -335,8 +344,8 @@ int method = Sort; /* save the current method in case of abort */ switch (mutt_multi_choice (reverse ? - _("Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: ") : - _("Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore?: "), + _("Rev-Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore/(m)l?: ") : + _("Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore/(m)l?: "), _("dfrsotuzc"))) { case -1: /* abort - don't resort */ @@ -377,6 +386,11 @@ case 9: /* s(c)ore */ Sort = SORT_SCORE; break; +#ifdef KANJI + case 10: + Sort = SORT_ML; + break; +#endif } if (reverse) Sort |= SORT_REVERSE; diff -uNr mutt-1.0.1/configure.in mutt-1.0.1.new/configure.in --- mutt-1.0.1/configure.in Tue Jan 18 14:19:03 2000 +++ mutt-1.0.1.new/configure.in Thu Feb 24 12:42:12 2000 @@ -7,7 +7,7 @@ AC_PREREQ(2.12) -ALL_LINGUAS="de ru it es uk fr pl nl cs id sk ko el zh_TW.Big5 pt_BR sv gl eo" +ALL_LINGUAS="de ru it es uk fr pl nl cs id sk ko el zh_TW.Big5 pt_BR sv gl eo ja" AC_CANONICAL_HOST @@ -40,8 +40,10 @@ OPS='$(srcdir)/OPS' if test -f $srcdir/EXPORTABLE ; then SUBVERSION="us" + JPVERSION="-jp0" else SUBVERSION="i" + JPVERSION="-jp0" PGPPATH=no AC_PATH_PROG(GPG, gpg, no) @@ -86,7 +88,7 @@ fi AC_SUBST(OPS) -AC_DEFINE_UNQUOTED(SUBVERSION, "$SUBVERSION") +AC_DEFINE_UNQUOTED(SUBVERSION, "$SUBVERSION$JPVERSION") AC_SUBST(SUBVERSION) AC_PATH_PROG(ISPELL, ispell, no) @@ -391,7 +393,7 @@ AC_DEFINE(USE_POP) AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o" + MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o md5c.o md5ify.o" fi ]) diff -uNr mutt-1.0.1/configure.in.rej mutt-1.0.1.new/configure.in.rej --- mutt-1.0.1/configure.in.rej Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/configure.in.rej Thu Feb 24 12:39:33 2000 @@ -0,0 +1,34 @@ +*************** +*** 7,13 **** + + AC_PREREQ(2.12) + +- ALL_LINGUAS="de ru it es uk fr pl nl cs id sk ko el zh_TW.Big5 pt_BR" + + AC_CANONICAL_HOST + +--- 7,13 ---- + + AC_PREREQ(2.12) + ++ ALL_LINGUAS="de ru it es uk fr pl nl cs id sk ko el zh_TW.Big5 pt_BR ja" + + AC_CANONICAL_HOST + +*************** +*** 390,396 **** + [ AC_DEFINE(USE_POP) + AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) + AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) +- MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o" + ]) + + AC_ARG_ENABLE(imap, [ --enable-imap Enable IMAP support], +--- 392,398 ---- + [ AC_DEFINE(USE_POP) + AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) + AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) ++ MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o md5c.o md5ify.o" + ]) + + AC_ARG_ENABLE(imap, [ --enable-imap Enable IMAP support], diff -uNr mutt-1.0.1/copy.c mutt-1.0.1.new/copy.c --- mutt-1.0.1/copy.c Thu Jan 6 03:55:04 2000 +++ mutt-1.0.1.new/copy.c Thu Feb 24 12:39:33 2000 @@ -37,6 +37,9 @@ static int copy_delete_attach (BODY *b, FILE *fpin, FILE *fpout, char *date); +#ifdef KANJI +int jis2disp(unsigned char *, unsigned char *, int); +#endif /* Ok, the only reason for not merging this with mutt_copy_header() * below is to avoid creating a HEADER structure in message_handler(). */ @@ -46,7 +49,13 @@ { int from = 0; int ignore = 0; +#ifdef KANJI + char buf[LONG_STRING]; + unsigned char kbuf[LONG_STRING]; + int ch; +#else char buf[STRING]; /* should be long enough to get most fields in one pass */ +#endif char *nl; LIST *t; char **headers; @@ -129,8 +138,24 @@ nl = strchr (buf, '\n'); /* Read a line */ +#ifdef KANJI + if ((fgets (buf, STRING, in)) == NULL) + break; + if (flags & CH_KDECODE) { + jis2disp ((unsigned char *)kbuf, (unsigned char *)buf, strlen (buf)); + strcpy (buf, (char *)kbuf); + } +#else if ((fgets (buf, sizeof (buf), in)) == NULL) break; +#endif + +#ifdef KANJI + if ((ch = fgetc (in)) != ' ' && ch != '\t') + ungetc (ch, in); + else + buf[strlen (buf) - 1] = ' '; +#endif /* Is it the begining of a header? */ if (nl && buf[0] != ' ' && buf[0] != '\t') @@ -202,7 +227,11 @@ { if (headers[x]) { - if (flags & CH_DECODE) +#ifdef KANJI + if (option (OPTWEED) && (flags & CH_DECODE)) +#else + if (flags & CH_DECODE) +#endif rfc2047_decode (headers[x], headers[x], mutt_strlen (headers[x]) + 1); /* We couldn't do the prefixing when reading because RFC 2047 @@ -557,8 +586,15 @@ } } } - else if (mutt_copy_bytes (fpin, fpout, body->length) == -1) - return -1; + else +#ifdef KANJI + if (chflags & CH_KDECODE) { + return mutt_copy_wbytes (&s, fpin, fpout, body->length); + } else +#endif + if (mutt_copy_bytes (fpin, fpout, body->length) == -1) { + return -1; + } } if ((flags & M_CM_UPDATE) && (flags & M_CM_NOHEADER) == 0 diff -uNr mutt-1.0.1/curs_main.c mutt-1.0.1.new/curs_main.c --- mutt-1.0.1/curs_main.c Thu Jan 6 03:55:04 2000 +++ mutt-1.0.1.new/curs_main.c Thu Feb 24 12:39:33 2000 @@ -39,6 +39,10 @@ +#ifdef KANJI +#include "khenkan.h" +#endif + #include #include #include @@ -85,12 +89,35 @@ extern const char *ReleaseDate; +#ifdef KANJI +int jis2disp(unsigned char *, unsigned char *, int); +#endif void index_make_entry (char *s, size_t l, MUTTMENU *menu, int num) { format_flag flag = M_FORMAT_MAKEPRINT | M_FORMAT_ARROWCURSOR | M_FORMAT_INDEX; int edgemsgno, reverse = Sort & SORT_REVERSE; HEADER *tmp, *h = Context->hdrs[Context->v2r[num]]; +#ifdef KANJI + unsigned char kbuf[2048]; + unsigned char *from; + unsigned char *subject = + (unsigned char *)Context->hdrs[Context->v2r[num]]->env->subject; + + if ( Context->hdrs[Context->v2r[num]]->env->from ) + from = (unsigned char *)Context->hdrs[Context->v2r[num]]->env->from->personal; + else + from = NULL; + + if (from) { + jis2disp (kbuf, from, strlen ((char *)from)); + strcpy ((char *)from, (char *)kbuf); + } + if (subject) { + jis2disp (kbuf, subject, strlen ((char *)subject)); + strcpy ((char *)subject, (char *)kbuf); + } +#endif if ((Sort & SORT_MASK) == SORT_THREADS && h->tree) { flag |= M_FORMAT_TREE; /* display the thread tree */ diff -uNr mutt-1.0.1/gen_defs.kanji mutt-1.0.1.new/gen_defs.kanji --- mutt-1.0.1/gen_defs.kanji Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/gen_defs.kanji Thu Feb 24 12:39:33 2000 @@ -0,0 +1,29 @@ +#!/bin/sh + +echo '/* Automatically generated by gen_defs. Do not edit! */' +echo '' + +for mode in help; do + case $mode in + help) + echo "#ifdef HELP_C" + echo "#ifdef KANJI" + echo "const char *JHelpStrings[] = {" + expr='s;^[^ ]* *\(.*\); \1,;' + ;; + *) + echo "enum {" + expr='s;^\([^ ]*\).*; \1,;' + ;; + esac + for i in $*; do + sed -e "$expr" < $i + done + echo ' NULL' + echo "};" + if test $mode = help; then + echo "#endif /* KANJI */" + echo "#endif /* MAIN_C */" + echo '' + fi +done diff -uNr mutt-1.0.1/globals.h mutt-1.0.1.new/globals.h --- mutt-1.0.1/globals.h Thu Jan 6 03:55:05 2000 +++ mutt-1.0.1.new/globals.h Thu Feb 24 12:39:33 2000 @@ -51,6 +51,7 @@ WHERE char *Locale; WHERE char *MailcapPath; WHERE char *Maildir; +WHERE char *MHPath; WHERE char *MsgFmt; WHERE char *Muttrc INITVAL (NULL); WHERE char *Outbox; @@ -98,6 +99,10 @@ /* bit vector for the yes/no/ask variable type */ WHERE unsigned long QuadOptions INITVAL (0); + +#ifdef KANJI +WHERE char *SpoilChar; +#endif WHERE unsigned short Counter INITVAL (0); diff -uNr mutt-1.0.1/handler.c mutt-1.0.1.new/handler.c --- mutt-1.0.1/handler.c Thu Jan 6 03:55:06 2000 +++ mutt-1.0.1.new/handler.c Thu Feb 24 12:39:33 2000 @@ -23,6 +23,9 @@ #include #include +#ifdef KANJI +#include "khenkan.h" +#endif #include "mutt.h" #include "mutt_curses.h" #include "rfc1524.h" @@ -38,6 +41,9 @@ #endif +#ifdef KANJI +int jis2disp(unsigned char *, unsigned char *, int); +#endif typedef void handler_f (BODY *, STATE *); typedef handler_f *handler_t; @@ -110,6 +116,9 @@ state_maybe_utf8_putc(s, c, is_utf8, chs, map); } +#ifdef KANJI + state_prefix_flush(s); +#endif state_reset_prefix(s); if(is_utf8) @@ -207,6 +216,9 @@ state_maybe_utf8_putc(s, ch, is_utf8, chs, map); } +#ifdef KANJI + state_prefix_flush(s); +#endif state_reset_prefix(s); if(is_utf8) @@ -288,6 +300,9 @@ else state_maybe_utf8_putc(s, ch, is_utf8, chs, map); } +#ifdef KANJI + state_prefix_flush(s); +#endif state_reset_prefix(s); } @@ -354,6 +369,9 @@ } } +#ifdef KANJI + state_prefix_flush(s); +#endif state_reset_prefix(s); if(is_utf8) state_fput_utf8(s, '\0', chs); @@ -721,6 +739,9 @@ int c = 0; int tag_len = 0; char tag[LONG_STRING + 1]; +#ifdef KANJI + unsigned char buf[LONG_STRING], kbuf[LONG_STRING], *kp; +#endif memset (&stte, 0, sizeof (stte)); stte.s = s; @@ -728,6 +749,10 @@ stte.line_max = stte.WrapMargin * 4; stte.line = (char *) safe_calloc (1, stte.line_max + 1); stte.param = (char *) safe_calloc (1, STRING); +#ifdef KANJI + buf[0] = kbuf[0] = '\0'; + kp = kbuf; +#endif stte.param_len = STRING; stte.param_used = 0; @@ -742,10 +767,24 @@ { if (state != ST_EOF) { +#ifdef KANJI + if (*kp) + c = *kp++; + else if (bytes <= 0 || fgets ((char *)buf, sizeof (buf), s->fpin) == NULL) + state = ST_EOF; + else + { + bytes -= strlen ((char *)buf); + jis2disp (kbuf, buf, strlen ((char *)buf)); + kp = kbuf; + c = *kp++; + } +#else if (!bytes || (c = fgetc (s->fpin)) == EOF) state = ST_EOF; else bytes--; +#endif } switch (state) @@ -810,8 +849,12 @@ enriched_flush (&stte, 1); else { +#ifdef KANJI + kp--; +#else ungetc (c, s->fpin); bytes++; +#endif state = TEXT; } break; @@ -1166,8 +1209,19 @@ return; } - mutt_copy_bytes (s->fpin, fpin, a->length); +#ifdef KANJI + { + char *charset = mutt_get_parameter ("charset", a->parameter); + if (!option (OPTWEED) || !charset || strncasecmp ("iso-2022-jp", charset, strlen ("iso-2022-jp")) == 0) + mutt_copy_wbytes (s, s->fpin, fpin, a->length); + else + mutt_copy_bytes (s->fpin, fpin, a->length); + } +#else + + mutt_copy_bytes (s->fpin, fpin, a->length); +#endif if(!piped) { fclose (fpin); @@ -1309,6 +1363,9 @@ void mutt_decode_attachment (BODY *b, STATE *s) { fseek (s->fpin, b->offset, 0); +#ifdef KANJI + s->istext = mutt_is_text_type (b->type, b->subtype); +#endif switch (b->encoding) { case ENCQUOTEDPRINTABLE: @@ -1358,7 +1415,19 @@ plaintext = 1; } else if (mutt_strcasecmp ("enriched", b->subtype) == 0) +#ifdef KANJI + { + char *charset = mutt_get_parameter ("charset", b->parameter); + if (strncasecmp ("iso-2022-jp", charset, 11) == 0 && + !option (OPTWEED)) { + plaintext = 1; + } + else +#endif handler = text_enriched_handler; +#ifdef KANJI + } +#endif else if (mutt_strcasecmp ("rfc822-headers", b->subtype) == 0) plaintext = 1; } @@ -1468,7 +1537,6 @@ b->type = TYPETEXT; mutt_decode_attachment (b, s); - if (decode) { b->length = ftell (s->fpout); diff -uNr mutt-1.0.1/hdrline.c mutt-1.0.1.new/hdrline.c --- mutt-1.0.1/hdrline.c Thu Jan 6 03:55:06 2000 +++ mutt-1.0.1.new/hdrline.c Thu Feb 24 12:39:33 2000 @@ -216,6 +216,9 @@ HEADER *hdr; }; +#ifdef KANJI +int jp_snprintf(char *, int, char *, char *); +#endif static const char * hdr_format_str (char *dest, size_t destlen, @@ -238,6 +241,9 @@ #define THREAD_NEW (threads && hdr->collapsed && hdr->num_hidden > 1 && mutt_thread_contains_unread (ctx, hdr) == 1) #define THREAD_OLD (threads && hdr->collapsed && hdr->num_hidden > 1 && mutt_thread_contains_unread (ctx, hdr) == 2) size_t len; +#ifdef KANJI + char *subj_strt, *s1; +#endif hdr = hfi->hdr; ctx = hfi->ctx; @@ -400,13 +406,21 @@ buf2[0] = 0; rfc822_write_address (buf2, sizeof (buf2), hdr->env->from); snprintf (fmt, sizeof (fmt), "%%%ss", prefix); +#ifdef KANJI + jp_snprintf (dest, destlen, fmt, buf2); +#else snprintf (dest, destlen, fmt, buf2); +#endif break; case 'F': snprintf (fmt, sizeof (fmt), "%%%ss", prefix); make_from (hdr->env, buf2, sizeof (buf2), 0); +#ifdef KANJI + jp_snprintf (dest, destlen, fmt, buf2); +#else snprintf (dest, destlen, fmt, buf2); +#endif break; case 'i': @@ -432,7 +446,11 @@ { make_from (hdr->env, buf2, sizeof (buf2), 1); snprintf (fmt, sizeof (fmt), "%%%ss", prefix); +#ifdef KANJI + jp_snprintf (dest, destlen, fmt, buf2); +#else snprintf (dest, destlen, fmt, buf2); +#endif } else if (!check_for_mailing_list (hdr->env->to, NULL, NULL, 0) && !check_for_mailing_list (hdr->env->cc, NULL, NULL, 0)) @@ -507,18 +525,54 @@ case 's': snprintf (fmt, sizeof (fmt), "%%%ss", prefix); +#ifdef KANJI + /* very ad-hoc... maybe should consider reply_regexp */ + subj_strt = s1 = hdr->env->subject; + if ( s1 && option (OPTNUMBML) ) { + /* trim [ml-name:01234] or [ml-name 01234] */ + SKIPWS (s1); + if ('[' == *s1) { + char *s2; + + for (s2 = s1+1; *s2 && ':' != *s2 && ' ' != *s2; ++s2) + ; + if (':' == *s2 || ' ' == *s2) { + ++s2; + SKIPWS (s2); + for (s2; *s2 && isdigit(*s2); ++s2) + ; + if (']' == *s2) { + ++s2; + SKIPWS (s2); + subj_strt = s2; + } + } + } + } +#endif if (flags & M_FORMAT_TREE) { if (flags & M_FORMAT_FORCESUBJ) { +#ifdef KANJI + snprintf (buf2, sizeof (buf2), "%s%s", hdr->tree, + NONULL (hdr->env->subject ? subj_strt : "") ); + jp_snprintf (dest, destlen, fmt, buf2); +#else snprintf (buf2, sizeof (buf2), "%s%s", hdr->tree, NONULL (hdr->env->subject)); snprintf (dest, destlen, fmt, buf2); +#endif } else snprintf (dest, destlen, fmt, hdr->tree); } else +#ifdef KANJI + jp_snprintf (dest, destlen, fmt, + NONULL (hdr->env->subject ? subj_strt : "")); +#else snprintf (dest, destlen, fmt, NONULL (hdr->env->subject)); +#endif break; case 'S': @@ -556,7 +610,11 @@ snprintf (buf2, sizeof (buf2), "Cc %s", mutt_get_name (hdr->env->cc)); } snprintf (fmt, sizeof (fmt), "%%%ss", prefix); +#ifdef KANJI + jp_snprintf (dest, destlen, fmt, buf2); +#else snprintf (dest, destlen, fmt, buf2); +#endif break; case 'T': diff -uNr mutt-1.0.1/init.c mutt-1.0.1.new/init.c --- mutt-1.0.1/init.c Thu Jan 6 03:55:07 2000 +++ mutt-1.0.1.new/init.c Thu Feb 24 12:39:33 2000 @@ -1760,6 +1760,11 @@ FREE (&AliasFile); AliasFile = safe_strdup (NONULL(Muttrc)); + snprintf (buffer, sizeof (buffer), NONULL(MHPath) ); + FREE (&MHPath); + mutt_expand_path (buffer, sizeof (buffer)); + MHPath = safe_strdup ( buffer ); + /* Process the global rc file if it exists and the user hasn't explicity requested not to via "-n". */ if (!skip_sys_rc) diff -uNr mutt-1.0.1/init.h mutt-1.0.1.new/init.h --- mutt-1.0.1/init.h Thu Jan 6 03:55:07 2000 +++ mutt-1.0.1.new/init.h Thu Feb 24 12:39:33 2000 @@ -68,6 +68,15 @@ struct option_t MuttVars[] = { { "abort_nosubject", DT_QUAD, R_NONE, OPT_SUBJECT, M_ASKYES }, +#ifdef KANJI + { "edit_forward", DT_QUAD, R_NONE, OPT_EDITFORWARD, M_YES }, + { "msgid", DT_BOOL, R_NONE, OPTMSGID, 1 }, + { "numbered_ml", DT_BOOL, R_NONE, OPTNUMBML, 0 }, + { "pager_hdrs_only", DT_BOOL, R_NONE, OPTPAGERHDRSONLY, 0 }, + { "pager_spoiler", DT_BOOL, R_NONE, OPTPAGERSPOIL, 0 }, + { "pager_spoiler_char", DT_STR, R_NONE, UL &SpoilChar, UL "*" }, + { "kanjithread", DT_BOOL, R_NONE, OPTKANJITHREAD, 0 }, +#endif { "abort_unmodified", DT_QUAD, R_NONE, OPT_ABORT, M_YES }, { "alias_file", DT_PATH, R_NONE, UL &AliasFile, UL "~/.muttrc" }, { "alias_format", DT_STR, R_NONE, UL &AliasFmt, UL "%2n %t %-10a %r" }, @@ -86,7 +95,11 @@ { "beep", DT_BOOL, R_NONE, OPTBEEP, 1 }, { "beep_new", DT_BOOL, R_NONE, OPTBEEPNEW, 0 }, { "bounce_delivered", DT_BOOL, R_NONE, OPTBOUNCEDELIVERED, 1 }, +#ifdef KANJI + { "charset", DT_STR, R_NONE, UL &Charset, UL "iso-2022-jp" }, +#else { "charset", DT_STR, R_NONE, UL &Charset, UL "iso-8859-1" }, +#endif { "check_new", DT_BOOL, R_NONE, OPTCHECKNEW, 1 }, { "collapse_unread", DT_BOOL, R_NONE, OPTCOLLAPSEUNREAD, 1 }, { "uncollapse_jump", DT_BOOL, R_NONE, OPTUNCOLLAPSEJUMP, 0 }, @@ -150,6 +163,7 @@ { "menu_scroll", DT_BOOL, R_NONE, OPTMENUSCROLL, 0 }, { "meta_key", DT_BOOL, R_NONE, OPTMETAKEY, 0 }, { "mh_purge", DT_BOOL, R_NONE, OPTMHPURGE, 0 }, + { "mh_path", DT_PATH, R_NONE, UL &MHPath, 0 }, { "mime_forward", DT_QUAD, R_NONE, OPT_MIMEFWD, M_NO }, { "mime_forward_decode", DT_BOOL, R_NONE, OPTMIMEFORWDECODE, 0 }, { "mime_fwd", DT_SYN, R_NONE, UL "mime_forward", 0 }, @@ -222,6 +236,7 @@ { "pipe_decode", DT_BOOL, R_NONE, OPTPIPEDECODE, 0 }, { "pipe_sep", DT_STR, R_NONE, UL &PipeSep, UL "\n" }, #ifdef USE_POP + { "pop_apop", DT_BOOL, R_NONE, OPTPOPAPOP, 0 }, { "pop_delete", DT_BOOL, R_NONE, OPTPOPDELETE, 0 }, { "pop_host", DT_STR, R_NONE, UL &PopHost, UL "" }, { "pop_last", DT_BOOL, R_NONE, OPTPOPLAST, 0 }, diff -uNr mutt-1.0.1/khenkan.c mutt-1.0.1.new/khenkan.c --- mutt-1.0.1/khenkan.c Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/khenkan.c Thu Feb 24 12:39:33 2000 @@ -0,0 +1,1199 @@ +#ifdef KANJI +/* + * 勝田さんの日本語slrn用の同名sourceを + * 菊谷がmutt用に修正しています。 + */ + +#include +#include +#include +#include +#include +#include +#include "khenkan.h" +#include "mutt.h" + +/* 他のモジュールで日本語コードを変換する時に一時的に使う領域 */ +/* このモジュールでは使ってはいけない */ +unsigned char jtmp_str[JTMP_LEN]; + +/* X0201 / X0208 conversion tables */ + +/* X0201 kana conversion table */ +/* 90-9F A0-DF */ +static unsigned int cv[]= { +0x21,0x21,0x21,0x23,0x21,0x56,0x21,0x57, +0x21,0x22,0x21,0x26,0x25,0x72,0x25,0x21, +0x25,0x23,0x25,0x25,0x25,0x27,0x25,0x29, +0x25,0x63,0x25,0x65,0x25,0x67,0x25,0x43, +0x21,0x3c,0x25,0x22,0x25,0x24,0x25,0x26, +0x25,0x28,0x25,0x2a,0x25,0x2b,0x25,0x2d, +0x25,0x2f,0x25,0x31,0x25,0x33,0x25,0x35, +0x25,0x37,0x25,0x39,0x25,0x3b,0x25,0x3d, +0x25,0x3f,0x25,0x41,0x25,0x44,0x25,0x46, +0x25,0x48,0x25,0x4a,0x25,0x4b,0x25,0x4c, +0x25,0x4d,0x25,0x4e,0x25,0x4f,0x25,0x52, +0x25,0x55,0x25,0x58,0x25,0x5b,0x25,0x5e, +0x25,0x5f,0x25,0x60,0x25,0x61,0x25,0x62, +0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69, +0x25,0x6a,0x25,0x6b,0x25,0x6c,0x25,0x6d, +0x25,0x6f,0x25,0x73,0x21,0x2b,0x21,0x2c}; + +static int Zenkaku1; /* 変換した全角文字の上位 1 バイト */ +static int Zenkaku2; /* 変換した全角文字の下位 1 バイト */ + +/* 半角カタカナ(1 or 2 文字) -> 全角カタカナ(1 文字) + * s : 入力する文字列へのポインタ(EUC の場合は SS2 から始まる) + * return: 全角に変換した半角カタカナの文字数(EUC の場合は SS2 も含む) + * 0: 半角カタカナではなかった + * 1: 入力を一文字だけ全角カタカナに変換した(EUC の場合は 2) + * 2: 濁点、半濁点も含めて、入力を二文字全角に変換した(EUC の場合は 4) + */ +static int mutt_han2zen(unsigned char *s) +{ + int ch, d1, d2, result, euc = 0; + + if ((*s | 0x80) == SS2) { + s++; + euc = 1; + } + ch = ((*s++ & 0x7f) - 0x20) << 1; + if (ch < 0 || ch >= 0x80) { + return (0); + } + d1 = cv[ch]; + d2 = cv[ch + 1]; + result = 1; + + if (d1 == 0x25 + && ((d2 >= 0x2b && d2 <= 0x48) || (d2 >= 0x4f && d2 <= 0x5b))) { + ch = *s++; + if (euc) { + if ((ch | 0x80) == SS2) { + ch = *s++; + } else { + ch = 0; + } + } + ch &= 0x7f; + if (ch == 0x5e) { /* 濁点 */ + d2++; + result = 2; + } else if (ch == 0x5f && d2 >= 0x4f) { /* 半濁点 */ + d2 += 2; + result = 2; + } + } + Zenkaku1 = d1; + Zenkaku2 = d2; + return (result << euc); +} + +/* + * EUC -> JIS + * 入力がJISだったらそのまま通すこと(なってる?) + * 漢字の途中で切れてもそのまま(ASCII に戻さない) + * 半角カタカナは全角に直す。 + * return 0: success + * 1: 途中で切れた + */ +#define TO_ASCII(p) (*(p)++ = ESC, *(p)++ = '(', *(p)++ = 'B') +#define TO_JIS208(p) (*(p)++ = ESC, *(p)++ = '$', *(p)++ = 'B') +#define TO_JIS201(p) (*(p)++ = ESC, *(p)++ = '(', *(p)++ = 'I') + +int euc2jis(unsigned char *d, unsigned char *s, int dlen) +{ + int k = 0, ch; + + while(dlen > 0) { /* ASCII character or JIS encoding */ + ch = *s++; + if (ch & 0x80) { + if (k == 0) { + dlen -= 3; + if (dlen < 0) break; + *d++ = ESC; + *d++ = '$'; + *d++ = 'B'; + k = 1; + } + if (ch != SS2) { + dlen--; + *d++ = ch & 0x7f; + ch = *s++; + } else { /* 半角カタカナ。全角に変換 */ + s--; + s += mutt_han2zen(s); + dlen--; + *d++ = Zenkaku1; + ch = Zenkaku2; + } + if (dlen <= 0) break; + } else if (k == 1) { + dlen -= 3; + if (dlen < 0) break; + *d++ = ESC; + *d++ = '('; + *d++ = 'B'; + k = 0; + } + if (ch == '\0') break; + dlen--; + *d++ = ch & 0x7f; + } + *d = '\0'; + if (dlen < 0) { + return 1; + } else { + return 0; + } +} + +/* + * JIS(, EUC) -> EUC + * d: 変換後の文字列 + * s: 変換前の文字列 + * dlen: 文字列の長さ(最後の '\0' は含まない) + * + * return + * 0: ASCII + * 1: JIS + * 2: EUC + * 以下は変換結果不定 + * 3: SJIS かも知れない + * 4: 7bit で 2 バイト文字の途中で切れた、または JIS の終了シーケンスが無い + * 5: 8bit で SJIS でも EUC でもない + */ +typedef enum {_ASCII, JISX0208, JISX0201, OTHER} Kanji_Type; + +int jis2euc(unsigned char *d, unsigned char *s, int dlen) +{ + unsigned char c1, c2 = 0, *seq; + Kanji_Type kanji_mode = _ASCII; + int ctrl = 0, hibit = 0; + + while((c1 = *s++) && dlen > 0) { + if (c1 & 0x80) { /* 8bit code ??? */ /* まさかEUC? */ + /* JIS-X0208 へのシーケンスが存在すれば 8bit 文字は SJIS + と見なす */ + seq = s; + while(*seq++ != '\0' && ctrl == 0) { + if (*seq == ESC && *(seq + 1) == '(' + && (*(seq + 2) == '@' || *(seq + 2) == 'B')) ctrl++; + } + if (ctrl == 0) { + hibit++; + c2 = *s; + if (c1 == 0x92 && IS_EUC1(c2) && IS_EUC2(*(s+1))) { + /* Mule の内部コード */ + c1 = c2; + s++; + c2 = *s; + } + if (IS_EUC1(c1) && IS_EUC2(c2)) { /* EUC らしい */ + kanji_mode = _ASCII; + dlen--; + *d++ = c1; + c1 = c2; + s++; + } else if (c1 == SS2 && IS_SJISH(c2)) { /* EUC 半角カタカナ */ + s--; + s += mutt_han2zen(s); + dlen -= 2; + *d++ = Zenkaku1 | 0x80; + *d++ = Zenkaku2 | 0x80; + continue; + } else if (IS_SJISH(c1) || (IS_SJIS1(c1) && IS_SJIS2(c2))) { + /* なんてこった、SJISらしい */ + *d = 0; /* 一応 */ + return (3); + } else { /* 日本語ではない。取りあえず残りの文字を複写する */ + strcpy((char *)d, (char *)s); + return (5); + } + } else { /* SJIS とみなして変換する */ + unsigned char str[3]; + + str[0] = c1; + if (*s == '\0' || *s == ESC) { + str[1] = '\0'; + } else { + str[1] = *s++; + str[2] = 0; + } + if (sjis2euc(d, str, dlen) == 0) { + while(*d != '\0') d++; + } + continue; + } + } else { + switch(c1) { + case ESC: + ctrl++; + c1 = *s++; + if (c1 == '$') { + c1 = *s++; + if (c1 == '(') c1 = *s++; + if (c1 == '@' || c1 == 'B') { + kanji_mode = JISX0208; + } else { /* その他の文字セット。'?'に置き換える */ + kanji_mode = OTHER; + } + } else if (c1 == '(') { + c1 = *s++; + if (c1 == 'B' || c1 == 'H' || c1 == 'J' ) { + kanji_mode = _ASCII; + } else if (c1 == 'I') { /* X0201 */ + kanji_mode = JISX0201; + } else { /* その他の文字セット。'?'に置き換える */ + kanji_mode = OTHER; + } + } + continue; + /* not break */ + case SO: + ctrl++; + seq = s; + while((c1 = *seq++) != '\0' && c1 != SI); + if (c1 == '\0') { /* SI がなければシングルシフトと見なす */ + s--; + s += mutt_han2zen(s); + dlen -= 2; + *d++ = Zenkaku1 | 0x80; + *d++ = Zenkaku2 | 0x80; + } else { + kanji_mode = JISX0201; + } + continue; + /* not break */ + case SI: + ctrl++; + kanji_mode = _ASCII; + continue; + /* not break */ + } + } + switch(kanji_mode) { + case OTHER: + c1 = '?'; + /*FALLTHROUGH*/ + case _ASCII: /* 非漢字または EUC */ + *d++ = c1; + dlen--; + continue; + case JISX0201: + s--; + c1 = mutt_han2zen(s); /* X0208に変換(半角カナ→全角カナ) */ + if (c1 == 0) { /* 半角カタカナでない。無視する。 */ + s++; + continue; + } else { + s += c1; + } + c1 = Zenkaku1; + c2 = Zenkaku2; + break; + default: + c2 = *s++; + if (c2 == 0x01) { /* 最近の Mozilla 4.04 [en] (Win95; I) のバグと */ + c1++; /* おぼしき文字化けに対する補正 */ + c2 += 0x21; + } + } + dlen -= 2; + if (dlen < 0 || c2 == 0 || c2 == ESC) break; + *d++ = c1 | 0x80; + *d++ = c2 | 0x80; + } + *d = 0; + if ((kanji_mode != _ASCII && c2 == 0) || kanji_mode == JISX0208) { + return (4); + } else if (ctrl) { + return (1); + } else if (hibit) { + return (2); + } + return (0); +} + +/* + * SJIS -> EUC + * 世の中にはSJISで投げてくる人もいるのでしかたがない + * return 0: success + * 1: 途中で切れた + * 2: SJIS ではない (未着手) + */ +int sjis2euc(unsigned char *d, unsigned char *s, int dlen) +{ + unsigned char upper,lower; + int jisx0201_mode = 0; + + while((upper = *s++) != 0 && dlen > 0) { + if ((upper & 0x80) == 0) { /* ASCII */ + /* なぜか SJIS の中に JISX0201 へのシーケンスが存在することがある */ + if (upper != ESC) { + *d++ = upper; + dlen--; + continue; + } else if (*s == '(') { + s++; + if (*s == 'I') { + jisx0201_mode = 1; + } else { + jisx0201_mode = 0; + } + upper = *(s + 1); + s += 2; + } + } + if ((upper >= 0xa0 && upper < 0xe0) || jisx0201_mode) { + s--; /* いわゆる半角カナ */ + s += mutt_han2zen(s); + upper = Zenkaku1 | 0x80; + lower = Zenkaku2 | 0x80; + } else { /* 漢字 */ + lower = *s++; + if (!IS_SJIS2(lower) || upper >= 0xf0) { /* 途中で切れた! */ + if (lower == '\0') { /* たまに行の折り返し不正などで 2byte 文字の */ + break; /* 間の byte で切れている記事がある。*/ + } else { + return (1); + } + } + if (upper >= 0xe0) { + upper -= 0x70; + } else { + upper -= 0x30; + } + upper <<= 1; + if (lower >= 0x9f) { + lower += 2; + } else { + upper--; + if (lower & 0x80) { + lower += 0x60; + } else { + lower += 0x61; + } + } + } + dlen -= 2; + if (dlen < 0) break; + *d++ = upper; + *d++ = lower; + } + *d = '\0'; + + return 0; +} + +/* + * JIS -> display code + */ +int jis2disp(unsigned char *d, unsigned char *s, int dlen) +{ + int ret; + /* 常に EUC に変換する */ + /* SJISくさかったらSJIS->EUCする */ + if ((ret = jis2euc(d, s, dlen)) == 3) return sjis2euc(d, s, dlen); + return ret; +} + +/* + * EUC -> SJIS + * エラーチェックはしていない + * return 0: success + */ +int euc2sjis(unsigned char *d, unsigned char *s, int dlen) +{ + unsigned char ch, ch2; + + while((ch = *s++) != 0 && dlen > 0) { + if ((ch & 0x80) == 0) { /* ASCII */ + *d++ = ch; + dlen--; + continue; + } + if (ch == SS2) { + ch2 = mutt_han2zen(s - 1); + if (ch2 != 0) { + s += ch2 - 1; + ch = Zenkaku1 | 0x80; + ch2 = Zenkaku2 | 0x80; + } + } else { + ch2 = *s++; + } + if (ch & 1) { + ch2 -= 0x60; + if ((ch2 & 0x80) == 0) { + ch2--; + } + } else { + ch2 -= 2; + } + ch++; + ch >>= 1; + ch += 0x30; + if (ch > 0x9f) { + ch += 0x40; + } + dlen -= 2; + *d++ = ch; + *d++ = ch2; + } + *d = '\0'; + return (0); +} + +/* + * JIS -> internal code(EUC) + * return (入力コードが) + * 0: ASCII + * 1: JIS + * 2: EUC (他の 8bit 系コードかも知れない) + * 3: SJIS + * 4: SJIS と思われるがそうでないかも知れない + * 5: 8bit で SJIS でも EUC でもない + */ +int jis2int(unsigned char *d, unsigned char *s, int dlen) +{ + unsigned char ch, *p = s; + int hibit = 0; + + /* 常に EUC に変換する */ + switch (jis2euc(d, s, dlen)) { + case 0: /* ASCII */ + return (0); + case 1: /* JIS */ + case 4: /* JIS の途中で切れた。*/ + return (1); + case 2: /* EUC */ + return (2); + case 3: /* SJIS? */ + /* SJISくさかったらSJIS->EUCする */ + if (sjis2euc(d, s, dlen) != 0) return (5); + /* 8bit 文字に比べて ASCII が非常に多ければ日本語でないとみなす */ + /* 8bit 文字が 1 つおきに 3 つ連続していれば SJIS とみなす */ + /* 0x80 - 0x9f にあれば ISO-8859-X ではない(かといって SJIS であるとも + 言えないが SJIS でということにする) */ + /* もうちょっと正確に判定が出来るように、改良が必要!! */ + while((ch = *p++) != 0) { + if (ch & 0x80) { + hibit++; + if (ch < 0xa0 || (ch != *p && ch != *(p + 1) + && (*(p + 1) & 0x80) && (*(p + 3) & 0x80))) return (3); + } + } + if (hibit * 9 > strlen((char *)s)) return (3); + return (4); + } + return (5); +} + +/* + * universal code covert routine + */ +int convcode(unsigned char *d, unsigned char *s, int dlen, int code) +{ + static unsigned char jstr[JTMP_LEN]; + int ret; + + ret = jis2euc(jstr, s, dlen); + switch(code) { + case JIS: + if (ret <= 1 || ret >= 4) { + strcpy((char *)d, (char *)s); + return (0); + } else if (ret == 3) { + (void)sjis2euc(jstr, s, dlen); + } + return (euc2jis(d, jstr, dlen)); + case EUC: + if (ret == 0 || ret == 2 || ret >= 4) { + strcpy((char *)d, (char *)s); + return (0); + } else if (ret == 1) { + strcpy((char *)d, (char *)jstr); + return (0); + } else { + return (sjis2euc(d, s, dlen)); + } + case SJIS: + if (ret == 0 || ret >= 3) { + strcpy((char *)d, (char *)s); + return (0); + } else { + return (euc2sjis(d, jstr, dlen)); + } + } + return (0); +} + +void mutt_mktemp (char *); +FILE *safe_fopen (const char *, const char *); +/* ファイルを code で指定されたコードに変換する */ +int mutt_conv_file(char *file, int code) +{ + static unsigned char jstr[JTMP_LEN]; + static char line[1024], tmpfile[256 + 2 * _POSIX_PATH_MAX]; + FILE *origfp, *tmpfp; + int ch; + unsigned int len; + + origfp = fopen(file, "r"); + mutt_mktemp (tmpfile); + tmpfp = safe_fopen (tmpfile, "w"); + if (origfp == NULL || tmpfp == NULL) { + mutt_error("File Open Error."); + return (-1); + } + while (EOF != (ch = getc(origfp))) { + if (EOF == putc(ch, tmpfp)) { + mutt_error("Write Error."); + return (-1); + } + } + fclose (tmpfp); + fclose (origfp); + + origfp = fopen(file, "w"); + tmpfp = fopen(tmpfile, "r"); + while (fgets (line, sizeof(line), tmpfp) != NULL) { + len = strlen (line); + if (len == 0) continue; + len--; + + if (line [len] == '\n') line [len] = '\0'; + (void)convcode(jstr, (unsigned char *)line, JTMP_LEN, code); + fputs((char *)jstr, origfp); + putc('\n', origfp); + } + fclose (tmpfp); + fclose (origfp); + + unlink(tmpfile); + return (0); +} + +/* 文字列を code で指定されたコードに変換する */ +void mutt_conv_string(char *line, int code) +{ + static unsigned char jstr[JTMP_LEN]; + + (void)convcode(jstr, (unsigned char *)line, JTMP_LEN, code); + (void)strcpy(line, (char *)jstr); +} + +#define match_2byte(c1, c2) ((((c1) > '\040' && (c1) < '\050') \ + || ((c1) > '\057' && (c1) < '\165')) \ + && (c2) > '\040' && (c2) < '\177') + +#define match_kin(c1, c2) ((c1) == '$' \ + && ((c2) == '@' || (c2) == 'B')) + +#define match_kout(c1, c2) ((c1) == '(' \ + && ((c2) == 'J' || (c2) == 'B')) + +/* ESC の落ちた JIS encoding を EUC に変換する。変換した場合は */ +/* 1 を返す。*/ +int recover_jis(unsigned char *to, unsigned char *from, int max) +{ + static unsigned char jtmp[JTMP_LEN]; + unsigned char *orig_ptr = from, *buf = jtmp, c1, c2; + int len, eflag = 0; + + while(*from != '\0' && from - orig_ptr < JTMP_LEN) { + if (match_kin(*from, *(from + 1))){ + if (from > orig_ptr && *(from - 1) == '\033') { + eflag = 1; + } + len = 2; + while(*(from + len) != '\0' && from - orig_ptr < max - len) { + c1 = *(from + len); + c2 = *(from + len + 1); + if (match_2byte(c1, c2)) { /* 2byte charcter */ + len += 2; + } else if (c1 == '\040') { /* space */ + len++; + } else if (c1 == '\033') { + if (match_kin(c2, *(from + len + 2)) && eflag == 0) { + break; /* real kin sequence */ + } + len++; /* only a escape character */ + } else { /* not a mutibyte character sequence */ + if (match_kout(c1, c2) /* kout sequence */ + && (eflag == 0 || *(from + len - 1) == '\033')) { + if (eflag == 0) { + *buf++ = '\033'; + } + while(len > 0) { + *buf++ = *from++; + len--; + } + if (*(from - 1) != '\033') { + *buf++ = '\033'; + } + } + break; + } + } + eflag = 0; + } + *buf = *from; + from++; + buf++; + } + *buf = '\0'; + return (jis2int(to, jtmp, max)); +} + +/* koi8-r を ISO-8859-5 に変換する */ +static unsigned char koi8_table[] = { + 32, 32, 32, 0xf1, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 0xa1, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, + 0xee, 0xd0, 0xd1, 0xe6, 0xd4, 0xd5, 0xe4, 0xd3, + 0xe5, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, + 0xdf, 0xef, 0xe0, 0xe1, 0xe2, 0xe3, 0xd6, 0xd2, + 0xec, 0xeb, 0xd7, 0xe8, 0xed, 0xe9, 0xe7, 0xea, + 0xce, 0xb0, 0xb1, 0xc6, 0xb4, 0xb5, 0xc4, 0xb3, + 0xc5, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, + 0xbf, 0xcf, 0xc0, 0xc1, 0xc2, 0xc3, 0xb6, 0xb2, + 0xcc, 0xcb, 0xb7, 0xc8, 0xcd, 0xc9, 0xc7, 0xca +}; + +void mutt_convert_koi8_r2iso8859_5(unsigned char *s) +{ + while(*s != '\0') { + if (*s >= 0xa0) { + *s = koi8_table[*s - 0xa0]; + } + s++; + } +} + +/* utf8 を JISX0201、JISX0208(ひらがな、かたかなのみ)または ISO-8859-1 + に変換する(それ以外の漢字の変換はできない) */ +static unsigned char u3000[] = { /* 3000 - 3015 */ + 0x21, 0x21, 0x21, 0x22, 0x21, 0x23, 0x21, 0x37, + 0x00, 0x00, 0x21, 0x39, 0x21, 0x3A, 0x21, 0x3B, + 0x21, 0x52, 0x21, 0x53, 0x21, 0x54, 0x21, 0x55, + 0x21, 0x56, 0x21, 0x57, 0x21, 0x58, 0x21, 0x59, + 0x21, 0x5A, 0x21, 0x5B, 0x22, 0x29, 0x22, 0x2E, + 0x21, 0x4C, 0x21, 0x4D +}; + +static unsigned char u309b[] = { /* 309B - 309E */ + 0x21, 0x2B, 0x21, 0x2C, 0x21, 0x35, 0x21, 0x36 +}; + +static unsigned char u30fb[] = { /* 30FB - 30FE */ + 0x21, 0x26, 0x21, 0x3C, 0x21, 0x33, 0x21, 0x34 +}; + +static unsigned char uff01[] = { /* FF01 - FF0F */ + 0x21, 0x2A, 0x00, 0x00, 0x21, 0x74, 0x21, 0x70, + 0x21, 0x73, 0x21, 0x75, 0x00, 0x00, 0x21, 0x4A, + 0x21, 0x4B, 0x21, 0x76, 0x21, 0x5C, 0x21, 0x24, + 0x21, 0x5D, 0x21, 0x25, 0x21, 0x3F +}; + +static unsigned char uff1a[] = { /* FF1A - FF20 */ + 0x21, 0x27, 0x21, 0x28, 0x21, 0x63, 0x21, 0x61, + 0x21, 0x64, 0x21, 0x29, 0x21, 0x77 +}; + +static unsigned char uff3b[] = { /* FF3B - FF40 */ + 0x21, 0x4E, 0x21, 0x40, 0x21, 0x4F, 0x21, 0x30, + 0x21, 0x32, 0x21, 0x2E +}; + +static unsigned char uff5b[] = { /* FF5B - FF5D */ + 0x21, 0x50, 0x21, 0x43, 0x21, 0x51 +}; + + +/* return: + * 0: ASCII のみ + * 1: ISO-8859-1 のみ + * 2: 2 byte 文字があった。 + */ +static int utf82euc(unsigned char *s, unsigned char *d, int dlen) +{ + int ch, ch2, ch3, hi, lo, ret = 0; + unsigned char *tbl; + + while(*s != '\0' && dlen > 0) { + ch = *s++; + if (ch & 0x80) { + ch2 = *s++; + if (ch2 == '\0') { + break; + } + if (ch & 0x20) { + ch3 = *s++; + if (ch3 == '\0') { + break; + } + hi = ((ch & 0x0f) << 4) | ((ch2 & 0x3c) >> 2); + lo = ((ch2 & 0x03) << 6) | (ch3 & 0x3f); + } else { + hi = (ch & 0x1c) >> 2; + lo = ((ch & 0x03) << 6) | (ch2 & 0x3f); + } + ret = 2; + } else { /* ASCII */ + hi = 0; + lo = ch; + } + tbl = NULL; + switch (hi) { + case 0x00: + ch2 = 1; /* 0:cannot convert 1:1 byte character 2:2 byte character */ + if (lo & 0x80) { + if (ret == 2) { /* cannot use ISO-8859-1 */ + lo = '?'; + } else { + ret = 1; + } + } + break; + case 0x30: + ch2 = 2; + if (lo <= 0x15) { + ch = lo; + tbl = u3000; + } else if (lo >= 0x41 && lo <= 0x93) { /* hiragana */ + hi = 0x24; + lo -= 0x20; + } else if (lo >= 0x9b && lo <= 0x9e) { + ch = lo - 0x9b; + tbl = u309b; + } else if (lo >= 0xa1 && lo <= 0xf6) { /* katakana */ + hi = 0x25; + } else if (lo >= 0xfb && lo <= 0xfe) { + ch = lo - 0xfb; + tbl = u30fb; + } else { + ch2 = 0; + } + break; + case 0xff: + ch2 = 2; + if (lo <= 0x0f) { + ch = lo - 0x01; + tbl = uff01; + } else if (lo <= 0x19) { /* full width digit */ + hi = 0x23; + lo += 0x21; + } else if (lo <= 0x20) { + ch = lo - 0x1a; + tbl = uff1a; + } else if ((lo <= 0x3a) || (lo >= 0x41 && lo <= 0x5a)) { + hi = 0x23; + lo += 0x20; + } else if (lo <= 0x40) { + ch = lo - 0x3b; + tbl = uff3b; + } else if (lo <= 0x5d) { + ch = lo - 0x5b; + tbl = uff5b; + } else if (lo >= 0x61 && lo <= 0x9f) { + hi = 0x8e; /* half width katakana */ + lo += 0x40; + } else { + ch2 = 0; + } + break; + default: + ch2 = 0; + } + if (ch2 == 1) { + *d++ = lo; + dlen--; + continue; + } + if (tbl != NULL) { + ch <<= 1; + hi = tbl[ch]; + lo = tbl[ch + 1]; + } + if (ch2 == 0 || (hi == 0 && lo == 0)) { + hi = '?'; + lo = '?'; + } else { + hi |= 0x80; + lo |= 0x80; + } + if (dlen < 2) { + break; + } + *d++ = (unsigned char)hi; + *d++ = (unsigned char)lo; + dlen -= 2; + } + *d = 0; + return (ret); +} + +void mutt_convert_utf82int(unsigned char *s) +{ + /* int ret; + ret = */ (void)utf82euc(s, s, strlen((char *)s)); + (void)jis2euc(s, s, strlen((char *)s)); /* 念のため */ + /* return (ret); */ +} + +#if 0 /* def MUTT_JED_SLANG Now it's in JED's SLANG */ +/* EUC で、2byte 文字の位置を返す。 + * 0: ASCII + * 1: 1 byte 目 + * 2: 2 byte 目 + */ +int kanji_pos(unsigned char *beg, unsigned char *end) +{ + int ret = 0; + while(*beg) { + if (*beg & 0x80) { + if (ret == 1) { + ret = 2; + } else { + ret = 1; + } + } else { + ret = 0; + } + if (beg == end) break; + beg++; + } + return ret; +} +#endif + +int jp_snprintf(char *str, int n, char *format, char *arg) +{ + char *p, min_pre[16], fld_pre[16], *d; + int minimum, field, i, ladjust = 0; + + /* format should be "%[-]NNN.MMMs" */ + if (*format != '%') return snprintf(str, n, format, arg); + p = format + 1; + if (*p == 's' || (*p != '-' && *p != '.' && !isdigit(*p))) + return snprintf(str, n, format, arg); + + if (*p == '-') { + ladjust = 1; + ++p; + } + if (*p == '.') { + min_pre[0] = '\0'; + ++p; + } + else { + for (d = min_pre; isdigit(*p); ++p) + *d++ = *p; + if (*p == '\0') return snprintf(str, n, format, arg); + *d = '\0'; + } + + if (*p == 's') { + fld_pre[0] = '\0'; + } + else if (*p == '.') { + for (++p, d = fld_pre; isdigit(*p); ++p) + *d++ = *p; + if (*p != 's') return snprintf(str, n, format, arg); + *d = '\0'; + } + + minimum = atoi(min_pre); + field = atoi(fld_pre); + if (field == 0) + field = 9999; /* big integer... */ + + d = str; + p = arg; + i = 0; + if (ladjust) { + for (; i < field && *p != '\0'; ++i, p++) { + if (i >= n) return n; + *d++ = *p; + } + if (kanji_pos((unsigned char *)str, (unsigned char *)(d-1)) == 1) { + *(d-1) = ' '; + } + if (i < minimum) + for (; i < minimum; ++i) { + if (i >= n) return n; + *d++ = ' '; + } + *d = '\0'; + return i; + } + else { + int len = strlen(arg); + if (len < minimum) { + for (; i < minimum-len; ++i) { + if (i >= n) return n; + *d++ = ' '; + } + } + for (; i < field && *p != '\0'; ++i, p++) { + if (i >= n) return n; + *d++ = *p; + } + if (kanji_pos((unsigned char *)str, (unsigned char *)(d-1)) == 1) { + *(d-1) = ' '; + } + *d = '\0'; + return i; + } +} + +/* ---------------------- MIME ---------------------- + * muttのmimeエンコーダは使いものにならない。 + * 以下はslrnの勝田さんのものを拝借。 + */ +#define IS_RFC850_SPECIAL(c) \ + (((c) == '(') || ((c) == ')') || ((c) == '<') || ((c) == '>') || ((c) == '"')) + +static char basis_64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +/* src must less than srcmax */ +static unsigned char *encode_base64(unsigned char *dest, + unsigned char *src, unsigned char *srcmax) +{ + int c1, c2, c3, pad = 0; + + while (src < srcmax) { + c1 = *src++; + *dest++ = basis_64[c1>>2]; + if (src < srcmax) { + c2 = *src++; + } else { + c2 = 0; + pad = 1; + } + *dest++ = basis_64[((c1 & 0x3)<< 4) | ((c2 & 0xf0) >> 4)]; + if (src < srcmax) { + c3 = *src++; + } else { + c3 = 0; + pad++; + } + if (pad < 2) { + *dest++ = basis_64[((c2 & 0xf) << 2) | ((c3 & 0xc0) >>6)]; + } else { + *dest++ = '='; + } + if (pad == 0) { + *dest++ = basis_64[c3 & 0x3f]; + } else { + *dest++ = '='; + } + } + return (dest); +} + +/* + * 上のoutput64chunkとto64は佐藤@電総研さんのmimekit1.1のコードを + * 参考にさせていただきましたが、下のエンコーダー本体は、スペースを + * 考慮していないきわめていいかげんなものです。 + * + * RFC2047 に厳密に対応するには、 + * 1. "あa" の場合、"あ" のみを encode すると decode した時 "あ a" となって + * しまう。-> "a" も含めてすべて encode するしかない。 + * + * 2. "あ い" の場合、"あ" と "い" を別々に encode すると、decode した時 + * "あい" となってしまう。-> space も含めて一緒に encode するか、"あ" + * か "い" のどちらかに space を含める。 + * + * 3. encoded word の前後は space でなければならない。つまり、日本語と + * くっついている半角文字もすべてひとつの encoded word にしなければな + * らない。ただ、これでは encode した文字列の可読性が落ちるので、日本 + * 語だけ encode する実装も存在するが、RFC2047 に厳密であるとは言えない。 + * + * 注: 2.で space も含めて一緒に encode すると単語の区切りがなくなって + * しまうので、RFC に厳密であるとは言えない。しかし、どうせ長くなると + * folding してしまうし、分けて encode すると全体が非常に長くなってし + * まうので、ここでは一緒に encode することにする。 + * + */ +/* アルゴリズム + * 1. まず、日本語の始まる ESC sequence を探す。 + 2. 空白まで元に戻る。 + 3. 日本語の終わる ESC sequence を探す。 + 4. 次が空白で、その次が日本語を含むならば、その日本語の終わる ESC sequence + を探す。 + 5. 4 を繰り返して、その次の文字列が日本語を含まない空白を探す。 + 6. 2 の位置から現在地まで base64 エンコードする。 + + さらに 75 文字以下に folding するのと、structured field に対応しなけ + ればならない。 + */ +/* only for ISO-2022-JP */ +int Slrn_Mime_Strict_Rfc = 0; /* RFC2047 に厳密な encode を行う(その代わり + ASCII 文字も encode してしまう)。 */ +#define IS_TO_KANJI(p) (*(p) == ESC && *((p) + 1) == '$' \ + && (*((p) + 2) == 'B' || *((p) + 2) == '@')) +#define IS_TO_ASCII(p) (*(p) == ESC && *((p) + 1) == '(' \ + && (*((p) + 2) == 'B' || *((p) + 2) == 'J')) +int encode_base64_header(unsigned char *d, unsigned char *dmax, + unsigned char *s, char *charset, + unsigned int c_len, int ignore_specials) +{ + char *p = (char *)s, ch, *beg, *end=NULL, *to_ascii=NULL, *to_kanji=NULL; + int len = 0, count, beg_kanji, end_kanji=0; + + /* check if buffer 'd' has a enough length */ + if (dmax - d < strlen((char *)s) * 4 / 3) return (-1); + + while(*p != 0 && d < dmax) { + beg = p; + while (((ch = *p) != 0) && d < dmax && !IS_TO_KANJI(p) + && len < 76) { + *d++ = ch; + p++; + len++; + if (ch == ' ' || (ignore_specials == 0 && IS_RFC850_SPECIAL(ch))) { + beg = p; /* remember the beginning of the current word */ + } + } + if (ch == 0) break; + if (d == dmax) return (-1); + + if (len > 75) { /* line break(in text) */ + p = beg; /* search previous word's end */ + while(beg > (char *)s && *beg != ' ') beg--; + while(beg > (char *)s && *beg == ' ') beg--; + ++beg; + d -= p - beg + 1; + *d++ = '\n'; + *d++ = ' '; + len = 0; + continue; + } + + /* found to_kanji sequence and the beginning of encoding */ + to_kanji = p; + if (Slrn_Mime_Strict_Rfc) { + d -= p - beg; + len -= p - beg; + p = beg; + } else { + beg = p; + } + + /* search to_ascii sequence and the end of encoding */ + while((ch = *p) != 0) { + if (IS_TO_ASCII(p)) { /* skip to space or end of line */ + to_ascii = p; + p += 3; + if (!Slrn_Mime_Strict_Rfc) { + end = p; + break; + } + while((ch = *p) != 0 && ch != ' ' && ch != '\n' + && (ignore_specials || !IS_RFC850_SPECIAL(ch))) p++; + end = p; + if (ch == 0) break; + SKIPWS(p); + while((ch = *p) != 0 && ch != ' ' && ch != '\n' && !IS_TO_KANJI(p) + && (ignore_specials || !IS_RFC850_SPECIAL(ch))) { + p++; + } + if (!IS_TO_KANJI(p)) break; + } + p++; + } + + /* encode between beg and end */ + p = beg; /* p must less than end */ + beg_kanji = 0; /* flag whether last string ended in kanji or ascii*/ + while (p < end && d < dmax) { + unsigned char *new_d; + + if (d + c_len >= dmax) return (-1); + + if (len + c_len + 14 > 75) { /* 14 = to_kanji(4) + one char(4) */ + *d++ = '\n'; /* + to_ascii(4) + "?="(2) */ + *d++ = ' '; + len = 0; + } else if (!Slrn_Mime_Strict_Rfc + && p != (char *)s && *(p - 1) != ' ' + && (ignore_specials || !IS_RFC850_SPECIAL(*(p - 1)))) { + *d++ = ' '; + len++; + } + strcpy((char *)d, charset); + d += c_len; + len += c_len + 2; /* 2 = "?=" */ + + /* count length of encoded word */ + count = beg_kanji * 4; /* 8 = one char(4) + to_ascii(4) */ + while(p < end && ((ch = *p) != 0) && len + count + 8 < 76) { + if (IS_TO_KANJI(p)) { + if (Slrn_Mime_Strict_Rfc && len + count > 70) { + len = 76; + break; + } else { /* flag whether current string ended in kanji or ascii*/ + end_kanji = 1; + } + p += 3; + } else if (IS_TO_ASCII(p)) { + end_kanji = 0; + p += 3; + } else if (*p > ' ' && end_kanji) { /* 2 byte character */ + p += 2; + } else { /* 1 byte character */ + p++; + } + count = (20 - (beg + 60 - p) / 3) * 4; + } + + if (len + count + 8 < 76) { + p = end; + } + if (beg_kanji) { + strncpy((char *)jtmp_str, to_kanji, 3); + count = 3; + } else { + count = 0; + } + + strncpy((char *)jtmp_str + count, beg, p - beg); + count += p - beg; + if (end_kanji) { + strncpy((char *)jtmp_str + count, to_ascii, 3); + count += 3; + } + /* add trailing space */ + if (!Slrn_Mime_Strict_Rfc && *p == ' ') { + jtmp_str[count] = ' '; + count++; + p++; + } + + new_d = encode_base64(d, jtmp_str, jtmp_str + count); + len += new_d - d; + d = new_d; + + beg_kanji = end_kanji; + beg = p; + + if (d + 1 >= dmax) return (-1); + d[0] = '?'; + d[1] = '='; + d += 2; + if (!Slrn_Mime_Strict_Rfc && *p != ' ') { + *d++ = ' '; + len++; + } + } + } + + *d = 0; + return (0); +} +#endif diff -uNr mutt-1.0.1/khenkan.h mutt-1.0.1.new/khenkan.h --- mutt-1.0.1/khenkan.h Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/khenkan.h Thu Feb 24 12:39:33 2000 @@ -0,0 +1,66 @@ +/* + $@ JIS X0208-1978 + $B,$(B JIS X0208-1983 + (I JIS X0201 kana + (J JIS X0201 roman + $(D JIS X0212-1990 補助漢字 + (B ASCII + + $ 36 24 @ 64 40 ( 40 28 B 66 42 + I 73 49 D 68 44 +*/ + +#define MUTT_JED_SLANG + +#include "config.h" /* to know USE_SLANG_CURSES is defined */ + +#if defined(USE_SLANG_CURSES) && defined(MUTT_JED_SLANG) +#include +#define Slang_Display_Code (kSLdisplay_code) +#else +#define ESC 0x1b +#define SS2 0x8e + +#define JIS 0 +#define EUC 1 +#define SJIS 2 +extern int Slang_Display_Code; /* 0 = JIS, 1 = EUC, 2 = SJIS */ +#endif /* MUTT_JED_SLANG */ +// extern int Slrn_Editor_Code; + +#define SI 0x0f +#define SO 0x0e + +#define IS_SJIS1(c) (((c) >= 0x81 && (c) <= 0x9f) || ((c) >= 0xe0 && (c) <= 0xef)) /* 2byte 文字のみ */ +#define IS_SJIS2(c) ((c) >= 0x40 && (c) <= 0xfc && (c) != 0x7f) +#define IS_SJISH(c) ((c) >= 0xa0 && (c) <= 0xdf) /* SJIS hankaku katakana */ + +#define IS_EUC1(x) ((x) >= 0xa1 && (x) <= 0xfe) + +#define IS_EUC2(x) IS_EUC1((x)) + +extern int euc2jis(unsigned char *, unsigned char *, int); +extern int euc2sjis(unsigned char *, unsigned char *, int); +extern int sjis2euc(unsigned char *, unsigned char *, int); +extern int jis2euc(unsigned char *, unsigned char *, int); +extern int jis2int(unsigned char *, unsigned char *, int); + +/* slangのkanji.cにある。一行の先頭からscanして、日本語かどうか判断 */ +extern int kanji_pos(unsigned char *, unsigned char *); + +extern int slrn_conv_file(char *, int); +extern void slrn_conv_string(char *, int); + +extern void slrn_convert_koi8_r2iso8859_5(unsigned char *); +extern void slrn_convert_utf82int(unsigned char *); + +#define JTMP_LEN 4096 +extern unsigned char jtmp_str[JTMP_LEN]; + +extern int Slrn_Use_ISO8859; +extern int Slrn_Detect_SJIS; + +extern int Slrn_Japanese_Messages; +extern int Slang_Current_Charset; + +extern int recover_jis(unsigned char *, unsigned char *, int); diff -uNr mutt-1.0.1/lib.c mutt-1.0.1.new/lib.c --- mutt-1.0.1/lib.c Thu Jan 6 03:55:08 2000 +++ mutt-1.0.1.new/lib.c Thu Feb 24 12:39:33 2000 @@ -26,6 +26,9 @@ #include "pgp.h" #endif +#ifdef KANJI +#include "khenkan.h" +#endif #include #include #include @@ -387,6 +390,32 @@ return 0; } +#ifdef KANJI +int jis2disp(unsigned char *, unsigned char *, int); +int convcode(unsigned char *, unsigned char *, int, int); +int mutt_copy_wbytes (STATE *s, FILE *in, FILE *out, size_t size) +{ + unsigned char buf[2048], kbuf[4096]; + + while (size > 0) + { + if (fgets((char *)buf, sizeof (buf), in) == NULL) break; + + if (s->flags & M_PENDINGPREFIX) { + state_reset_prefix(s); + if (s->prefix) + fputs (s->prefix, s->fpout); + } + jis2disp (kbuf, buf, strlen ((char *)buf)); + fputs ((char *)kbuf, out); + + size -= strlen ((char *)buf); + } + + return 0; +} +#endif + char *mutt_get_parameter (const char *s, PARAMETER *p) { for (; p; p = p->next) @@ -621,7 +650,24 @@ mutt_expand_fmt(dest, destlen, fmt, _src); safe_free((void **) &_src); } +#ifdef KANJI +int mutt_kconv_copy_stream (FILE *fin, FILE *fout, int code) +{ + size_t l; + char buf[LONG_STRING], buf2[LONG_STRING]; + while ((l = fread (buf, 1, sizeof (buf), fin)) > 0) + { + strncpy(buf2, buf, l); + buf2[l] = '\0'; + convcode ((unsigned char *)buf, (unsigned char *)buf2, LONG_STRING, code); + if (fwrite (buf, 1, strlen(buf), fout) != l) + return (-1); + } + + return 0; +} +#endif void mutt_expand_fmt (char *dest, size_t destlen, const char *fmt, const char *src) { const char *p = fmt; @@ -1325,19 +1371,67 @@ return d; } +#ifdef KANJI +struct t_jp { + char buf[HUGE_STRING]; + char kbuf[HUGE_STRING]; + char *p; +}; + +static struct t_jp jp = { { '\0' }, { '\0' }, jp.buf }; + +void state_prefix_flush(STATE *s) +{ + if (jp.p != jp.buf) { + if (s->istext) { + jis2disp(jp.kbuf, jp.buf, HUGE_STRING); + state_puts(jp.kbuf, s); + *(jp.p = jp.buf) = '\0'; + } + state_set_prefix(s); + } +} +#endif + void state_prefix_putc(char c, STATE *s) { if (s->flags & M_PENDINGPREFIX) { state_reset_prefix(s); if (s->prefix) +#ifndef KANJI state_puts(s->prefix, s); +#else + { + if (!s->istext) + state_puts(s->prefix, s); + else + { + strcat(jp.p, s->prefix); + jp.p += strlen(s->prefix); + } + } +#endif } +#ifdef KANJI + if (!s->istext) + state_putc(c, s); + else + { + *jp.p++ = c; + *jp.p = '\0'; + } +#else state_putc(c, s); +#endif if(c == '\n') +#ifndef KANJI state_set_prefix(s); +#else + state_prefix_flush(s); +#endif } int state_printf(STATE *s, const char *fmt, ...) diff -uNr mutt-1.0.1/main.c mutt-1.0.1.new/main.c --- mutt-1.0.1/main.c Thu Jan 6 03:58:02 2000 +++ mutt-1.0.1.new/main.c Thu Feb 24 12:48:09 2000 @@ -45,11 +45,14 @@ Mutt is free software, and you are welcome to redistribute it\n\ under certain conditions; type `mutt -vv' for details.\n"); +#ifdef KANJI +#include "khenkan.h" const char *Copyright = N_("\ Copyright (C) 1996-2000 Michael R. Elkins \n\ Copyright (C) 1997-2000 Thomas Roessler \n\ Copyright (C) 1998-2000 Werner Koch \n\ Copyright (C) 1998-2000 Ruslan Ermilov \n\ +Copyright (C) 1998-9 Yukinori YOSHIDA (Japanese patch)\n\n\ \n\ Lots of others not mentioned here contributed lots of code,\n\ fixes, and suggestions.\n\ @@ -68,6 +71,31 @@ along with this program; if not, write to the Free Software\n\ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\ "); +#else +const char *Copyright = N_("\ +Copyright (C) 1996-9 Michael R. Elkins \n\ +Copyright (C) 1997-9 Thomas Roessler \n\ +Copyright (C) 1998-9 Werner Koch \n\ +Copyright (C) 1998-9 Ruslan Ermilov \n\ +\n\ +Lots of others not mentioned here contributed lots of code,\n\ +fixes, and suggestions.\n\ +\n\ + This program is free software; you can redistribute it and/or modify\n\ + it under the terms of the GNU General Public License as published by\n\ + the Free Software Foundation; either version 2 of the License, or\n\ + (at your option) any later version.\n\ +\n\ + This program is distributed in the hope that it will be useful,\n\ + but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ + GNU General Public License for more details.\n\ +\n\ + You should have received a copy of the GNU General Public License\n\ + along with this program; if not, write to the Free Software\n\ + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\ +"); +#endif #ifdef _PGPPATH const char *ShaCopyright = N_("\n\ @@ -297,6 +325,11 @@ km_init (); /* must come before mutt_init */ #ifdef USE_SLANG_CURSES +#ifdef KANJI +#ifdef MUTT_JED_SLANG + kSLcode = EUC; +#endif +#endif SLtt_Ignore_Beep = 1; /* don't do that #*$@^! annoying visual beep! */ SLsmg_Display_Eight_Bit = 128; /* characters above this are printable */ #else diff -uNr mutt-1.0.1/main.c.rej mutt-1.0.1.new/main.c.rej --- mutt-1.0.1/main.c.rej Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/main.c.rej Thu Feb 24 12:39:33 2000 @@ -0,0 +1,28 @@ +*************** +*** 45,55 **** + Mutt is free software, and you are welcome to redistribute it\n\ + under certain conditions; type `mutt -vv' for details.\n"); + + const char *Copyright = N_("\ + Copyright (C) 1996-9 Michael R. Elkins \n\ + Copyright (C) 1997-9 Thomas Roessler \n\ + Copyright (C) 1998-9 Werner Koch \n\ + Copyright (C) 1998-9 Ruslan Ermilov \n\ + \n\ + Lots of others not mentioned here contributed lots of code,\n\ + fixes, and suggestions.\n\ +--- 45,58 ---- + Mutt is free software, and you are welcome to redistribute it\n\ + under certain conditions; type `mutt -vv' for details.\n"); + ++ #ifdef KANJI ++ #include "khenkan.h" + const char *Copyright = N_("\ + Copyright (C) 1996-9 Michael R. Elkins \n\ + Copyright (C) 1997-9 Thomas Roessler \n\ + Copyright (C) 1998-9 Werner Koch \n\ + Copyright (C) 1998-9 Ruslan Ermilov \n\ ++ Copyright (C) 1998-9 Yukinori YOSHIDA (Japanese patch)\n\n\ + \n\ + Lots of others not mentioned here contributed lots of code,\n\ + fixes, and suggestions.\n\ diff -uNr mutt-1.0.1/md5.h mutt-1.0.1.new/md5.h --- mutt-1.0.1/md5.h Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/md5.h Thu Feb 24 12:39:33 2000 @@ -0,0 +1,42 @@ +/* MD5.H - header file for MD5C.C + */ + +/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All +rights reserved. + +License to copy and use this software is granted provided that it +is identified as the "RSA Data Security, Inc. MD5 Message-Digest +Algorithm" in all material mentioning or referencing this software +or this function. + +License is also granted to make and use derivative works provided +that such works are identified as "derived from the RSA Data +Security, Inc. MD5 Message-Digest Algorithm" in all material +mentioning or referencing the derived work. + +RSA Data Security, Inc. makes no representations concerning either +the merchantability of this software or the suitability of this +software for any particular purpose. It is provided "as is" +without express or implied warranty of any kind. + +These notices must be retained in any copies of any part of this +documentation and/or software. + */ + +#ifndef MD5_H__ +#define MD5_H__ + +#include "md5global.h" + +/* MD5 context. */ +typedef struct { + UINT4 state[4]; /* state (ABCD) */ + UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ + unsigned char buffer[64]; /* input buffer */ +} MD5_CTX; + +void MD5Init PROTO_LIST ((MD5_CTX *)); +void MD5Update PROTO_LIST + ((MD5_CTX *, unsigned char *, unsigned int)); +void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); +#endif /* MD5_H__ */ diff -uNr mutt-1.0.1/md5c.c mutt-1.0.1.new/md5c.c --- mutt-1.0.1/md5c.c Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/md5c.c Thu Feb 24 12:39:33 2000 @@ -0,0 +1,334 @@ +/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm + */ + +/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All +rights reserved. + +License to copy and use this software is granted provided that it +is identified as the "RSA Data Security, Inc. MD5 Message-Digest +Algorithm" in all material mentioning or referencing this software +or this function. + +License is also granted to make and use derivative works provided +that such works are identified as "derived from the RSA Data +Security, Inc. MD5 Message-Digest Algorithm" in all material +mentioning or referencing the derived work. + +RSA Data Security, Inc. makes no representations concerning either +the merchantability of this software or the suitability of this +software for any particular purpose. It is provided "as is" +without express or implied warranty of any kind. + +These notices must be retained in any copies of any part of this +documentation and/or software. + */ + +#include "config.h" +#include "md5global.h" +#include "md5.h" + +/* Constants for MD5Transform routine. + */ +#define S11 7 +#define S12 12 +#define S13 17 +#define S14 22 +#define S21 5 +#define S22 9 +#define S23 14 +#define S24 20 +#define S31 4 +#define S32 11 +#define S33 16 +#define S34 23 +#define S41 6 +#define S42 10 +#define S43 15 +#define S44 21 + +static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64])); +static void Encode PROTO_LIST + ((unsigned char *, UINT4 *, unsigned int)); +static void Decode PROTO_LIST + ((UINT4 *, unsigned char *, unsigned int)); +static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int)); +static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int)); + +static unsigned char PADDING[64] = { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* F, G, H and I are basic MD5 functions. + */ +#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) +#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define I(x, y, z) ((y) ^ ((x) | (~z))) + +/* ROTATE_LEFT rotates x left n bits. + */ +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) + +/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. +Rotation is separate from addition to prevent recomputation. + */ +#define FF(a, b, c, d, x, s, ac) { \ + (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define GG(a, b, c, d, x, s, ac) { \ + (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define HH(a, b, c, d, x, s, ac) { \ + (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define II(a, b, c, d, x, s, ac) { \ + (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } + +/* MD5 initialization. Begins an MD5 operation, writing a new context. + */ +void MD5Init (context) +MD5_CTX *context; /* context */ +{ + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. +*/ + context->state[0] = 0x67452301; + context->state[1] = 0xefcdab89; + context->state[2] = 0x98badcfe; + context->state[3] = 0x10325476; +} + +/* MD5 block update operation. Continues an MD5 message-digest + operation, processing another message block, and updating the + context. + */ +void MD5Update (context, input, inputLen) +MD5_CTX *context; /* context */ +unsigned char *input; /* input block */ +unsigned int inputLen; /* length of input block */ +{ + unsigned int i, index, partLen; + + /* Compute number of bytes mod 64 */ + index = (unsigned int)((context->count[0] >> 3) & 0x3F); + + /* Update number of bits */ + if ((context->count[0] += ((UINT4)inputLen << 3)) + < ((UINT4)inputLen << 3)) + context->count[1]++; + context->count[1] += ((UINT4)inputLen >> 29); + + partLen = 64 - index; + + /* Transform as many times as possible. +*/ + if (inputLen >= partLen) { + MD5_memcpy + ((POINTER)&context->buffer[index], (POINTER)input, partLen); + MD5Transform (context->state, context->buffer); + + for (i = partLen; i + 63 < inputLen; i += 64) + MD5Transform (context->state, &input[i]); + + index = 0; + } + else + i = 0; + + /* Buffer remaining input */ + MD5_memcpy + ((POINTER)&context->buffer[index], (POINTER)&input[i], + inputLen-i); +} + +/* MD5 finalization. Ends an MD5 message-digest operation, writing the + the message digest and zeroizing the context. + */ +void MD5Final (digest, context) +unsigned char digest[16]; /* message digest */ +MD5_CTX *context; /* context */ +{ + unsigned char bits[8]; + unsigned int index, padLen; + + /* Save number of bits */ + Encode (bits, context->count, 8); + + /* Pad out to 56 mod 64. +*/ + index = (unsigned int)((context->count[0] >> 3) & 0x3f); + padLen = (index < 56) ? (56 - index) : (120 - index); + MD5Update (context, PADDING, padLen); + + /* Append length (before padding) */ + MD5Update (context, bits, 8); + /* Store state in digest */ + Encode (digest, context->state, 16); + + /* Zeroize sensitive information. +*/ + MD5_memset ((POINTER)context, 0, sizeof (*context)); +} + +/* MD5 basic transformation. Transforms state based on block. + */ +static void MD5Transform (state, block) +UINT4 state[4]; +unsigned char block[64]; +{ + UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; + + Decode (x, block, 64); + + /* Round 1 */ + FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ + FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ + FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ + FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ + FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ + FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ + FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ + FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ + FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ + FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ + FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ + FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ + FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ + FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ + FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ + FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ + + /* Round 2 */ + GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ + GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ + GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ + GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ + GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ + GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */ + GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ + GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ + GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ + GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ + GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ + GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ + GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ + GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ + GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ + GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ + + /* Round 3 */ + HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ + HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ + HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ + HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ + HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ + HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ + HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ + HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ + HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ + HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ + HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ + HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ + HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ + HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ + HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ + HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ + + /* Round 4 */ + II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ + II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ + II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ + II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ + II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ + II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ + II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ + II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ + II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ + II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ + II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ + II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ + II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ + II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ + II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ + II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + + /* Zeroize sensitive information. +*/ + MD5_memset ((POINTER)x, 0, sizeof (x)); +} + +/* Encodes input (UINT4) into output (unsigned char). Assumes len is + a multiple of 4. + */ +static void Encode (output, input, len) +unsigned char *output; +UINT4 *input; +unsigned int len; +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) { + output[j] = (unsigned char)(input[i] & 0xff); + output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); + output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); + output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); + } +} + +/* Decodes input (unsigned char) into output (UINT4). Assumes len is + a multiple of 4. + */ +static void Decode (output, input, len) +UINT4 *output; +unsigned char *input; +unsigned int len; +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) + output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | + (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); +} + +/* Note: Replace "for loop" with standard memcpy if possible. + */ + +static void MD5_memcpy (output, input, len) +POINTER output; +POINTER input; +unsigned int len; +{ + unsigned int i; + + for (i = 0; i < len; i++) + output[i] = input[i]; +} + +/* Note: Replace "for loop" with standard memset if possible. + */ +static void MD5_memset (output, value, len) +POINTER output; +int value; +unsigned int len; +{ + unsigned int i; + + for (i = 0; i < len; i++) + ((char *)output)[i] = (char)value; +} diff -uNr mutt-1.0.1/md5global.h mutt-1.0.1.new/md5global.h --- mutt-1.0.1/md5global.h Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/md5global.h Thu Feb 24 12:39:33 2000 @@ -0,0 +1,41 @@ +/* + * For license terms, see the file COPYING in this directory. + * + * md5global.h Global declarations for MD5 module used by fetchmail + * + */ + +#ifndef MD5GLOBAL_H__ +#define MD5GLOBAL_H__ +/* GLOBAL.H - RSAREF types and constants + */ + +/* force prototypes on, we need ANSI C anyway */ +#ifndef PROTOTYPES +#define PROTOTYPES 1 +#endif + +/* POINTER defines a generic pointer type */ +typedef unsigned char *POINTER; + +/* UINT2 defines a two byte word */ +typedef unsigned short int UINT2; + +/* UINT4 defines a four byte word */ +#if ( SIZEOF_INT == 4 || SIZEOF_LONG == 8 ) +typedef unsigned int UINT4; +#else +typedef unsigned long int UINT4; +#endif + +/* PROTO_LIST is defined depending on how PROTOTYPES is defined above. +If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it + returns an empty list. + */ +#if PROTOTYPES +#define PROTO_LIST(list) list +#else +#define PROTO_LIST(list) () +#endif + +#endif /* MD5GLOBAL_H__ */ diff -uNr mutt-1.0.1/md5ify.c mutt-1.0.1.new/md5ify.c --- mutt-1.0.1/md5ify.c Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/md5ify.c Thu Feb 24 12:39:33 2000 @@ -0,0 +1,36 @@ +/* + * this code was taken from "fetchmail". + */ + +/*********************************************************************** + module: md5ify.c + project: fetchmail + programmer: Carl Harris, ceharris@mal.com + description: Simple interface to MD5 module. + + ***********************************************************************/ + +#include + +#if defined(STDC_HEADERS) +#include +#endif + +#include "md5.h" + +char * MD5Digest (unsigned char *s) +{ + int i; + MD5_CTX context; + unsigned char digest[16]; + static char ascii_digest [33]; + + MD5Init(&context); + MD5Update(&context, s, strlen(s)); + MD5Final(digest, &context); + + for (i = 0; i < 16; i++) + sprintf(ascii_digest+2*i, "%02x", digest[i]); + + return(ascii_digest); +} diff -uNr mutt-1.0.1/menu.c mutt-1.0.1.new/menu.c --- mutt-1.0.1/menu.c Thu Jan 6 03:55:09 2000 +++ mutt-1.0.1.new/menu.c Thu Feb 24 12:39:33 2000 @@ -23,6 +23,13 @@ #include #include +#ifdef KANJI +#define JPEUC_LLCORNER (0x2826 | 0x8080) +#define JPEUC_ULCORNER (0x2823 | 0x8080) +#define JPEUC_LTEE (0x2827 | 0x8080) +#define JPEUC_VLINE (0x2822 | 0x8080) +#endif + static void print_enriched_string (int attr, unsigned char *s, int do_color) { while (*s) @@ -36,18 +43,82 @@ switch (*s) { case M_TREE_LLCORNER: +#ifdef KANJI + if (option (OPTKANJITHREAD)) + { + if (!option (OPTASCIICHARS) && + ((s[1] == M_TREE_STAR) || (s[1] == M_TREE_HLINE))) + { + s++; + addch ((JPEUC_LLCORNER >> 8) & 0xff); + addch (JPEUC_LLCORNER & 0xff); + } + else + addch('`'); + } + else +#endif addch (option (OPTASCIICHARS) ? '`' : ACS_LLCORNER); break; case M_TREE_ULCORNER: +#ifdef KANJI + if (option (OPTKANJITHREAD)) + { + if (!option (OPTASCIICHARS) && + ((s[1] == M_TREE_STAR) || (s[1] == M_TREE_HLINE))) + { + s++; + addch ((JPEUC_ULCORNER >> 8) & 0xff); + addch (JPEUC_ULCORNER & 0xff); + } + else + addch(','); + } + else +#endif addch (option (OPTASCIICHARS) ? ',' : ACS_ULCORNER); break; case M_TREE_LTEE: +#ifdef KANJI + if (option (OPTKANJITHREAD)) + { + if (!option (OPTASCIICHARS) && + ((s[1] == M_TREE_STAR) || (s[1] == M_TREE_HLINE))) + { + s++; + addch ((JPEUC_LTEE >> 8) & 0xff); + addch (JPEUC_LTEE & 0xff); + } + else + addch('|'); + } + else +#endif addch (option (OPTASCIICHARS) ? '|' : ACS_LTEE); break; case M_TREE_HLINE: +#ifdef KANJI + if (option (OPTKANJITHREAD)) + addch ('-'); + else +#endif addch (option (OPTASCIICHARS) ? '-' : ACS_HLINE); break; case M_TREE_VLINE: +#ifdef KANJI + if (option (OPTKANJITHREAD)) + { + if (!option (OPTASCIICHARS) && (s[1] == M_TREE_SPACE)) + { + s++; + addch ((JPEUC_VLINE >> 8) & 0xff); + addch (JPEUC_VLINE & 0xff); + } + else + addch('|'); + } + else +#endif addch (option (OPTASCIICHARS) ? '|' : ACS_VLINE); break; case M_TREE_SPACE: diff -uNr mutt-1.0.1/mutt.h mutt-1.0.1.new/mutt.h --- mutt-1.0.1/mutt.h Thu Jan 6 03:55:10 2000 +++ mutt-1.0.1.new/mutt.h Thu Feb 24 12:39:33 2000 @@ -86,6 +86,9 @@ #define CH_UPDATE_LEN (1<<10) /* update Lines: and Content-Length: */ #define CH_TXTPLAIN (1<<11) /* generate text/plain MIME headers */ #define CH_NOLEN (1<<12) /* don't write Content-Length: and Lines: */ +#ifdef KANJI +#define CH_KDECODE (1<<12) /* decode iso-2022-jp */ +#endif #define CH_WEED_DELIVERED (1<<13) /* weed eventual Delivered-To headers */ /* flags for mutt_enter_string() */ @@ -261,6 +264,9 @@ OPT_REPLYTO, OPT_ABORT, OPT_RECALL, +#ifdef KANJI + OPT_EDITFORWARD, +#endif OPT_SUBJECT }; @@ -321,6 +327,7 @@ OPTPAGERSTOP, OPTPIPEDECODE, OPTPIPESPLIT, + OPTPOPAPOP, OPTPOPDELETE, OPTPOPLAST, OPTPROMPTAFTER, @@ -387,6 +394,13 @@ OPTPGPCHECKTRUST, /* (pseudo) used by pgp_select_key () */ OPTDONTHANDLEPGPKEYS, /* (pseudo) used to extract PGP keys */ #endif +#ifdef KANJI + OPTNUMBML, + OPTPAGERHDRSONLY, + OPTPAGERSPOIL, + OPTMSGID, + OPTKANJITHREAD, +#endif @@ -470,6 +484,9 @@ unsigned int binary : 1; /* long lines, or CR not in CRLF pair */ unsigned int from : 1; /* has a line beginning with "From "? */ unsigned int dot : 1; /* has a line consisting of a single dot? */ +#ifdef KANJI + unsigned int iso2022jp : 1; /* has iso2022jp text */ +#endif unsigned int nonasc : 1; /* has unicode characters out of ASCII range */ } CONTENT; @@ -662,6 +679,9 @@ FILE *fpout; char *prefix; int flags; +#ifdef KANJI + int istext; +#endif } STATE; @@ -683,6 +703,9 @@ #define state_putc(x,y) fputc(x,(y)->fpout) void state_prefix_putc(char, STATE *); +#ifdef KANJI +void state_prefix_flush(STATE *); +#endif int state_printf(STATE *, const char *, ...); #include "protos.h" diff -uNr mutt-1.0.1/mutt.log mutt-1.0.1.new/mutt.log --- mutt-1.0.1/mutt.log Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/mutt.log Thu Feb 24 12:39:33 2000 @@ -0,0 +1,54 @@ +patching file `Makefile.am' +patching file `commands.c' +patching file `configure.in' +Hunk #3 succeeded at 86 (offset 5 lines). +patching file `copy.c' +patching file `curs_main.c' +patching file `gen_defs.kanji' +patching file `globals.h' +patching file `handler.c' +Hunk #7 succeeded at 739 (offset 9 lines). +Hunk #8 succeeded at 740 with fuzz 2. +Hunk #9 succeeded at 767 (offset 12 lines). +Hunk #11 succeeded at 1209 (offset 12 lines). +Hunk #13 succeeded at 1415 (offset 12 lines). +patching file `hdrline.c' +patching file `init.c' +Hunk #1 succeeded at 1760 (offset 21 lines). +patching file `init.h' +Hunk #4 succeeded at 235 (offset 4 lines). +patching file `khenkan.c' +patching file `khenkan.h' +patching file `lib.c' +patching file `main.c' +Hunk #1 FAILED at 45. +Hunk #2 succeeded at 71 with fuzz 1. +Hunk #3 succeeded at 324 (offset 3 lines). +1 out of 3 hunks FAILED -- saving rejects to main.c.rej +patching file `md5.h' +patching file `md5c.c' +patching file `md5global.h' +patching file `md5ify.c' +patching file `menu.c' +patching file `mutt.h' +Hunk #5 succeeded at 484 (offset -1 lines). +Hunk #7 succeeded at 704 (offset -1 lines). +patching file `mx.c' +patching file `pager.c' +patching file `parse.c' +patching file `pattern.c' +patching file `pgp.c' +patching file `po/cat-id-tbl.c.orig' +patching file `po/cat-id-tbl.c.orig.rej' +patching file `po/cat-id-tbl.c.rej' +patching file `po/cat-id-tbl.c.rej.rej' +patching file `po/ja.po' +patching file `pop.c' +patching file `protos.h' +patching file `rfc2047.c' +patching file `sample.muttrc-for-japanese' +patching file `send.c' +patching file `sendlib.c' +patching file `sort.c' +patching file `sort.h' +patching file `thread.c' diff -uNr mutt-1.0.1/mx.c mutt-1.0.1.new/mx.c --- mutt-1.0.1/mx.c Thu Jan 6 03:55:11 2000 +++ mutt-1.0.1.new/mx.c Thu Feb 24 12:39:33 2000 @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -138,6 +139,37 @@ #endif /* USE_DOTLOCK */ +/* check if non-dot-beginning subdirectories exist */ +static int have_subdir (const char *path){ + int result = FALSE; + DIR * dirp; + struct dirent * de; + struct stat s; + char buffer[_POSIX_PATH_MAX + SHORT_STRING]; + + if ((dirp = opendir (path)) == NULL) + { + mutt_perror (path); + return (-1); + } + + while ((de = readdir(dirp)) != NULL){ + if ( de->d_name[0] != '.' ){ + snprintf (buffer, sizeof (buffer), "%s/%s", path, de->d_name); + if (lstat (buffer, &s) == -1) + continue; + + if (S_ISDIR (s.st_mode)) + { + result = TRUE; + break; + } + } + } + (void)closedir(dirp); + return result; +} + /* Args: * excl if excl != 0, request an exclusive lock * dot if dot != 0, try to dotlock the file @@ -370,6 +402,15 @@ snprintf (tmp, sizeof (tmp), "%s/.xmhcache", path); if (access (tmp, F_OK) == 0) + return (M_MH); + + snprintf (tmp, sizeof (tmp), "%s/.mew_cache", path); + if (access (tmp, F_OK) == 0) + return (M_MH); + + if( strlen(NONULL(MHPath)) > 0 && + ! mutt_strncmp (MHPath, path, strlen(NONULL(MHPath))) && + ! have_subdir( path )) return (M_MH); } else if (st.st_size == 0) diff -uNr mutt-1.0.1/pager.c mutt-1.0.1.new/pager.c --- mutt-1.0.1/pager.c Thu Jan 6 03:55:11 2000 +++ mutt-1.0.1.new/pager.c Thu Feb 24 12:39:33 2000 @@ -76,6 +76,21 @@ break; \ } +#ifdef KANJI +#define REDRAW_WHOLE if (hdronly) { \ + whole = 1; \ + hdronly = 0; \ + redraw = REDRAW_FULL; \ + break; \ + } + +#define DRAW_WHOLE if (hdronly) { \ + whole = 1; \ + hdronly = 0; \ + redraw = REDRAW_FULL; \ + } +#endif + struct q_class_t { int length; @@ -129,6 +144,12 @@ } *Resize = NULL; #endif +#ifdef KANJI +int hdronly = 0; +int inbody = 0; +int whole = 0; +#endif + #define NumSigLines 4 static int check_sig (const char *s, struct line_t *info, int n) @@ -973,6 +994,9 @@ * >0 normal exit, line was displayed */ +#ifdef KANJI +int kanji_pos(unsigned char *, unsigned char *); +#endif static int display_line (FILE *f, long *last_pos, struct line_t **lineInfo, int n, int *last, int *max, int flags, struct q_class_t **QuoteList, @@ -1193,6 +1217,10 @@ buf_ptr++; } +#ifdef KANJI + if (kanji_pos(buf, buf_ptr) == 2) + --buf_ptr; +#endif if (*buf_ptr == '\r') buf_ptr++; if (*buf_ptr == '\n') @@ -1288,6 +1316,11 @@ if (!special) last_special = 0; +#ifdef KANJI + if (inbody) + addch(SpoilChar[0]); + else +#endif addch (c); col++; } @@ -1352,6 +1385,10 @@ if (!(flags & M_SHOW)) flags = 0; +#ifdef KANJI + if (hdronly && buf[0] == '\n') + inbody = 1; +#endif return (flags); } @@ -1425,6 +1462,11 @@ if (!(flags & M_SHOWCOLOR)) flags |= M_SHOWFLAT; +#ifdef KANJI + hdronly = option (OPTPAGERHDRSONLY) && IsHeader (extra) ? 1 : 0; + if (IsHeader (extra)) + whole = 0; +#endif if ((fp = fopen (fname, "r")) == NULL) { mutt_perror (fname); @@ -1591,6 +1633,13 @@ lines = 0; force_redraw = 0; +#ifdef KANJI + if (!hdronly && IsHeader (extra)) + mutt_set_flag (Context, extra->hdr, M_READ, 1); + else if (IsHeader (extra) && Context->msgnotreadyet == extra->hdr->msgno) + mutt_set_flag (Context, extra->hdr, M_READ, 0); + inbody = 0; +#endif while (lines < bodylen && lineInfo[curline].offset <= sb.st_size - 1) { if (display_line (fp, &last_pos, &lineInfo, curline, &lastLine, @@ -1599,6 +1648,10 @@ &QuoteList, &q_level, &force_redraw, &SearchRE) > 0) lines++; curline++; +#ifdef KANJI + if (!option (OPTPAGERSPOIL) && hdronly && inbody) + lines = bodylen; +#endif } last_offset = lineInfo[curline].offset; } while (force_redraw); @@ -1734,6 +1787,9 @@ break; case OP_NEXT_PAGE: +#ifdef KANJI + REDRAW_WHOLE; +#endif if (lineInfo[curline].offset < sb.st_size-1) { topline = upNLines (PagerContext, lineInfo, curline, hideQuoted); @@ -1761,6 +1817,9 @@ break; case OP_NEXT_LINE: +#ifdef KANJI + REDRAW_WHOLE; +#endif if (lineInfo[curline].offset < sb.st_size-1) { topline++; @@ -1813,6 +1872,9 @@ case OP_SEARCH_NEXT: case OP_SEARCH_OPPOSITE: +#ifdef KANJI + DRAW_WHOLE; +#endif if (SearchCompiled) { if ((!SearchBack && ch==OP_SEARCH_NEXT) || @@ -1857,6 +1919,9 @@ case OP_SEARCH: case OP_SEARCH_REVERSE: +#ifdef KANJI + DRAW_WHOLE; +#endif /* leave SearchBack alone if ch == OP_SEARCH_NEXT */ if (ch == OP_SEARCH) SearchBack = 0; @@ -1957,6 +2022,10 @@ mutt_help (MENU_PAGER); redraw = REDRAW_FULL; InHelp = 0; +#ifdef KANJI + if (!whole && option (OPTPAGERHDRSONLY)) + hdronly = 1; +#endif } else mutt_error _("Help is currently being shown."); diff -uNr mutt-1.0.1/parse.c mutt-1.0.1.new/parse.c --- mutt-1.0.1/parse.c Thu Jan 6 03:55:12 2000 +++ mutt-1.0.1.new/parse.c Thu Feb 24 12:39:33 2000 @@ -1233,6 +1233,42 @@ if (regexec (ReplyRegexp.rx, e->subject, 1, pmatch, 0) == 0) e->real_subj = e->subject + pmatch[0].rm_eo; else +#ifdef KANJI + if (option (OPTNUMBML) ) + { + char *p; + p = e->subject; + if (strncasecmp (p, "re:", 3) == 0 || + strncasecmp (p, "aw:", 3) == 0) + { + p += 3; + SKIPWS (p); + } + if (*p == '[') + { + for (p++; *p && *p != ':' && *p != ' ' && *p != ']'; p++) + ; + if (*p == ':' || *p == ' ') /* [ml-name:01234] [ml-name 01234] style */ + { + for (p++; isdigit(*p); p++) + ; + if (*p == ']') + { + p++; + SKIPWS (p); + } + } + if (strncasecmp (p, "re:", 3) == 0 || + strncasecmp (p, "aw:", 3) == 0) + { + p += 3; + SKIPWS (p); + } + } + e->real_subj = p; + } + else +#endif e->real_subj = e->subject; } diff -uNr mutt-1.0.1/pattern.c mutt-1.0.1.new/pattern.c --- mutt-1.0.1/pattern.c Thu Jan 6 03:55:12 2000 +++ mutt-1.0.1.new/pattern.c Thu Feb 24 12:39:33 2000 @@ -21,6 +21,9 @@ #include "keymap.h" #include "mailbox.h" #include "copy.h" +#ifdef KANJI +#include "khenkan.h" +#endif #include #include @@ -123,6 +126,9 @@ } return REG_ICASE; /* case-insensitive */ } +#ifdef KANJI +int jis2disp(unsigned char *, unsigned char *, int); +#endif static int msg_search (CONTEXT *ctx, regex_t *rx, char *buf, size_t blen, int op, int msgno) @@ -133,6 +139,9 @@ struct stat st; FILE *fp = NULL; long lng = 0; +#ifdef KANJI + unsigned char kbuf[2048]; +#endif int match = 0; HEADER *h = ctx->hdrs[msgno]; @@ -207,7 +216,12 @@ { if (fgets (buf, blen - 1, fp) == NULL) break; /* don't loop forever */ +#ifdef KANJI + jis2disp (kbuf, (unsigned char *)buf, strlen (buf)); + if (regexec (rx, (char *)kbuf, 0, NULL, 0) == 0) +#else if (regexec (rx, buf, 0, NULL, 0) == 0) +#endif { match = 1; break; diff -uNr mutt-1.0.1/pgp.c mutt-1.0.1.new/pgp.c --- mutt-1.0.1/pgp.c Thu Jan 6 03:55:12 2000 +++ mutt-1.0.1.new/pgp.c Thu Feb 24 12:39:33 2000 @@ -30,6 +30,9 @@ #include "pgp.h" #include "mime.h" #include "parse.h" +#ifdef KANJI +#include "khenkan.h" +#endif #include #include @@ -226,6 +229,10 @@ /* Support for the Application/PGP Content Type. */ +#ifdef KANJI +int jis2disp(unsigned char *, unsigned char *, int); +int mutt_conv_file(char *, int); +#endif void application_pgp_handler (BODY *m, STATE *s) { int needpass = -1, pgp_keyblock = 0; @@ -233,6 +240,9 @@ long start_pos = 0; long bytes, last_pos, offset; char buf[HUGE_STRING]; +#ifdef KANJI + unsigned char kbuf[HUGE_STRING]; +#endif char outfile[_POSIX_PATH_MAX]; char tmpfname[_POSIX_PATH_MAX]; FILE *pgpout = NULL, *pgpin, *pgperr; @@ -412,6 +422,10 @@ offset = start_pos; while(bytes > 0 && fgets(buf, sizeof(buf) - 1, s->fpin) != NULL) { +#ifdef KANJI + jis2disp (kbuf, (unsigned char *)buf, strlen (buf)); + strcpy (buf, (char *)kbuf); +#endif offset = ftell(s->fpin); bytes -= (offset - last_pos); last_pos = offset; @@ -1028,7 +1042,11 @@ mutt_message_to_7bit(a, NULL); } else if (a->encoding == ENC8BIT) +#ifdef KANJI + a->encoding = ENC7BIT; +#else a->encoding = ENCQUOTEDPRINTABLE; +#endif else if (a->encoding == ENCBINARY) a->encoding = ENCBASE64; else if (a->content && a->encoding != ENCBASE64 && (a->content->from || (a->content->space && option (OPTPGPSTRICTENC)))) @@ -1073,6 +1091,9 @@ mutt_write_mime_body (a, sfp); fclose(sfp); +#ifdef KANJI + mutt_conv_file (signedfile, JIS); +#endif if((thepid = pgp->invoke_sign(pgp, &pgpin, &pgpout, &pgperr, -1, -1, -1, signedfile)) == -1) { diff -uNr mutt-1.0.1/po/ja.po mutt-1.0.1.new/po/ja.po --- mutt-1.0.1/po/ja.po Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/po/ja.po Thu Feb 24 12:39:33 2000 @@ -0,0 +1,2920 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 1998-12-31 10:15-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n" + +#: addrbook.c:32 browser.c:54 pager.c:1406 postpone.c:33 query.c:44 +#: recvattach.c:48 +msgid "Exit" +msgstr "" + +#: addrbook.c:33 +msgid "Select" +msgstr "" + +#: addrbook.c:34 browser.c:57 compose.c:84 curs_main.c:268 pager.c:1508 +#: pgpkey.c:181 postpone.c:36 query.c:49 recvattach.c:52 +msgid "Help" +msgstr "" + +#: addrbook.c:132 +msgid "You have no aliases!" +msgstr "" + +#: addrbook.c:144 +msgid "Aliases" +msgstr "" + +#. add a new alias +#: alias.c:193 +msgid "Alias as: " +msgstr "" + +#: alias.c:199 +msgid "You already have an alias defined with that name!" +msgstr "" + +#: alias.c:213 +msgid "Address: " +msgstr "" + +#: alias.c:229 +msgid "Personal name: " +msgstr "" + +#: alias.c:238 +#, c-format +msgid "[%s = %s] Accept?" +msgstr "" + +#: alias.c:255 recvattach.c:344 recvattach.c:399 +msgid "Save to file: " +msgstr "" + +#: alias.c:266 +msgid "Alias added." +msgstr "" + +#: attach.c:112 attach.c:235 attach.c:367 attach.c:806 +msgid "Can't match nametemplate, continue?" +msgstr "" + +#. For now, editing requires a file, no piping +#: attach.c:124 +msgid "Mailcap compose entry requires %%s" +msgstr "" + +#: attach.c:138 +msgid "Failure to open file to parse headers." +msgstr "" + +#: attach.c:169 +msgid "Failure to open file to strip headers." +msgstr "" + +#: attach.c:187 +#, c-format +msgid "No mailcap compose entry for %s, creating empty file." +msgstr "" + +#. For now, editing requires a file, no piping +#: attach.c:247 +msgid "Mailcap Edit entry requires %%s" +msgstr "" + +#: attach.c:265 +#, c-format +msgid "No mailcap edit entry for %s" +msgstr "" + +#: attach.c:333 +msgid "No matching mailcap entry found. Viewing as text." +msgstr "" + +#: attach.c:346 +msgid "MIME type not defined. Cannot view attachment." +msgstr "" + +#: attach.c:436 +msgid "Cannot create filter" +msgstr "" + +#: attach.c:638 recvattach.c:374 +msgid "Attachment saved." +msgstr "" + +#: attach.c:691 +msgid "Write fault!" +msgstr "" + +#: attach.c:890 +msgid "I don't know how to print that!" +msgstr "" + +#: browser.c:55 +msgid "Chdir" +msgstr "" + +#: browser.c:56 +msgid "Mask" +msgstr "" + +#: browser.c:345 browser.c:672 +#, c-format +msgid "%s is not a directory." +msgstr "" + +#: browser.c:450 +#, c-format +msgid "Mailboxes [%d]" +msgstr "" + +#: browser.c:455 +#, c-format +msgid "Directory [%s], File mask: %s" +msgstr "" + +#: browser.c:539 browser.c:729 browser.c:812 +msgid "No files match the file mask" +msgstr "" + +#: browser.c:646 +msgid "Chdir to: " +msgstr "" + +#: browser.c:665 browser.c:722 +msgid "Error scanning directory." +msgstr "" + +#: browser.c:683 +msgid "File Mask: " +msgstr "" + +#: browser.c:745 +msgid "Reverse sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? " +msgstr "" + +#: browser.c:746 +msgid "Sort by (d)ate, (a)lpha, si(z)e or do(n)'t sort? " +msgstr "" + +#: browser.c:747 +msgid "dazn" +msgstr "" + +#: browser.c:799 +msgid "New file name: " +msgstr "" + +#: browser.c:820 +msgid "Can't view a directory" +msgstr "" + +#: browser.c:838 +msgid "Error trying to view file" +msgstr "" + +#: buffy.c:364 +#, c-format +msgid "New mail in %s." +msgstr "" + +#: color.c:307 +#, c-format +msgid "%s: color not supported by term" +msgstr "" + +#: color.c:313 +#, c-format +msgid "%s: no such color" +msgstr "" + +#: color.c:359 color.c:550 color.c:561 +#, c-format +msgid "%s: no such object" +msgstr "" + +#: color.c:366 +#, c-format +msgid "%s: command valid only for index object" +msgstr "" + +#: color.c:374 +#, c-format +msgid "%s: too few arguments" +msgstr "" + +#: color.c:538 +msgid "Missing arguments." +msgstr "" + +#: color.c:577 color.c:588 +msgid "color: too few arguments" +msgstr "" + +#: color.c:611 +msgid "mono: too few arguments" +msgstr "" + +#: color.c:631 +#, c-format +msgid "%s: no such attribute" +msgstr "" + +#: color.c:671 hook.c:62 hook.c:70 keymap.c:681 +msgid "too few arguments" +msgstr "" + +#: color.c:680 hook.c:76 +msgid "too many arguments" +msgstr "" + +#: color.c:694 +msgid "default colors not supported" +msgstr "" + +#: commands.c:127 +msgid "Display message using mailcap?" +msgstr "" + +#: commands.c:158 commands.c:166 pgpkey.c:221 +msgid "Invoking PGP..." +msgstr "" + +#. find out whether or not the verify signature +#: commands.c:163 +msgid "Verify PGP signature?" +msgstr "" + +#: commands.c:181 mbox.c:721 +msgid "Could not create temporary file!" +msgstr "" + +#: commands.c:234 +msgid "Command: " +msgstr "" + +#: commands.c:252 recvattach.c:677 +msgid "Bounce message to: " +msgstr "メッセージの再送宛先: " + +#: commands.c:254 recvattach.c:679 +msgid "Bounce tagged messages to: " +msgstr "タグ付メッセージの再送宛先: " + +#: commands.c:269 +msgid "Error parsing address!" +msgstr "" + +#: commands.c:279 +#, c-format +msgid "Bounce message to %s" +msgstr "メッセージの再送宛先 %s" + +#: commands.c:279 +#, c-format +msgid "Bounce messages to %s" +msgstr "メッセージの再送宛先 %s" + +#: commands.c:290 +msgid "Message bounced." +msgstr "メッセージが再送されました." + +#: commands.c:290 +msgid "Messages bounced." +msgstr "メッセージが再送されました." + +#: commands.c:310 +msgid "Pipe to command: " +msgstr "パイプコマンド: " + +#: commands.c:410 +msgid "" +"Rev-Sort " +"(d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore/(m)l?: " +msgstr "" + +#: commands.c:411 +msgid "" +"Sort (d)ate/(f)rm/(r)ecv/(s)ubj/t(o)/(t)hread/(u)nsort/si(z)e/s(c)ore/(m)l?: " +msgstr "" + +#: commands.c:412 +msgid "dfrsotuzc" +msgstr "" + +#: commands.c:470 +msgid "Shell command: " +msgstr "" + +#: commands.c:586 +#, c-format +msgid "%s%s to mailbox" +msgstr "メールボックスに%2sしますか%1s" + +#: commands.c:587 +msgid "Decode-save" +msgstr "デコードして保存" + +#: commands.c:587 +msgid "Decode-copy" +msgstr "デコードしてコピー" + +#: commands.c:588 +msgid "Decrypt-save" +msgstr "暗号復号して保存" + +#: commands.c:588 +msgid "Decrypt-copy" +msgstr "暗号復号してコピー" + +#: commands.c:589 curs_main.c:264 recvattach.c:49 +msgid "Save" +msgstr "" +#msgstr "保存" + +#: commands.c:589 +msgid "Copy" +msgstr "コピー" + +#: commands.c:589 +msgid " tagged" +msgstr " タグの付いた" + +#: commands.c:658 +#, c-format +msgid "Copying to %s..." +msgstr "%s にコピー中..." + +#: commands.c:730 +msgid "Print message?" +msgstr "" + +#: commands.c:730 +msgid "Print tagged messages?" +msgstr "" + +#: commands.c:757 +msgid "Message printed" +msgstr "" + +#: commands.c:757 +msgid "Messages printed" +msgstr "" + +#: compose.c:77 +msgid "Send" +msgstr "" + +#: compose.c:78 +msgid "Abort" +msgstr "" + +#: compose.c:82 compose.c:539 +msgid "Attach file" +msgstr "添付文書" + +#: compose.c:83 +msgid "Descrip" +msgstr "" + +#: compose.c:104 +msgid "Sign, Encrypt" +msgstr "" + +#: compose.c:106 +msgid "Encrypt" +msgstr "" + +#: compose.c:108 +msgid "Sign" +msgstr "" + +#: compose.c:110 +msgid "Clear" +msgstr "" + +#: compose.c:117 +msgid " sign as: " +msgstr "" + +#: compose.c:117 +msgid "" +msgstr "" + +#: compose.c:118 compose.c:192 +msgid "MIC algorithm: " +msgstr "" + +#: compose.c:133 +msgid "" +"(e)ncrypt, (s)ign, sign (a)s, (b)oth, select (m)ic algorithm, or (f)orget " +"it? " +msgstr "" + +#: compose.c:134 +msgid "esabmf" +msgstr "" + +#: compose.c:151 +msgid "Can't open your secret key ring!" +msgstr "" + +#: compose.c:156 +msgid "Sign as: " +msgstr "" + +#: compose.c:176 +msgid "An unkown PGP version was defined for signing." +msgstr "" + +#: compose.c:186 +msgid "This doesn't make sense if you don't want to sign the message." +msgstr "" + +#: compose.c:197 +msgid "Unknown MIC algorithm, valid ones are: pgp-md5, pgp-sha1, pgp-rmd160" +msgstr "" + +#: compose.c:233 +#, c-format +msgid "%s [#%d] no longer exists!" +msgstr "" + +#: compose.c:241 +#, c-format +msgid "%s [#%d] modified. Update encoding?" +msgstr "" + +#: compose.c:282 +msgid "===== Attachments =====" +msgstr "" + +#: compose.c:320 +msgid "You may not delete the only attachment." +msgstr "" + +#: compose.c:394 +msgid "Compose" +msgstr "" + +#: compose.c:544 +msgid "Open mailbox to attach message from" +msgstr "" + +#: compose.c:583 +msgid "No messages in that folder." +msgstr "" + +#: compose.c:590 +msgid "Tag the messages you want to attach!" +msgstr "" + +#: compose.c:625 compose.c:645 +msgid "Unable to attach!" +msgstr "" + +#: compose.c:763 +msgid "Invalid encoding." +msgstr "" + +#: compose.c:778 +msgid "Save a copy of this message?" +msgstr "" + +#: compose.c:823 +msgid "Rename to: " +msgstr "" + +#: compose.c:828 +#, c-format +msgid "Can't stat: %s" +msgstr "" + +#: compose.c:855 +msgid "New file: " +msgstr "" + +#: compose.c:868 +msgid "Content-Type is of the form base/sub" +msgstr "" + +#: compose.c:874 +#, c-format +msgid "Unknown Content-Type %s" +msgstr "" + +#: compose.c:887 +#, c-format +msgid "Can't create file %s" +msgstr "" + +#: compose.c:895 +msgid "What we have here is a failure to make an attachment" +msgstr "" + +#: compose.c:958 +msgid "Postpone this message?" +msgstr "このメッセージを書きかけで保留しますか?" + +#: compose.c:1010 +msgid "Write message to mailbox" +msgstr "メッセージをメールボックスに書く" + +#: compose.c:1014 +#, c-format +msgid "Writing message to %s ..." +msgstr "メッセージを%sに書き込み中..." + +#: compose.c:1025 +msgid "Message written." +msgstr "メッセージは書かれました" + +#: curs_lib.c:135 +msgid "yes" +msgstr "" + +#: curs_lib.c:136 +msgid "no" +msgstr "" + +#. restore blocking operation +#: curs_lib.c:175 +msgid "Exit Mutt?" +msgstr "Mutt抜けます?" + +#: curs_lib.c:262 +msgid "unknown error" +msgstr "たわば!(unknown error)" + +#: curs_lib.c:282 +msgid "Press any key to continue..." +msgstr "何かキーを押せば続きが..." + +#: curs_lib.c:320 +msgid " ('?' for list): " +msgstr "('?'でリスト): " + +#: curs_main.c:242 +msgid "Cannot toggle write on a readonly mailbox!" +msgstr "" + +#: curs_main.c:249 +msgid "Changes to folder will be written on folder exit." +msgstr "" + +#: curs_main.c:254 +msgid "Changes to folder will not be written." +msgstr "" + +#: curs_main.c:261 +msgid "Quit" +msgstr "" + +#: curs_main.c:262 pager.c:1413 postpone.c:34 +msgid "Del" +msgstr "" + +#: curs_main.c:263 postpone.c:35 +msgid "Undel" +msgstr "" + +#: curs_main.c:265 query.c:45 +msgid "Mail" +msgstr "" + +#: curs_main.c:266 pager.c:1414 +msgid "Reply" +msgstr "" + +#: curs_main.c:267 +msgid "Group" +msgstr "" + +#: curs_main.c:432 +msgid "Mailbox was externally modified. Flags may be wrong." +msgstr "Mailboxが外部から変更されています. フラグが変な可能性あり." + +#: curs_main.c:435 +msgid "New mail in this mailbox." +msgstr "このメールボックスに新着メールがあります." + +#: curs_main.c:535 +msgid "No mailbox is open." +msgstr "" + +#: curs_main.c:541 +msgid "No tagged messages." +msgstr "" + +#: curs_main.c:621 +msgid "Jump to message: " +msgstr "" + +#: curs_main.c:627 +msgid "Argument must be a message number." +msgstr "" + +#: curs_main.c:660 +msgid "That message is not visible." +msgstr "" + +#: curs_main.c:663 +msgid "Invalid message number." +msgstr "" + +#: curs_main.c:676 +msgid "Delete messages matching: " +msgstr "" + +#: curs_main.c:698 +msgid "No limit pattern is in effect." +msgstr "" + +#. i18n: ask for a limit to apply +#: curs_main.c:703 +#, c-format +msgid "Limit: %s" +msgstr "" + +#: curs_main.c:712 +msgid "Limit to messages matching: " +msgstr "" + +#: curs_main.c:742 +msgid "Quit Mutt?" +msgstr "" + +#: curs_main.c:853 +msgid "Tag messages matching: " +msgstr "" + +#: curs_main.c:861 +msgid "Undelete messages matching: " +msgstr "" + +#: curs_main.c:868 +msgid "Untag messages matching: " +msgstr "" + +#: curs_main.c:886 +msgid "Open mailbox" +msgstr "メールボックスをオープンします" + +#: curs_main.c:888 +msgid "Open mailbox in read-only mode" +msgstr "メールボックスをリード・オンリーでオープンします" + +#: curs_main.c:904 mx.c:426 mx.c:567 +#, c-format +msgid "%s is not a mailbox." +msgstr "%s はメールボックスではありません." + +#: curs_main.c:1000 +msgid "Exit Mutt without saving?" +msgstr "保存しないでMuttを抜けますか?" + +#: curs_main.c:1014 curs_main.c:1038 +msgid "You are on the last message." +msgstr "すでに最後のメッセージです." + +#: curs_main.c:1021 curs_main.c:1063 +msgid "No undeleted messages." +msgstr "削除マークのないメッセージはありません." + +#: curs_main.c:1056 curs_main.c:1079 +msgid "You are on the first message." +msgstr "すでに最初のメッセージです." + +#: curs_main.c:1152 pattern.c:1117 +msgid "Search wrapped to top." +msgstr "検索は最初に戻りました." + +#: curs_main.c:1161 pattern.c:1128 +msgid "Search wrapped to bottom." +msgstr "検索は最後に戻りました." + +#: curs_main.c:1187 +msgid "No new messages" +msgstr "新しいメッセージはありません." + +#: curs_main.c:1187 +msgid "No unread messages" +msgstr "未読のメッセージはありません." + +#: curs_main.c:1188 +msgid " in this limited view" +msgstr "" + +#: curs_main.c:1298 +msgid "No more threads." +msgstr "もうスレッドはありません." + +#: curs_main.c:1300 +msgid "You are on the first thread." +msgstr "すでに最初のスレッドです." + +#: curs_main.c:1353 +msgid "Thread contains unread messages." +msgstr "" + +#: curs_main.c:1366 flags.c:220 thread.c:629 +msgid "Threading is not enabled." +msgstr "" + +#: date.c:49 +msgid "Please report this program error in the function mutt_mktime." +msgstr "" + +#. +#. * SLcurses_waddnstr() can't take a "const char *", so this is only +#. * declared "static" (sigh) +#. +#: edit.c:37 +msgid "" +"~~\t\tinsert a line begining with a single ~\n" +"~b users\tadd users to the Bcc: field\n" +"~c users\tadd users to the Cc: field\n" +"~f messages\tinclude messages\n" +"~F messages\tsame as ~f, except also include headers\n" +"~h\t\tedit the message header\n" +"~m messages\tinclude and quote messages\n" +"~M messages\tsame as ~m, except include headers\n" +"~p\t\tprint the message\n" +"~q\t\twrite file and quit editor\n" +"~r file\t\tread a file into the editor\n" +"~t users\tadd users to the To: field\n" +"~u\t\trecall the previous line\n" +"~v\t\tedit message with the $visual editor\n" +"~w file\t\twrite message to file\n" +"~x\t\tabort changes and quit editor\n" +"~?\t\tthis message\n" +".\t\ton a line by itself ends input\n" +msgstr "" + +#: edit.c:179 +#, c-format +msgid "%d: invalid message number.\n" +msgstr "" + +#: edit.c:313 +msgid "(End message with a . on a line by itself)\n" +msgstr "" + +#: edit.c:371 +msgid "No mailbox.\n" +msgstr "" + +#: edit.c:375 +msgid "Message contains:\n" +msgstr "" + +#: edit.c:379 edit.c:431 +msgid "(continue)\n" +msgstr "" + +#: edit.c:392 +msgid "missing filename.\n" +msgstr "" + +#: edit.c:413 +msgid "No lines in message.\n" +msgstr "" + +#: edit.c:442 +#, c-format +msgid "%s: unknown editor command (~? for help)\n" +msgstr "" + +#: flags.c:258 +msgid "Set flag" +msgstr "" + +#: flags.c:258 +msgid "Clear flag" +msgstr "" + +#: handler.c:131 +msgid "[-- Error: unexpected end of file! --]\n" +msgstr "" + +#. didn't find anything that we could display! +#: handler.c:982 +msgid "[-- Error: Could not display any parts of Multipart/Alternative! --]\n" +msgstr "" + +#: handler.c:1099 +#, c-format +msgid "[-- Attachment #%d" +msgstr "" + +#: handler.c:1110 +#, c-format +msgid "[-- Type: %s/%s, Encoding: %s, Size: %s --]\n" +msgstr "" + +#: handler.c:1169 +#, c-format +msgid "[-- Autoview using %s --]\n" +msgstr "" + +#: handler.c:1170 +#, c-format +msgid "Invoking autoview command: %s" +msgstr "" + +#: handler.c:1217 handler.c:1235 +#, c-format +msgid "[-- Autoview stderr of %s --]\n" +msgstr "" + +#: handler.c:1267 +msgid "[-- Error: message/external-body has no access-type parameter --]\n" +msgstr "" + +#: handler.c:1290 +#, c-format +msgid "[-- This %s/%s attachment " +msgstr "" + +#: handler.c:1297 +#, c-format +msgid "(size %s bytes) " +msgstr "" + +#: handler.c:1299 +msgid "has been deleted --]\n" +msgstr "" + +#: handler.c:1302 +#, c-format +msgid "[-- on %s --]\n" +msgstr "" + +#: handler.c:1312 +#, c-format +msgid "" +"[-- This %s/%s attachment is not included, --]\n" +"[-- and the indicated external source has --]\n" +"[-- expired. --]\n" +msgstr "" + +#: handler.c:1326 +#, c-format +msgid "" +"[-- This %s/%s attachment is not included, --]\n" +"[-- and the indicated access-type %s is unsupported --]\n" +msgstr "" + +#: handler.c:1435 +msgid "Error: multipart/signed has no protocol." +msgstr "" + +#: handler.c:1447 +msgid "Error: multipart/encrypted has no protocol parameter!" +msgstr "" + +#: handler.c:1489 +msgid "Unable to open temporary file!" +msgstr "" + +#: handler.c:1562 +#, c-format +msgid "[-- %s/%s is unsupported " +msgstr "" + +#: handler.c:1567 +#, c-format +msgid "(use '%s' to view this part)" +msgstr "" + +#: handler.c:1569 +msgid "(need 'view-attachments' bound to key!)" +msgstr "" + +#: headers.c:202 +#, c-format +msgid "%s: unable to attach file" +msgstr "" + +#: help.c:275 help.c:277 +msgid "ERROR: please report this bug" +msgstr "" + +#: help.c:329 +msgid "" +msgstr "" + +#: help.c:341 +msgid "" +"\n" +"Generic bindings:\n" +"\n" +msgstr "" +"\n" +"一般のバインディング:\n" +"\n" + +#: help.c:345 +msgid "" +"\n" +"Unbound functions:\n" +"\n" +msgstr "" +"\n" +"未バインディングの関数:\n" +"\n" + +#: help.c:353 +#, c-format +msgid "Help for %s" +msgstr "" + +#: imap.c:103 +#, c-format +msgid "imap_error(): unexpected response in %s: %s\n" +msgstr "" + +#. something is wrong because the server reported fewer messages +#. * than we previously saw +#. +#: imap.c:355 +msgid "Fatal error. Message count is out of sync!" +msgstr "" + +#: imap.c:425 +#, c-format +msgid "Fetching message headers... [%d/%d]" +msgstr "" + +#: imap.c:623 mbox.c:981 +msgid "Reopening mailbox..." +msgstr "" + +#: imap.c:865 +#, c-format +msgid "Connecting to %s..." +msgstr "%s に接続中..." + +#: imap.c:888 +msgid "IMAP Username: " +msgstr "" + +#: imap.c:901 +#, c-format +msgid "Password for %s@%s: " +msgstr "" + +#: imap.c:914 +msgid "Logging in..." +msgstr "" + +#. Login failed, try again +#: imap.c:927 +msgid "Login failed." +msgstr "" + +#: imap.c:984 +#, c-format +msgid "Selecting %s..." +msgstr "" + +#: imap.c:1083 lib.c:1243 +#, c-format +msgid "Create %s?" +msgstr "" + +#: imap.c:1132 +msgid "Fetching message..." +msgstr "" + +#: imap.c:1240 +msgid "Sending APPEND command ..." +msgstr "" + +#: imap.c:1279 +msgid "Uploading message ..." +msgstr "" + +#: imap.c:1334 +msgid "Closing connection to IMAP server..." +msgstr "" + +#: imap.c:1364 +#, c-format +msgid "Saving message status flags... [%d/%d]" +msgstr "" + +#: imap.c:1390 +msgid "Expunging messages from server..." +msgstr "" + +#. tell the server to commit changes +#: imap.c:1441 +msgid "Closing mailbox..." +msgstr "" + +#: init.c:433 +msgid "alias: no address" +msgstr "" + +#: init.c:527 +msgid "invalid header field" +msgstr "" + +#: init.c:535 +#, c-format +msgid "ignoring empty header field: %s" +msgstr "" + +#: init.c:587 +#, c-format +msgid "%s: unknown sorting method" +msgstr "" + +#: init.c:660 +#, c-format +msgid "mutt_restore_default: error in regexp: %s\n" +msgstr "" + +#: init.c:720 +#, c-format +msgid "%s: unknown variable" +msgstr "" + +#: init.c:729 +msgid "prefix is illegal with reset" +msgstr "" + +#: init.c:735 +msgid "value is illegal with reset" +msgstr "" + +#: init.c:752 +#, c-format +msgid "%s is a boolean var!" +msgstr "" + +#: init.c:759 +#, c-format +msgid "%s is set" +msgstr "" + +#: init.c:759 +#, c-format +msgid "%s is unset" +msgstr "" + +#: init.c:933 +#, c-format +msgid "%s: invalid mailbox type" +msgstr "" + +#: init.c:992 +#, c-format +msgid "%s: invalid value" +msgstr "" + +#: init.c:1042 +#, c-format +msgid "%s: unknown type" +msgstr "" + +#: init.c:1091 +#, c-format +msgid "Error in %s, line %d: %s" +msgstr "" + +#. the muttrc source keyword +#: init.c:1102 +#, c-format +msgid "source: errors in %s" +msgstr "" + +#: init.c:1112 +#, c-format +msgid "source: error at %s" +msgstr "" + +#: init.c:1117 +msgid "source: too many arguments" +msgstr "" + +#: init.c:1168 +#, c-format +msgid "%s: unknown command" +msgstr "" + +#: init.c:1497 +#, c-format +msgid "Error in command line: %s\n" +msgstr "" + +#: init.c:1540 +msgid "unable to determine home directory" +msgstr "" + +#: init.c:1548 +msgid "unable to determine username" +msgstr "" + +#: keymap.c:434 +msgid "Macro loop detected." +msgstr "" + +#: keymap.c:620 keymap.c:628 +msgid "Key is not bound." +msgstr "" + +#: keymap.c:632 +#, c-format +msgid "Key is not bound. Press '%s' for help." +msgstr "" + +#: keymap.c:643 +msgid "push: too many arguments" +msgstr "" + +#: keymap.c:664 +#, c-format +msgid "%s: no such menu" +msgstr "" + +#: keymap.c:673 +msgid "null key sequence" +msgstr "" + +#: keymap.c:751 +msgid "bind: too many arguments" +msgstr "" + +#: keymap.c:766 +#, c-format +msgid "%s: no such function in map" +msgstr "" + +#: keymap.c:789 +msgid "macro: empty key sequence" +msgstr "" + +#: keymap.c:800 +msgid "macro: too many arguments" +msgstr "" + +#: keymap.c:830 +msgid "exec: too few arguments" +msgstr "" + +#: keymap.c:850 +#, c-format +msgid "%s: no such command" +msgstr "" + +#: keymap_defs.h:5 +msgid "null operation" +msgstr "なんにもしない" + +#: keymap_defs.h:6 +msgid "force viewing of attachment using mailcap" +msgstr "強制的にmailcapを使って添付文書を読む" + +#: keymap_defs.h:7 +msgid "view attachment as text" +msgstr "添付文書をテキストとして読む" + +#: keymap_defs.h:8 +msgid "move to the bottom of the page" +msgstr "最後のページに行く" + +#: keymap_defs.h:9 +msgid "remail a message to another user" +msgstr "メッセージを他のユーザに再送する" + +#: keymap_defs.h:10 +msgid "select a new file in this directory" +msgstr "このディレクトリ中の新しいファイルを選択する" + +#: keymap_defs.h:11 +msgid "view file" +msgstr "ファイルを見る" + +#: keymap_defs.h:12 +msgid "display the currently selected file's name" +msgstr "選択中のファイル名を表示" + +#: keymap_defs.h:13 +msgid "change directories" +msgstr "ディレクトリを変更する" + +#: keymap_defs.h:14 +msgid "check mailboxes for new mail" +msgstr "メールボックスに新着メールがあるかチェックする" + +#: keymap_defs.h:15 +msgid "attach a file(s) to this message" +msgstr "このメッセージにファイルを添付する" + +#: keymap_defs.h:16 +msgid "attach message(s) to this message" +msgstr "このメッセージにメッセージを添付する" + +#: keymap_defs.h:17 +msgid "edit the BCC list" +msgstr "BCCリストを編集する" + +#: keymap_defs.h:18 +msgid "edit the CC list" +msgstr "CCリストを編集する" + +#: keymap_defs.h:19 +msgid "edit attachment description" +msgstr "この添付文書の内容説明文を編集" + +#: keymap_defs.h:20 +msgid "edit attachment transfer-encoding" +msgstr "添付文書のcontent-trasfer-encodingを編集" + +#: keymap_defs.h:21 +msgid "enter a file to save a copy of this message in" +msgstr "メッセージをセーブするファイル名を入力" + +#: keymap_defs.h:22 +msgid "edit the file to be attached" +msgstr "添付するファイルを編集する" + +#: keymap_defs.h:23 +msgid "edit the from field" +msgstr "fromフィールドを編集する" + +#: keymap_defs.h:24 +msgid "edit the message with headers" +msgstr "メッセージをヘッダとともに編集する" + +#: keymap_defs.h:25 +msgid "edit the message" +msgstr "メッセージを編集する" + +#: keymap_defs.h:26 +msgid "edit attachment using mailcap entry" +msgstr "添付文書をmailcapエントリを使って編集する" + +#: keymap_defs.h:27 +msgid "edit the Reply-To field" +msgstr "Reply-Toフィールドを編集する" + +#: keymap_defs.h:28 +msgid "edit the subject of this message" +msgstr "メッセージのサブジェクトを編集" + +#: keymap_defs.h:29 +msgid "edit the TO list" +msgstr "TOリストを編集する" + +#: keymap_defs.h:30 +msgid "edit attachment type" +msgstr "添付文書の attachment type を編集" + +#: keymap_defs.h:31 +msgid "get a temporary copy of an attachment" +msgstr "添付文書の一時的なコピーを作る" + +#: keymap_defs.h:32 +msgid "run ispell on the message" +msgstr "メッセージにispellを実行する" + +#: keymap_defs.h:33 +msgid "compose new attachment using mailcap entry" +msgstr "mailcapエントリを使って添付文書を作成する" + +#: keymap_defs.h:34 +msgid "save this message to send later" +msgstr "このメッセージ「書きかけ」にする" + +#: keymap_defs.h:35 +msgid "rename/move an attached file" +msgstr "添付文書をリネーム(移動)する" + +#: keymap_defs.h:36 +msgid "send the message" +msgstr "メッセージ送信" + +#: keymap_defs.h:37 +msgid "toggle whether to delete file after sending it" +msgstr "送信した後ファイルを消すかどうかのトグル" + +#: keymap_defs.h:38 +msgid "update an attachment's encoding info" +msgstr "添付文書のエンコード情報を更新" + +#: keymap_defs.h:39 +msgid "write the message to a folder" +msgstr "フォルダにメッセージを書く" + +#: keymap_defs.h:40 +msgid "copy a message to a file/mailbox" +msgstr "メッセージをファイルやメールボックスにコピー" + +#: keymap_defs.h:41 +msgid "create an alias from a message sender" +msgstr "メッセージの送信者をエイリアスに" + +#: keymap_defs.h:42 +msgid "move entry to bottom of screen" +msgstr "スクリーンの最下位置エントリに移動" + +#: keymap_defs.h:43 +msgid "move entry to middle of screen" +msgstr "スクリーンの中央位置エントリに移動" + +#: keymap_defs.h:44 +msgid "move entry to top of screen" +msgstr "スクリーンの最上位置エントリに移動" + +#: keymap_defs.h:45 +msgid "make decoded (text/plain) copy" +msgstr "text/plainにデコードしてコピー" + +#: keymap_defs.h:46 +msgid "make decoded copy (text/plain) and delete" +msgstr "text/plainにデコードしてコピー、かつ削除" + +#: keymap_defs.h:47 +msgid "delete the current entry" +msgstr "このエントリを削除" + +#: keymap_defs.h:48 +msgid "delete all messages in subthread" +msgstr "サブスレッドのメッセージをすべて削除" + +#: keymap_defs.h:49 +msgid "delete all messages in thread" +msgstr "スレッドのメッセージをすべて削除" + +#: keymap_defs.h:50 +msgid "display full address of sender" +msgstr "送信者のフル・アドレスを表示する" + +#: keymap_defs.h:51 +msgid "display message with full headers" +msgstr "メッセージをフル・ヘッダ付で表示する" + +#: keymap_defs.h:52 +msgid "display a message" +msgstr "メッセージを表示する" + +#: keymap_defs.h:53 +msgid "edit the current message for resending" +msgstr "このメッセージを再送信のため編集" + +#: keymap_defs.h:54 +msgid "delete the char in front of the cursor" +msgstr "カーソルの前の文字を削除" + +#: keymap_defs.h:55 +msgid "move the cursor one character to the left" +msgstr "カーソルを一文字左に移動" + +#: keymap_defs.h:56 +msgid "jump to the beginning of the line" +msgstr "行頭にジャンプ" + +#: keymap_defs.h:57 +msgid "cycle among incoming mailboxes" +msgstr "incomingメールボックスを巡回" + +#: keymap_defs.h:58 +msgid "complete filename or alias" +msgstr "ファイル名やエイリアス名を補完" + +#: keymap_defs.h:59 +msgid "complete address with query" +msgstr "問い合わせによりアドレスを補完する" + +#: keymap_defs.h:60 +msgid "delete the char under the cursor" +msgstr "カーソルの下の字を削除" + +#: keymap_defs.h:61 +msgid "jump to the end of the line" +msgstr "行末にジャンプ" + +#: keymap_defs.h:62 +msgid "move the cursor one character to the right" +msgstr "カーソルを一文字右に移動" + +#: keymap_defs.h:63 keymap_defs.h:64 +msgid "scroll up through the history list" +msgstr "ヒストリ・リストをスクロール・アップ" + +#: keymap_defs.h:65 +msgid "delete chars from cursor to end of line" +msgstr "カーソルから行末まで削除" + +#: keymap_defs.h:66 +msgid "delete all chars on the line" +msgstr "その行の文字をすべて削除" + +#: keymap_defs.h:67 +msgid "delete the word in front of the cursor" +msgstr "カーソルの前方の一語を削除" + +#: keymap_defs.h:68 +msgid "quote the next typed key" +msgstr "次にタイプする文字をquoteする" + +#: keymap_defs.h:69 +msgid "enter a muttrc command" +msgstr "muttrcの命令を入力" + +#: keymap_defs.h:70 +msgid "enter a file mask" +msgstr "ファイル・マスクを入力" + +#: keymap_defs.h:71 +msgid "exit this menu" +msgstr "このメニューから抜ける" + +#: keymap_defs.h:72 +msgid "filter attachment through a shell command" +msgstr "shellのコマンドを使って添付文書をfilterに" + +#: keymap_defs.h:73 +msgid "move to the first entry" +msgstr "最初のエントリに行" + +#: keymap_defs.h:74 +msgid "toggle a message's 'important' flag" +msgstr "「重要な」フラグのトグル" + +#: keymap_defs.h:75 +msgid "forward a message with comments" +msgstr "コメント付でメッセージをフォワード" + +#: keymap_defs.h:76 +msgid "select the current entry" +msgstr "このエントリを選ぶ" + +#: keymap_defs.h:77 +msgid "reply to all recipients" +msgstr "すべての受信者にリプライ" + +#: keymap_defs.h:78 +msgid "scroll down 1/2 page" +msgstr "ページを半分下にスクロール" + +#: keymap_defs.h:79 +msgid "scroll up 1/2 page" +msgstr "ページを半分上にスクロール" + +#: keymap_defs.h:80 +msgid "this screen" +msgstr "このスクリーン" + +#: keymap_defs.h:81 +msgid "jump to an index number" +msgstr "インデックス番号に飛ぶ" + +#: keymap_defs.h:82 +msgid "move to the last entry" +msgstr "最後のエントリに行く" + +#: keymap_defs.h:83 +msgid "reply to specified mailing list" +msgstr "メーリング・リスト宛てにリプライ" + +#: keymap_defs.h:84 +msgid "execute a macro" +msgstr "マクロを実行" + +#: keymap_defs.h:85 +msgid "compose a new mail message" +msgstr "新たなメッセージ作成" + +#: keymap_defs.h:86 +msgid "open a different folder" +msgstr "別のフォルダをオープン" + +#: keymap_defs.h:87 +msgid "open a different folder in read only mode" +msgstr "リード・オンリーモードで別のフォルダを開く" + +#: keymap_defs.h:88 +msgid "clear a status flag from a message" +msgstr "メッセージのステータス・フラグをクリア" + +#: keymap_defs.h:89 +msgid "delete messages matching a pattern" +msgstr "パターンにマッチしたメッセージを削除" + +#: keymap_defs.h:90 +msgid "retrieve mail from POP server" +msgstr "POPサーバからメールを取ってくる" + +#: keymap_defs.h:91 +msgid "move to the first message" +msgstr "最初のメッセージに行く" + +#: keymap_defs.h:92 +msgid "move to the last message" +msgstr "最後のメッセージに行く" + +#: keymap_defs.h:93 +msgid "show only messages matching a pattern" +msgstr "パターンにマッチしたメッセージだけ表示" + +#: keymap_defs.h:94 +msgid "jump to the next new message" +msgstr "次の新着メッセージへ飛ぶ" + +#: keymap_defs.h:95 +msgid "jump to the next subthread" +msgstr "次のサブスレッドへ飛ぶ" + +#: keymap_defs.h:96 +msgid "jump to the next thread" +msgstr "次のスレッドへ飛ぶ" + +#: keymap_defs.h:97 +msgid "move to the next undeleted message" +msgstr "削除マークのない次のメッセージ行く" + +#: keymap_defs.h:98 +msgid "jump to the next unread message" +msgstr "次の未読メッセージへ飛ぶ" + +#: keymap_defs.h:99 +msgid "jump to previous thread" +msgstr "前のスレッドへ飛ぶ" + +#: keymap_defs.h:100 +msgid "jump to previous subthread" +msgstr "前のサブスレッドへ飛ぶ" + +#: keymap_defs.h:101 +msgid "move to the last undelete message" +msgstr "削除マークのない最後のメッセージ行く" + +#: keymap_defs.h:102 +msgid "jump to the previous new message" +msgstr "前の新着メッセージへ飛ぶ" + +#: keymap_defs.h:103 +msgid "jump to the previous unread message" +msgstr "前の未読メッセージへ飛ぶ" + +#: keymap_defs.h:104 +msgid "mark the current thread as read" +msgstr "このスレッドを読んだことにする" + +#: keymap_defs.h:105 +msgid "mark the current subthread as read" +msgstr "このサブスレッドを読んだことにする" + +#: keymap_defs.h:106 +msgid "set a status flag on a message" +msgstr "メッセージのステータス・フラグをセット" + +#: keymap_defs.h:107 +msgid "save changes to mailbox" +msgstr "変更をメールボックスにセーブ" + +#: keymap_defs.h:108 +msgid "tag messages matching a pattern" +msgstr "パターンにマッチしたメッセージにタグを付ける" + +#: keymap_defs.h:109 +msgid "undelete messages matching a pattern" +msgstr "patternにマッチしたmessageの削除マークを取る" + +#: keymap_defs.h:110 +msgid "untag messages matching a pattern" +msgstr "パターンにマッチしたメッセージのタグを取る" + +#: keymap_defs.h:111 +msgid "move to the middle of the page" +msgstr "ページのまん中に行く" + +#: keymap_defs.h:112 +msgid "move to the next entry" +msgstr "次のエントリに行く" + +#: keymap_defs.h:113 +msgid "scroll down one line" +msgstr "一行スクロール・ダウン" + +#: keymap_defs.h:114 +msgid "move to the next page" +msgstr "次ページへ行く" + +#: keymap_defs.h:115 +msgid "jump to the bottom of the message" +msgstr "メッセージの最後に飛ぶ" + +#: keymap_defs.h:116 +msgid "return to the main-menu" +msgstr "メインメニューに戻る" + +#: keymap_defs.h:117 +msgid "toggle display of quoted text" +msgstr "引用部を表示する/しないのトグル" + +#: keymap_defs.h:118 +msgid "skip beyond quoted text" +msgstr "引用部テキストをスキップ" + +#: keymap_defs.h:119 +msgid "jump to the top of the message" +msgstr "メッセージの最初に飛ぶ" + +#: keymap_defs.h:120 +msgid "pipe message/attachment to a shell command" +msgstr "メッセージ/添付文書をpipeでshellコマンドに" + +#: keymap_defs.h:121 +msgid "move to the previous entry" +msgstr "前のエントリに行く" + +#: keymap_defs.h:122 +msgid "scroll up one line" +msgstr "一行スクロール・アップ" + +#: keymap_defs.h:123 +msgid "move to the previous page" +msgstr "前のページに行く" + +#: keymap_defs.h:124 +msgid "print the current entry" +msgstr "このエントリを印刷" + +#: keymap_defs.h:125 +msgid "query external program for addresses" +msgstr "外部プログラムにアドレスを問い合わせる" + +#: keymap_defs.h:126 +msgid "append new query results to current results" +msgstr "新たな問い合わせ結果を現在の結果に加える" + +#: keymap_defs.h:127 +msgid "save changes to mailbox and quit" +msgstr "変更をメールボックスにセーブ後終了" + +#: keymap_defs.h:128 +msgid "recall a postponed message" +msgstr "書きかけのメッセージを使う" + +#: keymap_defs.h:129 +msgid "clear and redraw the screen" +msgstr "画面をクリアして描き直す" + +#: keymap_defs.h:130 +msgid "{internal}" +msgstr "" + +#: keymap_defs.h:131 +msgid "reply to a message" +msgstr "メッセージにリプライする" + +#: keymap_defs.h:132 +msgid "save message/attachment to a file" +msgstr "メッセージや添付文書をファイルにセーブ" + +#: keymap_defs.h:133 +msgid "search for a regular expression" +msgstr "正規表現検索" + +#: keymap_defs.h:134 +msgid "search backwards for a regular expression" +msgstr "逆順の正規表現検索" + +#: keymap_defs.h:135 +msgid "search for next match" +msgstr "次のマッチを検索" + +#: keymap_defs.h:136 +msgid "search for next match in opposite direction" +msgstr "逆順にパターンを検索" + +#: keymap_defs.h:137 +msgid "toggle search pattern coloring" +msgstr "検索パターンの色をトグル" + +#: keymap_defs.h:138 +msgid "invoke a command in a subshell" +msgstr "サブシェルでコマンドを起動" + +#: keymap_defs.h:139 +msgid "sort messages" +msgstr "メッセージをソートする" + +#: keymap_defs.h:140 +msgid "sort messages in reverse order" +msgstr "メッセージを逆順にソートする" + +#: keymap_defs.h:141 +msgid "tag the current entry" +msgstr "メッセージにタグを付ける" + +#: keymap_defs.h:142 +msgid "apply next function to tagged messages" +msgstr "タグ付メッセージに次の関数を適用" + +#: keymap_defs.h:143 +msgid "tag the current subthread" +msgstr "このサブスレッドにタグを付ける" + +#: keymap_defs.h:144 +msgid "tag the current thread" +msgstr "このスレッドにタグを付ける" + +#: keymap_defs.h:145 +msgid "toggle a message's 'new' flag" +msgstr "メッセージの「新着」フラグをトグル" + +#: keymap_defs.h:146 +msgid "toggle whether the mailbox will be rewritten" +msgstr "メールボックスを書き戻すかどうかトグル" + +#: keymap_defs.h:147 +msgid "toggle wether to browse mailboxes or all files" +msgstr "メールボックスをさがすかファイルをさがすかのトグル" + +#: keymap_defs.h:148 +msgid "move to the top of the page" +msgstr "ページの最初に行く" + +#: keymap_defs.h:149 +msgid "undelete the current entry" +msgstr "エントリの削除マークを取る" + +#: keymap_defs.h:150 +msgid "undelete all messages in thread" +msgstr "スレッドの削除マークをすべて取る" + +#: keymap_defs.h:151 +msgid "undelete all messages in subthread" +msgstr "サブスレッドの削除マークをすべて取る" + +#: keymap_defs.h:152 +msgid "show the Mutt version number and date" +msgstr "Muttのバージョンと日付を表示" + +#: keymap_defs.h:153 +msgid "view attachment using mailcap entry if necessary" +msgstr "必要ならmailcapエントリを使って添付を表示" + +#: keymap_defs.h:154 +msgid "show MIME attachments" +msgstr "MIMEの添付文書を表示" + +#: keymap_defs.h:155 +msgid "show currently active limit pattern" +msgstr "active limit patternの現在の値を表示" + +#: keymap_defs.h:156 +msgid "collapse/uncollapse current thread" +msgstr "このスレッドをcollapse/uncollapse" + +#: keymap_defs.h:157 +msgid "collapse/uncollapse all threads" +msgstr "すべてのスレッドをcollapse/uncollapse" + +#: keymap_defs.h:158 +msgid "attach a PGP public key" +msgstr "PGP公開キーを添付" + +#: keymap_defs.h:159 +msgid "show PGP options" +msgstr "PGPオプションを表示" + +#: keymap_defs.h:160 +msgid "extract PGP public keys" +msgstr "PGP公開キーを抽出" + +#: keymap_defs.h:161 +msgid "wipe PGP passphrase from memory" +msgstr "PGPのパスフレーズをメモリから消去" + +#: keymap_defs.h:162 +msgid "mail a PGP public key" +msgstr "PGP公開キーをメールで送る" + +#: keymap_defs.h:163 +msgid "verify a PGP public key" +msgstr "PGP公開キーを検証する" + +#: keymap_defs.h:164 +msgid "view the key's user id" +msgstr "キーのユーザIDを表示" + +#: keymap_defs.h:165 +msgid "make decrypted copy and delete" +msgstr "復号したコピーを作り削除" + +#: keymap_defs.h:166 +msgid "make decrypted copy" +msgstr "復号したコピーを作る" + +#: lib.c:280 lib.c:295 lib.c:326 +msgid "Out of memory!" +msgstr "" + +#: lib.c:830 +msgid "File is a directory, save under it?" +msgstr "" + +#: lib.c:835 +msgid "File under directory: " +msgstr "" + +#: lib.c:846 +msgid "File exists, overwrite?" +msgstr "" + +#: lib.c:1219 +#, c-format +msgid "%s is not a mailbox!" +msgstr "" + +#: lib.c:1225 +#, c-format +msgid "Append messages to %s?" +msgstr "" + +#: main.c:40 +msgid "To contact the developers, please mail to .\n" +msgstr "" + +#: main.c:43 +msgid "" +"Copyright (C) 1996-8 Michael R. Elkins and others.\n" +"Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.\n" +"Mutt is free software, and you are welcome to redistribute it\n" +"under certain conditions; type `mutt -vv' for details.\n" +msgstr "" + +#: main.c:51 +msgid "" +"Copyright (C) 1996-8 Michael R. Elkins \n" +"Copyright (C) 1997-8 Thomas Roessler \n" +"Copyright (C) 1998 Werner Koch \n" +"Copyright (C) 1998 Ruslan Ermilov \n" +"Copyright (C) 1998 Yukinori YOSHIDA (Japanese " +"patch)\n" +"Copyright (C) 1998 Kikutani Makoto (Japanese " +"patch)\n" +"\n" +"Lots of others not mentioned here contributed lots of code,\n" +"fixes, and suggestions.\n" +"\n" +" This program is free software; you can redistribute it and/or modify\n" +" it under the terms of the GNU General Public License as published by\n" +" the Free Software Foundation; either version 2 of the License, or\n" +" (at your option) any later version.\n" +"\n" +" This program is distributed in the hope that it will be useful,\n" +" but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +" GNU General Public License for more details.\n" +"\n" +" You should have received a copy of the GNU General Public License\n" +" along with this program; if not, write to the Free Software\n" +" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n" +msgstr "" + +#: main.c:77 +msgid "" +"Copyright (C) 1996-8 Michael R. Elkins \n" +"Copyright (C) 1997-8 Thomas Roessler \n" +"Copyright (C) 1998 Werner Koch \n" +"Copyright (C) 1998 Ruslan Ermilov \n" +"\n" +" This program is free software; you can redistribute it and/or modify\n" +" it under the terms of the GNU General Public License as published by\n" +" the Free Software Foundation; either version 2 of the License, or\n" +" (at your option) any later version.\n" +"\n" +" This program is distributed in the hope that it will be useful,\n" +" but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +" GNU General Public License for more details.\n" +"\n" +" You should have received a copy of the GNU General Public License\n" +" along with this program; if not, write to the Free Software\n" +" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n" +msgstr "" + +#: main.c:100 +msgid "" +"\n" +"SHA1 implementation Copyright (C) 1995-7 Eric A. Young \n" +"\n" +" Redistribution and use in source and binary forms, with or without\n" +" modification, are permitted under certain conditions.\n" +"\n" +" The SHA1 implementation comes AS IS, and ANY EXPRESS OR IMPLIED\n" +" WARRANTIES, including, but not limited to, the implied warranties of\n" +" merchantability and fitness for a particular purpose ARE DISCLAIMED.\n" +"\n" +" You should have received a copy of the full distribution terms\n" +" along with this program; if not, write to the program's developers.\n" +msgstr "" + +#: main.c:126 +msgid "" +"usage: mutt [ -nRzZ ] [ -e ] [ -F ] [ -m ] [ -f " +"]\n" +" mutt [ -nx ] [ -e ] [ -a ] [ -F ] [ -H ] [ " +"-i ] [ -s ] [ -b ] [ -c ] [ ... ]\n" +" mutt [ -n ] [ -e ] [ -F ] -p\n" +" mutt -v[v]\n" +"\n" +"options:\n" +" -a \tattach a file to the message\n" +" -b
\tspecify a blind carbon-copy (BCC) address\n" +" -c
\tspecify a carbon-copy (CC) address\n" +" -e \tspecify a command to be executed after initialization\n" +" -f \tspecify which mailbox to read\n" +" -F \tspecify an alternate muttrc file\n" +" -H \tspecify a draft file to read header from\n" +" -i \tspecify a file which Mutt should include in the reply\n" +" -m \tspecify a default mailbox type\n" +" -n\t\tcauses Mutt not to read the system Muttrc\n" +" -p\t\trecall a postponed message\n" +" -R\t\topen mailbox in read-only mode\n" +" -s \tspecify a subject (must be in quotes if it has spaces)\n" +" -v\t\tshow version and compile-time definitions\n" +" -x\t\tsimulate the mailx send mode\n" +" -y\t\tselect a mailbox specified in your `mailboxes' list\n" +" -z\t\texit immediately if there are no messages in the mailbox\n" +" -Z\t\topen the first folder with new message, exit immediately if none\n" +" -h\t\tthis help message" +msgstr "" + +#: main.c:337 +msgid "Error initializing terminal." +msgstr "" + +#: main.c:435 +#, c-format +msgid "Debugging at level %d.\n" +msgstr "" + +#: main.c:437 +msgid "DEBUG was not defined during compilation. Ignored.\n" +msgstr "" + +#: main.c:575 +msgid "No recipients specified.\n" +msgstr "" + +#: main.c:648 +#, c-format +msgid "%s: unable to attach file.\n" +msgstr "" + +#: main.c:668 +msgid "No mailbox with new mail." +msgstr "" + +#: main.c:702 +msgid "Mailbox is empty." +msgstr "" + +#: mbox.c:143 mbox.c:202 +msgid "Mailbox is corrupt!" +msgstr "" + +#: mbox.c:277 +msgid "Reading %s... %d (%d%%)" +msgstr "読み込み中 %s... %d (%d%%)" + +#: mbox.c:650 +msgid "Mailbox was corrupted!" +msgstr "" + +#: mbox.c:687 mbox.c:904 +msgid "Fatal error! Could not reopen mailbox!" +msgstr "" + +#: mbox.c:696 +msgid "Unable to lock mailbox!" +msgstr "" + +#. this means ctx->changed or ctx->deleted was set, but no +#. * messages were found to be changed or deleted. This should +#. * never happen, is we presume it is a bug in mutt. +#. +#: mbox.c:737 +msgid "sync: mbox modified, but no modified messages! (report this bug)" +msgstr "" + +#: mbox.c:765 +msgid "Writing messages... %d (%d%%)" +msgstr "" + +#: mbox.c:889 +#, c-format +msgid "Write failed! Saved partial mailbox to %s" +msgstr "" + +#: mbox.c:941 +msgid "Could not reopen mailbox!" +msgstr "" + +#: menu.c:309 +msgid "Jump to: " +msgstr "" + +#: menu.c:318 +msgid "Invalid index number." +msgstr "" + +#: menu.c:322 menu.c:340 menu.c:376 menu.c:417 menu.c:433 menu.c:444 +#: menu.c:455 menu.c:497 menu.c:508 menu.c:521 menu.c:534 menu.c:813 +msgid "No entries." +msgstr "エントリはありません." + +#: menu.c:337 +msgid "You cannot scroll down farther." +msgstr "" + +#: menu.c:353 +msgid "You cannot scroll up farther." +msgstr "" + +#: menu.c:373 +msgid "You are on the last page." +msgstr "すでに最後のページです." + +#: menu.c:395 +msgid "You are on the first page." +msgstr "すでに最初のページです." + +#: menu.c:474 +msgid "First entry is shown." +msgstr "最初のエントリは表示されています." + +#: menu.c:494 +msgid "Last entry is shown." +msgstr "最後のエントリは表示されています." + +#: menu.c:545 +msgid "You are on the last entry." +msgstr "すでに最後のエントリです." + +#: menu.c:556 +msgid "You are on the first entry." +msgstr "すでに最初のエントリです." + +#: menu.c:596 pattern.c:1063 +msgid "Search for: " +msgstr "検索パターン: " + +#: menu.c:597 +msgid "Reverse search for: " +msgstr "逆順検索パターン: " + +#: menu.c:608 pattern.c:1096 +msgid "No search pattern." +msgstr "パターンがありません." + +#: menu.c:638 pager.c:1891 pager.c:1907 pager.c:1997 pattern.c:1161 +msgid "Not found." +msgstr "パターンはみつかりませんでした." + +#: menu.c:689 +msgid "No tagged entries." +msgstr "" + +#: menu.c:777 +msgid "Search is not implemented for this menu." +msgstr "サーチ機能はこのメニューでは実現されていません." + +#: menu.c:816 +msgid "Tagging is not supported." +msgstr "" + +#: mh.c:182 +#, c-format +msgid "Reading %s... %d" +msgstr "%s から読み込み中... %d" + +#: mx.c:114 +#, c-format +msgid "Lock count exceeded, remove lock for %s?" +msgstr "" + +#: mx.c:178 +msgid "Timeout exceeded while attempting fcntl lock!" +msgstr "" + +#: mx.c:184 +#, c-format +msgid "Waiting for fcntl lock... %d" +msgstr "" + +#: mx.c:212 +msgid "Timeout exceeded while attempting flock lock!" +msgstr "" + +#: mx.c:219 +#, c-format +msgid "Waiting for flock attempt... %d" +msgstr "" + +#: mx.c:592 +#, c-format +msgid "Reading %s..." +msgstr "%s から読み込み中..." + +#: mx.c:679 +#, c-format +msgid "Writing %s..." +msgstr "%s に書き込み中..." + +#: mx.c:761 +#, c-format +msgid "Move read messages to %s?" +msgstr "読んだメッセージを %s に移しますか?" + +#: mx.c:770 mx.c:958 +#, c-format +msgid "Purge %d deleted message?" +msgstr "" + +#: mx.c:770 mx.c:958 +#, c-format +msgid "Purge %d deleted messages?" +msgstr "" + +#: mx.c:790 +#, c-format +msgid "Moving read messages to %s..." +msgstr "" + +#: mx.c:806 mx.c:949 +msgid "Mailbox is unchanged." +msgstr "" + +#: mx.c:825 +#, c-format +msgid "%d kept, %d moved, %d deleted." +msgstr "" + +#: mx.c:828 mx.c:974 +#, c-format +msgid "%d kept, %d deleted." +msgstr "" + +#: mx.c:934 +#, c-format +msgid " Press '%s' to toggle write" +msgstr "" + +#: mx.c:936 +msgid "Use 'toggle-write' to re-enable write!" +msgstr "" + +#: mx.c:938 +#, c-format +msgid "Mailbox is marked unwritable. %s" +msgstr "" + +#: mx.c:943 +msgid "Mailbox is read-only." +msgstr "" + +#: pager.c:1407 +msgid "PrevPg" +msgstr "" + +#: pager.c:1408 +msgid "NextPg" +msgstr "" + +#: pager.c:1412 +msgid "View Attachm." +msgstr "" + +#: pager.c:1415 +msgid "Next" +msgstr "" + +#. emulate "less -q" and don't go on to the next message. +#: pager.c:1797 pager.c:1831 pager.c:1860 pager.c:2089 +msgid "Bottom of message is shown." +msgstr "" + +#: pager.c:1813 pager.c:1838 pager.c:1849 +msgid "Top of message is shown." +msgstr "" + +#: pager.c:1928 +msgid "Reverse search: " +msgstr "" + +#: pager.c:1929 +msgid "Search: " +msgstr "" + +#: pager.c:2027 +msgid "Help is currently being shown." +msgstr "" + +#: pager.c:2056 +msgid "No more quoted text." +msgstr "" + +#: pager.c:2069 +msgid "No more unquoted text after quoted text." +msgstr "" + +#: parse.c:502 +msgid "multipart message has no boundary parameter!" +msgstr "" + +#: pattern.c:249 +#, c-format +msgid "Error in expression: %s" +msgstr "" + +#: pattern.c:345 +#, c-format +msgid "Invalid day of month: %s" +msgstr "" + +#: pattern.c:359 +#, c-format +msgid "Invalid month: %s" +msgstr "" + +#: pattern.c:413 +msgid "error in expression" +msgstr "" + +#: pattern.c:598 pattern.c:706 +#, c-format +msgid "error in pattern at: %s" +msgstr "" + +#: pattern.c:646 +#, c-format +msgid "%c: invalid command" +msgstr "" + +#: pattern.c:652 +#, c-format +msgid "%c: not supported in this mode" +msgstr "" + +#: pattern.c:665 +msgid "missing parameter" +msgstr "" + +#: pattern.c:681 +#, c-format +msgid "mismatched parenthesis: %s" +msgstr "" + +#: pattern.c:713 +msgid "empty pattern" +msgstr "" + +#: pattern.c:890 +#, c-format +msgid "error: unknown op %d (report this error)." +msgstr "" + +#: pattern.c:954 pattern.c:1082 +msgid "Compiling search pattern..." +msgstr "" + +#: pattern.c:968 +msgid "Executing command on matching messages..." +msgstr "" + +#: pattern.c:1025 +msgid "No messages matched criteria." +msgstr "" + +#: pattern.c:1120 +msgid "Search hit bottom without finding match" +msgstr "" + +#: pattern.c:1131 +msgid "Search hit top without finding match" +msgstr "" + +#: pattern.c:1153 +msgid "Search interrupted." +msgstr "" + +#: pgp.c:134 +msgid "Enter PGP passphrase:" +msgstr "" + +#: pgp.c:150 +msgid "PGP passphrase forgotten." +msgstr "" + +#: pgp.c:178 +#, c-format +msgid "Unknown PGP version \"%s\"." +msgstr "" + +#: pgp.c:211 +msgid "[-- PGP output follows (current time: " +msgstr "" + +#: pgp.c:331 +msgid "[-- Error: unable to create PGP subprocess! --]\n" +msgstr "" + +#: pgp.c:358 +msgid "" +"\n" +"[-- End of PGP output --]\n" +"\n" +msgstr "" + +#: pgp.c:364 +msgid "" +"[-- BEGIN PGP MESSAGE --]\n" +"\n" +msgstr "" + +#: pgp.c:366 +msgid "[-- BEGIN PGP PUBLIC KEY BLOCK --]\n" +msgstr "" + +#: pgp.c:368 +msgid "" +"[-- BEGIN PGP SIGNED MESSAGE --]\n" +"\n" +msgstr "" + +#: pgp.c:474 +msgid "" +"\n" +"[-- END PGP MESSAGE --]\n" +msgstr "" + +#: pgp.c:476 +msgid "[-- END PGP PUBLIC KEY BLOCK --]\n" +msgstr "" + +#: pgp.c:491 +msgid "" +"[-- Error: could not find beginning of PGP message! --]\n" +"\n" +msgstr "" + +#: pgp.c:684 pgp.c:909 +msgid "" +"[-- End of PGP output --]\n" +"\n" +msgstr "" + +#. Now display the signed body +#: pgp.c:691 +msgid "" +"[-- The following data is PGP/MIME signed --]\n" +"\n" +msgstr "" + +#: pgp.c:697 +msgid "" +"\n" +"[-- End of PGP/MIME signed data --]\n" +msgstr "" + +#: pgp.c:702 +msgid "" +"[-- Error: this message does not comply with the PGP/MIME specification! " +"--]\n" +"\n" +msgstr "" + +#: pgp.c:816 +msgid "Internal error. Inform ." +msgstr "" + +#: pgp.c:880 +msgid "" +"[-- Error: could not create a PGP subprocess! --]\n" +"\n" +msgstr "" + +#: pgp.c:973 +msgid "" +"[-- Error: malformed PGP/MIME message! --]\n" +"\n" +msgstr "" + +#: pgp.c:986 +msgid "[-- Error: could not create temporary file! --]\n" +msgstr "" + +#: pgp.c:995 +msgid "" +"[-- The following data is PGP/MIME encrypted --]\n" +"\n" +msgstr "" + +#: pgp.c:1003 +msgid "" +"\n" +"[-- End of PGP/MIME encrypted data --]\n" +msgstr "" + +#: pgp.c:1092 +msgid "Can't open PGP subprocess!" +msgstr "" + +#: pgp.c:1216 +#, c-format +msgid "Use keyID = \"%s\" for %s?" +msgstr "" + +#: pgp.c:1222 +#, c-format +msgid "Enter keyID for %s: " +msgstr "" + +#: pgpkey.c:174 +msgid "Exit " +msgstr "" + +#: pgpkey.c:176 +msgid "Select " +msgstr "" + +#: pgpkey.c:179 +msgid "Check key " +msgstr "" + +#: pgpkey.c:192 +msgid "PGP keys matching " +msgstr "" + +#: pgpkey.c:211 pgpkey.c:388 +msgid "Can't open /dev/null" +msgstr "" + +#: pgpkey.c:217 pgpkey.c:382 +msgid "Can't create temporary file" +msgstr "" + +#: pgpkey.c:227 pgpkey.c:399 +msgid "Can't create filter" +msgstr "" + +#: pgpkey.c:237 +#, c-format +msgid "Key ID: 0x%s" +msgstr "" + +#: pgpkey.c:258 +msgid "This ID's trust level is undefined." +msgstr "" + +#: pgpkey.c:259 +msgid "This ID is not trusted." +msgstr "" + +#: pgpkey.c:260 +msgid "This ID is only marginally trusted." +msgstr "" + +#: pgpkey.c:263 +#, c-format +msgid "%s Do you really want to use it?" +msgstr "" + +#: pgpkey.c:370 +msgid "Please enter the key ID: " +msgstr "" + +#: pgpkey.c:417 +#, c-format +msgid "PGP Key 0x%s." +msgstr "" + +#: pgppubring.c:59 +msgid "reserved" +msgstr "" + +#: pgppubring.c:60 +msgid "Encrypted Session Key" +msgstr "" + +#: pgppubring.c:61 +msgid "Signature Packet" +msgstr "" + +#: pgppubring.c:62 +msgid "Conventionally Encrypted Session Key Packet" +msgstr "" + +#: pgppubring.c:63 +msgid "One-Pass Signature Packet" +msgstr "" + +#: pgppubring.c:64 +msgid "Secret Key Packet" +msgstr "" + +#: pgppubring.c:65 +msgid "Public Key Packet" +msgstr "" + +#: pgppubring.c:66 +msgid "Secret Subkey Packet" +msgstr "" + +#: pgppubring.c:67 +msgid "Compressed Data Packet" +msgstr "" + +#: pgppubring.c:68 +msgid "Symmetrically Encrypted Data Packet" +msgstr "" + +#: pgppubring.c:69 +msgid "Marker Packet" +msgstr "" + +#: pgppubring.c:70 +msgid "Literal Data Packet" +msgstr "" + +#: pgppubring.c:71 +msgid "Trust Packet" +msgstr "" + +#: pgppubring.c:72 +msgid "Name Packet" +msgstr "" + +#: pgppubring.c:73 +msgid "Subkey Packet" +msgstr "" + +#: pgppubring.c:74 +msgid "Reserved" +msgstr "" + +#: pgppubring.c:75 +msgid "Comment Packet" +msgstr "" + +#: pop.c:67 +msgid "POP Password: " +msgstr "" + +#: pop.c:92 +msgid "POP host is not defined." +msgstr "" + +#: pop.c:98 +msgid "No POP username is defined." +msgstr "" + +#: pop.c:115 +#, c-format +msgid "Could not find address for host %s." +msgstr "" + +#: pop.c:123 +#, c-format +msgid "Connecting to %s" +msgstr "%s に接続中..." + +#: pop.c:167 pop.c:332 +msgid "Server closed connection!" +msgstr "" + +#: pop.c:188 +msgid "No new mail in POP mailbox." +msgstr "POPメールボックスに新しいメールはありません." + +#: pop.c:210 +#, c-format +msgid "Reading %d new message (%d bytes)..." +msgstr "%d個の新メッセージを読み込み中(%d bytes)..." + +#: pop.c:211 +#, c-format +msgid "Reading %d new messages (%d bytes)..." +msgstr "%d個の新メッセージを読み込み中(%d bytes)..." + +#: pop.c:246 +msgid "Error reading message!" +msgstr "" + +#: pop.c:282 +msgid "Error while writing mailbox!" +msgstr "" + +#: pop.c:306 +#, c-format +msgid "%s [%d messages read]" +msgstr "%s [%d番目のメッセージを読み込み中]" + +#: postpone.c:112 +msgid "Postponed Messages" +msgstr "" + +#: postpone.c:185 postpone.c:194 +msgid "No postponed messages." +msgstr "" + +#: postpone.c:339 postpone.c:359 postpone.c:368 +msgid "Illegal PGP header" +msgstr "" + +#: query.c:46 +msgid "New Query" +msgstr "" + +#: query.c:47 +msgid "Make Alias" +msgstr "" + +#: query.c:48 +msgid "Search" +msgstr "" + +#: query.c:92 +msgid "Waiting for response..." +msgstr "" + +#: query.c:193 query.c:218 +msgid "Query command not defined." +msgstr "" + +#: query.c:245 +msgid "Query" +msgstr "" + +#. Prompt for Query +#: query.c:258 query.c:286 +msgid "Query: " +msgstr "" + +#: query.c:269 query.c:295 +#, c-format +msgid "Query '%s'" +msgstr "" + +#: recvattach.c:50 +msgid "Pipe" +msgstr "" + +#: recvattach.c:51 +msgid "Print" +msgstr "" + +#: recvattach.c:371 +msgid "Saving..." +msgstr "" + +#: recvattach.c:432 +msgid "Attachment saved" +msgstr "" + +#: recvattach.c:444 +#, c-format +msgid "WARNING! You are about to overwrite %s, continue?" +msgstr "" + +#: recvattach.c:462 +msgid "Attachment filtered." +msgstr "" + +#: recvattach.c:528 +msgid "Filter through: " +msgstr "" + +#: recvattach.c:528 +msgid "Pipe to: " +msgstr "" + +#: recvattach.c:563 +#, c-format +msgid "I dont know how to print %s attachments!" +msgstr "" + +#: recvattach.c:626 +msgid "Print tagged attachment(s)?" +msgstr "" + +#: recvattach.c:626 +msgid "Print attachment?" +msgstr "" + +#: recvattach.c:654 +msgid "You may only bounce message/rfc822 parts." +msgstr "" + +#: recvattach.c:690 +#, c-format +msgid "Bounce messages to %s...?" +msgstr "" + +#: recvattach.c:691 +#, c-format +msgid "Bounce message to %s...?" +msgstr "" + +#: recvattach.c:916 +msgid "Attachments" +msgstr "" + +#: recvattach.c:973 +msgid "Deletion of attachments from PGP messages is unsupported." +msgstr "" + +#: recvattach.c:993 recvattach.c:1010 +msgid "Only deletion of multipart attachments is supported." +msgstr "" + +#: recvattach.c:1060 +msgid "This operation is not currently supported for PGP messages." +msgstr "" + +#: rfc1524.c:158 +#, c-format +msgid "Improperly formated entry for type %s in \"%s\" line %d" +msgstr "" + +#: rfc1524.c:390 +msgid "No mailcap path specified" +msgstr "" + +#: rfc1524.c:416 +#, c-format +msgid "mailcap entry for type %s not found" +msgstr "" + +#: score.c:74 +msgid "score: too few arguments" +msgstr "" + +#: score.c:83 +msgid "score: too many arguments" +msgstr "" + +#: send.c:244 +msgid "No subject, abort?" +msgstr "" + +#: send.c:246 +msgid "No subject, aborting." +msgstr "" + +#. There are quite a few mailing lists which set the Reply-To: +#. * header field to the list address, which makes it quite impossible +#. * to send a message to only the sender of the message. This +#. * provides a way to do that. +#. +#: send.c:455 +#, c-format +msgid "Reply to %s%s?" +msgstr "返信先 %s%s?" + +#. This could happen if the user tagged some messages and then did +#. * a limit such that none of the tagged message are visible. +#. +#: send.c:539 +msgid "No tagged messages are visible!" +msgstr "" + +#: send.c:564 +msgid "No mailing lists found!" +msgstr "メーリングリストがありません!" + +#: send.c:661 +msgid "Include message in reply?" +msgstr "リプライにこのメッセージを引用しますか?" + +#: send.c:675 +msgid "Could not include all requested messages!" +msgstr "" + +#: send.c:688 +msgid "Forward MIME encapsulated?" +msgstr "" + +#. If the user is composing a new message, check to see if there +#. * are any postponed messages first. +#. +#: send.c:912 +msgid "Recall postponed message?" +msgstr "書きかけのメッセージを使いますか?" + +#: send.c:1151 +msgid "Abort unmodified message?" +msgstr "" + +#: send.c:1153 +msgid "Aborted unmodified message." +msgstr "" + +#. abort +#: send.c:1192 +msgid "Mail not sent." +msgstr "送られませんでした." + +#: send.c:1205 +msgid "Message postponed." +msgstr "メッセージは書きかけで保留されました." + +#: send.c:1214 +msgid "No recipients are specified!" +msgstr "受信者が指定されていません!" + +#: send.c:1219 +msgid "No recipients were specified." +msgstr "受信者が指定されていませんでした." + +#: send.c:1225 +msgid "No subject, abort sending?" +msgstr "サブジェクトがありません,中止しますか?" + +#: send.c:1229 +msgid "No subject specified." +msgstr "サブジェクトがありませんでした." + +#: send.c:1268 +msgid "Message edited. Really send?" +msgstr "" + +#: send.c:1274 +msgid "Sending message..." +msgstr "送信中..." + +#: send.c:1374 +msgid "Mail sent." +msgstr "送信しました." + +#: sendlib.c:485 +msgid "No boundary parameter found! [report this error]" +msgstr "" + +#: sendlib.c:519 +#, c-format +msgid "%s no longer exists!" +msgstr "" + +#: sendlib.c:868 +#, c-format +msgid "Could not open %s" +msgstr "" + +#: sendlib.c:1788 +#, c-format +msgid "Error sending message, child exited %d (%s).\n" +msgstr "" + +#: sendlib.c:1790 +#, c-format +msgid "Saved output of child process to %s.\n" +msgstr "" + +#: sendlib.c:1794 +msgid "Error sending message." +msgstr "" + +#: signal.c:39 signal.c:42 +#, c-format +msgid "Caught %s... Exiting.\n" +msgstr "" + +#: signal.c:44 +#, c-format +msgid "Caught signal %d... Exiting.\n" +msgstr "" + +#: sort.c:224 +msgid "Sorting mailbox..." +msgstr "" + +#: sort.c:252 +msgid "Could not find sorting function! [report this bug]" +msgstr "" + +#: status.c:102 +msgid "(no mailbox)" +msgstr "" diff -uNr mutt-1.0.1/pop.c mutt-1.0.1.new/pop.c --- mutt-1.0.1/pop.c Thu Jan 6 03:55:13 2000 +++ mutt-1.0.1.new/pop.c Thu Feb 24 12:39:33 2000 @@ -81,7 +81,10 @@ #endif struct hostent *he; char buffer[2048]; + char md5challenge[1024]; + char md5digestkey[33]; /* md5 digest is 128bit(represented by 32char) */ char msgbuf[SHORT_STRING]; + char *start,*end; int s, i, last = 0, msgs, bytes, err = 0; CONTEXT ctx; MESSAGE *msg = NULL; @@ -137,6 +140,38 @@ goto finish; } + if (option (OPTPOPAPOP)) + { + /* build MD5 digest from greeting timestamp + password */ + /* find start of timestamp */ + for (start = buffer; *start != 0 && *start != '<'; start++) + continue; + if (*start == 0) { + mutt_error("Required APOP timestamp not found in greeting"); + goto finish; + } + + /* find end of timestamp */ + for (end = start; *end != 0 && *end != '>'; end++) + continue; + if (*end == 0 || end == start + 1) { + mutt_error("Timestamp syntax error in greeting"); + goto finish; + } + else + *++end = '\0'; + + /* copy timestamp and password into digestion buffer */ + snprintf (md5challenge, sizeof(md5challenge),"%s%s\0",start,NONULL(PopPass)); + + strncpy(md5digestkey, MD5Digest(md5challenge), 32); /* md5digest string: 128bit(32char) */ + md5digestkey[32] = '\0'; + + snprintf (buffer, sizeof(buffer), "apop %s %s\r\n", PopUser, md5digestkey); + write (s, buffer, mutt_strlen (buffer)); + } + else /* APOP */ + { snprintf (buffer, sizeof(buffer), "user %s\r\n", PopUser); write (s, buffer, mutt_strlen (buffer)); @@ -152,6 +187,7 @@ snprintf (buffer, sizeof(buffer), "pass %s\r\n", NONULL(PopPass)); write (s, buffer, mutt_strlen (buffer)); + } /* end if(OPTPOPAPOP) */ if (getLine (s, buffer, sizeof (buffer)) == -1) goto fail; diff -uNr mutt-1.0.1/protos.h mutt-1.0.1.new/protos.h --- mutt-1.0.1/protos.h Thu Jan 6 03:55:14 2000 +++ mutt-1.0.1.new/protos.h Thu Feb 24 12:39:33 2000 @@ -283,6 +283,8 @@ int mutt_save_confirm (const char *, struct stat *); int mh_valid_message (const char *); +char * MD5Digest (unsigned char *); + pid_t mutt_create_filter (const char *, FILE **, FILE **, FILE **); pid_t mutt_create_filter_fd (const char *, FILE **, FILE **, FILE **, int, int, int); @@ -327,6 +329,9 @@ void mutt_check_simple (char *s, size_t len, const char *simple); void mutt_pattern_free (pattern_t **pat); +#ifdef KANJI +int mutt_copy_wbytes (STATE *, FILE *, FILE *, size_t); +#endif /* ---------------------------------------------------------------------------- * Prototypes for broken systems */ diff -uNr mutt-1.0.1/rfc2047.c mutt-1.0.1.new/rfc2047.c --- mutt-1.0.1/rfc2047.c Thu Jan 6 03:55:17 2000 +++ mutt-1.0.1.new/rfc2047.c Thu Feb 24 12:39:33 2000 @@ -20,6 +20,9 @@ #include "mime.h" #include "charset.h" #include "rfc2047.h" +#ifdef KANJI +#include "khenkan.h" +#endif #include #include @@ -176,16 +179,30 @@ strcpy (wptr, "?="); } +#ifdef KANJI +int encode_base64_header(unsigned char *, unsigned char *, + unsigned char *, char *, + unsigned int, int); +int convcode(unsigned char *, unsigned char *, int, int); +int jis2disp(unsigned char *, unsigned char *, int); +#endif void rfc2047_encode_string (char *d, size_t dlen, const unsigned char *s) { int count = 0; int len; const unsigned char *p = s; encode_t *encoder; +#ifdef KANJI + int esc = 0; +#endif /* First check to see if there are any 8-bit characters */ for (; *p; p++) { +#ifdef KANJI + if (*p == ESC) + esc++; +#endif if (*p & 0x80) count++; else if (*p == '=' && *(p+1) == '?') @@ -194,7 +211,11 @@ p++; } } +#ifdef KANJI + if (!esc && !count) +#else if (!count) +#endif { strfcpy (d, (const char *)s, dlen); return; @@ -230,6 +251,18 @@ s += 5; } +#ifdef KANJI + if (esc) + { + char mime_charset[32]; + sprintf (mime_charset, "=?%s?B?", Charset); + encode_base64_header ((unsigned char *)d, + (unsigned char *)(d + (int)dlen), + (unsigned char *)s, mime_charset, + strlen (mime_charset), 0); + } + else +#endif (*encoder) (d, dlen, s); } @@ -237,12 +270,20 @@ { ADDRESS *ptr = addr; char buffer[STRING]; +#ifdef KANJI + static unsigned char kbuffer[STRING]; +#endif while (ptr) { if (ptr->personal) { +#ifdef KANJI + convcode(kbuffer, (unsigned char *)ptr->personal, STRING, JIS); + rfc2047_encode_string (buffer, sizeof (buffer), kbuffer); +#else rfc2047_encode_string (buffer, sizeof (buffer), (const unsigned char *)ptr->personal); +#endif safe_free ((void **) &ptr->personal); ptr->personal = safe_strdup (buffer); } @@ -260,6 +301,9 @@ static int rfc2047_decode_word (char *d, const char *s, size_t len) { +#ifdef KANJI + unsigned char kbuf[2048]; +#endif char *p = safe_strdup (s); char *pp = p; char *pd = d; @@ -364,6 +408,10 @@ } } } +#ifdef KANJI + jis2disp (kbuf, (unsigned char *)d, strlen (d)); + strcpy (d, (char *)kbuf); +#endif safe_free ((void **) &p); return (0); } @@ -376,6 +424,9 @@ const char *p, *q; size_t n; int found_encoded = 0; +#ifdef KANJI + int between_mime = 0; +#endif dlen--; /* save room for the terminal nul */ @@ -394,6 +445,10 @@ if (p != s) { +#ifdef KANJI + if (between_mime) + SKIPWS(s); +#endif n = (size_t) (p - s); /* ignore spaces between encoded words */ if (!found_encoded || strspn (s, " \t\r\n") != n) @@ -409,6 +464,9 @@ rfc2047_decode_word (d, p, dlen); found_encoded = 1; +#ifdef KANJI + between_mime = 1; +#endif s = q + 2; n = mutt_strlen (d); dlen -= n; diff -uNr mutt-1.0.1/sample.muttrc-for-japanese mutt-1.0.1.new/sample.muttrc-for-japanese --- mutt-1.0.1/sample.muttrc-for-japanese Wed Dec 31 16:00:00 1969 +++ mutt-1.0.1.new/sample.muttrc-for-japanese Thu Feb 24 12:39:33 2000 @@ -0,0 +1,149 @@ +# ---- pop related +my_hdr From: kikutani@debian.or.jp (Kikutani Makoto) +set hostname="debian.or.jp" +set pop_host="foo" +# あまり勧められないけど、めんどくさいので +set pop_pass="????????" +set pop_delete +set spoolfile="~/Maildir-deb" + +#set mbox_type=Maildir + +# 複数のPOPサーバを使うときは、ここまでを ~/.muttrc-hostname +# にし、 +#source ~/.muttrc-common +# ここから下を共通の ~/.muttrc-common にしておくとよい。 +# mutt -F ~/.muttrc-hostname のように切り分けて使える。 + +# ---- 日本語版での拡張 +# サブジェクトに [ml-name:01234] と入るメーリング・リスト +# に入っているとき、これを表示しない +set numbered_ml +# pager_index_lines設定時、ボディを表示しないで移動する +#set pager_hdrs_only + +# ---- general +# ~/.mailcap に application/x-gunzip; zcat; copiousoutput +# のような行を入れとくと、.gzは展開されて読める +auto_view application/x-gunzip +# MIMEのmultipartのmessageをforwardするとき便利 +set forw_decode +#set nopager_spoiler +# noにしとくと、subjectなしでも文句言われない +set abort_nosubject=no + +# 普通は必要ないが、メーリング・リストで、To: と Reply-to: が違う +# アドレスで、自分の送ったメールにリプライするときにset +# 普通は必要ないが、メーリング・リストで、To: と Reply-to: が違う +# アドレスで、自分の送ったメールにリプライするときにset +set metoo +# 0以外の値にすると、slrn風に、常にindex画面の一部が上部に表示される +set pager_index_lines="5" +set forw_format="FWD:[%s]" +#set mime_fwd +#set nosig_dashes +#set reply_regexp="^(\\[[a-z0-9_-]+:[0-9]+\\][ \\t]+)?re:[ \\t]+" +set allow_8bit # Don't do any Quoted-Printable encoding on 8-bit data! +set edit_hdrs # let me edit those headers! +#set sort=threads +#set editor=emacsclient +set editor="jed %s -f set_buffer_no_backup" +set tilde +set postponed="+postponed" +set record=+outbox +set noabort_unmodified +# set quote_regexp="^ *[-=]*[>:|][>:|]*[ A-Za-z0-9]" +#set quote_regexp="^([A-Za-z ]+>|[]>:|}-][]>:|}-]*)" +set quote_regexp="^([A-Za-z ]+>|[ \t]*>)" +set charset="iso-2022-jp" +# 次のように、日本語が入る可能性のあるフィールド(f, F, L, n, s) +# は明確にフィールド幅を指定しないと化けます。 +set hdr_format="%4C %Z %{%b/%d} %-15.15L (%4l) %-40.40s" +set pager_format="%S %C/%T: %-20.20n %-38.38s" +set tmpdir="~/tmp" +set alias_file="~/.aliases" +set reverse_alias +# 昔のバージョンでは下の設定が効いたのだけど +#set web_browser="lynx %s" +# 今は下のように外部プログラムを呼ぶ必要があるらしい... +macro index \cb |urlview\n + +# ---- key binding +bind editor \C? backspace + +bind generic \e< first-entry +bind generic \e> last-entry + +bind index B bounce-message +bind index \e? search-opposite + +bind pager \e? search-opposite +bind pager n next-unread +bind pager p previous-unread +bind pager ' ' next-page +bind pager b previous-page +bind pager B bounce-message +bind pager up previous-line +bind pager down next-line + +# macro index g "!fetchpop -r -p\r" +# macro pager g "!fetchpop -r -p\r" + +# ---- shortcut for folders +macro index F5 "c!\n" +macro pager F5 "c!\n" +macro index F7 "c+ruby-list\n" +macro pager F7 "c+ruby-list\n" +macro index F8 "c+debian-users\n" +macro pager F8 "c+debian-users\n" + +# ---- color setting +# for Linux/kon +#color header blue black . +#color header black yellow Subject: +#color header black yellow From: +#color normal white black +#color message white black +#color body red black [_a-z\.A-Z0-9-]+@[a-zA-Z0-9\./\-]+ +#color body red black (http|ftp)://[_a-zA-Z0-9\./~\-]+ +#color quoted magenta black +#color signature blue black +#color attachment black green +#color tree red black +#color indicator black cyan +#color status yellow blue +#color tilde blue black + +color header blue white . +color header black yellow Subject: +color header black yellow From: +color normal black white +color message black white +color body red white [_a-z\.A-Z0-9-]+@[a-zA-Z0-9\./\-]+ +color body red white (http|ftp)://[_a-zA-Z0-9\./~\-]+ +color quoted magenta white +color signature blue white +color attachment black green +color tree red white +color indicator black cyan +color status yellow blue +color tilde blue white + +# How to display headers +ignore * +unignore date from to cc subject x-mailer reply-to +hdr_order date from subject to cc + +send-hook . 'set signature="~/.signature"' +send-hook . 'set attribution="%d において\n%n さん曰く:\n"' +send-hook \.jp$ 'set signature="~/.signature"' +send-hook \.jp$ 'set attribution="%d において\n%n さん曰く:\n"' +send-hook \.(com|de|se|mx|ro|edu|net)$ 'set signature="~/.signature-eng"' +send-hook \.(com|de|se|mx|ro|edu|net)$ 'set attribution="On %d,\n%f wrote:\n"' + +folder-hook . 'unlists *' +folder-hook . 'set sort=threads' +folder-hook outbox 'set sort=date-sent' +folder-hook "!" 'lists s-lang ruby-list debian-devel debian-users jf jed-users slang-workers' + +source ~/.aliases diff -uNr mutt-1.0.1/send.c mutt-1.0.1.new/send.c --- mutt-1.0.1/send.c Thu Jan 6 03:55:18 2000 +++ mutt-1.0.1.new/send.c Thu Feb 24 12:39:33 2000 @@ -24,6 +24,9 @@ #include "mailbox.h" #include "copy.h" #include "mx.h" +#ifdef KANJI +#include "khenkan.h" +#endif #include #include @@ -40,6 +43,9 @@ +#ifdef KANJI +int mutt_kconv_copy_stream (FILE *, FILE *, int); +#endif static void append_signature (FILE *f) { FILE *tmpfp; @@ -49,7 +55,11 @@ { if (option (OPTSIGDASHES)) fputs ("\n-- \n", f); +#ifdef KANJI + mutt_kconv_copy_stream (tmpfp, f, 1); /* 1 = EUC */ +#else mutt_copy_stream (tmpfp, f); +#endif fclose (tmpfp); if (thepid != -1) mutt_wait_filter (thepid); @@ -59,6 +69,10 @@ /* compare two e-mail addresses and return 1 if they are equivalent */ static int mutt_addrcmp (ADDRESS *a, ADDRESS *b) { +#ifdef KANJI + if (!a || !b) + return 0; +#endif if (!a->mailbox || !b->mailbox) return 0; if (mutt_strcasecmp (a->mailbox, b->mailbox)) @@ -344,7 +358,11 @@ if (option (OPTFORWQUOTE)) cmflags |= M_CM_PREFIX; mutt_parse_mime_message (ctx, cur); +#ifdef KANJI + mutt_copy_message (out, ctx, cur, cmflags, chflags | CH_KDECODE); +#else mutt_copy_message (out, ctx, cur, cmflags, chflags); +#endif fputs ("\n----- End forwarded message -----\n", out); return 0; } @@ -377,7 +395,11 @@ if (!option (OPTHEADER)) flags |= M_CM_NOHEADER; mutt_parse_mime_message (ctx, cur); +#ifdef KANJI + mutt_copy_message (out, ctx, cur, flags, CH_DECODE | CH_KDECODE); +#else mutt_copy_message (out, ctx, cur, flags, CH_DECODE); +#endif if (PostIndentString) { mutt_make_string (buffer, sizeof (buffer), PostIndentString, ctx, cur); @@ -559,8 +581,18 @@ if (curenv->real_subj) { +#ifdef KANJI + if (option (OPTNUMBML) && curenv->subject && '[' == curenv->subject[0]) { + env->subject = (char *) safe_malloc(mutt_strlen (curenv->subject) + 5); + sprintf (env->subject, "Re: %s", curenv->subject); + } + else { +#endif env->subject = safe_malloc (mutt_strlen (curenv->real_subj) + 5); sprintf (env->subject, "Re: %s", curenv->real_subj); +#ifdef KANJI + } +#endif } else env->subject = safe_strdup ("Re: your mail"); @@ -787,6 +819,10 @@ return (adr); } +#ifdef KANJI +int convcode(unsigned char *, unsigned char *, int, int); +int mutt_conv_file(char *, int); +#endif static int send_message (HEADER *msg) { char tempfile[_POSIX_PATH_MAX]; @@ -815,6 +851,9 @@ return (-1); } +#ifdef KANJI + mutt_conv_file(tempfile, JIS); +#endif i = mutt_invoke_sendmail (msg->env->to, msg->env->cc, msg->env->bcc, tempfile, (msg->content->encoding == ENC8BIT)); return (i); @@ -839,6 +878,9 @@ } } +#ifdef KANJI +int mutt_conv_file(char *, int); +#endif void ci_send_message (int flags, /* send mode */ HEADER *msg, /* template to use for new message */ @@ -1060,7 +1102,14 @@ #endif - +#ifdef KANJI +/* I don't know why I need this. + In 0.92.11i BODY of msg->content->filenam was EUC at this point. + But in 0.92.13i it's JIS !! + (attribution and signature are still EUC) +*/ + mutt_conv_file(msg->content->filename, EUC); +#endif if (flags & SENDMAILX) { diff -uNr mutt-1.0.1/sendlib.c mutt-1.0.1.new/sendlib.c --- mutt-1.0.1/sendlib.c Thu Jan 6 03:55:18 2000 +++ mutt-1.0.1.new/sendlib.c Thu Feb 24 12:39:33 2000 @@ -41,6 +41,9 @@ #else /* Make sure EX_OK is defined */ #define EX_OK 0 #endif +#ifdef KANJI +#include "khenkan.h" +#endif extern char RFC822Specials[]; @@ -464,8 +467,15 @@ fputc ('\n', f); } +#ifdef KANJI + if (a->encoding == ENC7BIT || a->encoding == ENC8BIT) + fprintf(f, "Content-Transfer-Encoding: %s\n", ENCODING(ENC7BIT)); + else + fprintf(f, "Content-Transfer-Encoding: %s\n", ENCODING(a->encoding)); +#else if (a->encoding != ENC7BIT) fprintf(f, "Content-Transfer-Encoding: %s\n", ENCODING (a->encoding)); +#endif /* Do NOT add the terminator here!!! */ return (ferror (f) ? -1 : 0); @@ -570,6 +580,11 @@ FILE *fp; CHARSET_MAP *cm; int ch, from=0, whitespace=0, dot=0, linelen=0; +#ifdef KANJI + int jpin_seq = 0; + int jpout_seq = 0; + int jp_in = 0; +#endif if ((fp = fopen (fname, "r")) == NULL) { @@ -620,6 +635,66 @@ linelen = 0; } } +#ifdef KANJI /* ESC */ + /* only allow {ESC-$-B, ESC-(-J} and {ESC-$-@, ESC-(-B} sequence */ + else if (ch == 0x1b) { + if (0 == jp_in) { + if (0 == jpin_seq) + jpin_seq = 1; + } + else { + if (0 == jpout_seq) + jpout_seq = 1; + } + } + else if (ch == '$') { + if (1 == jpin_seq) { + jpin_seq = 2; + } + else jpin_seq = 0; + } + else if (ch == '(') { + if (1 == jpout_seq) { + jpout_seq = 2; + } + else jpout_seq = 0; + } + else if (ch == '@') { + if (2 == jpin_seq) { + jp_in = 1; + jpin_seq = 0; + } + else jpin_seq = 0; + } + else if (ch == 'J') { + if (2 == jpout_seq) { + if (jp_in) { + info->iso2022jp = 1; + jp_in = 0; + jpout_seq = 0; + } + else jpout_seq = 0; + } + else jpout_seq = 0; + } + else if (ch == 'B') { + if (2 == jpin_seq) { + jp_in = 1; + jpin_seq = 0; + } + else jpin_seq = 0; + + if (2 == jpout_seq) { + if (jp_in) { + info->iso2022jp = 1; + jp_in = 0; + jpout_seq = 0; + } + else jpout_seq = 0; + } + else jpout_seq = 0; + } +#endif else if (ch & 0x80) info->hibin++; else if (ch == '\t' || ch == '\f') @@ -627,11 +702,19 @@ info->ascii++; whitespace++; } +#ifdef KANJI /* ESC */ + else if ((ch != 0x1b && ch < 32) || ch == 127) +#else else if (ch < 32 || ch == 127) +#endif info->lobin++; else { - if (linelen == 1) +#ifdef KANJI + jpin_seq = 0; + jpout_seq = 0; +#endif + if (linelen == 1) { if (ch == 'F') from = 1; @@ -769,11 +852,21 @@ if ((Charset == NULL || mutt_strcasecmp (Charset, "us-ascii") == 0) && info->hibin) return ("unknown-8bit"); +#ifdef KANJI + else if (info->iso2022jp) + return ("iso-2022-jp"); + else if (info->hibin == 0) + return ("us-ascii"); +#endif if (((cs = mutt_get_charset (Charset)) && cs->map) ? info->nonasc : info->hibin) return (Charset); +#ifdef KANJI + return ("iso-2022-jp"); +#else return ("us-ascii"); +#endif } void mutt_message_to_7bit (BODY *a, FILE *fp) @@ -1071,6 +1164,11 @@ att->subtype = safe_strdup (buf); } +#ifdef KANJI + if (att->type == TYPETEXT) + mutt_set_parameter("charset", set_text_charset(info), &att->parameter); + else +#endif if (!att->subtype) { if (info->lobin == 0 || (info->lobin + info->hibin + info->ascii)/ info->lobin >= 10) @@ -1315,6 +1413,9 @@ fputs ("Subject: \n", fp); /* save message id if the user has set it */ +#ifdef KANJI + if (option (OPTMSGID)) +#endif if (env->message_id) fprintf (fp, "Message-ID: %s\n", env->message_id); @@ -1369,6 +1470,9 @@ char tmp[LONG_STRING]; char *p; size_t len; +#ifdef KANJI + static unsigned char kbuffer[STRING]; +#endif for (; h; h = h->next) { @@ -1378,7 +1482,12 @@ SKIPWS (p); snprintf (tmp, sizeof (tmp), "%s: ", h->data); len = mutt_strlen (tmp); +#ifdef KANJI + convcode(kbuffer, (unsigned char *)p, STRING, JIS); + rfc2047_encode_string (tmp + len, sizeof (kbuffer), (unsigned char *) kbuffer); +#else rfc2047_encode_string (tmp + len, sizeof (tmp) - len, (unsigned char *) p); +#endif safe_free ((void **) &h->data); h->data = safe_strdup (tmp); } @@ -1767,9 +1876,15 @@ return (r); } +#ifdef KANJI +int convcode(unsigned char *, unsigned char *, int, int); +#endif void mutt_prepare_envelope (ENVELOPE *env) { char buffer[LONG_STRING]; +#ifdef KANJI + static unsigned char kbuffer[STRING]; +#endif if (env->bcc && !(env->to || env->cc)) { @@ -1799,8 +1914,13 @@ if (env->subject) { +#ifdef KANJI + convcode(kbuffer, (unsigned char *)env->subject, STRING, JIS); + rfc2047_encode_string (buffer, sizeof (buffer) - 1, kbuffer); +#else rfc2047_encode_string (buffer, sizeof (buffer) - 1, (unsigned char *) env->subject); +#endif safe_free ((void **) &env->subject); env->subject = safe_strdup (buffer); } @@ -1810,6 +1930,9 @@ env->message_id = mutt_gen_msgid (); } +#ifdef KANJI +int mutt_conv_file(char *, int); +#endif void mutt_bounce_message (HEADER *h, ADDRESS *to) { int i; @@ -1848,6 +1971,9 @@ mutt_copy_bytes (msg->fp, f, h->content->length); fclose (f); +#ifdef KANJI + mutt_conv_file(tempfile, JIS); +#endif mutt_invoke_sendmail (to, NULL, NULL, tempfile, h->content->encoding == ENC8BIT); } mx_close_message (&msg); diff -uNr mutt-1.0.1/sort.c mutt-1.0.1.new/sort.c --- mutt-1.0.1/sort.c Thu Jan 6 03:55:19 2000 +++ mutt-1.0.1.new/sort.c Thu Feb 24 12:39:33 2000 @@ -114,6 +114,27 @@ return (SORTCODE (result)); } +#ifdef KANJI +int compare_ml (const void *a, const void *b) +{ + HEADER **pa = (HEADER **) a; + HEADER **pb = (HEADER **) b; + int rc; + + if (!(*pa)->env->subject) + { + if (!(*pb)->env->subject) + rc = compare_date_sent (pa, pb); + else + rc = -1; + } + else if (!(*pb)->env->subject) + rc = 1; + else + rc = strcmp ((*pa)->env->subject, (*pb)->env->subject); + return (SORTCODE (rc)); +} +#endif int compare_from (const void *a, const void *b) { HEADER **ppa = (HEADER **) a; @@ -166,6 +187,10 @@ return (compare_to); case SORT_SCORE: return (compare_score); +#ifdef KANJI + case SORT_ML: + return (compare_ml); +#endif default: return (NULL); } diff -uNr mutt-1.0.1/sort.h mutt-1.0.1.new/sort.h --- mutt-1.0.1/sort.h Thu Jan 6 03:55:20 2000 +++ mutt-1.0.1.new/sort.h Thu Feb 24 12:39:33 2000 @@ -27,6 +27,9 @@ #define SORT_SCORE 9 #define SORT_ALIAS 10 #define SORT_ADDRESS 11 +#ifdef KANJI +#define SORT_ML 12 +#endif #define SORT_MASK 0xf #define SORT_REVERSE (1<<4) #define SORT_LAST (1<<5) diff -uNr mutt-1.0.1/thread.c mutt-1.0.1.new/thread.c --- mutt-1.0.1/thread.c Thu Jan 6 03:55:20 2000 +++ mutt-1.0.1.new/thread.c Thu Feb 24 12:39:33 2000 @@ -323,7 +323,7 @@ !is_descendant (tmp, cur) && /* don't match in the same thread */ cur->date_sent >= tmp->date_sent && (!last || (last->date_sent <= tmp->date_sent)) && - tmp->env->real_subj && + tmp->env && tmp->env->real_subj && mutt_strcmp (env->real_subj, tmp->env->real_subj) == 0) { last = tmp; /* best match so far */