Newsgroups: fj.questions.unix
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!nkkgw!yakoh
From: yakoh@info-sys.keihin.nkk.co.jp (Takahiro Yakoh)
Subject: Re: GNU screen for japanese?
In-Reply-To: =?ISO-2022-JP?B?GyRCOjQ1VzRWISFOSRsoQg==?= 
	's message of 14 Nov 1994 10:15:00 +0900
Message-ID: <YAKOH.94Nov14165051@magma.info-sys.keihin.nkk.co.jp>
Sender: news@nkk.co.jp
Nntp-Posting-Host: magma
Organization: Info. Tech. Sec., Info. Sys. Dep., NKK Co.
References: <INETNEWS-1-9-8.00227@niftyserve.or.jp>
Date: Mon, 14 Nov 1994 07:50:50 GMT
Lines: 210
Xref: galaxy.trc.rwcp.or.jp fj.questions.unix:4366
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.questions.unix&nb=4366&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

  $BLp8~!w#N#K#K(B $B$G$9!#(B

> GNU$B$N(Bscreen-3.5.1$B$r;HMQ$7$F$$$^$9$,!"F|K\8lI=<($G;~$?$^I=<($,Mp$l$^$9!%(B
> screen$B$K$O$H$/$K%Q%C%A$r$+$1$F$$$^$;$s$,!"F|K\8l2=$N%Q%C%A$,B8:_$9$k$N(B
> $B$G$7$g$&$+(B? $B$^$?F1MM$J8=>]$r2r7h$5$l$?J}!$$$$i$C$7$c$$$^$9$G$7$g$&$+(B?

$BL5=$@5$G;HMQ$7$F$$$k$J$i$P!"2=$1$FEvA3$+$H;W$$$^$9!#(B3.5.2 $B$J$i$P(BJIS$B%3!<(B
$B%I$rDL$9$?$a$N%Q%C%A$NB8:_$rCN$C$F$$$^$9!#(Bconfig $BA0$K0J2<$N%Q%C%A$rEv(B
$B$F$F!"(Bconfig, make, make install $B$7$F$_$F2<$5$$!#(B

$BLp8~!w$b$&(Bscreen$BL5$7$K$O@8$-$i$l$J$$(B...$B$o$1$J$$$+(B

#
# screen-3.5.2.jis1.1
#
# $BK\%Q%C%A$O!"(Bscreen-3.5.2$B$r(BJIS$B%3!<%I$,DL$k$h$&$KJQ99$9$k$b$N$G$9!#(B
# $B;d$,0JA0Ej9F$7$?%Q%C%A(B
#Message-ID: <YAKOH.94Jan27225415@nekkar.aa.cs.keio.ac.jp>
# $B$GITHw$@$C$?E@$r2~A1$9$k%Q%C%A(B
#Message-ID: <CoDtDs.Aqy@nttslb.slab.ntt.jp>
# $B$r>eLn@5L&!w#N#T#T$5$s$,%]%9%H$7$F2<$5$$$^$7$?$,!"K\%Q%C%A$O$=$N(B
# $BN>J}$rE}9g$7$?$b$N$G$9!#(B
#
#$BLp8~(B $B9b90(B(yakoh@info-sys.keihin.nkk.co.jp)
#

*** Makefile.in.origFri Aug 20 02:01:02 1993
--- Makefile.inSun May  8 11:32:23 1994
***************
*** 47,53 ****
  # -DFORKDEBUG
  #Swap roles of father and son when forking the SCREEN process. 
  #Useful only for debugging.
! OPTIONS=
  #OPTIONS= -DDEBUG -DTMPTEST
  
  
--- 47,55 ----
  # -DFORKDEBUG
  #Swap roles of father and son when forking the SCREEN process. 
  #Useful only for debugging.
! # -DJIS
! #Make through JIS kanji-in/out sequences.
! OPTIONS= -DJIS
  #OPTIONS= -DDEBUG -DTMPTEST
  
  
*** ansi.c.origFri Aug 20 00:44:38 1993
--- ansi.cSun May  8 11:32:24 1994
***************
*** 833,838 ****
--- 833,845 ----
    debug2("DoESC: %x - inter = %x\n", c, intermediate);
    switch (intermediate)
      {
+ #ifdefJIS
+     case '$':
+       if(c=='B' || c=='@'){
+ curr->w_Attr|=A_KU;
+       }
+       break;
+ #endif
      case 0:
        switch (c)
  {
***************
*** 906,912 ****
--- 913,929 ----
    break;
  }
        break;
+ #ifdefJIS
+     case 'J':
+       curr->w_Attr &= ~(A_KU);
+       break;
+ #endif
      case '(':
+ #ifdefJIS
+       if(c=='B' || c=='J'){
+ curr->w_Attr &= ~(A_KU);
+       }else
+ #endif
        DesignateCharset(c, G0);
        break;
      case ')':
*** ansi.h.origWed Aug  4 09:11:37 1993
--- ansi.hSun May  8 11:32:24 1994
***************
*** 29,34 ****
--- 29,42 ----
  #define ATTR_RV3/* Reverse mode */
  #define ATTR_SO4/* Standout mode */
  #define ATTR_BL5/* Blinking */
+ #ifdefJIS
+ #define ATTR_KU6/* Jis Kanji Upper */
+ #define ATTR_KL7/* Jis Kanji Lower */
+ #define A_KU(1<<ATTR_KU)
+ #define A_KL(1<<ATTR_KL)
+ #undef NATTR
+ #define NATTR7
+ #endif
  
  #define A_DI(1<<ATTR_DI)
  #define A_US(1<<ATTR_US)
*** display.c.origWed Aug  4 09:42:31 1993
--- display.cSun May  8 11:32:32 1994
***************
*** 58,63 ****
--- 58,66 ----
  struct display TheDisplay;
  #endif
  
+ #ifdef JIS
+ static int InJIS = 0;
+ #endif
  
  /*
   *  The default values
***************
*** 731,736 ****
--- 734,742 ----
        if (xxe == d_width - 1 && CE)
  {
    GotoPos(xs, y);
+ #ifdef JIS
+   if (InJIS) {PutStr("\033(B"); InJIS = 0;}
+ #endif
    PutStr(CE);
    continue;
  }
***************
*** 890,895 ****
--- 896,910 ----
  
    if (!display || (old = d_attr) == new)
      return;
+ #ifdefJIS
+   if(!(old & A_KU) && (new & A_KU)){
+ PutStr("\033$B"); InJIS = 1;
+   }else if((old & A_KU) && !(new & A_KU)){
+      if (InJIS)
+ PutStr("\033(B");
+      InJIS = 0;
+   }
+ #endif
    d_attr = new;
    for (i = 1; i <= A_MAX; i <<= 1)
      {
***************
*** 1090,1095 ****
--- 1105,1113 ----
    if (isblank == 0 && CE && to == d_width - 1)
      {
        GotoPos(from, y);
+ #ifdef JIS
+       if (InJIS) {PutStr("\033(B"); InJIS = 0;}
+ #endif
        PutStr(CE);
        isblank = 1;
      }
***************
*** 1176,1183 ****
  PutStr(DC);
        else if (CDC)
  CPutStr(CDC, 1);
!       else if (CE)
  PutStr(CE);
      }
  }
  
--- 1194,1208 ----
  PutStr(DC);
        else if (CDC)
  CPutStr(CDC, 1);
!       else if (CE) 
! #ifdef JIS
! {
!   if (InJIS) {PutStr("\033(B"); InJIS = 0;}
!   PutStr(CE);
! }
! #else
  PutStr(CE);
+ #endif
      }
  }
  
*** termcap.c.origFri Aug 20 20:22:40 1993
--- termcap.cSun May  8 11:32:25 1994
***************
*** 192,198 ****
--- 192,208 ----
  SE = 0;
  
        for (i = 0; i < NATTR; i++)
+ #ifdefJIS
+       if(i == ATTR_KU){
+ d_attrtab[i] = "\033$B";
+       }else if(i == ATTR_KL){
+ d_attrtab[i] = "\033(B";
+       }else{
+ d_attrtab[i] = d_tcs[T_ATTR + i].str;
+       }
+ #else
  d_attrtab[i] = d_tcs[T_ATTR + i].str;
+ #endif
        /* Set up missing entries */
        s = 0;
        for (i = NATTR-1; i >= 0; i--)

# $B$*$7$^$$(B
