Index: head/japanese/dvi2tty/Makefile =================================================================== --- head/japanese/dvi2tty/Makefile (revision 415137) +++ head/japanese/dvi2tty/Makefile (revision 415138) @@ -1,30 +1,33 @@ # Created by: Masafumi NAKANE # $FreeBSD$ PORTNAME= dvi2tty PORTVERSION= 5.0 PORTREVISION= 2 CATEGORIES= japanese print MASTER_SITES= LOCAL/hrs PKGNAMESUFFIX= -ascii DISTNAME= dvi2tty${PORTVERSION} PATCH_SITES= ${MASTER_SITES} PATCH_DIST_STRIP= -p1 PATCHFILES= dvi2tty-ascii-jtex-patch dvi2tty.c-patch MAINTAINER= TsurutaniNaoki@gmail.com COMMENT= Character-based DVI file previewer RUN_DEPENDS= jless:japanese/less PLIST_FILES= bin/jdvi2tty \ bin/jdisdvi \ man/man1/jdvi2tty.1.gz +post-patch: + ${REINPLACE_CMD} -e "s/getline/get_line/g" ${WRKSRC}/dvistuff.c + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/jdvi2tty ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/disdvi ${STAGEDIR}${PREFIX}/bin/jdisdvi ${INSTALL_MAN} ${WRKSRC}/dvi2tty.1 ${STAGEDIR}${PREFIX}/man/man1/jdvi2tty.1 .include Index: head/japanese/epwutil/files/patch-catdump.c =================================================================== --- head/japanese/epwutil/files/patch-catdump.c (nonexistent) +++ head/japanese/epwutil/files/patch-catdump.c (revision 415138) @@ -0,0 +1,56 @@ +--- catdump.c.orig 2016-05-13 19:10:22 UTC ++++ catdump.c +@@ -201,7 +201,7 @@ void outhex(); + void outstr(); + void outjstr(); + int undump(); +-uchr *getline(); ++uchr *get_line(); + uchr *getvalue(); + int gethex(); + int hexdigit(); +@@ -561,7 +561,7 @@ char *txtfile, *catalog; + err = 0; + line = 0; + +- if (getline(buf, fp) == NULL || ++ if (get_line(buf, fp) == NULL || + strncmp(buf, CAT_ENTRY, strlen(CAT_ENTRY))) { + fprintf(stderr, "ERR: 項目 %s がありません\n", CAT_ENTRY); + fclose(fp); +@@ -571,7 +571,7 @@ char *txtfile, *catalog; + st = 0; + hdr = (HDR_T *)catbuf; + mask = 0L; +- while (getline(buf, fp) != NULL && *buf != '[') { ++ while (get_line(buf, fp) != NULL && *buf != '[') { + if ((p = getvalue(buf)) == NULL) { + fprintf(stderr, "ERR: line %d: 構文に誤りがあります\n", line); + err++; +@@ -666,7 +666,7 @@ char *txtfile, *catalog; + if (strncmp(buf, BOOK_ENTRY, strlen(BOOK_ENTRY))) { + fprintf(stderr, "ERR: line %d: 不明な項目です(%s)\n", line, buf); + err++; +- while (getline(buf, fp) != NULL && *buf != '[') ++ while (get_line(buf, fp) != NULL && *buf != '[') + ; + if (*buf == '\0') + break; +@@ -680,7 +680,7 @@ char *txtfile, *catalog; + break; + } + mask = 0; +- while (getline(buf, fp) != NULL && *buf != '[') { ++ while (get_line(buf, fp) != NULL && *buf != '[') { + if ((p = getvalue(buf)) == NULL) { + fprintf(stderr, "ERR: line %d: 構文に誤りがあります\n", line); + err++; +@@ -917,7 +917,7 @@ char *txtfile, *catalog; + } + + uchr * +-getline(buf, fp) ++get_line(buf, fp) + uchr *buf; + FILE *fp; + { Property changes on: head/japanese/epwutil/files/patch-catdump.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/epwutil/files/patch-makefile.unx =================================================================== --- head/japanese/epwutil/files/patch-makefile.unx (revision 415137) +++ head/japanese/epwutil/files/patch-makefile.unx (revision 415138) @@ -1,13 +1,13 @@ ---- makefile.unx.orig Wed Oct 22 16:55:42 2003 -+++ makefile.unx Wed Oct 22 16:55:57 2003 +--- makefile.unx.orig 1999-01-12 20:22:02 UTC ++++ makefile.unx @@ -1,7 +1,8 @@ # EPWUTIL Makefile for UNIX/gcc -CC = gcc -CFLAGS = -DUNIX -DEUC +CC ?= cc +CFLAGS ?= -O -pipe +CFLAGS += -DUNIX -DEUC .c.o: $(CC) -c $(CFLAGS) $*.c Index: head/japanese/kdrill/files/patch-Imakefile =================================================================== --- head/japanese/kdrill/files/patch-Imakefile (revision 415137) +++ head/japanese/kdrill/files/patch-Imakefile (revision 415138) @@ -1,27 +1,27 @@ ---- Imakefile.orig Sat Jan 8 06:59:13 2005 -+++ Imakefile Fri Aug 5 16:16:00 2005 -@@ -32,9 +32,9 @@ +--- Imakefile.orig 2006-03-05 22:05:00 UTC ++++ Imakefile +@@ -32,9 +32,9 @@ UNCOMPRESSEXT = .gz /* You can change these here, and KDrill.ad will * get created with the matching values. Yaaay! */ -DICTLOCATION= /usr/local/lib/kanjidic.gz -EDICTLOCATION= /usr/local/lib/edict.gz -RADLOCATION= /usr/local/lib/radkfile +DICTLOCATION= $(LOCALBASE)/share/dict/edict/kanjidic +EDICTLOCATION= $(LOCALBASE)/share/dict/edict/edict +RADLOCATION= $(LOCALBASE/share/dict/edict/radkfile # If for some reason, the user prefs stuff isn't working for you, # and you can't compile, uncomment this -@@ -46,7 +46,10 @@ +@@ -46,7 +46,10 @@ RADLOCATION= /usr/local/lib/radkfile # The system should pick some default for you. # If you dont like it, uncomment this and use it as you like. # This isn't compiled in anywhere, it's just a convenience thing. -# BINDIR = /usr/local/bin/X11 +BINDIR = $(PREFIX)/bin +LIBDIR = $(PREFIX)/lib/X11 +CONFIGDIR = $(LOCALBASE)/lib/X11/config +MANPATH = $(PREFIX)/man Index: head/japanese/kdrill/files/patch-externs.h =================================================================== --- head/japanese/kdrill/files/patch-externs.h (nonexistent) +++ head/japanese/kdrill/files/patch-externs.h (revision 415138) @@ -0,0 +1,11 @@ +--- externs.h.orig 2002-10-01 06:52:38 UTC ++++ externs.h +@@ -35,7 +35,7 @@ extern void ClearCheat(); + + /* other "usefull" general functions */ + extern int xtoi(char *); +-extern int getline(FILE *, unsigned char *); ++extern int get_line(FILE *, unsigned char *); + extern void setstatus(char *); + + extern int FindIndex(char *); Property changes on: head/japanese/kdrill/files/patch-externs.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/kdrill/files/patch-makedic-Makefile =================================================================== --- head/japanese/kdrill/files/patch-makedic-Makefile (revision 415137) +++ head/japanese/kdrill/files/patch-makedic-Makefile (revision 415138) @@ -1,18 +1,18 @@ ---- makedic/Makefile.orig Sun Nov 12 16:18:27 2000 -+++ makedic/Makefile Sun Nov 12 16:19:21 2000 +--- makedic/Makefile.orig 2000-08-02 21:18:48 UTC ++++ makedic/Makefile @@ -5,13 +5,13 @@ all: makeedict makedic makeedict: makeedict.c - gcc -o $@ makeedict.c + $(CC) $(CFLAGS) -o $@ makeedict.c #This old version is just kept here for posterity's sake #It's doubtful you will want to make a new kanjidic entry. #but if you do, it's here makedic: makedic.c - gcc -o $@ makedic.c + $(CC) $(CFLAGS) -o $@ makedic.c DICTS=hira.edic hiraplus.edic kata.edic kataplus.edic fullkatahira.edic Index: head/japanese/kdrill/files/patch-readfile.c =================================================================== --- head/japanese/kdrill/files/patch-readfile.c (nonexistent) +++ head/japanese/kdrill/files/patch-readfile.c (revision 415138) @@ -0,0 +1,43 @@ +--- readfile.c.orig 2004-02-07 17:58:44 UTC ++++ readfile.c +@@ -31,7 +31,7 @@ int numberofkanji=0, highestkanji=0, low + static char *dictname=NULL; + static char *edictname=NULL; + +-/* getline: ++/* get_line: + * reads a line (from dictionary). + * Deals with 8-bit char reads (or attempts to) + * Also attempts to deal with the problem of variable line length. +@@ -46,11 +46,11 @@ static char *edictname=NULL; + * + * Used in "readstructs()", below. Also "readedict()" + * +- * Note that this expects static global getline_inptr to be NULL ++ * Note that this expects static global get_line_inptr to be NULL + * if we have just started reading a stream; + */ + +-int getline(FILE *fp,unsigned char *s) ++int get_line(FILE *fp,unsigned char *s) + { + char * val; + char *endparse; +@@ -464,7 +464,7 @@ void readedict() + lowestkanji = nextindex; + } + +- while(getline(fp, instring) != 0) ++ while(get_line(fp, instring) != 0) + { + int instrlen; + +@@ -668,7 +668,7 @@ void readstructs(){ + exit(-1); + } + +- while (getline(fp,instring) != 0) { ++ while (get_line(fp,instring) != 0) { + int Kanji; + int freq,grade,N,U,H,Q,SKIP; + unsigned char *parse; Property changes on: head/japanese/kdrill/files/patch-readfile.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/kinput2/files/patch-cmd_Kinput2.ad =================================================================== --- head/japanese/kinput2/files/patch-cmd_Kinput2.ad (revision 415137) +++ head/japanese/kinput2/files/patch-cmd_Kinput2.ad (revision 415138) @@ -1,23 +1,22 @@ Index: cmd/Kinput2.ad =================================================================== RCS file: /home/cvs/private/hrs/kinput2/cmd/Kinput2.ad,v retrieving revision 1.1.1.1 retrieving revision 1.2 -diff -u -p -r1.1.1.1 -r1.2 ---- cmd/Kinput2.ad 7 Dec 2009 06:36:04 -0000 1.1.1.1 -+++ cmd/Kinput2.ad 7 Dec 2009 06:44:56 -0000 1.2 +--- cmd/Kinput2.ad.orig 2002-10-03 09:35:26 UTC ++++ cmd/Kinput2.ad @@ -32,9 +32,12 @@ Kinput2.height: 1 !! !! Wnn setup !! -!*CcWnn.Jserver: "primary-jserver-host" +*CcWnn.Jserver: unix !*CcWnn.jserver2nd: "secondary-jserver-host-if-any" -*CcWnn.ccdef: ccdef.kinput2 +!!! Uncomment below if you like legacy key bindings +!*CcWnn.ccdef: ccdef.kinput2 +!!! Anc comment below if you like legacy key bindings +*CcWnn.ccdef: ccdef.kinput2.egg !*CcWnn.wnnEnvrc4: "wnenvrc-file-for-Wnn4" !*CcWnn.wnnEnvrc6: "wnenvrc-file-for-Wnn6" !! Index: head/japanese/kinput2/files/patch-lib_CcWnn.c =================================================================== --- head/japanese/kinput2/files/patch-lib_CcWnn.c (revision 415137) +++ head/japanese/kinput2/files/patch-lib_CcWnn.c (revision 415138) @@ -1,28 +1,27 @@ Index: lib/CcWnn.c =================================================================== RCS file: /home/cvs/private/hrs/kinput2/lib/CcWnn.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 -diff -u -p -r1.1.1.1 -r1.2 ---- lib/CcWnn.c 7 Dec 2009 06:36:04 -0000 1.1.1.1 -+++ lib/CcWnn.c 7 Dec 2009 06:44:58 -0000 1.2 +--- lib/CcWnn.c.orig 2002-10-03 09:35:27 UTC ++++ lib/CcWnn.c @@ -18,6 +18,8 @@ static char *rcsid = "$Id: CcWnn.c,v 1.5 * Author: Makoto Ishisone, Software Research Associates, Inc., Japan */ +#include + #include #include #include @@ -854,6 +856,10 @@ CcWnnObject obj; * $B$G!"3P$($F$*$/!#(B */ current_obj = obj; + /* Use JSERVER if defined instead of any other configurations */ + if (getenv("JSERVER") != NULL) { + obj->ccWnn.jservername = getenv("JSERVER"); + } obj->ccWnn.wnnbuf = jcOpen2(obj->ccWnn.jservername, obj->ccWnn.wnnenvname, obj->ccWnn.wnnoverrideenv, Index: head/japanese/kinput2/files/patch-lib_IMProto.c =================================================================== --- head/japanese/kinput2/files/patch-lib_IMProto.c (revision 415137) +++ head/japanese/kinput2/files/patch-lib_IMProto.c (revision 415138) @@ -1,40 +1,39 @@ Index: lib/IMProto.c =================================================================== RCS file: /home/cvs/private/hrs/kinput2/lib/IMProto.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 -diff -u -p -r1.1.1.1 -r1.2 ---- lib/IMProto.c 7 Dec 2009 06:36:04 -0000 1.1.1.1 -+++ lib/IMProto.c 7 Dec 2009 06:44:58 -0000 1.2 +--- lib/IMProto.c.orig 2002-10-03 09:35:28 UTC ++++ lib/IMProto.c @@ -259,7 +259,7 @@ Cardinal *num_args; #ifdef IM_TCP_TRANSPORT if (ipw->imp.use_tcp_transport) { ipw->imp.tcp_port = 0; /* let the system choose the port number */ - ipw->imp.tcp_sock = IMCreateTCPService(&ipw->imp.tcp_port); + ipw->imp.tcp_sock = IMCreateTCPService(&ipw->imp.tcp_port, "localhost"); } if (ipw->imp.tcp_sock >= 0) { TRACE(("call XtAppAddInput for tcp socket(%d)\n", ipw->imp.tcp_sock)); @@ -281,7 +281,7 @@ Cardinal *num_args; * The unix domain socket pathname has the following form: * /- */ - (void)mkdir(UNIX_SOCKET_DIR, 0777); + (void)mkdir(UNIX_SOCKET_DIR, 01777); #ifdef S_IFLNK { /* @@ -292,11 +292,11 @@ Cardinal *num_args; struct stat st; if (lstat(UNIX_SOCKET_DIR, &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR) { - (void)chmod(UNIX_SOCKET_DIR, 0777); + (void)chmod(UNIX_SOCKET_DIR, 01777); } } #else - (void)chmod(UNIX_SOCKET_DIR, 0777); + (void)chmod(UNIX_SOCKET_DIR, 01777); #endif (void)sprintf(path, "%s/%s", UNIX_SOCKET_DIR, DisplayString(XtDisplay(new))); Index: head/japanese/kinput2/files/patch-lib_cconv.c =================================================================== --- head/japanese/kinput2/files/patch-lib_cconv.c (revision 415137) +++ head/japanese/kinput2/files/patch-lib_cconv.c (revision 415138) @@ -1,609 +1,634 @@ Index: lib/cconv.c =================================================================== RCS file: /home/cvs/private/hrs/kinput2/lib/cconv.c,v retrieving revision 1.1.1.1 retrieving revision 1.3 -diff -u -p -r1.1.1.1 -r1.3 ---- lib/cconv.c 7 Dec 2009 06:36:04 -0000 1.1.1.1 -+++ lib/cconv.c 7 Dec 2009 06:50:44 -0000 1.3 +--- lib/cconv.c.orig 2002-10-03 09:35:28 UTC ++++ lib/cconv.c @@ -604,6 +604,7 @@ static char *rcsid = "$Id: cconv.c,v 10. #endif #include +#include #include #include #include @@ -672,8 +673,6 @@ static char *rcsid = "$Id: cconv.c,v 10. #define ccEncodeChar(c) ((ulong)(c)) -#define NOMODE 0xffff - #define MATCHED_CHAR 0x8080 /* $B$3$l$O(B EUC $B$H$7$F$O(B illegal $B$J%3!<%I$J$N$G(B * $BFCJL$JL\E*$KMQ$$$k(B */ #define CCLEAR_CHAR 0x8081 /* $B>e$KF1$8(B */ @@ -688,15 +687,20 @@ typedef struct convdesc { ushort context; /* context$BJ8;zNs(B ($B5U=g$K3JG<$5$l$k(B) */ ushort result; /* $BJQ497k2LJ8;zNs(B */ ushort function; /* function $B%Y%/%?$N%$%s%G%C%/%9(B */ + + struct convdesc *next; } ConvDesc; /* $B%b!<%I$4$H$N%F!<%V%k(B */ -typedef struct { - char *name; /* $B%b!<%IL>(B */ +typedef struct modetable { + char name[1024]; /* $B%b!<%IL>(B */ int nrule; /* $B%k!<%k$N?t(B */ - ConvDesc *cdbuf; /* $B%k!<%k(B */ + struct convdesc *cd_head; /* $B%k!<%k(B */ wchar *prompt; /* $B%W%m%s%W%HJ8;zNs(B */ - ushort fallthrough; + + int mt_index; + struct modetable *fallthrough; + struct modetable *next; } ModeTable; /* ccParseRule() $B$GFbItI=8=$KJQ49$5$l$?%k!<%k(B */ @@ -705,8 +709,8 @@ typedef struct _ccRule { ccRule next; /* $B%k!<%k%j%9%H$NH?t(B */ int nmode; /* $B%b!<%I$N?t(B */ - int initialmode; /* $B=i4|%b!<%I(B */ - ModeTable *modes; /* $B%b!<%I%F!<%V%k(B */ + struct modetable *initialmode; /* $B=i4|%b!<%I(B */ + struct modetable *modes; /* $B%b!<%I%F!<%V%k(B */ wchar *strbuf; /* $B%9%H%j%s%0%P%C%U%!(B */ ushort *funcbuf; /* $B%U%!%s%/%7%g%s%P%C%U%!(B */ int nfunc; /* $B%U%!%s%/%7%g%s$N?t(B */ @@ -731,8 +735,8 @@ typedef struct _ccBuf { void (*autofix)(); void (*modenotify)(); caddr_t client_data; - int currentmode; /* $B8=:_$N%b!<%I(B */ - int previousmode; /* $B0l$DA0$N%b!<%I(B */ + struct modetable *currentmode; /* $B8=:_$N%b!<%I(B */ + struct modetable *previousmode; /* $B0l$DA0$N%b!<%I(B */ wchar *context; wchar *contextend; int contextsize; @@ -747,14 +751,6 @@ typedef struct { wchar *strp; } _strbufRec; -#define CDSIZE 10 -#define MORECDSIZE 30 -typedef struct { - ConvDesc *cdbuf; /* ConvDesc $B%"%l%$(B */ - ConvDesc *cdend; - ConvDesc *cdp; -} _cdbufRec; - #define FUNCSIZE 20 #define MOREFUNCSIZE 20 typedef struct { -@@ -797,7 +793,7 @@ static int newMode(ccRule, Files *, _str +@@ -790,14 +786,14 @@ static wchar *promptsave(wchar *); + static int parseLine(uchar *, uchar **, int); + static FILE *openfile(char *); + static int doinclude(uchar *, Files *, void (*)()); +-static uchar *getline(uchar *, int, Files *, void (*)()); ++static uchar *get_line(uchar *, int, Files *, void (*)()); + static int readRuleFile(ccRule, char *); + static int registMode(ccRule, int, uchar **); + static int newMode(ccRule, Files *, _strbufRec *, _funcbufRec *, _funcnameRec *, int, uchar **); static int getDesc(ccRule, uchar *, _funcbufRec *, _funcnameRec *, ulong *, int *, wchar *, wchar *, int *); -static int getMode(ccRule, uchar *); +static struct modetable *getMode(ccRule, uchar *); static uchar *getQuote(uchar *, wchar *, int); static int getKey(uchar *, ulong *, int *); static int getmask(uchar *); @@ -810,14 +806,12 @@ static void deleteRule(ccRule); static int wstrsave(_strbufRec *, wchar *); static int wstralloc(_strbufRec *, int); static void wstradjust(_strbufRec *); -static ConvDesc *cdalloc(_cdbufRec *); -static void cdadjust(_cdbufRec *); static int funcalloc(_funcbufRec *, int); static void funcadjust(_funcbufRec *); static int funcsearch(_funcnameRec *, char *); static void funcnameadjust(_funcnameRec *); static int convchar(ccBuf, ulong, int, char *, int); -static int cconvert(ccBuf, int, ulong, int, int *, char *, int); +static int cconvert(ccBuf, struct modetable *, ulong, int, int *, char *, int); static int metamatch(ulong, ulong, int); static int contextMatch(ccBuf, wchar *); static void substStr(ccBuf, wchar *, wchar *, char *, int); @@ -841,8 +835,6 @@ static int getFunc(); static int wstrsave(); static int wstralloc(); static void wstradjust(); -static ConvDesc *cdalloc(); -static void cdadjust(); static int funcalloc(); static void funcadjust(); static int funcsearch(); -@@ -1098,7 +1090,7 @@ char *file; +@@ -1035,8 +1027,8 @@ void (*efunc)(); + return 0; + } + +-/* getline -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */ +-static uchar *getline(line, linesize, files, efunc) ++/* get_line -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */ ++static uchar *get_line(line, linesize, files, efunc) + uchar *line; + int linesize; + Files *files; +@@ -1098,9 +1090,9 @@ char *file; fnrec.funcnamebuf = NULL; rule->nmode = 0; - rule->initialmode = -1; + rule->initialmode = NULL; - while (getline(line, sizeof(line), &files, efunc)) { +- while (getline(line, sizeof(line), &files, efunc)) { ++ while (get_line(line, sizeof(line), &files, efunc)) { (void)Strcpy(tmp, line); + if ((argc = parseLine(tmp, argv, 20)) == 0) + continue; @@ -1191,33 +1183,42 @@ int ac; uchar **av; { int nmode; - ModeTable *modes; int i; + struct modetable *mtp; + struct modetable *mt_head; ac--, av++; nmode = ac; - modes = (ModeTable *)Malloc(nmode * sizeof(ModeTable)); - if (modes == NULL) { + if ((mt_head = malloc(sizeof(struct modetable))) == NULL) { eproc(rule->errorfunc, "can't alloc memory"); return -1; } - rule->modes = modes; + memset(mt_head, 0, sizeof(struct modetable)); + mt_head->mt_index = -1; + mtp = mt_head; for (i = 0; i < nmode; i++) { - if ((modes[i].name = Malloc(Strlen(av[i]) + 1)) == NULL) { + if ((mtp->next = malloc(sizeof(struct modetable))) == NULL) { eproc(rule->errorfunc, "can't alloc memory"); - Free(modes); return -1; } - (void)Strcpy(modes[i].name, av[i]); - modes[i].nrule = 0; - modes[i].cdbuf = NULL; - modes[i].prompt = NULL; - modes[i].fallthrough = NOMODE; + memset(mtp->next, 0, sizeof(struct modetable)); + mtp->next->mt_index = mtp->mt_index + 1; + mtp = mtp->next; + + strncpy(mtp->name, av[i], sizeof(mtp->name) -1); + mtp->name[sizeof(mtp->name) - 1] = '\0'; + + mtp->nrule = 0; + mtp->cd_head = NULL; + mtp->prompt = NULL; + mtp->fallthrough = NULL; } + rule->modes = mt_head->next; rule->nmode = nmode; + free(mt_head); return 0; } -@@ -1238,35 +1239,39 @@ uchar **av; +@@ -1238,38 +1239,42 @@ uchar **av; wchar prompt[30], context[100], result[100]; int func; int ndesc = 0; - ModeTable *mp; - ConvDesc *cdp; - _cdbufRec cdbuf; + struct modetable *mtp; + struct convdesc *cdp; + struct convdesc *cd_head; void (*efunc)() = rule->errorfunc; /* $B%U%)!<%^%C%H$O(B * "mode <$B%b!<%IL>(B> <"$B%W%m%s%W%HJ8;zNs(B"> [fallthrough <$B%b!<%IL>(B>] */ /* $B%b!<%I$N%A%'%C%/(B */ - if ((mode = getMode(rule, av[1])) < 0) { + if ((mtp = getMode(rule, av[1])) == NULL) { EPROC2(efunc, "illegal modename: %s", av[1]); return -1; /* No Such Mode */ } - mp = &rule->modes[mode]; if (getQuote(av[2], prompt, 0) == NULL) { EPROC2(efunc, "illegal prompt: %s", av[2]); return -1; } - mp->prompt = promptsave(prompt); - mp->nrule = 0; + + mtp->prompt = promptsave(prompt); + mtp->nrule = 0; if (ac > 4 && !Strcmp(av[3], "fallthrough")) { - mp->fallthrough = getMode(rule, av[4]); + mtp->fallthrough = getMode(rule, av[4]); } else { - mp->fallthrough = NOMODE; + mtp->fallthrough = NULL; } - cdbuf.cdbuf = NULL; + if ((cd_head = malloc(sizeof(struct convdesc))) == NULL) { + return -1; + } + memset(cd_head, 0, sizeof(struct convdesc)); + cdp = cd_head; /* $B%k!<%k$rFI$s$G%9%H%"$9$k(B */ - while (getline(line, sizeof(line), files, efunc)) { +- while (getline(line, sizeof(line), files, efunc)) { ++ while (get_line(line, sizeof(line), files, efunc)) { + /* '#' $B$G;O$^$k9T$O%3%a%s%H(B */ + if (*line == '\0' || *line == '\n' || *line == '#') + continue; @@ -1277,9 +1282,11 @@ uchar **av; break; if (getDesc(rule, line, frec, fnrec, &inkey, &modmask, context, result, &func)) { - if ((cdp = cdalloc(&cdbuf)) == NULL) { + if ((cdp->next = malloc(sizeof(struct convdesc))) == NULL) { return -1; } + memset(cdp->next, 0, sizeof(struct convdesc)); + cdp = cdp->next; /* $B%k!<%k$N%9%H%"(B */ cdp->key = inkey; @@ -1297,10 +1304,11 @@ uchar **av; * $B$"$j$&$k(B */ - cdadjust(&cdbuf); + mtp->nrule = ndesc; - mp->nrule = ndesc; - mp->cdbuf = cdbuf.cdbuf; + /* cd_head is always empty. cd_head->next is the head. */ + mtp->cd_head = cd_head->next; + free(cd_head); return 0; } @@ -1357,19 +1365,21 @@ int *funcp; return 1; } -static int getMode(rule, str) +static struct modetable *getMode(rule, str) ccRule rule; uchar *str; { - ModeTable *modes = rule->modes; - int i; + struct modetable *mtp = rule->modes; - for (i = 0; i < rule->nmode; i++) { - if (!Strcmp(str, modes[i].name)) - return i; + while (mtp) { + if (!Strcmp(str, mtp->name)) { + return mtp; + } + mtp = mtp->next; } + EPROC2(rule->errorfunc, "undefined mode %s", str); - return -1; + return NULL; } /* getQuote -- $B%/%)!<%F!<%7%g%s5-9f$G0O$^$l$?J8;zNs$rFI$s$G(B wchar $B$K$9$k(B */ @@ -1609,6 +1619,7 @@ uchar **args; ushort *fp; int findex; void (*efunc)() = rule->errorfunc; + struct modetable *mtp; findex = funcalloc(frec, n + 1); fp = frec->funcbuf + findex; @@ -1626,10 +1637,10 @@ uchar **args; fp[j++] = PREVMODE; break; } - if ((i = getMode(rule, arg)) < 0) { + if ((mtp = getMode(rule, arg)) == NULL) { break; } - fp[j++] = MODECHANGE | i; + fp[j++] = MODECHANGE | mtp->mt_index; break; } else if (!Strcmp(func, "redo")) { fp[j++] = REDO; @@ -1781,50 +1792,6 @@ _strbufRec *srec; } } -static ConvDesc *cdalloc(crec) -_cdbufRec *crec; -{ - ConvDesc *ret; - - if (crec->cdbuf == NULL) { - crec->cdbuf = (ConvDesc *)Malloc(CDSIZE * sizeof(ConvDesc)); - if (crec->cdbuf == NULL) - return NULL; - crec->cdend = crec->cdbuf + CDSIZE; - crec->cdp = crec->cdbuf; - } - if (crec->cdp >= crec->cdend) { - int size = crec->cdend - crec->cdbuf + MORECDSIZE; - int offset = crec->cdp - crec->cdbuf; - ConvDesc *cdp; - - cdp = (ConvDesc *)Realloc(crec->cdbuf, size * sizeof(ConvDesc)); - if (cdp == NULL) { - return NULL; - } - crec->cdp = cdp + offset; - crec->cdbuf = cdp; - crec->cdend = cdp + size; - } - - ret = crec->cdp++; - return ret; -} - -static void cdadjust(crec) -_cdbufRec *crec; -{ - int size = crec->cdp - crec->cdbuf; - ConvDesc *cdp; - - if (size == 0) return; - cdp = (ConvDesc *)Realloc(crec->cdbuf, size * sizeof(ConvDesc)); - if (cdp != NULL) { - crec->cdbuf = cdp; - crec->cdp = crec->cdend = cdp + size; - } -} - static int funcalloc(frec, n) _funcbufRec *frec; int n; @@ -1961,13 +1928,13 @@ int len; /* length of str */ /* $B%^%C%A$9$k%k!<%k$,8+$D$+$i$J$+$C$?$N$G(B * fallthrough $B$G;XDj$5$l$k%b!<%I$N%k!<%k$rC5$9(B */ - int tmpmode = rule->modes[buf->currentmode].fallthrough; + struct modetable *tmpmode = buf->currentmode->fallthrough; - while (tmpmode != NOMODE) { + while (tmpmode != NULL) { r = cconvert(buf, tmpmode, key, mask, &func, str, len); if (r >= 0) /* $B%^%C%A$7$?(B */ break; - tmpmode = rule->modes[tmpmode].fallthrough; + tmpmode = tmpmode->fallthrough; } } @@ -1985,7 +1952,7 @@ int len; /* length of str */ else goto redo; /* redo -- $B$b$&0lEY(B */ } else if (func & MODECHANGE) { /* $B%+%l%s%H%b!<%I$NJQ99(B */ - int tmpmode = buf->currentmode; + struct modetable *tmpmode = buf->currentmode; /* pseudo-key $B$NF~NO(B */ (void)convchar(buf, EXITMODE, 0, (char *)NULL, 0); @@ -1993,7 +1960,15 @@ int len; /* length of str */ if (func == PREVMODE) { buf->currentmode = buf->previousmode; } else { - buf->currentmode = func & ~MODECHANGE; + int index = func & ~MODECHANGE; + struct modetable *mtp; + for (mtp = rule->modes; mtp && mtp->mt_index != index; mtp = mtp->next) + ; + if (mtp) { + buf->currentmode = mtp; + } else { + return -1; + } } buf->previousmode = tmpmode; @@ -2038,7 +2013,7 @@ int len; /* length of str */ static int cconvert(buf, mode, inkey, mask, func, str, len) ccBuf buf; -int mode; /* current mode */ +struct modetable *mode; /* current mode */ ulong inkey; /* input key (raw/mapped) */ int mask; int *func; /* function */ @@ -2046,36 +2021,34 @@ char *str; int len; { ccRule rule = buf->rule; - ConvDesc *entry; + struct convdesc *cdp; ulong key; int n; - ModeTable *modep; + struct modetable *mtp = mode; - if (mode < 0 || mode >= rule->nmode) + if (mtp == NULL) return -1; /* No Such Mode */ - modep = &rule->modes[mode]; - - if ((n = modep->nrule) <= 0) + if (mtp->nrule <= 0) return -1; /* No Rules */ - for (entry = modep->cdbuf; --n >= 0; entry++) { - key = entry->key; + for (cdp = mtp->cd_head; cdp; cdp = cdp->next) { + key = cdp->key; if (key & (ulong)METAC) { /* $B%o%$%k%I%+!<%IJ8;z$N%^%C%A%s%0(B */ if (!metamatch(key, inkey, len == 0)) continue; - } else if (key & (ulong)RAWKEY && mask != entry->mask) { + } else if (key & (ulong)RAWKEY && mask != cdp->mask) { continue; } else if (key != inkey) { continue; } /* $B%-!<$,%^%C%A$7$?(B */ - if (contextMatch(buf, rule->strbuf + entry->context)) { - substStr(buf, rule->strbuf + entry->context, - rule->strbuf + entry->result, str, len); - *func = entry->function; + if (contextMatch(buf, rule->strbuf + cdp->context)) { + substStr(buf, rule->strbuf + cdp->context, + rule->strbuf + cdp->result, str, len); + *func = cdp->function; return 0; } } @@ -2347,7 +2320,6 @@ caddr_t data; /* callback $B%G!<%?(B /* $B%+%l%s%H%b!<%I$N@_Dj(B */ buf->previousmode = buf->currentmode = rule->initialmode; - buf->modifier = 0; return buf; @@ -2357,7 +2329,7 @@ caddr_t data; /* callback $B%G!<%?(B void ccFreeRule(rule) ccRule rule; { - ModeTable *modep; + struct modetable *mtp = rule->modes; int i; if (rule == NULL) return; @@ -2365,12 +2337,12 @@ ccRule rule; deleteRule(rule); - for (modep = rule->modes, i = 0; i < rule->nmode; modep++, i++) { - Free(modep->name); - Free(modep->cdbuf); - Free(modep->prompt); - } + /* XXX */ + Free(mtp->cd_head); + Free(mtp->prompt); + Free(rule->rulefile); + /* XXX */ Free(rule->modes); Free(rule->strbuf); Free(rule->funcbuf); @@ -2468,14 +2440,14 @@ XKeyPressedEvent *event; /* $B%-!<%$%Y% int ccGetMode(buf) ccBuf buf; { - return buf->currentmode; + return buf->currentmode->mt_index; } /* ccGetModePrompt -- $B8=:_$N%b!<%I$N%W%m%s%W%HJ8;zNs$rJV$9(B */ wchar *ccGetModePrompt(buf) ccBuf buf; { - return buf->rule->modes[buf->currentmode].prompt; + return buf->currentmode->prompt; } /* ccGetRule -- $BJQ49%P%C%U%!$G;H$o$l$F$$$kJQ49%k!<%k$rJV$9(B */ @@ -2599,7 +2571,6 @@ ccBuf buf; ccDestroyBuf(buf); } - #ifdef DEBUG_CCONV /* * Debug Functions @@ -2625,11 +2596,11 @@ uchar *s; void dumpRules(rule, mode) ccRule rule; -int mode; +struct modetable *mode; { int nkey; - ModeTable *modep; - ConvDesc *cdp; + struct modetable *mtp; + struct convdesc *cdp; wchar *strbuf = rule->strbuf; ushort *funcbuf = rule->funcbuf; char **funcnames; @@ -2639,31 +2610,32 @@ int mode; int i, j; funcnames = (char **)__builtin_alloca(rule->nfunc * sizeof(char *)); -{ char *cp, **fnp; - cp = rule->funcnamebuf; - fnp = funcnames; - for (i = 0; i < rule->nfunc; i++) { - *fnp++ = cp; - while (*cp++) - ; + { + char *cp, **fnp; + cp = rule->funcnamebuf; + fnp = funcnames; + for (i = 0; i < rule->nfunc; i++) { + *fnp++ = cp; + while (*cp++) + ; + } } -} - if (mode < 0 || mode >= rule->nmode) { - printf("No such mode %d\n", mode); + if (mode == NULL) { + printf("No such mode\n"); return; } - modep = &rule->modes[mode]; + mtp = rule->modes; - printf("mode: %s (%d) prompt: ", modep->name, mode); - putws(modep->prompt); - if (modep->fallthrough != NOMODE) { - printf(" fallthrough: %d", modep->fallthrough); + printf("mode: %s (%d) prompt: ", mtp->name, mtp->mt_index); + putws(mtp->prompt); + if (mtp->fallthrough != NULL) { + printf(" fallthrough: %s", mtp->fallthrough->name); } putchar('\n'); - cdp = modep->cdbuf; - for (i = 0; i < modep->nrule; i++) { - printf("rule[%d]: \"", i); + + for (cdp = mtp->cd_head; cdp; cdp = cdp->next) { + printf("rule: \""); putws(strbuf + cdp->context); printf("\"\t"); if (cdp->key & RAWKEY) { @@ -2763,14 +2735,15 @@ void dumpAllRules(rule) ccRule rule; { int i; + struct modetable *mtp; printf("** RULE DUMP **\n"); printf("number of modes: %d initialmode: %s (%d)\n\n", rule->nmode, - rule->modes[rule->initialmode].name, - rule->initialmode); - for (i = 0; i < rule->nmode; i++) { - dumpRules(rule, i); + rule->initialmode->name, + rule->initialmode->mt_index); + for (mtp = rule->modes; mtp; mtp = mtp->next) { + dumpRules(rule, mtp); } fflush(stdout); } Index: head/japanese/kinput2/files/patch-lib_imlib_imconv.c =================================================================== --- head/japanese/kinput2/files/patch-lib_imlib_imconv.c (revision 415137) +++ head/japanese/kinput2/files/patch-lib_imlib_imconv.c (revision 415138) @@ -1,18 +1,17 @@ Index: lib/imlib/imconv.c =================================================================== RCS file: /home/cvs/private/hrs/kinput2/lib/imlib/imconv.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 -diff -u -p -r1.1.1.1 -r1.2 ---- lib/imlib/imconv.c 7 Dec 2009 06:36:04 -0000 1.1.1.1 -+++ lib/imlib/imconv.c 7 Dec 2009 06:44:58 -0000 1.2 +--- lib/imlib/imconv.c.orig 2002-10-03 09:35:30 UTC ++++ lib/imlib/imconv.c @@ -591,6 +591,9 @@ OCCPreeditDrawArg *data; } } IMFinishRequest(conn, offset); +#ifdef STATUS_SYNC + IMFlush(conn); +#endif /* STATUS_SYNC */ } /*- preeditCaret: do actual preedit caret -*/ Index: head/japanese/kinput2/files/patch-lib_imlib_imfuncs.h =================================================================== --- head/japanese/kinput2/files/patch-lib_imlib_imfuncs.h (revision 415137) +++ head/japanese/kinput2/files/patch-lib_imlib_imfuncs.h (revision 415138) @@ -1,17 +1,16 @@ Index: lib/imlib/imfuncs.h =================================================================== RCS file: /home/cvs/private/hrs/kinput2/lib/imlib/imfuncs.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 -diff -u -p -r1.1.1.1 -r1.2 ---- lib/imlib/imfuncs.h 7 Dec 2009 06:36:04 -0000 1.1.1.1 -+++ lib/imlib/imfuncs.h 7 Dec 2009 06:44:58 -0000 1.2 +--- lib/imlib/imfuncs.h.orig 2002-10-03 09:35:30 UTC ++++ lib/imlib/imfuncs.h @@ -60,7 +60,7 @@ extern void IMSendBadLength _Pt_((IMConn /* * Transport layer functions (defined in imxport.c) */ -extern int IMCreateTCPService _Pt_((int *portp)); +extern int IMCreateTCPService _Pt_((int *portp, char *listenaddr)); extern IMConnection *IMTCPConnection _Pt_((Widget protocol, int socket)); extern int IMCreateUnixService _Pt_((char *path)); extern IMConnection *IMUnixConnection _Pt_((Widget protocol, int socket)); Index: head/japanese/kinput2/files/patch-lib_imlib_imxport.c =================================================================== --- head/japanese/kinput2/files/patch-lib_imlib_imxport.c (revision 415137) +++ head/japanese/kinput2/files/patch-lib_imlib_imxport.c (revision 415138) @@ -1,86 +1,85 @@ Index: lib/imlib/imxport.c =================================================================== RCS file: /home/cvs/private/hrs/kinput2/lib/imlib/imxport.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 -diff -u -p -r1.1.1.1 -r1.2 ---- lib/imlib/imxport.c 7 Dec 2009 06:36:04 -0000 1.1.1.1 -+++ lib/imlib/imxport.c 7 Dec 2009 06:44:58 -0000 1.2 +--- lib/imlib/imxport.c.orig 2002-10-03 09:35:31 UTC ++++ lib/imlib/imxport.c @@ -31,10 +31,12 @@ static char *rcsid = "$Id: imxport.c,v 1 #ifdef IM_UNIX_TRANSPORT #include +#include #endif #ifdef IM_TCP_TRANSPORT #include +#include #endif extern int errno; @@ -412,8 +414,9 @@ IMConnection *conn; #ifdef IM_TCP_TRANSPORT int -IMCreateTCPService(portp) +IMCreateTCPService(portp, listenaddr) int *portp; +char *listenaddr; { struct sockaddr_in addr; int optval = 1; @@ -431,7 +434,22 @@ int *portp; (char *)&optval, sizeof(optval)); #endif /* SO_REUSEADDR */ - bzero((char *)&addr, sizeof(addr)); + memset((void *)&addr, 0, sizeof(addr)); + if (listenaddr[0] == '\0') { + addr.sin_addr.s_addr = htonl(INADDR_ANY); + } else { + if (!inet_aton(listenaddr, &addr.sin_addr)) { + struct hostent *hp; + struct in_addr **pptr; + + if ((hp = gethostbyname((const char *)listenaddr)) == NULL) { + DPRINT(("Can't resolve %s\n", listenaddr)); + return -1; + } + pptr = (struct in_addr **)hp->h_addr_list; + memcpy((void *)&addr.sin_addr, pptr[0], sizeof(struct in_addr)); + } + } addr.sin_family = AF_INET; addr.sin_port = htons(*portp); @@ -495,6 +513,7 @@ char *path; { struct sockaddr_un addr; int sock; + mode_t oldumask; TRACE(("IMCreateUnixService(%s)\n", path)); if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) { @@ -510,15 +529,21 @@ char *path; * Remove socket which is created by the previous process. */ (void)unlink(path); + oldumask = umask(S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH); if (bind(sock, (struct sockaddr *)&addr, strlen(path) + 2) < 0) { DPRINT(("bind() failed with %d\n", errno)); + umask(oldumask); return -1; } + + umask(oldumask); + if (listen(sock, 4) < 0) { DPRINT(("listen() failed with %d\n", errno)); return -1; } + return sock; } Index: head/japanese/mh/files/patch-uip:vmh.c =================================================================== --- head/japanese/mh/files/patch-uip:vmh.c (revision 415137) +++ head/japanese/mh/files/patch-uip:vmh.c (nonexistent) @@ -1,16 +0,0 @@ ---- uip/vmh.c.orig 2001-04-21 20:16:49 +0900 -+++ uip/vmh.c 2007-10-19 12:51:52 +0900 -@@ -116,6 +116,13 @@ - - #define XYZ /* XXX */ - -+#if defined(__FreeBSD__) && __FreeBSD__ >= 5 -+struct ldat -+{ -+ unsigned long *text; -+}; -+#endif -+ - /* */ - - static struct swit switches[] = { Property changes on: head/japanese/mh/files/patch-uip:vmh.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-ao =================================================================== --- head/japanese/mh/files/patch-ao (revision 415137) +++ head/japanese/mh/files/patch-ao (nonexistent) @@ -1,16 +0,0 @@ ---- uip/replsbr.c.orig Thu Apr 5 01:05:17 2001 -+++ uip/replsbr.c Tue Jan 14 18:05:42 2003 -@@ -195,11 +195,12 @@ - } - } while (cptr = cptr->c_next); - -- while (state == FLDPLUS) -+ while (state == FLDPLUS) { - state = m_getfld (state, name, tmpbuf, SBUFSIZ, inb); - #ifdef JAPAN - (void) ml_conv(tmpbuf); - #endif /* JAPAN */ -+ } - break; - - case LENERR: Property changes on: head/japanese/mh/files/patch-ao ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-uip:slocal.c =================================================================== --- head/japanese/mh/files/patch-uip:slocal.c (revision 415137) +++ head/japanese/mh/files/patch-uip:slocal.c (nonexistent) @@ -1,54 +0,0 @@ ---- uip/slocal.c.orig 2000-12-04 21:09:38.000000000 +0900 -+++ uip/slocal.c 2010-04-12 17:10:12.000000000 +0900 -@@ -36,6 +36,10 @@ - #endif /* NOIOCTLH */ - #endif /* not V7 */ - #include -+#include -+#if __FreeBSD_version > 900007 -+#include -+#else /* __FreeBSD_version > 900007 */ - #include - #ifndef UTMP_FILENAME - #ifdef UTMP_FILE -@@ -48,6 +52,7 @@ - #endif - #endif - #endif /* UTMP_FILENAME */ -+#endif /* __FreeBSD_version > 900007 */ - #ifdef LOCALE - #include - #endif -@@ -938,6 +943,24 @@ - - /* */ - -+#if __FreeBSD_version > 900007 -+static int logged_in (void) { -+ if (utmped) { -+ return utmped; -+ } -+ else { -+ struct utmpx* ut = NULL; -+ -+ ut = getutxuser(user); -+ if (ut != NULL) { -+ return (utmped = DONE); -+ } -+ else { -+ return (utmped = NOTOK); -+ } -+ } -+} -+#else /* __FreeBSD_version > 900007 */ - static int logged_in () { - struct utmp ut; - register FILE *uf; -@@ -963,6 +986,7 @@ - (void) fclose (uf); - return (utmped = NOTOK); - } -+#endif /* __FreeBSD_version > 900007 */ - - - static int timely (t1, t2) Property changes on: head/japanese/mh/files/patch-uip:slocal.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-uip:rcvtty.c =================================================================== --- head/japanese/mh/files/patch-uip:rcvtty.c (revision 415137) +++ head/japanese/mh/files/patch-uip:rcvtty.c (nonexistent) @@ -1,62 +0,0 @@ ---- uip/rcvtty.c.orig 2001-04-05 01:05:17.000000000 +0900 -+++ uip/rcvtty.c 2014-10-13 17:46:24.000000000 +0900 -@@ -8,11 +8,16 @@ - #endif - #include "../h/mh.h" - #include "../h/rcvmail.h" -+#include "../h/formatsbr.h" - #include "../h/scansbr.h" - #include "../zotnet/tws.h" - #include - #include -+#include - #ifndef TTYD -+#if __FreeBSD_version > 900007 -+#include -+#else /* __FreeBSD_version > 900007 */ - #include - #ifndef UTMP_FILENAME - #ifdef UTMP_FILE -@@ -25,6 +30,7 @@ - #endif - #endif - #endif /* UTMP_FILENAME */ -+#endif /* __FreeBSD_version > 900007 */ - #endif /* not TTYD */ - #ifdef LOCALE - #include -@@ -110,8 +116,12 @@ - *vec[MAXARGS]; - #ifndef TTYD - char tty[BUFSIZ]; -+#if __FreeBSD_version > 900007 -+ struct utmpx *ut; -+#else /* __FreeBSD_version > 900007 */ - struct utmp ut; - register FILE *uf; -+#endif /* __FreeBSD_version > 900007 */ - #endif /* not TTYD */ - - #ifdef BSD43 -@@ -200,6 +210,13 @@ - - user = getusr (); - #ifndef TTYD -+#if __FreeBSD_version > 900007 -+ ut = getutxuser(user); -+ if (ut != NULL) { -+ (void) strncpy (tty, ut->ut_line, sizeof ut->ut_line); -+ alert (tty, md); -+ } -+#else /* __FreeBSD_version > 900007 */ - if ((uf = fopen (UTMP_FILENAME, "r")) == NULL) - exit (RCV_MBX); - while (fread ((char *) &ut, sizeof ut, 1, uf) == 1) -@@ -212,6 +229,7 @@ - alert (tty, md); - } - (void) fclose (uf); -+#endif /* __FreeBSD_version > 900007 */ - #else /* TTYD */ - alert (user, md); - #endif /* TTYD */ Property changes on: head/japanese/mh/files/patch-uip:rcvtty.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-h:mh.h =================================================================== --- head/japanese/mh/files/patch-h:mh.h (revision 415137) +++ head/japanese/mh/files/patch-h:mh.h (nonexistent) @@ -1,13 +0,0 @@ -Index: h/mh.h -diff -u h/mh.h.orig h/mh.h ---- h/mh.h.orig Wed Dec 2 02:05:00 1998 -+++ h/mh.h Fri Jul 18 16:47:28 2003 -@@ -253,7 +253,7 @@ - int atooi (); - char **brkstring (); - void closefds (); --char *concat (); -+char *concat (char *, ...); - char *copy (); - char **copyip (); - void cpydata (); Property changes on: head/japanese/mh/files/patch-h:mh.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-sbr:concat.c =================================================================== --- head/japanese/mh/files/patch-sbr:concat.c (revision 415137) +++ head/japanese/mh/files/patch-sbr:concat.c (nonexistent) @@ -1,55 +0,0 @@ ---- sbr/concat.c.orig 1993-12-01 13:01:21.000000000 +0900 -+++ sbr/concat.c 2008-04-27 00:14:56.000000000 +0900 -@@ -2,34 +2,40 @@ - - #include "../h/mh.h" - #include --#include -+#include - - - /* VARARGS */ - --char *concat (va_alist) --va_dcl -+char *concat (char *first, ...) - { - register char *cp, - *dp, - *sp; - register unsigned len; -- register va_list list; -+ va_list list; - - len = 1; -- va_start (list); -- while (cp = va_arg (list, char *)) -- len += strlen (cp); -- va_end (list); -+ if (first) { -+ len += strlen (first); -+ va_start (list, first); -+ while (cp = va_arg (list, char *)) -+ len += strlen (cp); -+ va_end (list); -+ } - - dp = sp = malloc (len); - if (dp == NULL) - adios (NULLCP, "unable to allocate string storage"); - -- va_start (list); -- while (cp = va_arg (list, char *)) -- sp = copy (cp, sp); -- va_end (list); -+ *sp = '\0'; -+ if (first) { -+ sp = copy (first, sp); -+ va_start (list, first); -+ while (cp = va_arg (list, char *)) -+ sp = copy (cp, sp); -+ va_end (list); -+ } - - return dp; - } Property changes on: head/japanese/mh/files/patch-sbr:concat.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-conf__makefiles__uip =================================================================== --- head/japanese/mh/files/patch-conf__makefiles__uip (revision 415137) +++ head/japanese/mh/files/patch-conf__makefiles__uip (revision 415138) @@ -1,13 +1,13 @@ ---- conf/makefiles/uip.orig 2001-05-30 23:57:47.000000000 +0900 -+++ conf/makefiles/uip 2014-10-13 17:55:46.000000000 +0900 -@@ -995,10 +995,6 @@ +--- conf/makefiles/uip.orig 2001-05-30 14:57:47 UTC ++++ conf/makefiles/uip +@@ -995,10 +995,6 @@ $(ETCDIR)/rcvtty: xrcvtty -chmod g-s zrcvtty $(CP) xrcvtty $@ -@chmod $(PGMPROT) $@ -@BEGIN: BSD43 - -@chgrp tty $@ - -@chmod g+s $@ -@END: BSD43 -@ls -l $@ -@echo "" Index: head/japanese/mh/files/patch-configure =================================================================== --- head/japanese/mh/files/patch-configure (revision 415137) +++ head/japanese/mh/files/patch-configure (revision 415138) @@ -1,52 +1,53 @@ ---- configure.orig 2001-06-15 01:41:51.000000000 +0900 -+++ configure 2014-10-08 22:52:42.000000000 +0900 -@@ -1397,14 +1397,8 @@ +--- configure.orig 2001-06-14 16:41:51 UTC ++++ configure +@@ -1397,14 +1397,8 @@ case "$host_os" in if test "$use_sharedlib" != no then sharedlib=fbsd - if test -x /usr/bin/objformat - then - if test x`/usr/bin/objformat` = xelf - then sharedlib=gnuelf - make_mhconfig='CFLAGS="-O -DMHSLIB_NOMINVER"' +- make_mhconfig='CFLAGS="-O -DMHSLIB_NOMINVER"' - fi - fi ++ make_mhconfig='CFLAGS="-O2 -pipe -Wno-return-type -fstack-protector -fno-strict-aliasing -DMHSLIB_NOMINVER"' echo __ELF__ | $CC -E - | grep -q __ELF__ || sharedlib=gnuelf slflags="-fpic" slibdir=$libdir -@@ -1748,34 +1742,6 @@ +@@ -1748,34 +1742,6 @@ test -n "$pager" || pager="/usr/ucb/more pagerpath="$ac_cv_path_pager" fi -echo $ac_n "checking for broken vi""... $ac_c" 1>&6 -echo "configure:1753: checking for broken vi" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_vi_bug'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_cv_prog_vi_bug=no - echo 'r /nonexist-file -r /nonexist-file -q' | ex > /dev/null 2>&1 - if test $? = 2 - then - echo 'r /nonexist-file -r /nonexist-file -r /nonexist-file -q' | ex > /dev/null 2>&1 - if test $? = 3 - then - ac_cv_prog_vi_bug=yes - fi - fi -fi - -echo "$ac_t""$ac_cv_prog_vi_bug" 1>&6 -if test "$ac_cv_prog_vi_bug" = yes -then - ATTVIBUG=ATTVIBUG -fi - echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 echo "configure:1781: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then Index: head/japanese/mh/files/patch-h_mh.h =================================================================== --- head/japanese/mh/files/patch-h_mh.h (nonexistent) +++ head/japanese/mh/files/patch-h_mh.h (revision 415138) @@ -0,0 +1,12 @@ +Index: h/mh.h +--- h/mh.h.orig 1998-12-01 17:05:00 UTC ++++ h/mh.h +@@ -253,7 +253,7 @@ void ambigsw (); + int atooi (); + char **brkstring (); + void closefds (); +-char *concat (); ++char *concat (char *, ...); + char *copy (); + char **copyip (); + void cpydata (); Property changes on: head/japanese/mh/files/patch-h_mh.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-sbr_concat.c =================================================================== --- head/japanese/mh/files/patch-sbr_concat.c (nonexistent) +++ head/japanese/mh/files/patch-sbr_concat.c (revision 415138) @@ -0,0 +1,55 @@ +--- sbr/concat.c.orig 1993-12-01 04:01:21 UTC ++++ sbr/concat.c +@@ -2,34 +2,40 @@ + + #include "../h/mh.h" + #include +-#include ++#include + + + /* VARARGS */ + +-char *concat (va_alist) +-va_dcl ++char *concat (char *first, ...) + { + register char *cp, + *dp, + *sp; + register unsigned len; +- register va_list list; ++ va_list list; + + len = 1; +- va_start (list); +- while (cp = va_arg (list, char *)) +- len += strlen (cp); +- va_end (list); ++ if (first) { ++ len += strlen (first); ++ va_start (list, first); ++ while (cp = va_arg (list, char *)) ++ len += strlen (cp); ++ va_end (list); ++ } + + dp = sp = malloc (len); + if (dp == NULL) + adios (NULLCP, "unable to allocate string storage"); + +- va_start (list); +- while (cp = va_arg (list, char *)) +- sp = copy (cp, sp); +- va_end (list); ++ *sp = '\0'; ++ if (first) { ++ sp = copy (first, sp); ++ va_start (list, first); ++ while (cp = va_arg (list, char *)) ++ sp = copy (cp, sp); ++ va_end (list); ++ } + + return dp; + } Property changes on: head/japanese/mh/files/patch-sbr_concat.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-support_pop_popser.c =================================================================== --- head/japanese/mh/files/patch-support_pop_popser.c (nonexistent) +++ head/japanese/mh/files/patch-support_pop_popser.c (revision 415138) @@ -0,0 +1,29 @@ +--- support/pop/popser.c.orig 1999-02-09 11:30:00 UTC ++++ support/pop/popser.c +@@ -259,7 +259,7 @@ static p_cmatch(), p_isdate(), p_ishead + extern int mbx_read (); + + static int setup(), setupaux(), read_map(), read_file(), pmbx_size(); +-static int quitaux(), quitfile(), respond(), getline(); ++static int quitaux(), quitfile(), respond(), get_line(); + static m_gMsgs(), multiline(), multiend(), putline(); + /* */ + +@@ -410,7 +410,7 @@ char *rhost; + (void) respond (OK, "%s ready %s", server, timestamp); + + for (mystate = auth1; mystate != halt && mystate != error;) +- switch (getline (buffer, sizeof buffer, input)) { ++ switch (get_line (buffer, sizeof buffer, input)) { + case OK: + if ((v = getvector (buffer, vec)) == NULL) + continue; +@@ -1850,7 +1850,7 @@ static multiend () { + + /* */ + +-static int getline (s, n, iop) ++static int get_line (s, n, iop) + register char *s; + register int n; + register FILE *iop; Property changes on: head/japanese/mh/files/patch-support_pop_popser.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-uip_msh.c =================================================================== --- head/japanese/mh/files/patch-uip_msh.c (revision 415137) +++ head/japanese/mh/files/patch-uip_msh.c (revision 415138) @@ -1,17 +1,17 @@ ---- uip/msh.c +--- uip/msh.c.orig 2001-06-14 16:41:30 UTC +++ uip/msh.c -@@ -17,14 +17,7 @@ +@@ -17,14 +17,7 @@ static char ident[] = "@(#)$Id: msh.c,v #include #include #include -#ifndef SYS5 -#include -#else /* SYS5 */ -#include -#ifndef NOIOCTLH #include -#endif /* NOIOCTLH */ -#endif /* SYS5 */ #include #include #include Index: head/japanese/mh/files/patch-uip_popsbr.c =================================================================== --- head/japanese/mh/files/patch-uip_popsbr.c (nonexistent) +++ head/japanese/mh/files/patch-uip_popsbr.c (revision 415138) @@ -0,0 +1,47 @@ +--- uip/popsbr.c.orig 2001-04-02 10:50:01 UTC ++++ uip/popsbr.c +@@ -63,7 +63,7 @@ int command(), multiline(); + static int command(), multiline(); + #endif + +-static int getline(); ++static int get_line(); + static putline(); + + #ifdef NNTP +@@ -176,7 +176,7 @@ int snoop; + + (void) signal (SIGPIPE, SIG_IGN); + +- switch (getline (response, sizeof response, input)) { ++ switch (get_line (response, sizeof response, input)) { + case OK: + if (poprint) + fprintf (stderr, "<--- %s\n", response); +@@ -619,7 +619,7 @@ char *fmt, + if (putline (buffer, output) == NOTOK) + return NOTOK; + +- switch (getline (response, sizeof response, input)) { ++ switch (get_line (response, sizeof response, input)) { + case OK: + if (poprint) + fprintf (stderr, "<--- %s\n", response); +@@ -645,7 +645,7 @@ static int multiline () { + #endif + char buffer[BUFSIZ + TRMLEN]; + +- if (getline (buffer, sizeof buffer, input) != OK) ++ if (get_line (buffer, sizeof buffer, input) != OK) + return NOTOK; + #ifdef DEBUG + if (poprint) +@@ -665,7 +665,7 @@ static int multiline () { + + /* */ + +-static int getline (s, n, iop) ++static int get_line (s, n, iop) + char *s; + int n; + FILE * iop; Property changes on: head/japanese/mh/files/patch-uip_popsbr.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-uip_prompter.c =================================================================== --- head/japanese/mh/files/patch-uip_prompter.c (revision 415137) +++ head/japanese/mh/files/patch-uip_prompter.c (revision 415138) @@ -1,100 +1,99 @@ ---- uip/prompter.c +--- uip/prompter.c.orig 1998-04-23 21:02:00 UTC +++ uip/prompter.c -@@ -6,15 +6,7 @@ +@@ -6,15 +6,7 @@ static char ident[] = "@(#)$Id: prompter #include "../h/mh.h" #include #include -#ifndef SYS5 -#include -#else /* SYS5 */ -#include -#include -#ifndef NOIOCTLH -#include -#endif /* NOIOCTLH */ -#endif /* SYS5 */ +#include #if defined(BSD42) || defined(SVR4) #include #endif /* BSD42 || SVR4 */ -@@ -71,19 +63,10 @@ +@@ -71,19 +63,10 @@ static struct swit switches[] = { extern int errno; -#ifndef SYS5 -#define ERASE sg.sg_erase -#define KILL sg.sg_kill -static struct sgttyb sg; - -#define INTR tc.t_intrc -static struct tchars tc; -#else /* SYS5 */ #define ERASE sg.c_cc[VERASE] #define KILL sg.c_cc[VKILL] #define INTR sg.c_cc[VINTR] -static struct termio sg; -#endif /* SYS5 */ +static struct termios sg; static TYPESIG intrser (); -@@ -209,29 +192,14 @@ +@@ -209,29 +192,14 @@ char *argv[]; (void) chmod (tmpfil, 0600); if (killp || erasep) { -#ifndef SYS5 - int serase, - skill; -#else /* SYS5 */ - char serase, - skill; -#endif /* SYS5 */ -- ++ cc_t serase, skill; + -#ifndef SYS5 - (void) ioctl (0, TIOCGETP, (char *) &sg); - (void) ioctl (0, TIOCGETC, (char *) &tc); -#else /* SYS5 */ - (void) ioctl(0, TCGETA, &sg); -#endif /* SYS5 */ -+ cc_t serase, skill; -+ + (void) tcgetattr(0, &sg); skill = KILL; serase = ERASE; KILL = killp ? chrcnv (killp) : skill; ERASE = erasep ? chrcnv (erasep) : serase; -#ifndef SYS5 - (void) ioctl (0, TIOCSETN, (char *) &sg); -#else /* SYS5 */ - (void) ioctl(0, TCSETAW, &sg); -#endif /* SYS5 */ + (void) tcsetattr(0, TCSADRAIN, &sg); chrdsp ("erase", ERASE); chrdsp (", kill", KILL); -@@ -273,11 +241,7 @@ +@@ -273,11 +241,7 @@ char *argv[]; if (i == -1) { abort: ; if (killp || erasep) -#ifndef SYS5 - (void) ioctl (0, TIOCSETN, (char *) &sg); -#else /* SYS5 */ - (void) ioctl (0, TCSETA, &sg); -#endif /* SYS5 */ + (void) tcsetattr (0, TCSANOW, &sg); (void) unlink (tmpfil); done (1); } -@@ -365,11 +329,7 @@ +@@ -365,11 +329,7 @@ no_body: ; /* */ if (killp || erasep) -#ifndef SYS5 - (void) ioctl (0, TIOCSETN, (char *) &sg); -#else /* SYS5 */ - (void) ioctl (0, TCSETAW, &sg); -#endif /* SYS5 */ + (void) tcsetattr (0, TCSANOW, &sg); if ((fdi = open (tmpfil, 0)) == NOTOK) adios (tmpfil, "unable to re-open"); Index: head/japanese/mh/files/patch-uip_pshsbr.c =================================================================== --- head/japanese/mh/files/patch-uip_pshsbr.c (nonexistent) +++ head/japanese/mh/files/patch-uip_pshsbr.c (revision 415138) @@ -0,0 +1,47 @@ +--- uip/pshsbr.c.orig 2001-04-02 10:50:24 UTC ++++ uip/pshsbr.c +@@ -63,7 +63,7 @@ int command(), multiline(); + static int command(), multiline(); + #endif + +-static int getline(); ++static int get_line(); + static putline(); + + #ifdef NNTP +@@ -176,7 +176,7 @@ int snoop; + + (void) signal (SIGPIPE, SIG_IGN); + +- switch (getline (response, sizeof response, input)) { ++ switch (get_line (response, sizeof response, input)) { + case OK: + if (poprint) + fprintf (stderr, "<--- %s\n", response); +@@ -619,7 +619,7 @@ char *fmt, + if (putline (buffer, output) == NOTOK) + return NOTOK; + +- switch (getline (response, sizeof response, input)) { ++ switch (get_line (response, sizeof response, input)) { + case OK: + if (poprint) + fprintf (stderr, "<--- %s\n", response); +@@ -645,7 +645,7 @@ static int multiline () { + #endif + char buffer[BUFSIZ + TRMLEN]; + +- if (getline (buffer, sizeof buffer, input) != OK) ++ if (get_line (buffer, sizeof buffer, input) != OK) + return NOTOK; + #ifdef DEBUG + if (poprint) +@@ -665,7 +665,7 @@ static int multiline () { + + /* */ + +-static int getline (s, n, iop) ++static int get_line (s, n, iop) + char *s; + int n; + FILE * iop; Property changes on: head/japanese/mh/files/patch-uip_pshsbr.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-uip_rcvtty.c =================================================================== --- head/japanese/mh/files/patch-uip_rcvtty.c (nonexistent) +++ head/japanese/mh/files/patch-uip_rcvtty.c (revision 415138) @@ -0,0 +1,62 @@ +--- uip/rcvtty.c.orig 2001-04-04 16:05:17 UTC ++++ uip/rcvtty.c +@@ -8,11 +8,16 @@ static char ident[] = "@(#)$Id: rcvtty.c + #endif + #include "../h/mh.h" + #include "../h/rcvmail.h" ++#include "../h/formatsbr.h" + #include "../h/scansbr.h" + #include "../zotnet/tws.h" + #include + #include ++#include + #ifndef TTYD ++#if __FreeBSD_version > 900007 ++#include ++#else /* __FreeBSD_version > 900007 */ + #include + #ifndef UTMP_FILENAME + #ifdef UTMP_FILE +@@ -25,6 +30,7 @@ static char ident[] = "@(#)$Id: rcvtty.c + #endif + #endif + #endif /* UTMP_FILENAME */ ++#endif /* __FreeBSD_version > 900007 */ + #endif /* not TTYD */ + #ifdef LOCALE + #include +@@ -110,8 +116,12 @@ char **argv; + *vec[MAXARGS]; + #ifndef TTYD + char tty[BUFSIZ]; ++#if __FreeBSD_version > 900007 ++ struct utmpx *ut; ++#else /* __FreeBSD_version > 900007 */ + struct utmp ut; + register FILE *uf; ++#endif /* __FreeBSD_version > 900007 */ + #endif /* not TTYD */ + + #ifdef BSD43 +@@ -200,6 +210,13 @@ char **argv; + + user = getusr (); + #ifndef TTYD ++#if __FreeBSD_version > 900007 ++ ut = getutxuser(user); ++ if (ut != NULL) { ++ (void) strncpy (tty, ut->ut_line, sizeof ut->ut_line); ++ alert (tty, md); ++ } ++#else /* __FreeBSD_version > 900007 */ + if ((uf = fopen (UTMP_FILENAME, "r")) == NULL) + exit (RCV_MBX); + while (fread ((char *) &ut, sizeof ut, 1, uf) == 1) +@@ -212,6 +229,7 @@ char **argv; + alert (tty, md); + } + (void) fclose (uf); ++#endif /* __FreeBSD_version > 900007 */ + #else /* TTYD */ + alert (user, md); + #endif /* TTYD */ Property changes on: head/japanese/mh/files/patch-uip_rcvtty.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-uip_replsbr.c =================================================================== --- head/japanese/mh/files/patch-uip_replsbr.c (nonexistent) +++ head/japanese/mh/files/patch-uip_replsbr.c (revision 415138) @@ -0,0 +1,16 @@ +--- uip/replsbr.c.orig 2001-04-04 16:05:17 UTC ++++ uip/replsbr.c +@@ -195,11 +195,12 @@ replout (inb, msg, drft, mp) + } + } while (cptr = cptr->c_next); + +- while (state == FLDPLUS) ++ while (state == FLDPLUS) { + state = m_getfld (state, name, tmpbuf, SBUFSIZ, inb); + #ifdef JAPAN + (void) ml_conv(tmpbuf); + #endif /* JAPAN */ ++ } + break; + + case LENERR: Property changes on: head/japanese/mh/files/patch-uip_replsbr.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-uip_slocal.c =================================================================== --- head/japanese/mh/files/patch-uip_slocal.c (nonexistent) +++ head/japanese/mh/files/patch-uip_slocal.c (revision 415138) @@ -0,0 +1,54 @@ +--- uip/slocal.c.orig 2000-12-04 12:09:38 UTC ++++ uip/slocal.c +@@ -36,6 +36,10 @@ static char ident[] = "@(#)$Id: slocal.c + #endif /* NOIOCTLH */ + #endif /* not V7 */ + #include ++#include ++#if __FreeBSD_version > 900007 ++#include ++#else /* __FreeBSD_version > 900007 */ + #include + #ifndef UTMP_FILENAME + #ifdef UTMP_FILE +@@ -48,6 +52,7 @@ static char ident[] = "@(#)$Id: slocal.c + #endif + #endif + #endif /* UTMP_FILENAME */ ++#endif /* __FreeBSD_version > 900007 */ + #ifdef LOCALE + #include + #endif +@@ -938,6 +943,24 @@ register char *key; + + /* */ + ++#if __FreeBSD_version > 900007 ++static int logged_in (void) { ++ if (utmped) { ++ return utmped; ++ } ++ else { ++ struct utmpx* ut = NULL; ++ ++ ut = getutxuser(user); ++ if (ut != NULL) { ++ return (utmped = DONE); ++ } ++ else { ++ return (utmped = NOTOK); ++ } ++ } ++} ++#else /* __FreeBSD_version > 900007 */ + static int logged_in () { + struct utmp ut; + register FILE *uf; +@@ -963,6 +986,7 @@ static int logged_in () { + (void) fclose (uf); + return (utmped = NOTOK); + } ++#endif /* __FreeBSD_version > 900007 */ + + + static int timely (t1, t2) Property changes on: head/japanese/mh/files/patch-uip_slocal.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/mh/files/patch-uip_trmsbr.c =================================================================== --- head/japanese/mh/files/patch-uip_trmsbr.c (revision 415137) +++ head/japanese/mh/files/patch-uip_trmsbr.c (revision 415138) @@ -1,51 +1,51 @@ ---- uip/trmsbr.c +--- uip/trmsbr.c.orig 1993-12-01 04:01:39 UTC +++ uip/trmsbr.c -@@ -5,19 +5,8 @@ +@@ -5,19 +5,8 @@ static char ident[] = "@(#)$Id: trmsbr.c #include "../h/mh.h" #include -#ifndef SYS5 -#include -#if defined(ULTRIX) && !defined(BSD43) -#undef TIOCGWINSZ -#endif -#else /* SYS5 */ -#include -#include -#ifndef NOIOCTLH #include -#endif /* NOIOCTLH */ -#undef TIOCGWINSZ -#endif /* SYS5 */ +#include #if BUFSIZ<2048 -@@ -58,11 +47,7 @@ +@@ -58,11 +47,7 @@ static read_termcap () { *term; char *cp, myterm[TXTSIZ]; -#ifndef SYS5 - struct sgttyb sg; -#else /* SYS5 */ - struct termio sg; -#endif /* SYS5 */ + struct termios sg; static int inited = 0; if (inited++) -@@ -71,13 +56,7 @@ +@@ -71,13 +56,7 @@ static read_termcap () { if ((term = getenv ("TERM")) == NULL || tgetent (myterm, term) <= OK) return; -#ifndef SYS5 - ospeed = ioctl (fileno (stdout), TIOCGETP, (char *) &sg) != NOTOK - ? sg.sg_ospeed : 0; -#else /* SYS5 */ - ospeed = ioctl (fileno (stdout), TCGETA, &sg) != NOTOK - ? sg.c_cflag & CBAUD : 0; -#endif /* SYS5 */ + ospeed = tcgetattr (fileno (stdout), &sg) != NOTOK ? cfgetospeed(&sg) : 0; HC = tgetflag ("hc"); Index: head/japanese/mh/files/patch-uip_vmh.c =================================================================== --- head/japanese/mh/files/patch-uip_vmh.c (nonexistent) +++ head/japanese/mh/files/patch-uip_vmh.c (revision 415138) @@ -0,0 +1,16 @@ +--- uip/vmh.c.orig 2001-04-21 11:16:49 UTC ++++ uip/vmh.c +@@ -116,6 +116,13 @@ void __cputchar __P((int)); + + #define XYZ /* XXX */ + ++#if defined(__FreeBSD__) && __FreeBSD__ >= 5 ++struct ldat ++{ ++ unsigned long *text; ++}; ++#endif ++ + /* */ + + static struct swit switches[] = { Property changes on: head/japanese/mh/files/patch-uip_vmh.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/japanese/prn/files/patch-Makefile =================================================================== --- head/japanese/prn/files/patch-Makefile (revision 415137) +++ head/japanese/prn/files/patch-Makefile (revision 415138) @@ -1,82 +1,51 @@ -*** Makefile.orig Wed May 11 17:00:58 1994 ---- Makefile Tue Jul 1 17:44:49 1997 -*************** -*** 25,35 **** - # @(#)Makefile 2.3 (Y.Tonooka) 5/11/94 - #- - -! BINPATH = /usr/local/bin -! LIBPATH = /usr/local/lib -! MANPATH = /usr/local/man -! JMANDIR = japanese -! CFLAGS = -O - # CFLAGS = -g -DDEBUG - ARFLAGS = rcv - ---- 25,39 ---- - # @(#)Makefile 2.3 (Y.Tonooka) 5/11/94 - #- - -! PREFIX?=/usr/local -! BINPATH = ${PREFIX}/bin -! LIBPATH = ${PREFIX}/share/prn -! MANPATH = ${PREFIX}/man -! JMANDIR = ja -! CFLAGS += \ -! -DKCCPATH=\"${PREFIX}/bin/kcc\" \ -! -DCMTPATH=\"${PREFIX}/bin/cmt\" \ -! -DPSPATH=\"${PREFIX}/bin/psconv\" - # CFLAGS = -g -DDEBUG - ARFLAGS = rcv - -*************** -*** 39,47 **** - AR = ar - RANLIB = ranlib - LINT = lint -! INSTALL = install - CP = cp -! LN = ln - RM = rm -f - TAGS = ctags - ETAGS = etags ---- 43,51 ---- - AR = ar - RANLIB = ranlib - LINT = lint -! INSTALL = install -c - CP = cp -! LN = ln -fs - RM = rm -f - TAGS = ctags - ETAGS = etags -*************** -*** 91,103 **** - - $(BINPATH)/cprn: $(BINPATH)/prn - if [ $@ ]; then $(RM) $@; fi -! $(LN) $(BINPATH)/prn $@ - - $(BINPATH)/cmt: cmt.c defs.c euc.c reg.y - $(MAKE) cmt - $(INSTALL) -s cmt $(BINPATH) - - $(LIBPATH)/cmtdefs: cmtdefs - $(CP) cmtdefs $@; chmod 644 $@ - - $(BINPATH)/psconv: psconv.c ---- 95,108 ---- - - $(BINPATH)/cprn: $(BINPATH)/prn - if [ $@ ]; then $(RM) $@; fi -! $(LN) prn $@ - - $(BINPATH)/cmt: cmt.c defs.c euc.c reg.y - $(MAKE) cmt - $(INSTALL) -s cmt $(BINPATH) - - $(LIBPATH)/cmtdefs: cmtdefs -+ mkdir -p $(LIBPATH) - $(CP) cmtdefs $@; chmod 644 $@ - - $(BINPATH)/psconv: psconv.c +--- Makefile.orig 1994-05-11 08:00:58 UTC ++++ Makefile +@@ -25,11 +25,15 @@ + # @(#)Makefile 2.3 (Y.Tonooka) 5/11/94 + #- + +- BINPATH = /usr/local/bin +- LIBPATH = /usr/local/lib +- MANPATH = /usr/local/man +- JMANDIR = japanese +- CFLAGS = -O ++ PREFIX?=/usr/local ++ BINPATH = ${PREFIX}/bin ++ LIBPATH = ${PREFIX}/share/prn ++ MANPATH = ${PREFIX}/man ++ JMANDIR = ja ++ CFLAGS += \ ++ -DKCCPATH=\"${PREFIX}/bin/kcc\" \ ++ -DCMTPATH=\"${PREFIX}/bin/cmt\" \ ++ -DPSPATH=\"${PREFIX}/bin/psconv\" + # CFLAGS = -g -DDEBUG + ARFLAGS = rcv + +@@ -39,9 +43,9 @@ + AR = ar + RANLIB = ranlib + LINT = lint +- INSTALL = install ++ INSTALL = install -c + CP = cp +- LN = ln ++ LN = ln -fs + RM = rm -f + TAGS = ctags + ETAGS = etags +@@ -91,13 +95,14 @@ $(BINPATH)/prn: prn.c euc.c + + $(BINPATH)/cprn: $(BINPATH)/prn + if [ $@ ]; then $(RM) $@; fi +- $(LN) $(BINPATH)/prn $@ ++ $(LN) prn $@ + + $(BINPATH)/cmt: cmt.c defs.c euc.c reg.y + $(MAKE) cmt + $(INSTALL) -s cmt $(BINPATH) + + $(LIBPATH)/cmtdefs: cmtdefs ++ mkdir -p $(LIBPATH) + $(CP) cmtdefs $@; chmod 644 $@ + + $(BINPATH)/psconv: psconv.c Index: head/japanese/prn/files/patch-cmt.c =================================================================== --- head/japanese/prn/files/patch-cmt.c (revision 415137) +++ head/japanese/prn/files/patch-cmt.c (revision 415138) @@ -1,33 +1,33 @@ ---- cmt.c.orig Mon Apr 25 16:26:57 1994 -+++ cmt.c Fri Feb 6 00:18:46 2004 -@@ -27,7 +27,9 @@ +--- cmt.c.orig 1994-04-25 07:26:57 UTC ++++ cmt.c +@@ -27,7 +27,9 @@ static char *sccsid = "@(#)cmt.c 2.2 (Y. #endif #include +#include #include +#include #include #include #include "cmt.h" -@@ -352,16 +354,15 @@ +@@ -352,16 +354,15 @@ static char_t *readkeyword(filename) error(format, arg1, arg2, ...) char *format; ---------------------------------------------------------------------*/ -#include +#include -void error(va_alist) - va_dcl +void error(char *a, ...) { va_list args; - va_start(args); + va_start(args, a); fprintf(stderr, "%s: ", progname); - vfprintf(stderr, va_arg(args, char *), args); + vfprintf(stderr, a, args); putc('\n', stderr); va_end(args); exit(1); Index: head/japanese/prn/files/patch-cmt.h =================================================================== --- head/japanese/prn/files/patch-cmt.h (revision 415137) +++ head/japanese/prn/files/patch-cmt.h (revision 415138) @@ -1,8 +1,8 @@ ---- cmt.h.orig Fri Feb 6 00:13:05 2004 -+++ cmt.h Fri Feb 6 00:13:18 2004 -@@ -32,4 +32,4 @@ +--- cmt.h.orig 1993-11-29 10:00:33 UTC ++++ cmt.h +@@ -32,4 +32,4 @@ typedef int bool; /* * Error handling function. */ -extern void error(); +extern void error(char *, ...); Index: head/japanese/prn/files/patch-cmt.jman =================================================================== --- head/japanese/prn/files/patch-cmt.jman (revision 415137) +++ head/japanese/prn/files/patch-cmt.jman (revision 415138) @@ -1,19 +1,11 @@ -*** cmt.jman.orig Mon Jun 9 14:19:17 1997 ---- cmt.jman Mon Jun 9 14:19:40 1997 -*************** -*** 91,97 **** - るときの名称を示します。 - .LP - .RS -! .ta +19n; +12n; +20n; - ファイル名 言語 指定名称 - .ie n .br - .el .sp .4 ---- 91,97 ---- - るときの名称を示します。 - .LP - .RS -! .ta +19n +12n +20n - ファイル名 言語 指定名称 - .ie n .br - .el .sp .4 +--- cmt.jman.orig 1994-03-28 11:06:39 UTC ++++ cmt.jman +@@ -91,7 +91,7 @@ cmt \- コメントと予約語の処理 + るときの名称を示します。 + .LP + .RS +-.ta +19n; +12n; +20n; ++.ta +19n +12n +20n + ファイル名 言語 指定名称 + .ie n .br + .el .sp .4 Index: head/japanese/prn/files/patch-defs.c =================================================================== --- head/japanese/prn/files/patch-defs.c (revision 415137) +++ head/japanese/prn/files/patch-defs.c (revision 415138) @@ -1,10 +1,10 @@ ---- defs.c.orig +--- defs.c.orig 1994-04-25 07:26:57 UTC +++ defs.c -@@ -26,6 +26,7 @@ +@@ -26,6 +26,7 @@ static char sccsid[] = "@(#)defs.c 2.2 ( #endif #include +#include #include #include "euc.h" #include "cmt.h" Index: head/japanese/prn/files/patch-euc.c =================================================================== --- head/japanese/prn/files/patch-euc.c (revision 415137) +++ head/japanese/prn/files/patch-euc.c (revision 415138) @@ -1,12 +1,12 @@ ---- euc.c.orig +--- euc.c.orig 1994-03-28 10:21:54 UTC +++ euc.c -@@ -26,6 +26,9 @@ +@@ -26,6 +26,9 @@ static char *sccsid = "@(#)euc.c 2.2 (Y. #endif #include +#include +#include +#include #include "euc.h" #if defined EUC Index: head/japanese/prn/files/patch-prn.c =================================================================== --- head/japanese/prn/files/patch-prn.c (revision 415137) +++ head/japanese/prn/files/patch-prn.c (revision 415138) @@ -1,71 +1,71 @@ ---- prn.c.orig Thu May 26 11:37:45 1994 -+++ prn.c Fri Feb 6 00:18:11 2004 -@@ -26,16 +26,24 @@ +--- prn.c.orig 1994-05-26 02:37:45 UTC ++++ prn.c +@@ -26,16 +26,24 @@ static char sccsid[] = "@(#)prn.c 2.3 (Y #endif #include +#include #include #include #include #include +#include #include #include +#include #include "euc.h" +#if !defined KCCPATH #define KCCPATH "/usr/local/bin/kcc" -#if defined (__bsdi__) +#endif +#if (defined(__unix__) || defined(unix)) && !defined(USG) +#include +#endif +#if defined (__bsdi__) || (defined(BSD) && (BSD >= 199103)) #define LPRPATH "/usr/bin/lpr" #else #define LPRPATH "/usr/ucb/lpr" -@@ -48,8 +56,12 @@ +@@ -48,8 +56,12 @@ static char sccsid[] = "@(#)prn.c 2.3 (Y #else +#if !defined CMTPATH #define CMTPATH "/usr/local/bin/cmt" +#endif +#if !defined PSPATH #define PSPATH "/usr/local/bin/psconv" +#endif #endif -@@ -96,7 +108,7 @@ +@@ -96,7 +108,7 @@ static char *rangestr = NULL; static char *filename; /* name of the file being processed */ static char *modtime; /* the last modification time */ -static void error(); +static void error(char *, ...); static char *basename(); static bool formatopt(); static bool rangeopt(); -@@ -498,16 +510,15 @@ +@@ -498,16 +510,15 @@ int main(c, v) error(format, arg1, arg2, ...) char *format; ---------------------------------------------------------------------*/ -#include +#include -static void error(va_alist) - va_dcl +static void error(char *a, ...) { va_list args; - va_start(args); + va_start(args, a); fprintf(stderr, "%s: ", progname); - vfprintf(stderr, va_arg(args, char *), args); + vfprintf(stderr, a, args); putc('\n', stderr); va_end(args); exit(1); Index: head/japanese/prn/files/patch-prn.jman =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: head/japanese/prn/files/patch-prn.jman ___________________________________________________________________ Modified: svn:mime-type ## -1 +1 ## -text/plain \ No newline at end of property +application/octet-stream \ No newline at end of property Index: head/japanese/prn/files/patch-psconv.c =================================================================== --- head/japanese/prn/files/patch-psconv.c (revision 415137) +++ head/japanese/prn/files/patch-psconv.c (revision 415138) @@ -1,14 +1,40 @@ ---- psconv.c.orig +--- psconv.c.orig 1994-05-11 08:00:59 UTC +++ psconv.c -@@ -64,9 +64,11 @@ +@@ -64,9 +64,11 @@ static char *sccsid = "@(#)psconv.c 1.7 */ #include +#include #include #include #include +#include #include #include +@@ -591,7 +593,7 @@ void convert(fp) + dostart = 1; + done = 0; + +- while ((end = getline(fp)) > 0) { ++ while ((end = get_line(fp)) > 0) { + for (i = 0; i < end; i++) { + intmask = 1; + /* +@@ -647,14 +649,14 @@ void convert(fp) + + /*-==(spec:\\:":":\(:\):\[:\]::::psconv)==----------------------------- + NAME +- getline ++ get_line + DESCRIPTION + Reads characters onto cbuf[] upto NEWLINE, FORMFEED, escape + sequence or EOF. + An attribute of each character is set onto abuf[]. + No checking on buffer overflow. + ---------------------------------------------------------------------*/ +-int getline(fp) ++int get_line(fp) + FILE *fp; + { + register int c; Index: head/japanese/prn/files/patch-psconv.jman =================================================================== --- head/japanese/prn/files/patch-psconv.jman (revision 415137) +++ head/japanese/prn/files/patch-psconv.jman (revision 415138) @@ -1,53 +1,29 @@ -*** psconv.jman.orig Mon Jun 9 14:16:33 1997 ---- psconv.jman Mon Jun 9 14:18:21 1997 -*************** -*** 104,110 **** - です。 - .PD - .RS -! .ta +16; - .ie n .TP 15 - .el .TP 10 - .B \-V ---- 104,110 ---- - です。 - .PD - .RS -! .ta +16 - .ie n .TP 15 - .el .TP 10 - .B \-V -*************** -*** 136,142 **** - .IP - 書式は任意に指定することもできます。 - .RS -! .ta +16; - .ie n .TP 15 - .el .TP 10 - .B \-V\fIwid\fB\-\fIlen ---- 136,142 ---- - .IP - 書式は任意に指定することもできます。 - .RS -! .ta +16 - .ie n .TP 15 - .el .TP 10 - .B \-V\fIwid\fB\-\fIlen -*************** -*** 181,187 **** - 指示できる要素には以下の 4 種類があります。 - .LP - .RS 10 -! .ta +5n; - \fBR\fR 標準 - .br - \fBB\fR 太字(bold) ---- 181,187 ---- - 指示できる要素には以下の 4 種類があります。 - .LP - .RS 10 -! .ta +5n - \fBR\fR 標準 - .br - \fBB\fR 太字(bold) +--- psconv.jman.orig 1994-03-22 07:04:56 UTC ++++ psconv.jman +@@ -104,7 +104,7 @@ _\^_\^_\^_\fB^M\fR\fIcccc\fR\fB^M\fR\fIc + です。 + .PD + .RS +-.ta +16; ++.ta +16 + .ie n .TP 15 + .el .TP 10 + .B \-V +@@ -136,7 +136,7 @@ _\^_\^_\^_\fB^M\fR\fIcccc\fR\fB^M\fR\fIc + .IP + 書式は任意に指定することもできます。 + .RS +-.ta +16; ++.ta +16 + .ie n .TP 15 + .el .TP 10 + .B \-V\fIwid\fB\-\fIlen +@@ -181,7 +181,7 @@ 半角かなに対してカタカナの代わりにひらが + 指示できる要素には以下の 4 種類があります。 + .LP + .RS 10 +-.ta +5n; ++.ta +5n + \fBR\fR 標準 + .br + \fBB\fR 太字(bold) Index: head/japanese/prn/files/patch-reg.y =================================================================== --- head/japanese/prn/files/patch-reg.y (revision 415137) +++ head/japanese/prn/files/patch-reg.y (revision 415138) @@ -1,19 +1,19 @@ ---- reg.y.org Mon Nov 29 18:43:56 1993 -+++ reg.y Thu Jan 20 12:29:44 2005 -@@ -20,6 +20,7 @@ +--- reg.y.orig 1993-11-29 09:43:56 UTC ++++ reg.y +@@ -20,6 +20,7 @@ static char *sccsid = "@(#)reg.y 2.1 (Y. #endif #include +#include #include #include "cmt.h" #include "euc.h" -@@ -286,7 +287,7 @@ +@@ -286,7 +287,7 @@ yyerror(s) * Node Creation Functions * * * **********************************************************************/ -extern void error(); +extern void error(char *, ...); /*--------------------------------------------------------------------- NAME