diff options
Diffstat (limited to 'vietnamese/vnterm')
23 files changed, 1411 insertions, 191 deletions
diff --git a/vietnamese/vnterm/Makefile b/vietnamese/vnterm/Makefile index 4eed66a06984..501536603114 100644 --- a/vietnamese/vnterm/Makefile +++ b/vietnamese/vnterm/Makefile @@ -7,12 +7,10 @@ # PORTNAME= vnterm -PORTVERSION= 3.3 +PORTVERSION= 3.4 #11.6.5.1 CATEGORIES= vietnamese x11 -MASTER_SITES= ftp://ftp.media.mit.edu/pub/Vietnet/Viscii/Unix/ \ - ftp://ftp.monash.edu.au/pub/vietnam/unix/ -DISTNAME= ${PORTNAME}${PORTVERSION} -EXTRACT_SUFX= .tar.Z +MASTER_SITES= ftp://ftp.x.org/pub/R6.5.1/tars/ +DISTNAME= xorg-1 MAINTAINER= obrien@FreeBSD.org @@ -20,27 +18,27 @@ USE_IMAKE= yes .include <bsd.port.pre.mk> +BUILD_DEPENDS= ${LOCALBASE}/lib/libviqr.a:${PORTSDIR}/vietnamese/libviet +RUN_DEPENDS= ${PREFIX}/lib/X11/fonts/vietnamese/fonts.dir:${PORTSDIR}/vietnamese/vnxfonts .if ${XFREE86_VERSION} == 4 RUN_DEPENDS= mkfontdir:${PORTSDIR}/x11/XFree86-4-clients .endif +EXTRACT_AFTER_ARGS= | ${TAR} -xf - xc/programs/xterm +WRKSRC= ${WRKDIR}/xc/programs/xterm XMKMF= xmkmf MAN1= vnterm.1 -CFLAGS+= -I../../include +CFLAGS+= -I${PREFIX}/include/viet post-patch: - @${LN} ${WRKSRC}/XTerm.ad ${WRKSRC}/VNTerm.ad - @${LN} ${WRKSRC}/vnterm.1V ${WRKSRC}/vnterm.man + @${CP} -p ${FILESDIR}/vnvars.* ${WRKSRC} + +pre-build: + ${LN} -f ${WRKSRC}/XTerm.ad ${WRKSRC}/VNTerm.ad + ${LN} -f ${FILESDIR}/vnterm.1V ${WRKSRC}/vnterm.man post-install: @${INSTALL_SCRIPT} ${WRKDIR}/VNterm.sh ${PREFIX}/bin/VNterm - @${MKDIR} ${PREFIX}/lib/X11/fonts/vietnamese - @(cd ${WRKSRC}/../fonts/X ; \ - ${INSTALL_DATA} fonts.dir *.pcf.Z \ - ${PREFIX}/lib/X11/fonts/vietnamese ; \ - ) - @${SETENV} PKG_PREFIX=${PREFIX} \ - ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .if !defined(NOPORTDOCS) @${MKDIR} ${PREFIX}/share/doc/vnterm \ && ${CHMOD} a+rx ${PREFIX}/share/doc/vnterm diff --git a/vietnamese/vnterm/distinfo b/vietnamese/vnterm/distinfo index 5bb5831b6b55..bce091115063 100644 --- a/vietnamese/vnterm/distinfo +++ b/vietnamese/vnterm/distinfo @@ -1 +1 @@ -MD5 (vnterm3.3.tar.Z) = 6eb2fccfad669c1eb839778c34b5d956 +MD5 (xorg-1.tar.gz) = 1f5d04a6a542afe41c47ca9ce0b7b3c6 diff --git a/vietnamese/vnterm/files/README.vnterm b/vietnamese/vnterm/files/README.vnterm new file mode 100644 index 000000000000..bab821384574 --- /dev/null +++ b/vietnamese/vnterm/files/README.vnterm @@ -0,0 +1,271 @@ +7/15/93 +vnterm has been "ported" to be base on the latest X11R5 xterm source +that I have. It has only been tested on SGI IRIX 5.0 alpha. + +Theoretically, it should compile on other SVR4 derived OS. + +Any problem, contact me as I am responsible for this particular +version of vnterm. Email to tin@saigon.com + +Tin Le + +-------------------------- + +If you received this program in source form and must compile it, +please follow the compile instructions below. If you received +the program in executable format, please skip directly to the +XDEFAULTS section below. + +The files VIQR.7 and VISCII.8 contain samples of Vietnamese +text that conform to the Viet-Std encoding specifications, +with which Vnterm complies. + +-------- +COMPILE INSTRUCTIONS: + +To compile this program, first try + + % xmkmf + % /bin/make + +If your system is properly set up for X and imake, that should be +sufficient. However, some systems are not correctly set up, +and for that we have provided the script "make" that summarizes +the important parameters you need to set for your system. +Edit "Doimake" and "make" as appropriate, and run + + % Doimake + % ./Make Makefile + % ./Make + +Sparc users note: your system libraries may require the -ldl +option added at the final linking step. A simple fix for this +is to edit your Imakefile/Makefile, and change the definition + + VNLIBS = $(VNLIBDIR)/libviqr.a $(VNLIBDIR)/libvntype.a + +to + + VNLIBS = -ldl $(VNLIBDIR)/libviqr.a $(VNLIBDIR)/libvntype.a + +If you still have trouble, make a transcript of your compile +attempt, + + % script + % .... + % exit + +and mail it to trichlor@haydn.Stanford.EDU, along with your questions. +-------- +XDEFAULTS: + +Sample settings to be placed in your .Xdefaults file for vnterm +is provided in the file "Xdefaults." + + > vnterm*font: vn-r14 + This sets the font for "vnterm" to "vn-r14" whenever you + run it. + + > vnterm*vnFilterKeyboard: on + This enables the Vietnamese keyboard. + + > vnterm*vnFilterScreen: off + This disables the screen-filter mode. When this mode is enabled, + instead of displaying the true characters, vnterm will display them + as Vietnamese characters according to the VIQR standard (Viet-Net + like, see below under KEYBOARD INSTRUCTIONS). This is useful if + you're reading Vietnamese mail or Soc.Culture.Vietnamese messages + where people type things like: + + DDa^y la` tie^'ng Vie^.t. + + By having the screen filter ON, you will see this as true Vietnamese + characters. Of course, you won't need the filter on if the characters + are already true Vietnamese data (according to the Viet-Std 8-bit + VISCII standard). + + One hitch: occasionally, some magic strings will cause the + Vietnamese screen filter to switch language modes (see below, + under KEYBOARD INSTRUCTIONS) and it will no longer combine + characters to form Vietnamese. "This is not a bug, it is a feature." + If you want to get back to Vietnamese mode for screen filtering, + the simplest way is to go to the pop-up menu (CTRL-MIDDLE MOUSE) + and turn the screen filter off, then on again. + +-------- +FONT INSTRUCTIONS: + +Vnterm.3.0 requires the availability of Vietnamese X fonts. +Such fonts can be found under the "fonts/X" directory of the +TriChlor distribution. Installation of the fonts is a 4-step +process, which is partially taken care of by the Makefile +in the fonts/X directory: + + 1. Convert the BDF format to SNF (server normal format), + with "bdftosnf <fontfile>.bdf > <fontfile>.snf". + The Makefile under fonts/X takes care of this automatically. + This is also automatically taken care of if you run + a compilation of vnterm. However, if you retrieved + vnterm in its executable form, you must go to the + fonts/X directory and run "make all". + + 2. Make a listing of your fonts in the directory so the + X server can read it, with "mkfontdir". The Makefile + takes care of this automatically. + + 3. Tell the X server where to find your font directory, + with "xset +fp <your_font_directory>". The Makefile + does NOT do this, as you may wish to place your fonts + somewhere other than in the directory where they were compiled. + + Remember that <your_font_directory> refers to + where the X server is running, which is NOT necessarily + the machine you are logged into. If this doesn't make + much sense, don't worry, just plow ahead with the installation. + If it doesn't work, you'll know this is one possible + reason why. In case of doubt, ask your local X guru. + + 4. Set the font for the "vnterm" program to that font. + For example, if you have the font "vn-r14", + either issue the command + + % vnterm -fn vn-r14 + + of place the following line in your .Xdefaults: + + + vnterm*font: vn-r14 + +If you have trouble with the font installation, try seeking help +from a local X guru who knows the particulars of your environment. +We can be reached for further consultation at the mail alias +TriChlor@haydn.Stanford.EDU. + +Particulars: + +X11/NeWS: the server has its own font format that can be generated + with the command "convertfont". + +NFS users:make sure your font files are accessible by everyone. This + means a minimum of: + + (a) all directories in the path to your font files must + be executable by everyone. This means a minimum of: + + % chmod go+x <dir> + + for all directory components. + + (b) all font files readable by everyone: + + % chmod go+r * + + in the font directory. + +X-terminals: recently X-terminals have become increasingly available. + X-terminals typically boot up getting files from a file server, + in particular its font files. This poses a thorny problem: + how do you install a new font for these displays? The user + typically does not have access to the file system where the + X-terminal looks for its fonts. + + If you know where your X terminal looks for its fonts + (at least which file system), and have write access to + it, you're okay, because you can place your fonts there + and tell the X terminal server proram to look there. + + If you do know where it looks for fonts, but don't have + access to it, OR, if you don't know where it looks for fonts, + there is nothing you can do short of contacting the + guru who manages your X terminal. He or she will be + able to put the Vietnames font file in the right places +-------- +KEYBOARD INSTRUCTIONS: + + Vnterm starts up in Vietnamese typing mode. There are two other + modes, English and Literal, (according to the Viet-Std VIQR standard) + each of which is initiated as described below: + + Typing instructions: + + \v: Start Vietnamese mode, where Viet-Net style input is supported, + for example: + + Ca' kho^ng a(n muo^'i ca' u+o+ng + Con ca~i cha me. tra(m ddu+o+`ng con hu+\. + + To prevent composition, use "\". The example above shows + "hu+\." which tells Vnterm that the ending period is + a period and not a Vietnamese dot-below (da^'u na(.ng). + + The diacritics (da^'u) are: + + ( breve da^'u tra(ng, a(' + ^ circumflex da^'u mu~, a^' + + horn da^'u mo'c, o+ + + ' acute da^'u sa('c + ` grave da^'u huye^`n + ? hook above da^'u ho?i + ~ tilde da^'u nga~ + . dot below da^'u na(.ng + + \m: Start English mode, where Viet-Net style input is supported, + but must be explicitly announced with a "\", for example: + + C\a' kh\o^ng \a(n mu\o^'i c\a' \u+\o+ng + Con c\a~i cha m\e. tr\a(m \dd\u+\o+`ng con h\u+\. + + This mode is useful if you type mostly English and don't + want the trouble of having to type "\" to escape composition + all the time. + + \l: starts Literal mode, almost all keys are passed literally. + + For complete details, please see the Viet-Std documents + published elsewhere. Contact "viet-std@haydn.Stanford.EDU" + if you would like a copy. + + To turn off keyboard filtering completely, use the pop-up menu + using CTRL-middle (hold down Control key while pressing the middle + mouse button), and highlight the option "Enable Vietnamese keys." + If there is a check mark next to it, the Vietnamese keyboard filtering + is in effect. Otherwise, it has been turned off. +-------- +DISPLAY INSTRUCTIONS: + + Vnterm also supports a Screen-Filter mode which will convert + the displayed text to Vietnamese as appropriate. This is useful + if you are reading Soc.Culture.Vietnamese or something similar. + To use this, bring up the pop-up menu, also using CTRL-middle, + and highlight the "Use Vietnamese screen" option so that there + is a check mark next to it. From then on if you read a message + with Vietnamese mnemonics in it, it will display as true Vietnamese + characters. NOTE: the screen filter also switches modes like + the keyboard filter, so that if you happen to read a message + with the string "\l" or "\m" in it, it will put the filter in + Literal or English mode, respectively. Subsequently, the + Vietnamese mnemonics will no longer display as Vietnamese. + A simple way to get the screen filter back to Vietnamese mode + is to turn it off, then on again, using the pop-up menu. + +-------- +TTY settings: + + Some of the newer shells try to be "smart" and will actually + reset your terminal characteristics, even though vnterm attempts + to set them correctly on start-up. This requires you to manually + set: + + % stty pass8 cs8 -istrip + + You may find it convenient to place the line above in your + .cshrc, which is read every time the C-shell starts up. + + In addition, the one of the newest shells we've tested will + actually insist on not passing 8-bit characters, regardless + of the tty settings. Your best bet in this case is to run + an older shell, which may be available on your system as + /bin/csh. + +Cu+o+`ng Nguye^~n diff --git a/vietnamese/vnterm/files/patch-01 b/vietnamese/vnterm/files/patch-01 deleted file mode 100644 index 2d21ae8a23fe..000000000000 --- a/vietnamese/vnterm/files/patch-01 +++ /dev/null @@ -1,21 +0,0 @@ ---- misc.c.orig Fri Jul 16 10:17:56 1993 -+++ misc.c Sun Nov 24 18:29:09 1996 -@@ -34,6 +34,7 @@ - #include <ctype.h> - #include <pwd.h> - #include <errno.h> -+#include <sys/param.h> - - #include <X11/Xatom.h> - #include <X11/cursorfont.h> -@@ -776,8 +777,10 @@ - char *SysErrorMsg (n) - int n; - { -+#if !((defined(BSD) && (BSD >= 199103))) - extern char *sys_errlist[]; - extern int sys_nerr; -+#endif - - return ((n >= 0 && n < sys_nerr) ? sys_errlist[n] : "unknown error"); - } diff --git a/vietnamese/vnterm/files/patch-02 b/vietnamese/vnterm/files/patch-02 deleted file mode 100644 index 74ea68c9bcc2..000000000000 --- a/vietnamese/vnterm/files/patch-02 +++ /dev/null @@ -1,26 +0,0 @@ ---- ../lib/Makefile.orig Tue Aug 31 15:40:06 1993 -+++ ../lib/Makefile Sun Nov 24 19:59:14 1996 -@@ -4,7 +4,7 @@ - LIBDIRS = viqr vntype - LIBS = libviqr.a libvntype.a - #FLAGS = -DNO_ANSI_C --MFLAGS = -r -+#MFLAGS = -r - - all: - @$(MAKE) MSG="Working on" TARGET=all forloop -@@ -13,12 +13,13 @@ - @$(MAKE) MSG="Working on" TARGET=clean forloop - - forloop: -+ @echo "CFLAGS are $(CFLAGS)" - @for dir in $(LIBDIRS) ; do \ - $(ECHO) "Working on" $$dir " {" ; \ - cd $$dir ; \ - PATH=".:$(PATH)" ; \ - export PATH ; \ -- make $(MFLAGS) -e TAB="$(TAB)$(TAB)" $(TARGET) ; \ -+ make $(MFLAGS) TAB="$(TAB)$(TAB)" $(TARGET) ; \ - cd .. ; \ - $(ECHO) "Done with" $$dir " }";\ - $(ECHO) "" ;\ diff --git a/vietnamese/vnterm/files/patch-03 b/vietnamese/vnterm/files/patch-03 deleted file mode 100644 index b8c3c5a9dee4..000000000000 --- a/vietnamese/vnterm/files/patch-03 +++ /dev/null @@ -1,11 +0,0 @@ ---- ../lib/viqr/Makefile.orig Thu Jul 15 18:19:16 1993 -+++ ../lib/viqr/Makefile Fri Dec 6 11:48:24 1996 -@@ -8,7 +8,7 @@ - SHELL = /bin/sh - VNLIBDIR= .. - VNINCDIR= ../../include --RANLIB= echo -+RANLIB= ranlib - - SRCS = vncompos.c vnkeys.c vk_qrto8.c vk_8toqr.c - OBJS = vncompos.o vnkeys.o vk_qrto8.o vk_8toqr.o diff --git a/vietnamese/vnterm/files/patch-04 b/vietnamese/vnterm/files/patch-04 deleted file mode 100644 index 10fc15a9b340..000000000000 --- a/vietnamese/vnterm/files/patch-04 +++ /dev/null @@ -1,18 +0,0 @@ ---- ../lib/vntype/Makefile.orig Tue Aug 10 18:26:33 1993 -+++ ../lib/vntype/Makefile Fri Dec 6 11:48:38 1996 -@@ -12,13 +12,13 @@ - SRTI = vntype.I toupper.I tolower.I - SRTS = vntype.srt toupper.srt tolower.srt - LIB = $(VNLIBDIR)/libvntype.a --RANLIB = echo -+RANLIB = ranlib - - INC = -I$(VNINCDIR) - #FLAGS = -DNOANSI_C - CFLAGS = $(FLAGS) $(INC) - CC = cc --CPP = /lib/cpp -+CPP = cpp - - .I.srt: - @echo -n "Generating $@ from $*.I..." diff --git a/vietnamese/vnterm/files/patch-05 b/vietnamese/vnterm/files/patch-05 deleted file mode 100644 index eb677d71bf00..000000000000 --- a/vietnamese/vnterm/files/patch-05 +++ /dev/null @@ -1,19 +0,0 @@ ---- ../fonts/X/Makefile.orig Tue Aug 31 15:42:26 1993 -+++ ../fonts/X/Makefile Wed Dec 4 02:00:53 1996 -@@ -35,7 +35,7 @@ - @echo $(TAB)We\'re going to do some font conversion. - @echo $(TAB)Depending on your system set-up, some of - @echo $(TAB)the conversion programs may not exist. -- @echo $(TAB)Don't worry about this; it means that -+ @echo "$(TAB)Don't worry about this; it means that" - @echo $(TAB)your font format is one of the others. - @echo $(TAB)We try to cover PCF, SNF, and FB formats. - @echo $(TAB)You're out of luck if NONE of these work. -@@ -71,6 +71,7 @@ - else echo "I guess you don't." ;\ - fi - -+ -compress *.pcf - -mkfontdir >/dev/null 2>&1 - @-chmod go+r fonts.* - @touch $(MADEFLAG) diff --git a/vietnamese/vnterm/files/patch-06 b/vietnamese/vnterm/files/patch-06 deleted file mode 100644 index f0c2216a45e6..000000000000 --- a/vietnamese/vnterm/files/patch-06 +++ /dev/null @@ -1,52 +0,0 @@ ---- vnterm.1V.orig Tue May 26 16:57:45 1992 -+++ vnterm.1V Wed Dec 4 00:52:33 1996 -@@ -1,7 +1,7 @@ - .\" to view this file, use: nroff -man %M% | more - .\" %W% (TriChlor) %G% %U% - .\" --.TH vnterm.3 1V -+.TH vnterm 1V - .SH NAME - vnterm \- X-terminal with Vietnamese - .SH SYNTAX -@@ -12,9 +12,9 @@ - [\fIregular_xterm_options\fP] - .SH DESCRIPTION - .NXR "vnterm command" --Version 3.0 of -+Version 3.3 of - .PN vnterm --is an adaptation of the X11R4 -+is an adaptation of the X11R5 - .MS xterm 1X - command. This manual page describes only - those features specific to -@@ -68,6 +68,7 @@ - combination. - The corresponding X resources are: - .EX -+ vnterm*font: vn-r14 - vnterm*vnFilterKeyboard: on - vnterm*vnFilterScreen: off - vnterm*vnEraseCharacter: 127 -@@ -203,12 +204,18 @@ - menu of - .PN vnterm. - .SH AUTHOR -+4.4BSD porting by David O'Brien <obrien@cs.ucdavis.edu> -+.PP -+Adapted from X11R5's xterm by -+Tin Le <tin@saigon.com> -+.PP - Adapted from X11R4's xterm by - the TriChlor Group, TriChlor@haydn.Stanford.EDU. - .PP - Thanks to Tuan P. Do (tuan@compass-da.com) for illustrating - the need for the vnEraseCharacter specifier. - .SH "SEE ALSO" --The Viet-Std Standardization Specification (Viet-Std@Haydn.Stanford.EDU) --.br -+.PP - vietterm(1V), vnelvis(1V) -+.SH STANDARDS -+Viet-Std Standardization Specification (Viet-Std@Haydn.Stanford.EDU) diff --git a/vietnamese/vnterm/files/patch-07 b/vietnamese/vnterm/files/patch-07 deleted file mode 100644 index d4dee573d54f..000000000000 --- a/vietnamese/vnterm/files/patch-07 +++ /dev/null @@ -1,11 +0,0 @@ ---- ptyx.h.orig Fri Jul 16 10:17:57 1993 -+++ ptyx.h Sat Apr 26 10:06:58 1997 -@@ -91,7 +91,7 @@ - #ifdef hpux - #define PTYCHAR2 "fedcba9876543210" - #else /* !hpux */ --#define PTYCHAR2 "0123456789abcdef" -+#define PTYCHAR2 "0123456789abcdefghijklmnopqrstuvwxyz" - #endif /* !hpux */ - #endif /* !PTYCHAR2 */ - diff --git a/vietnamese/vnterm/files/patch-Imakefile b/vietnamese/vnterm/files/patch-Imakefile new file mode 100644 index 000000000000..d6e3f9a3eb6f --- /dev/null +++ b/vietnamese/vnterm/files/patch-Imakefile @@ -0,0 +1,114 @@ +--- Imakefile.orig Mon Aug 21 08:47:46 2000 ++++ Imakefile Sat Feb 10 05:32:41 2001 +@@ -1,6 +1,6 @@ + XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:55:07 cpqbld Exp $ + XCOMM +-XCOMM Attention xterm porters ++XCOMM Attention vnterm porters + XCOMM + XCOMM + XCOMM Xterm assumes that bcopy can handle overlapping arguments. If your +@@ -23,26 +23,35 @@ + OSMAJORVERSION = OSMajorVersion + OSMINORVERSION = OSMinorVersion + ++ VNLIBDIR = ../lib ++ VNINCDIR = /usr/local/include/viet ++ VNFONTXDIR = ../fonts/X ++ + MAIN_DEFINES = -DUTMP $(TTYGROUPDEF) $(PUCCPTYDDEF) \ + -DOSMAJORVERSION=$(OSMAJORVERSION) \ + -DOSMINORVERSION=$(OSMINORVERSION) + MISC_DEFINES = /* -DALLOWLOGFILEEXEC */ + XKB_DEFINES = XkbClientDefines + DEFINES = $(XKB_DEFINES) ++ CDEBUGFLAGS = -I$(VNINCDIR) -O #-g ++ LDLIBS = $(VNLIBS) + SRCS1 = button.c charproc.c cursor.c data.c input.c \ + main.c menu.c misc.c screen.c scrollbar.c tabs.c \ +- TekPrsTbl.c Tekproc.c util.c VTPrsTbl.c ++ TekPrsTbl.c Tekproc.c util.c VTPrsTbl.c vnvars.c + OBJS1 = main.o input.o charproc.o cursor.o util.o tabs.o \ + screen.o scrollbar.o button.o Tekproc.o misc.o \ +- VTPrsTbl.o TekPrsTbl.o data.o menu.o ++ VTPrsTbl.o TekPrsTbl.o data.o menu.o vnvars.o + SRCS2 = resize.c + OBJS2 = resize.o + SRCS = $(SRCS1) $(SRCS2) + OBJS = $(OBJS1) $(OBJS2) +- PROGRAMS = resize xterm +- DEPLIBS1 = XkbClientDepLibs XawClientDepLibs ++ PROGRAMS = vnterm ++ VNLIBS = /usr/local/lib/libviqr.a /usr/local/lib/libvntype.a ++ /*VNFONTX = $(VNFONTXDIR)/fontsmade */ ++ VNFONTX = ++ DEPLIBS1 = XkbClientDepLibs XawClientDepLibs $(VNFONTX) + DEPLIBS2 = +- PROGRAMS = xterm resize ++ PROGRAMS = vnterm + + #ifndef TermcapLibrary + #if SystemV && !defined(MacIIArchitecture) +@@ -65,9 +74,9 @@ + SpecialCObjectRule(charproc,$(_NOOP_),$(MISC_DEFINES)) + + #if InstallXtermSetUID +-SetUIDProgramTarget(xterm,$(OBJS1),$(DEPLIBS1),XkbClientLibs XawClientLibs,$(TERMCAPLIB) $(PTYLIB)) ++SetUIDProgramTarget(vnterm,$(OBJS1),$(DEPLIBS1),XkbClientLibs XawClientLibs,$(TERMCAPLIB) $(PTYLIB)) + #else +-NormalProgramTarget(xterm,$(OBJS1),$(DEPLIBS1),XkbClientLibs XawClientLibs,$(TERMCAPLIB) $(PTYLIB)) ++NormalProgramTarget(vnterm,$(OBJS1),$(DEPLIBS1),XkbClientLibs XawClientLibs,$(TERMCAPLIB) $(PTYLIB)) + #endif + + #if InstallXtermSetUID && defined(SunArchitecture) && HasSharedLibraries && OSMajorVersion < 5 +@@ -83,24 +92,37 @@ + #endif + #endif + #endif +-install:: xterm ++ ++/* XTERM_LINK_FLAGS = -Wl,-T,10000000,-D,10400000 */ ++ ++install:: vnterm + MakeDir($(DESTDIR)$(BINDIR)) +- RemoveFile(xterm.inst) +- LinkRule(xterm.inst,$(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(LOCAL_LDFLAGS),$(OBJS1),$(LDOVERRIDE) XawClientLibs $(LDRESUME) $(LDLIBS) $(TERMCAPLIB) $(PTYLIB)) +- $(INSTALL) -c $(INSTPGMFLAGS) $(INSTUIDFLAGS) xterm.inst $(DESTDIR)$(BINDIR)/xterm +- RemoveFile(xterm.inst) ++ RemoveFile(vnterm.inst) ++ LinkRule(vnterm.inst,$(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(LOCAL_LDFLAGS),$(OBJS1),$(LDOVERRIDE) XawClientLibs $(LDRESUME) $(LDLIBS) $(TERMCAPLIB) $(PTYLIB) $(XTERM_LINK_FLAGS)) ++ $(INSTALL) -c $(INSTPGMFLAGS) $(INSTUIDFLAGS) vnterm.inst $(DESTDIR)$(BINDIR)/vnterm ++ RemoveFile(vnterm.inst) + #else + #if InstallXtermSetUID +-InstallProgramWithFlags(xterm,$(BINDIR),$(INSTUIDFLAGS)) ++InstallProgramWithFlags(vnterm,$(BINDIR),$(INSTUIDFLAGS)) + #else +-InstallProgramWithFlags(xterm,$(BINDIR),NullParameter) ++InstallProgramWithFlags(vnterm,$(BINDIR),NullParameter) + #endif + #endif + +-NormalProgramTarget(resize,$(OBJS2),$(DEPLIBS2),NullParameter,$(TERMCAPLIB)) +-InstallProgramWithFlags(resize,$(BINDIR),NullParameter) +- +-InstallAppDefaults(XTerm) +-InstallManPage(xterm,$(MANDIR)) +-InstallManPage(resize,$(MANDIR)) ++InstallAppDefaults(VNTerm) ++InstallManPage(vnterm,$(MANDIR)) + DependTarget() ++ ++$(VNLIBS): ++ @echo "" ++ @echo "Making library routines in $(VNLIBDIR). Please wait..." ++ @(cd $(VNLIBDIR) ; make VNLIBDIR=.. VNINCDIR=../../include) ++ @echo "Done making library routines." ++ @echo "" ++ ++$(VNFONTX): ++ @echo "" ++ @echo "Making X fonts in $(VNFONTXDIR). Please wait..." ++ @(cd $(VNFONTXDIR) ; make) ++ @echo "Done making X fonts." ++ @echo "" diff --git a/vietnamese/vnterm/files/patch-charproc.c b/vietnamese/vnterm/files/patch-charproc.c new file mode 100644 index 000000000000..b7978ee7a709 --- /dev/null +++ b/vietnamese/vnterm/files/patch-charproc.c @@ -0,0 +1,294 @@ +--- charproc.c.orig Mon Aug 21 08:47:46 2000 ++++ charproc.c Sat Feb 10 05:32:41 2001 +@@ -72,6 +72,10 @@ + #include <X11/Shell.h> + #endif /* NO_ACTIVE_ICON */ + ++#ifndef NO_VIETNAMESE ++#include <vnkeys.h> ++#endif /* NO_VIETNAMESE */ ++ + /* + * Check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX + * systems are broken and return EWOULDBLOCK when they should return EAGAIN. +@@ -619,6 +623,10 @@ + for( ; ; ) { + switch (parsestate[c = doinput()]) { + case CASE_PRINT: ++#ifndef NO_VIETNAMESE ++label_CASE_PRINT: /* for escaping from the CASE_IGNORE ++ state with Vietnamese characters */ ++#endif /* NO_VIETNAMESE */ + /* printable characters */ + top = bcnt > TEXT_BUF_SIZE ? TEXT_BUF_SIZE : bcnt; + cp = bptr; +@@ -656,6 +664,9 @@ + break; + + case CASE_IGNORE: ++#ifndef NO_VIETNAMESE ++ if (isgraph(c)) goto label_CASE_PRINT; ++#endif /* NO_VIETNAMESE */ + /* Ignore character */ + break; + +@@ -666,17 +677,32 @@ + + case CASE_BS: + /* backspace */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + CursorBack(screen, 1); + break; + + case CASE_CR: + /* carriage return */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + CarriageReturn(screen); + parsestate = groundtable; + break; + + case CASE_ESC: + /* escape */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + parsestate = esctable; + break; + +@@ -684,6 +710,11 @@ + /* + * form feed, line feed, vertical tab + */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + Index(screen, 1); + if (term->flags & LINEFEED) + CarriageReturn(screen); +@@ -695,6 +726,11 @@ + + case CASE_TAB: + /* tab */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + screen->cur_col = TabNext(term->tabs, screen->cur_col); + if (screen->cur_col > screen->max_col) + screen->cur_col = screen->max_col; +@@ -762,6 +798,11 @@ + + case CASE_ICH: + /* ICH */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + if((row = param[0]) < 1) + row = 1; + InsertChar(screen, row); +@@ -770,6 +811,11 @@ + + case CASE_CUU: + /* CUU */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + if((row = param[0]) < 1) + row = 1; + CursorUp(screen, row); +@@ -778,6 +824,11 @@ + + case CASE_CUD: + /* CUD */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + if((row = param[0]) < 1) + row = 1; + CursorDown(screen, row); +@@ -786,6 +837,11 @@ + + case CASE_CUF: + /* CUF */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + if((row = param[0]) < 1) + row = 1; + CursorForward(screen, row); +@@ -794,6 +850,11 @@ + + case CASE_CUB: + /* CUB */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + if((row = param[0]) < 1) + row = 1; + CursorBack(screen, row); +@@ -802,6 +863,11 @@ + + case CASE_CUP: + /* CUP | HVP */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + if((row = param[0]) < 1) + row = 1; + if(nparam < 2 || (col = param[1]) < 1) +@@ -821,6 +887,11 @@ + + case CASE_ED: + /* ED */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + switch (param[0]) { + case DEFAULT: + case 0: +@@ -840,6 +911,11 @@ + + case CASE_EL: + /* EL */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + switch (param[0]) { + case DEFAULT: + case 0: +@@ -857,6 +933,11 @@ + + case CASE_IL: + /* IL */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + if((row = param[0]) < 1) + row = 1; + InsertLine(screen, row); +@@ -865,6 +946,11 @@ + + case CASE_DL: + /* DL */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + if((row = param[0]) < 1) + row = 1; + DeleteLine(screen, row); +@@ -873,6 +959,11 @@ + + case CASE_DCH: + /* DCH */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + if((row = param[0]) < 1) + row = 1; + DeleteChar(screen, row); +@@ -1092,6 +1183,11 @@ + + case CASE_NEL: + /* NEL */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + Index(screen, 1); + CarriageReturn(screen); + +@@ -1109,6 +1205,11 @@ + + case CASE_RI: + /* RI */ ++#ifndef NO_VIETNAMESE ++ /* flush the Vietnamese FSM */ ++ dotext(screen, term->flags, ++ screen->gsets[screen->curgl], 0, 0); ++#endif /* NO_VIETNAMESE */ + RevIndex(screen, 1); + parsestate = groundtable; + break; +@@ -1460,6 +1561,13 @@ + register int len; + register int n; + register int next_col; ++#ifndef NO_VIETNAMESE ++ extern Boolean vn_filter_screen; ++ extern Vk_Fsm vn_screen_id; ++ unsigned char buf2[TEXT_BUF_SIZE+3]; /* at most three pending ++ chars from previous ++ call */ ++#endif /* NO_VIETNAMESE */ + + switch (charset) { + case 'A': /* United Kingdom set */ +@@ -1480,6 +1588,32 @@ + default: /* any character sets we don't recognize*/ + return; + } ++ ++#ifndef NO_VIETNAMESE ++ if (buf == 0 && ptr == 0) { /* flush the FSM */ ++ ++ int count; ++ ++ vk_flush(vn_screen_id, buf2, &count); ++ buf = (char *)buf2; ++ ptr = (char *)buf + count; ++ } else if (vn_filter_screen) { ++ /* translate output into 8-bit Vietnamese */ ++ register unsigned char *s1, *s2; ++ register int i; ++ unsigned char outchars[5]; ++ int count; ++ ++ for (s1 = (unsigned char*)buf, s2 = buf2; ++ s1 < (unsigned char*)ptr; s1++) { ++ vk_step(vn_screen_id, *s1, outchars, &count); ++ for (i = 0; i < count; i++) *s2++ = outchars[i]; ++ } ++ ++ buf = (char *)buf2; ++ ptr = (char *)s2; ++ } ++#endif /* NO_VIETNAMESE */ + + len = ptr - buf; + ptr = buf; diff --git a/vietnamese/vnterm/files/patch-input.c b/vietnamese/vnterm/files/patch-input.c new file mode 100644 index 000000000000..ad6a731c662d --- /dev/null +++ b/vietnamese/vnterm/files/patch-input.c @@ -0,0 +1,91 @@ +--- input.c.orig Mon Aug 21 08:47:47 2000 ++++ input.c Sat Feb 10 05:32:41 2001 +@@ -155,7 +155,40 @@ + unparseputc (033, pty); /* escape */ + } + while (nbytes-- > 0) ++#ifndef NO_VIETNAMESE ++ { ++#include <vnkeys.h> ++ unsigned char outchars[5]; ++ register int i; ++ int nchars; ++ extern Vk_Fsm vn_keyboard_id; ++ extern Boolean vn_filter_keyboard; ++ ++ if (!vn_filter_keyboard) { /* don't filter */ ++ unparseputc(*string++, pty); ++ } else { ++ ++ Vk_State state; ++ static Vk_State lastState; ++ ++ /* feed in the keypresses */ ++ state = vk_step(vn_keyboard_id, *string++, outchars, &nchars); ++ if (lastState != state) { ++ lastState = state; ++ _Set_Vn_Title(state); ++ } ++ ++ /* send out the Vietnamese translation */ ++ for (i = 0; i < nchars; i++) { ++ unparseputc(outchars[i], pty); ++ } ++ } ++ } ++#else /* NO_VIETNAMESE */ ++ { + unparseputc(*string++, pty); ++ } ++#endif /* NO_VIETNAMESE */ + key = TRUE; + } + if(key && !screen->TekEmu) +@@ -165,6 +198,47 @@ + #endif + return; + } ++ ++#ifndef NO_VIETNAMESE ++_Set_Vn_Title(state) ++ int state; ++{ ++ int nochange = 0; ++ char title[80], icon[80]; ++ extern Boolean vn_filter_keyboard; ++ ++ strcpy(title, "vnterm-"); ++ strcpy(icon, title); ++ if (!vn_filter_keyboard){ ++ strcat(title, "No Filtering"); ++ strcat(icon, "off"); ++ } else { ++ switch(state) { ++ case VK_ST_VIETNAMESE: ++ strcat(title, "Vietnamese"); ++ strcat(icon, "V"); ++ break; ++ case VK_ST_ENGLISH: ++ strcat(title, "English"); ++ strcat(icon, "E"); ++ break; ++ case VK_ST_LITERAL: ++ strcat(title, "Literal"); ++ strcat(icon, "L"); ++ break; ++ default: ++ nochange = 1; ++ break; ++ } ++ } ++ ++ if (!nochange) { ++ Changetitle(title); ++ Changename(icon); ++ } ++} ++#endif /* NO_VIETNAMESE */ ++ + + StringInput (screen, string, nbytes) + register TScreen *screen; diff --git a/vietnamese/vnterm/files/patch-main.c b/vietnamese/vnterm/files/patch-main.c new file mode 100644 index 000000000000..48561c19633e --- /dev/null +++ b/vietnamese/vnterm/files/patch-main.c @@ -0,0 +1,185 @@ +--- main.c.orig Mon Aug 21 08:47:47 2000 ++++ main.c Sat Feb 10 05:42:17 2001 +@@ -76,6 +76,9 @@ + #include "data.h" + #include "error.h" + #include "menu.h" ++#ifndef NO_VIETNAMESE ++#include "vnvars.h" ++#endif /* NO_VIETNAMESE */ + + #ifdef att + #define ATT +@@ -421,7 +424,11 @@ + CFLUSH, CWERASE, CLNEXT + }; + static int d_disipline = NTTYDISC; ++#ifndef NO_VIETNAMESE ++static long int d_lmode = LCRTBS|LCRTERA|LCRTKIL|LPASS8; ++#else /* NO_VIETNAMESE */ + static long int d_lmode = LCRTBS|LCRTERA|LCRTKIL|LCTLECH; ++#endif /* NO_VIETNAMESE */ + #ifdef sony + static long int d_jmode = KM_SYSSJIS|KM_ASCII; + static struct jtchars d_jtc = { +@@ -586,6 +593,11 @@ + Boolean sunFunctionKeys; /* %%% should be widget resource? */ + Boolean wait_for_map; + Boolean useInsertMode; ++#ifndef NO_VIETNAMESE ++ Boolean vn_filter_keyboard; ++ Boolean vn_filter_screen; ++ unsigned int vn_erase_character; ++#endif /* NO_VIETNAMESE */ + } resource; + + /* used by VT (charproc.c) */ +@@ -613,6 +625,14 @@ + offset(wait_for_map), XtRString, "false"}, + {"useInsertMode", "UseInsertMode", XtRBoolean, sizeof (Boolean), + offset(useInsertMode), XtRString, "false"}, ++#ifndef NO_VIETNAMESE ++ {"vnFilterKeyboard", "VnFilterKeyboard", XtRBoolean, sizeof (Boolean), ++ offset(vn_filter_keyboard), XtRString, "true"}, ++ {"vnFilterScreen", "VnFilterScreen", XtRBoolean, sizeof (Boolean), ++ offset(vn_filter_screen), XtRString, "false"}, ++ {"vnEraseCharacter", "VnEraseCharacter", XtRInt, sizeof (unsigned int), ++ offset(vn_erase_character), XtRString, "0"}, ++#endif /* NO_VIETNAMESE */ + }; + #undef offset + +@@ -621,7 +641,7 @@ + "XTerm*SimpleMenu*HorizontalMargins: 16", + "XTerm*SimpleMenu*Sme.height: 16", + "XTerm*SimpleMenu*Cursor: left_ptr", +- "XTerm*mainMenu.Label: Main Options (no app-defaults)", ++ "XTerm*mainMenu.Label: VNTERM v2.1.1 (SGI version by Tin Le)", + "XTerm*vtMenu.Label: VT Options (no app-defaults)", + "XTerm*fontMenu.Label: VT Fonts (no app-defaults)", + "XTerm*tekMenu.Label: Tek Options (no app-defaults)", +@@ -693,6 +713,13 @@ + {"+im", "*useInsertMode", XrmoptionNoArg, (caddr_t) "off"}, + {"-vb", "*visualBell", XrmoptionNoArg, (caddr_t) "on"}, + {"+vb", "*visualBell", XrmoptionNoArg, (caddr_t) "off"}, ++#ifndef NO_VIETNAMESE ++{"-vnk", "*vnFilterKeyboard", XrmoptionNoArg, (caddr_t) "on"}, ++{"+vnk", "*vnFilterKeyboard", XrmoptionNoArg, (caddr_t) "off"}, ++{"-vns", "*vnFilterScreen", XrmoptionNoArg, (caddr_t) "on"}, ++{"+vns", "*vnFilterScreen", XrmoptionNoArg, (caddr_t) "off"}, ++{"-vne", "*vnEraseCharacter", XrmoptionSepArg, (caddr_t) "0"}, ++#endif /* NO_VIETNAMESE */ + {"-wf", "*waitForMap", XrmoptionNoArg, (caddr_t) "on"}, + {"+wf", "*waitForMap", XrmoptionNoArg, (caddr_t) "off"}, + /* bogus old compatibility stuff for which there are +@@ -770,6 +797,11 @@ + #endif + { "-/+vb", "turn on/off visual bell" }, + { "-/+wf", "turn on/off wait for map before command exec" }, ++#ifndef NO_VIETNAMESE ++{ "-/+vnk", "turn on/off Vietnamese keyboard filter" }, ++{ "-/+vns", "turn on/off Vietnamese screen filter" }, ++{ "-vne ASCII_code", "specify erase character for Vietnamese typing" }, ++#endif /* NO_VIETNAMESE */ + { "-e command args ...", "command to execute" }, + { "%geom", "Tek window geometry" }, + { "#geom", "icon window geometry" }, +@@ -815,6 +847,11 @@ + + fprintf (stderr, "\r\n\nType %s -help for a full description.\r\n\n", + ProgramName); ++fprintf(stderr, "\n"); ++fprintf(stderr, "Version: VISCII & VIQR 1.1\n"); ++fprintf(stderr, "Ported by: Cuong T. Nguyen (cuong@haydn.Stanford.EDU\n"); ++fprintf(stderr, " TriChlor Software Group\n"); ++fprintf(stderr, "Ported to 4.4BSD and X11R6.5.1 by: David E. O'Brien <obrien@NUXI.com>\n"); + exit (1); + } + +@@ -836,6 +873,11 @@ + putc ('\n', stderr); + } + putc ('\n', stderr); ++fprintf(stderr, "\n"); ++fprintf(stderr, "Version: VISCII & VIQR 1.1\n"); ++fprintf(stderr, "Ported by: Cuong T. Nguyen (cuong@haydn.Stanford.EDU\n"); ++fprintf(stderr, " TriChlor Software Group\n"); ++fprintf(stderr, "Ported to 4.4BSD and X11R6.5.1 by: David E. O'Brien <obrien@NUXI.com>\n"); + + exit (0); + } +@@ -926,6 +968,11 @@ + int mode; + char *base_name(); + int xerror(), xioerror(); ++#ifndef NO_VIETNAMESE ++#ifdef USE_SYSV_TERMIO ++ struct termio deftio; ++#endif /* USE_SYSV_TERMIO */ ++#endif /* NO_VIETNAMESE */ + + XtSetLanguageProc (NULL, NULL, NULL); + +@@ -1150,6 +1197,39 @@ + XtNumber(application_resources), NULL, 0); + + waiting_for_initial_map = resource.wait_for_map; ++#ifndef NO_VIETNAMESE ++{ ++ vn_filter_keyboard = resource.vn_filter_keyboard; ++ vn_filter_screen = resource.vn_filter_screen; ++ vn_erase_character = resource.vn_erase_character; ++ ++ vn_keyboard_id = vk_init(VK_ST_VIETNAMESE, VK_DEFAULT_ESC, VK_DEFAULT_BS); ++ _Set_Vn_Title(VK_ST_VIETNAMESE); ++ ++#ifdef USE_SYSV_TERMIO /* deftio has been initialized above */ ++ vn_erase_char = deftio.c_cc[VERASE]; ++#else /* USE_SYSV_TERMIO */ ++ { ++ struct sgttyb attr; ++ ++ if (ioctl (0, TIOCGETP, (char *)&attr) >= 0) { ++ vn_erase_char = attr.sg_erase; ++ } else { ++ vn_erase_char = VK_DEFAULT_BS; ++ } ++ } ++#endif /* USE_SYSV_TERMIO */ ++ if (vn_erase_character != 0) { /* not specified by user, take from tty characteristics */ ++ vn_erase_char = (unsigned int) vn_erase_character; ++ } ++ vk_set(vn_keyboard_id, (unsigned int) vn_erase_char, (int)VK_SET_BS); ++ ++ vn_screen_id = vk_init(VK_ST_VIETNAMESE, VK_DEFAULT_ESC, VK_DEFAULT_BS); ++ /* screen filter is batch mode, as we don't want to spew backspaces ++ all over the true drawing screen */ ++ vk_set(vn_screen_id, 1, VK_SET_BATCH); ++} ++#endif /* NO_VIETNAMESE */ + + /* + * ICCCM delete_window. +@@ -1255,6 +1335,11 @@ + + if (screen->savelines < 0) screen->savelines = 0; + ++#ifndef NO_VIETNAMESE ++ update_vnfilterkeyboard(); ++ update_vnfilterscreen(); ++#endif /* NO_VIETNAMESE */ ++ + term->flags = 0; + if (!screen->jumpscroll) { + term->flags |= SMOOTHSCROLL; +@@ -2417,6 +2502,10 @@ + HsSysError(cp_pipe[1], ERROR_TIOCSETC); + #endif /* TIOCSLTC */ + #ifdef TIOCLSET ++#ifndef NO_VIETNAMESE ++ lmode |= LPASS8; ++ lmode &= ~LCTLECH; ++#endif /* NO_VIETNAMESE */ + if (ioctl (tty, TIOCLSET, (char *)&lmode) == -1) + HsSysError(cp_pipe[1], ERROR_TIOCLSET); + #endif /* TIOCLSET */ diff --git a/vietnamese/vnterm/files/patch-menu.c b/vietnamese/vnterm/files/patch-menu.c new file mode 100644 index 000000000000..f4cb2a2da457 --- /dev/null +++ b/vietnamese/vnterm/files/patch-menu.c @@ -0,0 +1,111 @@ +--- menu.c.orig Mon Aug 21 08:47:47 2000 ++++ menu.c Sat Feb 10 05:32:41 2001 +@@ -33,6 +33,10 @@ + #include <stdio.h> + #include <signal.h> + ++#ifndef NO_VIETNAMESE ++#include "vnvars.h" ++#endif /* NO_VIETNAMESE */ ++ + extern void FindFontSelection(); + + Arg menuArgs[2] = {{ XtNleftBitmap, (XtArgVal) 0 }, +@@ -57,12 +61,20 @@ + do_tektextlarge(), do_tektext2(), do_tektext3(), do_tektextsmall(), + do_tekpage(), do_tekreset(), do_tekcopy(), do_vtshow(), do_vtmode(), + do_tekhide(), do_vtfont(); ++#ifndef NO_VIETNAMESE ++static void do_vnfilterkeyboard(), do_vnfilterscreen(); ++#endif /* NO_VIETNAMESE */ + + + /* + * The order entries MUST match the values given in menu.h + */ + MenuEntry mainMenuEntries[] = { ++#ifndef NO_VIETNAMESE ++ { "Enable Vietnamese keys",do_vnfilterkeyboard, NULL }, /* 0 */ ++ { "Use Vietnamese screen", do_vnfilterscreen, NULL }, /* 1 */ ++ { "line3", NULL, NULL }, /* 2 */ ++#endif /* NO_VIETNAMESE */ + { "securekbd", do_securekbd, NULL }, /* 0 */ + { "allowsends", do_allowsends, NULL }, /* 1 */ + #ifdef ALLOWLOGGING +@@ -80,6 +92,11 @@ + { "quit", do_quit, NULL }}; /* 12 */ + + MenuEntry vtMenuEntries[] = { ++#ifndef NO_VIETNAMESE ++ { "Enable Vietnamese keys",do_vnfilterkeyboard, NULL }, /* 0 */ ++ { "Use Vietnamese screen", do_vnfilterscreen, NULL }, /* 1 */ ++ { "line3", NULL, NULL }, /* 2 */ ++#endif /* NO_VIETNAMESE */ + { "scrollbar", do_scrollbar, NULL }, /* 0 */ + { "jumpscroll", do_jumpscroll, NULL }, /* 1 */ + { "reversevideo", do_reversevideo, NULL }, /* 2 */ +@@ -160,6 +177,10 @@ + Cardinal *param_count; /* 0 or 1 */ + { + TScreen *screen = &term->screen; ++#ifndef NO_VIETNAMESE ++ extern Boolean vn_filter_keyboard; ++ extern Boolean vn_filter_screen; ++#endif + + if (*param_count != 1) { + Bell(XkbBI_MinorError,0); +@@ -209,6 +230,10 @@ + update_cursesemul(); + update_visualbell(); + update_marginbell(); ++#ifndef NO_VIETNAMESE ++ update_vnfilterkeyboard(); ++ update_vnfilterscreen(); ++#endif + #ifndef NO_ACTIVE_ICON + if (!screen->fnt_icon || !screen->iconVwin.window) { + set_sensitivity (screen->vtmenu, +@@ -1277,3 +1302,42 @@ + } + + ++#ifndef NO_VIETNAMESE ++ ++static void do_vnfilterkeyboard (gw, closure, data) ++ Widget gw; ++ caddr_t closure, data; ++{ ++ unsigned char buf[5]; ++ int count; ++ ++ vn_filter_keyboard = !vn_filter_keyboard; ++ if (vn_filter_keyboard) { ++ vn_keyboard_id = vk_init(VK_ST_VIETNAMESE, VK_DEFAULT_ESC, vn_erase_char); ++ } else { ++ vk_end(vn_keyboard_id, buf, &count); ++ } ++ _Set_Vn_Title(VK_ST_VIETNAMESE); ++ update_vnfilterkeyboard(); ++} ++ ++ ++static void do_vnfilterscreen (gw, closure, data) ++ Widget gw; ++ caddr_t closure, data; ++{ ++ unsigned char buf[5]; ++ int count; ++ ++ vn_filter_screen = !vn_filter_screen; ++ if (vn_filter_screen) { ++ vn_screen_id = vk_init(VK_ST_VIETNAMESE, VK_DEFAULT_ESC, vn_erase_char); ++ /* set it in batch mode so we don't get backspaces in immediate mode */ ++ vk_set(vn_screen_id, 1, VK_SET_BATCH); ++ } else { ++ vk_end(vn_screen_id, buf, &count); ++ } ++ update_vnfilterscreen(); ++} ++ ++#endif /* NO_VIETNAMESE */ diff --git a/vietnamese/vnterm/files/patch-menu.h b/vietnamese/vnterm/files/patch-menu.h new file mode 100644 index 000000000000..14bab7fdd5de --- /dev/null +++ b/vietnamese/vnterm/files/patch-menu.h @@ -0,0 +1,73 @@ +--- menu.h.orig Mon Aug 21 08:47:47 2000 ++++ menu.h Sat Feb 10 05:32:41 2001 +@@ -94,6 +94,37 @@ + /* + * items in vt100 mode menu + */ ++#ifndef NO_VIETNAMESE ++#define vtMenu_vnfilterkeyboard 0 ++#define vtMenu_vnfilterscreen 1 ++#define vtMenu_line3 2 ++#define vtMenu_scrollbar 3 ++#define vtMenu_jumpscroll 4 ++#define vtMenu_reversevideo 5 ++#define vtMenu_autowrap 6 ++#define vtMenu_reversewrap 7 ++#define vtMenu_autolinefeed 8 ++#define vtMenu_appcursor 9 ++#define vtMenu_appkeypad 10 ++#define vtMenu_scrollkey 11 ++#define vtMenu_scrollttyoutput 12 ++#define vtMenu_allow132 13 ++#define vtMenu_cursesemul 14 ++#define vtMenu_visualbell 15 ++#define vtMenu_marginbell 16 ++#define vtMenu_altscreen 17 ++#ifndef NO_ACTIVE_ICON ++#define vtMenu_activeicon 18 ++#endif /* NO_ACTIVE_ICON */ ++#define vtMenu_line1 19 ++#define vtMenu_softreset 20 ++#define vtMenu_hardreset 21 ++#define vtMenu_clearsavedlines 22 ++#define vtMenu_line2 23 ++#define vtMenu_tekshow 24 ++#define vtMenu_tekmode 25 ++#define vtMenu_vthide 26 ++#else /* NO_VIETNAMESE */ + #define vtMenu_scrollbar 0 + #define vtMenu_jumpscroll 1 + #define vtMenu_reversevideo 2 +@@ -120,6 +151,7 @@ + #define vtMenu_tekshow 21 + #define vtMenu_tekmode 22 + #define vtMenu_vthide 23 ++#endif /* NO_VIETNAMESE */ + + /* + * items in vt100 font menu +@@ -278,6 +310,24 @@ + update_menu_item (term->screen.vtMenu, \ + vtMenuEntries[vtMenu_tekshow].widget, \ + term->screen.Tshow) ++ ++#ifndef NO_VIETNAMESE ++#define update_vnfilterkeyboard() \ ++ update_menu_item (term->screen.vtMenu, \ ++ vtMenuEntries[vtMenu_vnfilterkeyboard].widget, \ ++ vn_filter_keyboard) ++ ++/* Keep this around just for future reference */ ++#define set_vnfilterimmediate_sensitivity(val) \ ++ set_sensitivity (term->screen.vtMenu,\ ++ vtMenuEntries[vtMenu_vnfilterimmediate].widget, (val)) ++ ++#define update_vnfilterscreen() \ ++ update_menu_item (term->screen.vtMenu, \ ++ vtMenuEntries[vtMenu_vnfilterscreen].widget, \ ++ vn_filter_screen) ++ ++#endif /* NO_VIETNAMESE */ + + #define update_vttekmode() { \ + update_menu_item (term->screen.vtMenu, \ diff --git a/vietnamese/vnterm/files/vnterm.1V b/vietnamese/vnterm/files/vnterm.1V new file mode 100644 index 000000000000..b9d9cf82d62c --- /dev/null +++ b/vietnamese/vnterm/files/vnterm.1V @@ -0,0 +1,222 @@ +.\" $FreeBSD$ +.\" to view this file, use: nroff -man %M% | more +.\" %W% (TriChlor) %G% %U% +.\" +.TH vnterm 1V +.SH NAME +vnterm \- X-terminal with Vietnamese +.SH SYNTAX +.B vnterm +[\fB-/+vnk\fP] +[\fB-/+vns\fP] +[\fB-vne <erase_ASCII_code>\fP] +[\fIregular_xterm_options\fP] +.SH DESCRIPTION +.NXR "vnterm command" +Version 3.3 of +.PN vnterm +is an adaptation of the X11R5 +.MS xterm 1X +command. This manual page describes only +those features specific to +.PN vnterm ; +please consult the manual page for +.MS xterm 1X +for the rest of the story. +.PP +.PN Vnterm +allows the X-environment user to type and +display Vietnamese text. The keyboard input +scheme follows the +7-bit VIQR (VIetnamese Quoted-Readable) standard, +which is based on the prevalent +Vietnamese networking convention of placing Vietnamese +diacritical marks after the vowel, for example: "Vie^.t Nam". +.PP +With the appropriate font setting, +.PN vnterm +can display both 7-bit and 8-bit +Vietnamese text. The 7-bit text is assumed +to follow the +.I VIQR +standard, +and the 8-bit text is according to +.I VISCII +(VIetnamese Standard Code for Information Interchange), +both published by the Viet-Std working group +(Viet-Std@Haydn.Stanford.EDU). +.PP +On start-up, +.PN vnterm +attempts to set the tty line to 8-bit mode, +with canonical echoing of control characters turned off +(because the Vietnamese characters "A(? A(~ A^~ Y? Y~ Y." +are encoded in the C0 control-character area). +.SH OPTIONS +.nf + -/+vnk turn on/off Vietnamese keyboard filter (default on) + -/+vns turn on/off Vietnamese screen output (default off) + -vne ASCII_code explicitly specify erase character +.fi +.PP +The keyboard and screen options above +can also be found and set +in the +"VT\ Options" +menu of +.PN vnterm , +which you may access by clicking the CTRL-middle-mouse-button +combination. +The corresponding X resources are: +.EX + vnterm*font: vn-r14 + vnterm*vnFilterKeyboard: on + vnterm*vnFilterScreen: off + vnterm*vnEraseCharacter: 127 +.EE +.PP +If +.I vnFilterKeyboard +is turned off, no keyboard processing is done and characters +are reported to the underlying application as they are typed. +With +.I vnFilterKeyboard +turned on, +Vietnamese composition takes place. +.PP +The erase character (which is needed to backspace +over the Vietnamese letter being composed) +is figured from the terminal settings at the time +.PN vnterm +is invoked. In those cases where it is necessary +to specify another erase character, +.I vnEraseCharacter +may be used. The argument to this option is +the decimal ASCII code for the desired erase +character. Use 8 for backspace, and 127 for +delete. +.PP +The +.I vnFilterScreen +setting is provided as a convenience to the user +who wants to read 7-bit Vietnamese without +having first to convert it to 8-bit format. +When turned on, +.I vnFilterScreen +causes the displayed characters to be interpreted +with exactly the same rules as those applied to +keyboard input. This option is provided +with Soc.Culture.Vietnamese readers +explicitly in mind. +.SH "KEYBOARD INSTRUCTIONS" +Vnterm starts up in Vietnamese typing mode. There are two other +modes, English and Literal, +each of which is initiated as described below. + +.PP +.SH "Vietnamese Mode:" +Type "\\V" or "\\v" to start Vietnamese mode, +where Viet-Net style input is supported, for example: +.EX + Ca' kho^ng a(n muo^'i ca' u+o+ng + Con ca~i cha me. tra(m ddu+o+`ng con hu+\\. +.EE +.PP +To prevent composition, use "\\". The example above shows +"hu+\." which tells Vnterm that the ending period is +a period and not a Vietnamese dot-below (da^'u na(.ng). +.PP +The diacritics (da^'u) are: +.EX + MARK CHAR EXAMPLE + + breve ( a(n na(n + circumflex ^ nha^n co^ng + horn + tu+o+ng tu+ + + acute ' choa'ng va'ng + grave ` lu` khu` + hook above ? ho?i tha(m + tilde ~ ky~ ca`ng + dot below . Tra.ng Nguye^n + + dd dd dda ti`nh + DD DD DDo^ng So+n +.EE +.SH "English Mode:" +Type "\\M" or "\\m" to start English mode, +where Viet-Net style input is supported, +but must be explicitly announced with a "\\", for example: +.EX + C\\a' kh\\o^ng \\a(n mu\\o^'i c\\a' \\u+\\o+ng + Con c\\a~i cha m\\e. tr\\a(m \\dd\\u+\\o+`ng con h\\u+\\. +.EE +.PP +This mode is useful if you type mostly English and don't +want the trouble of having to type "\\" to escape composition +all the time. +.SH "Literal Mode:" +Typing "\\L" or "\\l" starts the Literal mode, +in which almost all keys are passed literally. +.SH RESTRICTIONS +.NXR "vnterm command" "restricted" +.PP +.IP o +If your shell is tcsh, you may find that it's unfriendly +to 8-bit data; this means Vietnamese characters cannot +be used. Use csh in the +.PN vnterm +window instead. +.PP +.IP o +In some cases +.PN vnterm +may fail to set the terminal mode correctly for 8-bits. +This will happen when your shell is "smart" and undoes the +settings performed by +.PN vnterm +on start-up. +In this case issue the command: +.EX + % stty -istrip cs8 pass8 +.EE +to set the terminal line for 8-bits. +.PP +.IP o +Remember that the screen output filter only works strictly +with 7-bit Vietnamese that is conformant to the VIQR +standard. +With the Viet-Net style text alone, there are potential +ambiguities which +.PN vnterm +will not interpret correctly, e.g., in displaying +the question "La`m chi?", where the question mark +will be taken to be a hook-above (da^'u ho?i), +and the word displayed as "ch<i?>" (Vietnamese "thread") +rather than as "chi<?>" (Vietnamese "what"). +Note that "chi\\?" will be correctly interpreted. +.PP +Occasionally, magic sequences such as "\\V", +"\\M", and "\\L" may appear in non-VIQR-conformant text +which will change the state of the screen filter +causing it not to display Vietnamese properly afterwards. +When this happens, simply turn the screen filter +off and on again, by using the CTRL-middle-mouse-button +menu of +.PN vnterm. +.SH AUTHOR +4.4BSD porting by David O'Brien <obrien@cs.ucdavis.edu> +.PP +Adapted from X11R5's xterm by +Tin Le <tin@saigon.com> +.PP +Adapted from X11R4's xterm by +the TriChlor Group, TriChlor@haydn.Stanford.EDU. +.PP +Thanks to Tuan P. Do (tuan@compass-da.com) for illustrating +the need for the vnEraseCharacter specifier. +.SH "SEE ALSO" +.PP +vietterm(1V), vnelvis(1V) +.SH STANDARDS +Viet-Std Standardization Specification (Viet-Std@Haydn.Stanford.EDU) diff --git a/vietnamese/vnterm/files/vnvars.c b/vietnamese/vnterm/files/vnvars.c new file mode 100644 index 000000000000..9de0c28175f8 --- /dev/null +++ b/vietnamese/vnterm/files/vnvars.c @@ -0,0 +1,13 @@ +/* + * @(#)vnvars.c 2.1 TriChlor: 92/03/17 06:36:00 + */ + + +#include "vnvars.h" + +Boolean vn_filter_keyboard; +Boolean vn_filter_screen; +Vk_Fsm vn_keyboard_id; +Vk_Fsm vn_screen_id; +u_char vn_erase_char; /* character copied from tty characteristics */ +unsigned int vn_erase_character; /* character given by .Xdefaults */ diff --git a/vietnamese/vnterm/files/vnvars.h b/vietnamese/vnterm/files/vnvars.h new file mode 100644 index 000000000000..7106c683a481 --- /dev/null +++ b/vietnamese/vnterm/files/vnvars.h @@ -0,0 +1,19 @@ +/* + * @(#)vnvars.h 2.1 TriChlor: 92/03/17 06:36:41 + */ + +#ifndef _VNVARS_H_ +#define _VNVARS_H_ + +#include <sys/types.h> +#include <X11/Intrinsic.h> +#include <vnkeys.h> + +extern Boolean vn_filter_keyboard; +extern Boolean vn_filter_screen; +extern Vk_Fsm vn_keyboard_id; +extern Vk_Fsm vn_screen_id; +extern u_char vn_erase_char; /* see vnvars.c */ +extern unsigned int vn_erase_character; /* see vnvars.c */ + +#endif /* _VNVARS_H_ */ diff --git a/vietnamese/vnterm/pkg-descr b/vietnamese/vnterm/pkg-descr index 43433f4d4c25..c69d8b048af3 100644 --- a/vietnamese/vnterm/pkg-descr +++ b/vietnamese/vnterm/pkg-descr @@ -1,8 +1,8 @@ Tha^n cha`o ca'c ba.n, vnxterm is a xterm replacement with Vietnamese VIQR 1.1 (7-bit VIetnamese -Quoted Readable/Viet-Net) support. This version of cxterm is derived from the -X11R5 xterm, and thus has simular capabilities. +Quoted Readable/Viet-Net) support. This version of vnterm is derived from the +X11R6.5.1 xterm, and thus has simular capabilities. Please see the README file in the share/doc/vnterm directory. diff --git a/vietnamese/vnterm/pkg-install b/vietnamese/vnterm/pkg-install deleted file mode 100644 index 5cfd6c47fc5f..000000000000 --- a/vietnamese/vnterm/pkg-install +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$2" != "POST-INSTALL" ]; then - exit 0 -fi - -cd ${PKG_PREFIX}/lib/X11/fonts/vietnamese -mkfontdir >/dev/null 2>&1 diff --git a/vietnamese/vnterm/pkg-plist b/vietnamese/vnterm/pkg-plist index 3f229134187e..2bf44d1dbd28 100644 --- a/vietnamese/vnterm/pkg-plist +++ b/vietnamese/vnterm/pkg-plist @@ -1,12 +1,5 @@ @comment $FreeBSD$ bin/vnterm bin/VNterm -lib/X11/app-defaults/VNTerm -lib/X11/fonts/vietnamese/fonts.dir -lib/X11/fonts/vietnamese/vn-r14.pcf.Z -lib/X11/fonts/vietnamese/vn10x20.pcf.Z -lib/X11/fonts/vietnamese/vn9x15.pcf.Z -lib/X11/fonts/vietnamese/vnlutRS18.pcf.Z share/doc/vnterm/README @dirrm share/doc/vnterm -@dirrm lib/X11/fonts/vietnamese diff --git a/vietnamese/vnterm/scripts/pre-install b/vietnamese/vnterm/scripts/pre-install index aeddf89033fc..e3fd9fddc3da 100644 --- a/vietnamese/vnterm/scripts/pre-install +++ b/vietnamese/vnterm/scripts/pre-install @@ -1,5 +1,7 @@ #!/bin/sh +# $FreeBSD$ + # set up the resource file # nothing yet... |