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FE24, 0xFE25
6$B!A(B7CNS-11643($BCf9qEAE};z(B)0xFE26, 0xFE27
8$BBg4AOB<-E5<}O?J8;z(B0xFE28
9$BBg4AOB<-E5<}O?J8;z!&5-9fJ8;zN`(B0xFE29
10$BCf9qEA>5J8;z!">/?tL1B2J8;zN`(B0xFE2A
11$B!A(B13($B7gHV(B)0xFE2B $B!A(B 0xFE2D
14$B!A(B15($BM=Ls(B)0xFE2E, 0xFE2F
16$B!A(B17Unicode0xFE30, 0xFE31
18$B!A(B31($BM=Ls(B)0xFE32 $B!A(B 0xFE3F

$BBh(B3$B>O(B TAD$B>\:Y;EMM=q(B


3.4 TAD$B%G!<%?9=@.$N>\:Y(B


3.4.8 $B;XDjIUd5%;%0%a%s%H(B


$B""(B $B%G!<%?7A<0(B:

$B8GM-%G!<%?$N%a%s%P(B:
        UB      dat[dlen]       -- $B8GM-%G!<%?(B ( dlen $B%P%$%H(B )
$B$r!"0J2<$N$h$&$KJQ99$9$k(B:
        UB      data[dlen]       -- $B8GM-%G!<%?(B ( dlen $B%P%$%H(B )

$BBh(B4$B>O(B $B%U%m%C%T!<%G%#%9%/7A<0(B

$B!T(BR4 $B$G$NJQ99FbMF!U(B

$B%U%!%$%k%7%9%F%`$NAmMFNL(B4GB$BD6$KBP1~$9$k3HD%7A<0#2$rDI2C!#(B
$B$3$l$KH<$$!"=>Mh$N3HD%7A<0$r3HD%7A<0#1$H$9$k!#(B


4.2 $B%U%!%$%k%7%9%F%`9=@.(B


4.2.2 $B%7%9%F%`%V%m%C%/9=@.(B


$B0J2<$N$h$&$K3HD%7A<0#2$rDI2C(B

$B#T#R#O#N%G%#%9%/#I#D!'(B
$BI8=`7A<0$N>l9g(B    0x42FE
$B3HD%7A<0$N>l9g(B    0x52FE  ($B3HD%7A<0#1$*$h$S#26&DL(B)
$B%G%#%9%/7A<0#I#D!'(B
$BI8=`7A<0$N>l9g(B    0x6400
$B3HD%7A<0#1$N>l9g(B  0x6401
$B3HD%7A<0#2$N>l9g(B  0x6402

4.3 $B%U%!%$%k9=@.(B


4.3.3 $B%U%!%$%k%X%C%@$N9=@.(B


$B3HD%7A<0#2$N%U%!%$%k%X%C%@$O0J2<$N7A<0$H$J$k!#(B
$B3HD%7A<0#1$K!"%l%3!<%I%$%s%G%C%/%93+;O0LCV(B ridxofs $B$,DI2C$5$l$F$$$k!#(B

typedef struct {
        UW      startid;        /* $B%U%!%$%k%X%C%@3+;O(B ID (0x54726F6E) */
        UH      ftype;          /* $B%U%!%$%k%?%$%W(B */
        UH      atype;          /* $B%"%W%j%1!<%7%g%s%?%$%W(B */
        VB      own[28];        /* $B=jM-!\1#$7L>(B */
        VB      grp[28];        /* $B%0%k!<%WL>!\1#$7L>(B */
        UH      gacclv;         /* $B%0%k!<%W%"%/%;%9%l%Y%k(B */
        UH      pacclv;         /* $B0lHL%"%/%;%9%l%Y%k(B */
        H       nlnk;           /* $B4^$^$l$k%j%s%/?t(B */
        H       idxlv;          /* $B%$%s%G%C%/%9%l%Y%k(B */
        W       size;           /* $B%U%!%$%k$NAm%P%$%H?t(B */
        W       nblk;           /* $BAm;HMQO@M}%V%m%C%/?t(B */
        W       nrec;           /* $BAm%l%3!<%I?t(B */
        VB      reserved1[8];
        W       ltime;          /* $BJ]B84|8B(B */
        W       atime;          /* $B:G?7$N%"%/%;%9F|;~(B */
        W       mtime;          /* $B:G?7$N99?7F|;~(B */
        W       ctime;          /* $B%U%!%$%k$N@[email protected]|;~(B */
        VB      name[40];       /* $B%U%!%$%kL>(B */
        VB      pswd[24];       /* $B9g8@MU(B */
        W       refcnt;         /* $B%U%!%$%k;2>H%+%&%s%H(B ($B!f(B255) */
        UH      ridxofs;        /* $B%l%3!<%I%$%s%G%C%/%93+;O0LCV(B */
        VB      reserved2[8];
        UH      fid;            /* $B%U%!%$%k(B ID */
        UW      endid;          /* $B%U%!%$%k%X%C%@=*N;(B ID (0x82DDE96B) */
} DfFileHeader;

$B%l%3!<%I%$%s%G%C%/%93+;O0LCV!'(B
$B%l%3!<%I%$%s%G%C%/%9$^$?$O4V@\%$%s%G%C%/%9$N@hF,$r%U%!%$%k%X%C%@%V%m%C%/$N@hF,$+$i$N%*%U%;%C%H(B($B%P%$%H0LCV(B)$B$G;XDj$9$k!#$3$l$K$h$j!"%U%i%0%a%s%H%F!<%V%k$NEPO??t$,2DJQ$H$J$k!#(B
$B%l%3!<%I%$%s%G%C%/%93+;O0LCV$O!"I,$:(B16$B%P%$%HC10L$N0LCV$G$J$1$l$P$J$i$J$$(B($B%l%3!<%I%$%s%G%C%/%9$,#1$D$"$?$j(B16$B%P%$%H$G$"$k$?$a(B)$B!#$^$?!"%U%i%0%a%s%H%F!<%V%k$NNN0h$r$J$/$7$F$O$$$1$J$$!#(B
$B$7$?$,$C$F!"%l%3!<%I%$%s%G%C%/%93+;O0LCV$O (192 + 16) $B!e(B ridxofs $B!e(B ($BO@M}%V%m%C%/%5%$%:(B - 16)


4.3.4 $B%U%i%0%a%s%H%F!<%V%k$N9=B$(B


$B3HD%7A<0#2$N%U%i%0%a%s%H%F!<%V%k$O0J2<$N7A<0$H$J$k!#(B

typedef struct {
        UH      size;           /* $B%U%i%0%a%s%H%5%$%:(B */
        UH      offset;         /* $B%V%m%C%/Fb%*%U%;%C%H(B */
        UW      blk;            /* $BO@M}%V%m%C%/%"%I%l%9(B */
} DfFragment2;

$B%U%i%0%a%s%H%F!<%V%k$N:GBgEPO??t$O2DJQ$H$J$k!#(B
$B%U%!%$%k%X%C%@$N=*C<$+$i!"%U%!%$%k%X%C%@$K;XDj$5$l$?%l%3!<%I%$%s%G%C%/%93+;O0LCV$^$G$,%U%i%0%a%s%H%F!<%V%k$H$J$k!#(B


$BBh(B2$BJT(B OS $B;EMM(B


$BBh(B1$B>O<~JU3K(B


1.1 $B%W%m%;%9!?%?%9%/4IM}(B


$B0J2<$N%7%9%F%`%3!<%k$rDI2C$9$k(B

$B!T(BR4 $B$G$NJQ99FbMF!U(B

$B6&M-%i%$%V%i%j$N%5%]!<%H5!G=$,DI2C$5$l$?!#(B
prc_inf
 
$B%W%m%;%9$N3FpJs$N

$B!Z7A<0![(B

WERR prc_inf( W pid, W item, VP buf, W len )

$B!Z2r@b![(B

pid ($B%W%m%;%9(BID) $B$G;XDj$7$?%W%m%;%9$K4X$9$k3FpJs$rbuf $B$X3JG<$9$k!#(B $B>pJs$Nitem $B$G;XDj$9$k!#(B pid = 0 $B$O<+%W%m%;%9!"(Bpid = -1 $B$O?F%W%m%;%9$r<($9!#(B len $B$O(B buf $B$N%5%$%:(B ($B%P%$%H?t(B) $B$G!"(B $BI,MW%5%$%:$KK~$?$J$$$H$-$O%(%i!<(B (ER_PAR) $B$H$J$j(B buf $B$K$O2?$b3JG<$5$l$J$$!#(B $BLaCM$K!"(Bbuf $B$KI,MW$J%5%$%:(B($B%P%$%H?t(B)$B$rJV$9!#(B buf = NULL $B$r;XDj$7$?>l9g$O>pJs$O3JG<$5$l$J$$$,!"(B $BLaCM$K$O(B buf $B$KI,MW$J%5%$%:$,JV$5$l$k!#(B $B$3$N>l9g!"(Blen $B$OL5;k$5$l$k!#(B

$B>pJs$NuBV(B */
PI_LINK
  item    PI_LINK
  buf     LINK

$B%W%m%0%i%`%U%!%$%k$N%j%s%/$r cre_prc() $B$G;XDj$5$l$?%W%m%0%i%`%U%!%$%k$N%j%s%/$rJV$9!#(B

PI_NTSK
  item    PI_NTSK
  buf     W ntsk

$B%W%m%;%9Fb$N%?%9%/?t(B($B%a%$%s%?%9%/$H%5%V%?%9%/$N9g7W(B)$B$r

PI_TSKSTAT
  item    PI_TSKSTAT + n
  buf     typedef struct {
                  W       tskid;          /* $B%?%9%/(BID */
                  UW      state;          /* $B%?%9%/>uBV(B */
                  W       priority;       /* $B%?%9%/M%@hEY(B */
           } P_TSKSTAT;

           state = P_WAIT $B!B(B P_READY $B!B(B P_RUN

n $BHVL\$N%?%9%/$N>uBV>pJs$r n = 0 $B$,%a%$%s%?%9%/$N>pJs$H$J$j!"(Bn >= 1 $B$,%5%V%?%9%/$H$J$k!#(B
n $B$O!"(BPI_NTSK $B$GF@$i$l$?%?%9%/?t(B - 1 $B$^$G$,M-8z$H$J$k!#(B

req_emg
 
$B%W%m%;%9=*N;DLCN(B ($BDI2C%7%9%F%`%3!<%k(B)

$B!Z7A<0![(B

WERR req_emg( W pid, W t_mask )

$B!Z2r@b![(B

$B;XDj$N%W%m%;%9$N=*N;$r!"%a%C%;!<%8$GDLCN$9$k!#(B
pid $B$G;XDj$7$?%W%m%;%9$,=*N;$7$?;~!"(B $B=*N;DLCN$N%a%C%;!<%8$,<+%W%m%;%9$KAw?.$5$l$k$h$&$K@_Dj$9$k!#(B $BDLCN$5$l$k=*N;$Nt_mask $B$G;XDj$9$k!#(B

pid = -1 $B$O?F%W%m%;%9$rI=$o$9!#(B $B<+%W%m%;%9$O;XDj$G$-$J$$(B( ER_SELF)$B!#(B

t_mask = [MM_ABORT] | [MM_EXIT] | [MM_TERM]
          MM_ABORT        $B%W%m%;%9$,0[>o=*N;$7$?;~DLCN(B
          MM_EXIT         $B%W%m%;%9$,@5>o=*N;$7$?;~DLCN(B
          MM_TERM         $B%W%m%;%9$,6/@)=*N;$7$?;~DLCN(B

t_mask = 0 $B$N;~$O!"=*N;DLCN$r2r=|$9$k!#(B
t_mask < 0 $B$N;~$O!"@_Dj$rJQ99$7$J$$!#(B

$BLaCM$KJQ99A0$N(B t_mask $B$N@_DjCM$rJV$9!#(B
$B<+%W%m%;%9$,=*N;$7$?;~$O<+F0E*$K@_Dj$O2r=|$5$l$k!#(B

$B=*N;DLCN$N%a%C%;!<%8$O

  typedef struct {
          W       type;   /* $B%a%C%;!<%8%?%$%W(B (MS_SYS2) */
          W       size;   /* $B%a%C%;!<%8%5%$%:(B */
          W       kind;   /* $B=*N;%?%$%W(B (MS_ABORT,MS_EXIT,MS_TERM) */
          W       pid;    /* $B=*N;$7$?%W%m%;%9$N%W%m%;%9(B ID */
          W       code;   /* $B=*N;%3!<%I(B */
  } EXITMSG;

kind, pid, code $B$O?F%W%m%;%9$KAw$i$l$k=*N;%a%C%;!<%8$HF1$8FbMF$G$"$k!#(B

kind $B=*N;%a%C%;!<%8%?%$%W(B (MS_ABORT, MS_EXIT, MS_TERM $B$N$$$:$l$+(B)
pid $B=*N;$7$?%W%m%;%9$N%W%m%;%9(B ID
code $B%7%9%F%`$N%(%i!<%3!<%I$^$?$O(B ext_prc(), ter_prc() $B$G;XDj$7$?=*N;%3!<%I(B

EXITMSG $B$O(B MS_SYS2 $B$N3F

  typedef union {
         struct {                /* MS_SYS2 $B$N4pK\7A<0(B */
                  W       type;   /* $B%a%C%;!<%8%?%$%W(B (MS_SYS2) */
                  W       size;   /* $B%a%C%;!<%8%5%$%:(B */
                  W       kind;   /* $BpJs(B */
          } base;
          EXITMSG exitmsg;        /* $B=*N;DLCN(B */
  } MSG_SYS2;

$B=*N;DLCN$N%a%C%;!<%8$O!"(B $BDL>o$N;R%W%m%;%9$N=*N;;~$K?F%W%m%;%9$KDLCN$5$l$k=*N;%a%C%;!<%8$H$OJL$KAw?.$5$l$k!#(B $B$7$?$,$C$F!";R%W%m%;%9$KBP$7$F=*N;DLCN$r@_Dj$7$?>l9g$O!"(B $B=*N;DLCN$N%a%C%;!<%8(B( MS_SYS2 )$B$,Mh$?8e$K!"(B $B$5$i$K=*N;%a%C%;!<%8(B( MS_ABORT,MS_EXIT,MS_TERM )$B$,Mh$k$3$H$K$J$k!#(B

lod_mod
 
$B6&M-%*%V%8%'%/%H$N%m!<%I(B ($BDI2C%7%9%F%`%3!<%k(B)

$B!Z7A<0![(B

WERR lod_mod( LINK *lnk, P_DYNLDINF *info )

$B!Z2r@b![(B

  typedef struct {
          VP      loadaddr;       /* $B%m!<%I%"%I%l%9(B */
          UW      loadsize;       /* $B%m!<%I%5%$%:(B */
          FP      entry;          /* $B%(%s%H%j!<%"%I%l%9(B */
          UW      info[3];        /* $B5!pJs(B */
  } P_DYNLDINF;

lnk $B$G;XDj$7$?6&M-%*%V%8%'%/%H$r<+%W%m%;%9$N%m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B
typedef struct {
        UH      fs_bsize;       /* $BO@M}%V%m%C%/$N%P%$%H?t(B               */
        UH      fs_nfile;       /* $B:GBg%U%!%$%k?t(B                       */
        H       fs_lang;        /* $B%U%!%$%k%7%9%F%`$G$N;HMQ8@8l(B         */
        H       fs_level;       /* $B%U%!%$%k%7%9%F%`$N%"%/%;%94IM}%l%Y%k(B */
        W       fs_nblk;        /* $BA4BN$N%V%m%C%/?t(B                     */
        W       fs_nfree;       /* $BL$;HMQ%V%m%C%/$NAm?t(B                 */
        STIME   fs_mtime;       /* $B:G?7$N%7%9%F%`%V%m%C%/$N99?7F|;~(B     */
        STIME   fs_ctime;       /* $B%U%!%$%k%7%9%F%`$N@[email protected]|;~(B           */
        TC      fs_name[L_FSNM];  /* $B%U%!%$%k%7%9%F%`L>(B                 */
        TC      fs_locat[L_DLNM]; /* $B%G%P%$%9=j:_L>(B                     */
} FS_STATE;
ins_rec
 
$B%l%3!<%IA^F~(B

$B2r@b$N9`$K$"$k0J2<$N5-=R$r:o=|$9$k!#(B

$B8=:_%l%3!<%I$,%j%s%/%l%3!<%I$N$H$-$O(B buf $B$NFbMF$O(B LINK $B9=B$BN$H$J$k$,!"(B $BB0@-%G!<%?ItJ,$N$_$,=q$-9~$^$l!";2>H$9$k%U%!%$%k<+BN$rJQ99$9$k$3$H$O$G$-$J$$!#(B $B$3$N>l9g!"(Boffset = 0$B!"(Bsize $B!f(BLINK $B9=B$BN$N%5%$%:(B ($B$^$?$O(B size = 0 ) $B$G$J$/$F$O$$$1$J$$!#(B
opn_fil
 
$B%U%!%$%k$N%*!<%W%s(B

$B%Q%9%o!<%I$O%5%]!<%H$7$F$$$J$$!#(B

chk_fil
 
$B%U%!%$%k%"%/%;%98"%A%'%C%/(B

$B%Q%9%o!<%I$O%5%]!<%H$7$F$$$J$$!#(B

chg_fpw
 
$B%U%!%$%k%Q%9%o!<%IJQ99(B

$B$3$N%7%9%F%`%3!<%k$O%5%]!<%H$7$F$$$J$$!#(B

map_rec
 
$B%l%3!<%I$N%^%C%W(B

$Bl9g$K$O!"%^%C%W$G$-$J$$$H$$$&@)8B$,$"$k!#(B

syn_fil
 
$B%U%!%$%kC10L$NF14|(B ($BDI2C%7%9%F%`%3!<%k(B)

$B!Z7A<0![(B

ERR syn_fil( W fd )

$B!Z%Q%i%a!<%?![(B

fd      $B%U%!%$%k%G%#%9%/%j%W%?(B

$B!Z%j%?!<%sCM![(B

$B!a(B 0    $B@5>o(B
$B!c(B 0    $B%(%i!<(B ($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B;XDj$5$l$?%*!<%W%sCf$N%U%!%$%k$K4X$7$F!"(B $B0l;~E*$K%a%b%j!<$KJ];}$5$l$F$$$kFbMFEy$r%G%#%9%/$K=q$-=P$9!#(B $B%l%3!<%I%^%C%W(B(map_rec)$B$K$h$k=q$-9~$_$bF1MM$K%G%#%9%/$K=q$-=P$5$l$k!#(B


1.7 $B%$%Y%s%H4IM}(B


$B0J2<$N5-=R$rDI2C$9$k!#(B

$B%$%Y%s%H%a%?%-!<>uBV(B

$B%$%Y%s%H9=B$BN(B(EVENT)$B$N%a%?%-!<>uBV>pJs(B (stat)$B$K2<5-$N>uBV$,DI2C$5$l$F$$$k!#(B

  ES_KBSEL        0x00020000      $B%-!<%\!<%IA*Br(B
                                  0: $B$+$JF~NO(B
                                  1: $B%m!<%^;zF~NO(B

$B%[%$!<%k%^%&%9BP1~5!G=(B

$B%[%$!<%k%^%&%9$N%[%$!<%k$N2sE>$r%$%Y%s%H$GDLCN$9$k$?$a$NFC

$B"((B $B$3$N5!G=$O!">-Mh;EMM$,JQ99$5$l$k2DG=@-$,$"$k!#(B

$B!&%[%$!<%k%$%Y%s%H$NFbMF(B

$B%[%$!<%k$N%$%Y%s%H$O(B EV_AUTKEY $B$N%-!<%$%Y%s%H$H$J$k!#(B
$B$?$@$7!"%$%Y%s%H$NM%@hEY$OK\Mh$N%-!<%j%T!<%H$K$h$k(B EV_AUTKEY $B$H$O0[$J$j!"(B $B%[%$!<%k$K$h$k(B EV_AUTKEY $B$O:GDcM%@hEY(B ( EV_NULL $B$h$j$O>e(B)$B$H$9$k!#(B

  $B%$%Y%s%HFbMF(B
  type                    EV_AUTKEY
  data.key.keytop         0x8000 + $B2sE>NL(B
                          $B2sE>NL(B > 0      $B%[%$!<%k$r(B
                          $B2sE>NL(B < 0      $B%[%$!<%k$r1|$K2sE>(B
  data.key.code           KC_SS_D         $B%[%$!<%k$r(B
                          KC_SS_U         $B%[%$!<%k$r1|$K2sE>(B

$B"((B $B%[%$!<%k$N2sE>$K$h$k(B EV_KEYDWN, EV_KEYUP $B%$%Y%s%H$OH/@8$7$J$$!#(B

$B!&%[%$!<%k%$%Y%s%H$N@8B8;~4V(B

$B%[%$!<%k$N%$%Y%s%H$O!"2<5-$N>r7o$N$$$:$l$+$,@.N)$7$?$H$-!"(B $B%$%Y%s%H%-%e!<$+$i<+F0E*$K>CLG$9$k!#(B

  1. $B%[%$!<%k$r2sE>$5$;$F$+$i(B 300ms $B0JFb$K%"%W%j%1!<%7%g%s$,%[%$!<%k%$%Y%s%H$r $B%[%$!<%k0J30$N%$%Y%s%H(B (EV_NULL $B$r=|$/(B) $B$r%"%W%j%1!<%7%g%s$,

    $B$J$*!"%"%W%j%1!<%7%g%s$,$5$;$i$l$?$H$-$O!"(B $B$=$N9g7WNL$,(B 1 $B2s$N%$%Y%s%H$H$7$F07$o$l$k!#(B $B$?$@$7!"2sE>J}8~$,H?E>$7$?>l9g$O!"$=$l0JA0$N2sE>NL$O
    chg_pda
     
    $B%]%$%s%F%#%s%0%G%P%$%9B0@-$NJQ99(B($BB0@-$N3HD%(B)

    $B!Z7A<0![(B

    WERR chg_pda( W atr )
    
    

    $B!Z%Q%i%a!<%?![(B

    $B%]%$%s%F%#%s%0%G%P%$%9B0@-(B atr $B$,

    xx..xx xWQV CCCA RRRR SSSS
    
    
    S$B!'46EY(B
    0: $B:GDc46EY(B $B!A(B 15: $B:G9b46EY(B
    R$B!'%9%-%c%sB.EY(B
    0: $B:GDcB.(B $B!A(B 15: $B:G9bB.(B
    A$B!'F0:n%?%$%W(B
    0: $BAjBP:BI8%?%$%W(B
    1: $B@dBP:BI8%?%$%W(B
    C$B!'%]%$%s%?0\F02CB.EY(B ($BAjBP:BI8F0:n;~$N$_M-8z(B)
    0: $B2CB.$J$7(B
    1$B!A(B7: $B2CB.>.!ABg(B
    V$B!':81&H?E>(B
    0: $B1& 1: $B:8Q$B!'%/%$%C%/%W%l%9(B ( 3 $B%\%?%s%^%&%9Ey$N;HMQ;~$KM-8z(B)
    0: $BL58z(B
    1: $BM-8z(B
    W$B!'%[%$!<%k(B ($B%[%$!<%k%^%&%9;HMQ;~$KM-8z(B)
    0: $BL58z(B
    1: $BM-8z(B
    x$B!'M=Ls(B (= 0)

    1.10 $B%7%9%F%`4IM}5!G=(B


    OS $B%P!<%8%g%s$N
    def_exc
     
    $BNc30=hM}%O%s%I%iDj5A(B

    $B$3$N%7%9%F%`%3!<%k$O%5%]!<%H$7$F$$$J$$!#(B

    ret_exc
     
    $BNc30=hM}%O%s%I%i=*N;(B

    $B$3$N%7%9%F%`%3!<%k$O%5%]!<%H$7$F$$$J$$!#(B

    get_cnf
     
    $B%3%s%U%#%0%l!<%7%g%s>pJs$N

    $B$3$N%7%9%F%`%3!<%k$O%5%]!<%H$7$F$$$J$$!#(B


    $BBh(B2$B>O(B $B%G%#%9%W%l%$%W%j%_%F%#%V(B


    2.2 $B4pK\35G0(B


    2.2.2 $B%S%C%H%^%C%W(B


    $B%S%C%H%^%C%W$N9=B$(B

    • $BIA2h4D6-$H$7$F@[email protected]=$J%S%C%H%^%C%W$N%W%l!<%s?t$O(B 1 $B$N$_$r%5%]!<%H(B $B$7$F$$$k!#$?$@$7!"%S%C%H%^%C%WA`:n$r9T$&4X?t$N0lIt!"%Q%?!<%s$N(B $B%S%C%H%^%C%W$K4X$7$F$O!"J#?t%W%l!<%s$r%5%]!<%H$7$F$$$k!#(B
    • $BM-8z%T%/%;%k%S%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J8;z?'$N;XDj$H$7$FF)L@?'$,;XDj$5$l$F$$$k>l9g!"%0%l!<%9%1!<%kItJ,$NIA2h$K4X$7$F$O!"(B $B;XDj?';XDj$N:G>e0L%S%C%H$r(B 0 $B$K$7$?$b$N$H$7$F07$$!"%0%l!<%9%1!<%k$N?'$r7hDj$9$k!#(B
    $B$7$?$,$C$F!"J8;zA07J?'$K(B 0x10000000 ($B9u(B)$B!"GX7J?'$K(B 0x90FFFFFF ($BGr(B + 0x80000000)$B$r;XDj$7$?>l9g!"J8;z?'$O9u$+$iGr$X$N%0%i%G!<%7%g%s$H$7$F!"(B $BGX7J?'$OF)L@$H$7$FIA2h$,9T$o$l$k!#(B

    $BJ8;z%;%C%H(B

    $BIA2h4D6-$K$O!"(B $B8@8l;XDj%3!<%I$,;XDj$5$l$F$$$J$$>uBV$GJ8;z%3!<%IIA2h$,MW5a$5$l$?>l9g$N!"(B $B%G%U%)%k%H$N8@8l;XDj$H$7$F;HMQ$5$l$kJ8;z%;%C%H$,J];}$5$l$F$$$k!#(B
    $BJ8;z%;%C%H$OITDjD9$N8@8l;XDj%3!<%I$rC;=L$7$?$b$N$G!"(B $B8@8l;XDj%3!<%I$r0J2<$N$h$&$KJQ7A$7$?$b$N$G$"$k!#(B

        $B8@8l;XDj%3!<%I(B                          $BJ8;z%;%C%H(B(SCRIPT)
        0xFE$B!_(BN, (0x21$B!A(B0x7E,0x80$B!A(B0xFD)        N-1, (0x21$B!A(B0x7E,0x80$B!A(B0xFD)
    
        $B8=;~E@$G$O!"(BN = 1 $B$N$_%5%]!<%H$7$F$$$k!#(B
    

    $B%7%9%F%`%9%/%j%W%H(B( 0xFE21 )$B$NJ8;z%;%C%H(B( SCRIPT )$B$O(B 0x0021 $B$H$J$k!#(B

    $BIA2h4D6-$NJ8;z%;%C%H$O8@8l;XDj%3!<%I$r4^$`J8;zNsIA2h$K$h$C$FJQ99$5$l$k!#(B

    $BIA2h4D6-$N=i4|CM$O(B 0x0021 $B$G$"$k!#(B


    2.3 $B4pK\4X?t(B



    2.3.1 $BIA2h4D6-$N@8@.!?:o=|(B


    gcls_env
    Delete Drawing Environment
    gcls_env

    $B%W%m%;%9$,=*N;$7$?>l9g$K$O!"(B $B$=$N%W%m%;%9$,@8@.$7$?$9$Y$F$NIA2h4D6-$O<+F0E*$K:o=|$5$l$k!#(B


    2.3.2 $B%+%i!<%^%C%W$NA`:n(B


    gget_col
    Get Color Map Entries
    gget_col

    $B!Z7A<0![$K$"$k%7%s%\%k(BOUT$B$r:o=|$9$k!#(B $B$9$J$o$A!"7A<0$O0J2<$N$h$&$K$J$k!#(B

    $B!Z7A<0![(B
    W gget_col ( GID gid, UW p, COLOR *cv, UW cnt )

    2.3.3 $BIA2h4D6-%l%3!<%I$N%"%/%;%9(B


    gcre_pat
    Create Pattern Image
    gcre_pat

    $B!Z2r@b![$N9`Bh(B3$BCJMn$NJ8(B:

    *pat $B$K$O!"@8@.$5$l$?FbIt%Q%?!<%s%$%a!<%8$X$N%]%$%s%?$,La$5$l!"(B $B$=$N%P%$%H?t$,(B *size $B$KLa$5$l$k!#(B $BF@$i$l$?%]%$%s%?$r(B PAT $B9=B$BN$N(B ipat.ptr $B$K@_Dj$9$k$3$H$K$h$j!"(B $B%Q%?!<%s$H$7$F;HMQ$G$-$k$3$H$K$J$k!#(B loc != NULL $B$N>l9g$K$O!"(B*pat $B$K$O(B loc $B$NCM$,@_Dj$5$l$k$3$H$K$J$k!#(B
    $B$r!"0J2<$N$h$&$KJQ99$9$k!#(B
    *pat $B$K$O!"@8@.$5$l$?FbIt%Q%?!<%s%$%a!<%8$X$N%]%$%s%?$,La$5$l!"(B $B$=$N%P%$%H?t$,(B *size $B$KLa$5$l$k!#(B $BF@$i$l$?%]%$%s%?$r(B PAT $B9=B$BN$N(B ipat.pat $B$K@_Dj$9$k$3$H$K$h$j!"(B $B%Q%?!<%s$H$7$F;HMQ$G$-$k$3$H$K$J$k!#(B loc != NULL $B$N>l9g$K$O!"(B*pat $B$K$O(B loc $B$NCM$,@_Dj$5$l$k$3$H$K$J$k!#(B

    2.4 $B?^7AIA2h4X?t(B



    2.4.9 $B%S%C%H%^%C%W$NA`:n(B


    grst_bmp
    Restore Bitmap
    $B%S%C%H%^%C%W$N2sI|(B

    $B7A<0JQ49;XDj$r9T$&>l9g!"(B $BE>Aw85%S%C%H%^%C%W$N7A<0$H$7$FJ#?t%W%l!<%s$r%5%]!<%H$7$F$$$k!#(B

    grst_mbm
    Restore Masked Bitmap
    $B%S%C%H%^%C%W$N2sI|(B

    $B7A<0JQ49;XDj$r9T$&>l9g!"(B $BE>Aw85%S%C%H%^%C%W$N7A<0$H$7$FJ#?t%W%l!<%s$r%5%]!<%H$7$F$$$k!#(B

    gscr_rec
    Scroll Rectangle
    $BD9J}7ANN0h$N%9%/%m!<%k(B

    $B!Z2r@b![$N9`Bh(B2$BCJMn(B:

    $B4X?tCM$H$7$F!"%Q%?!<%s$GEI$j$D$V$5$l$?ItJ,$N6k7ANN0h$N?t$,La$j!"(B rlp $B$,(B NULL $B$G$J$$>l9g$O!"$=$N6k7ANN0h$N%j%9%H$,@_Dj$5$l$k!#(B rlp$B$NMWAG$,ITB-$9$k>l9g$O!"(Brlp $B$NMWAGJ,$N$_@_Dj$5$l$k!#(B
    $B$r!"0J2<$N$h$&$KJQ99$9$k!#(B
    $B4X?tCM$H$7$F!"(B $B%Q%?!<%s$GEI$j$D$V$5$l$?ItJ,$N6k7ANN0h$N?t$,La$j!"(B rlp $B$,(B NULL $B$G$J$$>l9g$O!"$=$N6k7ANN0h$N%j%9%H$,@dBP:BI8CM$G@_Dj$5$l$k!#(B rlp$B$NMWAG$,ITB-$9$k>l9g$O!"(Brlp$B$NMWAGJ,$N$_@_Dj$5$l$k!#(B

    gsiz_cbm
    Get Compression Size
    $B05=L%S%C%H%^%C%W$N%5%$%:7W;;(B

    $B$3$N4X?t$O%5%]!<%H$7$F$$$J$$!#(B $B>o$K%(%i!<(B ( EG_NOSPT )$B$rLa$9!#(B

    gcom_bmp
    Compress Bitmap
    $B%S%C%H%^%C%W$N05=L(B

    $B$3$N4X?t$O%5%]!<%H$7$F$$$J$$!#(B $B>o$K%(%i!<(B ( EG_NOSPT )$B$rLa$9!#(B

    gunc_bmp
    Uncompress Bitmap
    $B05=L%S%C%H%^%C%W$NI|85(B

    $B05=L7A<0$,(B NOCOMPAC $B0J30$N>l9g!"(B $B>o$K%(%i!<(B ( EG_NOSPT ) $B$rLa$9!#(B


    2.5 $BJ8;z(B($BNs(B)$BIA2h4X?t(B


    2.5.1 $BIA2h4D6-%l%3!<%I%"%/%;%9(B


    gset_chc
    Set Character Color
    $BJ8;zIA2h%+%i!<$N@_Dj(B

    $B%0%l!<%9%1!<%k%U%)%s%H$,E,MQ$5$l$k>l9g$K!"(B $BJ8;zA07J?'!"J8;zGX7J?'$,%0%i%G!<%7%g%s?'$N@8@.$K;HMQ$5$l$k!#(B $BF)L@?'$,;XDj$5$l$F$$$k>l9g$G$b!"(B $B@_DjCM$N:G>e0L%S%C%H$r(B 0 $B$H$7$F2r


    2.6 $B%]%$%s%?@)8f4X?t(B


    2.6.2 $B%]%$%s%?$N>uBV!?7A>u(B


    $B%]%$%s%?$NA07J?'$HGX7J?'$N;XDj$O%T%/%;%kCM$@$1$G$O$J$/(B $B@dBP%+%i!


    $BBh(B3$B>O(B $B303L(B


    3.1 $B%&%#%s%I%&%^%M!<%8%c(B


    $B!T(BR4 $B$G$NJQ99FbMF!U(B

    • $B%0%k!<%W=>B0%&%#%s%I%&$N5!G=$,DI2C$5$l$?!#(B
      WA_GROUP $BB0@-$r;}$D=>B0%&%#%s%I%&$O!"%0%k!<%WuBV$N@Z$j49$($K1~$8$F!"<+F0E*$K?F%&%#%s%I%&$,@Z$jBX$o$j!"%0%k!<%WuBV$N$H$-$O!">o$KI=<($5$l$k$h$&$K$J$k!#(B
    • $B%&%#%s%I%&B0@-$K(B WA_THIN, WA_NOFRAME $B$,DI2C$5$l$?!#(B
      WA_THIN $B$G%&%#%s%I%&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I%&$rJD$8$?;~E@$G(B $B2r=|$5$l$k!#(B
      • $BJQ99!"%G%P%$%9@ZCG$J$I$G$O!"%0%k!<%W%&%#%s%I%&$N$=$l$>$l$KBP$7$F(B $B2>?HA`:n%$%Y%s%H$,AwIU$5$l$k!#(B
      • $B?H%^%M!<%8%c$N(Bosta_prc()$B$O!":G=i$K3+$$$?%0%k!<%W%&%#%s%I%&$KBP$7$F$N$_(B 1 $B2s$@$1oend_prc()$B$O!":G8e$N%0%k!<%W%&%#%s%I%&$rJD$8$?;~E@$G$N$_(B 1 $B2s$@$1


        3.1.1.4 $B%&%#%s%I%&$NA`:n(B


        $B""(B $B%&%#%s%I%&B0@-(B

        $B0J2<$N@bL@$rDI2C!#(B

        #define	WA_GROUP    0x10000	/* $B%0%k!<%W
        

        WA_GROUP $B$N;XDj$h$j!"%0%k!<%W%&%#%s%I%&$G$"$k$3$H$r;XDj$9$k!#(B $B$3$NB0@-$OB0%&%#%s%I%&$N$H$-$N$_M-8z$G!"(B $BB>$N>l9g$OL5;k$5$l$k!#(B

        WA_THIN $B$r;XDj$7!"$+$DJQ7A2DG=$J$H$-$O!"%9%/%m!<%k%P!<$,$J$$ItJ,$NOH$NI}$,(B $B:Y$/$J$k!#(B

        WA_NOFRAME $B$r;XDj$7!"$+$D%?%$%H%k%P!<$J$7!"JQ7AIT2D$N$H$-$O!"OH$,$J$$(B $B%&%#%s%I%&$H$J$k!#(B

        $B""(B $B%&%#%s%I%&$NI=<(B0@-(B

        $B%&%#%s%I%&$N%G%6%$%s!"?'$O%7%9%F%`$G5,Dj$7$F$$$k$?$a!"(B $B%&%#%s%I%&$NI=<(B0@-$N;XDj$OL5;k$5$l$k!#(B


        3.1.2 $B%&%#%s%I%&$N4IM}(B


        3.1.2.2 $B%&%#%s%I%&%$%Y%s%H(B


        $B!{(B EV_REQUEST

        W_REDISP $B$G$N(B src $B$K0J2<$NCM$rDI2C!#(B

        	src = 0x10 : $B%&%#%s%I%&$NG[?'$,JQ99$5$l$?!#(B
        

        3.1.2.6 $B%&%#%s%I%&>pJs%l%3!<%I(B


        $B%&%#%s%I%&>pJs%l%3!<%I$H$7$FBP1~$7$F$$$k9`L\$O0J2<$NDL$j!#(B

        	R  : $B~9`L\(B ( WI_ATTRIBUTE = 400 )
        WI_WORKBACK	(+ 0)	RW PAT	$BGX7J2hLL$N%Q%?!<%s(B
        WI_PANELBACK	(+ 1)	RW PAT	$B%Q%M%kGX7J$N%Q%?!<%s(B
        WI_HLIGHT	(+ 51)	RW PAT	$B%O%$%i%$%HItJ,$N@~$N%Q%?!<%s(B
        WI_SHADOW	(+ 52)	RW PAT	$B1F$NItJ,$N@~$N%Q%?!<%s(B
        WI_MSGBACK	(+ 53)	RW PAT	$B%7%9%F%`%a%C%;!<%8%Q%M%kGX7J$N%Q%?!<%s(B
        WI_ACTFRAME	(+ 54)	RW PAT	$B%"%/%F%#%VB0%&%#%s%I%&OH$N%Q%?!<%s(B
        WI_FRONTFRAME	(+ 57)	RW PAT	$BA0LL%&%#%s%I%&OH$N%Q%?!<%s(B
        WI_MAINMENU	(+ 58)	RW PAT	$B%a%$%s%a%K%e!$N%Q!<%DNN0h$N%Q%?!<%s(B
        WI_VOLKNOB	(+ 64)	RW PAT	$B%\%j%e!<%`$N%N%V$N%Q%?!<%s(B
        WI_VOLBACK	(+ 65)	RW PAT	$B%\%j%e!<%`GX7J$N%Q%?!<%s(B
        WI_INDON	(+ 66)	RW PAT	ON$B>uBV$N%$%s%8%1!<%?$N%Q%?!<%s(B
        WI_INDONF	(+ 67)	RW PAT	ON$B>uBV$N%$%s%8%1!<%?OH$N%Q%?!<%s(B
        WI_INDOFF	(+ 68)	RW PAT	OFF$B>uBV$N%$%s%8%1!<%?$N%Q%?!<%s(B
        WI_INDOFFF	(+ 69)	RW PAT	OFF$B>uBV$N%$%s%8%1!<%?OH$N%Q%?!<%s(B
        WI_PEMPHAS	(+ 70)	RW PAT	$B%Q!<%D6/D4?'$N%Q%?!<%s(B
        WI_PTOMBO	(+ 71)	RW PAT	$B%\%j%e!<%`$N%H%s%\$N%Q%?!<%s(B
        WI_SBARKNOB	(+ 72)	RW PAT	$B%9%/%m!<%k%P!<$N%N%V$N%Q%?!<%s(B
        WI_SBARBACK	(+ 73)	RW PAT	$B%9%/%m!<%k%P!uBV$N%$%s%8%1!<%?$N%Q%?!<%s(B
        WI_MINDONF	(+ 76)	RW PAT	$B%a%K%e!<$N(BON$B>uBV$N%$%s%8%1!<%?OH$N%Q%?!<%s(B
        WI_MINDOFF	(+ 77)	RW PAT	$B%a%K%e!<$N(BOFF$B>uBV$N%$%s%8%1!<%?$N%Q%?!<%s(B
        WI_MINDOFFF	(+ 78)	RW PAT	$B%a%K%e!<$N(BOFF$B>uBV$N%$%s%8%1!<%?OH$N%Q%?!<%s(B
        WI_PANELFRAME	(+ 79)	RW PAT	$BI8=`%Q%M%k$NOH$N%Q%?!<%s(B
        WI_POPUPFRAME	(+ 80)	RW PAT	$B%]%C%W%"%C%W%&%#%s%I%&$NOH$N%Q%?!<%s(B
        WI_PANELWARN	(+ 82)	RW PAT	$B7Y9p%Q%M%k$NOH$N%Q%?!<%s(B
        WI_PANELFATAL	(+ 83)	RW PAT	$BCWL?E*%(%i!<%Q%M%k$NOH$N%Q%?!<%s(B
        
        $B!{(B $B$=$NB>(B ( WI_OTHER = 500 )
        WI_LASTCARPOS	(+ 0)	R  PNT	  $B:G8e$K%+%l%C%H$,I=<($5$l$?@dBP:BI8(B
        WI_LASTCARTIME	(+ 1)	R  W	  $B:G8e$K%+%l%C%H$,I=<($5$l$?%7%9%F%`;~9o(B
        WI_ACTWTFCOL	(+ 50)	RW COLOR  $B%"%/%F%#%V%&%#%s%I%&$NA07J%?%$%H%k?'(B
        WI_ACTWTBCOL	(+ 51)	RW COLOR  $B%"%/%F%#%V%&%#%s%I%&$NGX7J%?%$%H%k?'(B
        WI_INACTWTFCOL	(+ 52)	RW COLOR  $B%$%s%"%/%F%#%V%&%#%s%I%&$NA07J%?%$%H%k?'(B
        WI_INACTWTBCOL	(+ 53)	RW COLOR  $B%$%s%"%/%F%#%V%&%#%s%I%&$NGX7J%?%$%H%k?'(B
        WI_ACTWDTFCOL	(+ 54)	RW COLOR  $B%"%/%F%#%V5u?H%&%#%s%I%&$NA07J%?%$%H%k?'(B
        WI_ACTWDTBCOL	(+ 55)	RW COLOR  $B%"%/%F%#%V5u?H%&%#%s%I%&$NGX7J%?%$%H%k?'(B
        WI_INACTWDTFCOL	(+ 56)	RW COLOR  $B%$%s%"%/%F%#%V5u%&%#%s%I%&$NA07J%?%$%H%k?'(B
        WI_INACTWDTBCOL	(+ 57)	RW COLOR  $B%$%s%"%/%F%#%V5u?H%&%#%s%I%&$NGX7J%?%$%H%k?'(B
        WI_ACTMENUCOL	(+ 58)	RW COLOR  $B5v2D>uBV$NI8=`%a%K%e!uBV$NI8=`%a%K%e!uBV$NHFMQ%a%K%e!uBV$NHFMQ%a%K%e!?H$N%G%U%)!<%k%H$N%?%$%H%kGX7J?'(B
        WI_FSTITLE	(+ 80) 	RW FSSPEC $B%&%#%s%I%&%?%$%H%kJ8;z=qBN(B
        WI_FSMENU	(+ 81) 	RW FSSPEC $B%a%K%e!?HJ8;z=qBN(B
        
        • $B%Q%?!<%s9=B$BN(B(PAT)$B$Nsize $B$,ITB-$7$?>l9g$O!"@hF,ItJ,$N$_$rZ$5$l$J$$!#(B
        • $B%Q%?!<%s9=B$BN(B(PAT)$B$N@_Dj$K$*$$$F!"(Bsize $B$O0UL#$r;}$?$J$$$,!"(Bp $B$N%"%I%l%9$+$i(B size $B%P%$%H$N%"%/%;%9$,$G$-$J$$>l9g$O(B EX_ADR $B$N%(%i!<$H$J$k!#(B
        • $B%Q%?!<%s9=B$BN(B(PAT)$B$H$7$F!"(Bmpat $B$r@_Dj$9$k>l9g!"(B $B%S%C%H%^%C%W$N7A<0$O%9%/%j!<%s$N7A<0$HF1$8$G$J$/$F$O$$$1$J$$!#(B
        • $B=$>~9`L\(B(WI_WORKBACK $B$r=|$/3F$N9`L\(B($B?'!"=qBN(B)$B$N@_Dj$O!"@_Dj8e$N:FI=<($N;~E@$GH?1G$5$l$k$,!"9`L\$K$h$C$F$O%"%W%j%1!<%7%g%sB&$NBP1~$K0MB8$9$k!#(B
        • $B$=$NB>$N9`L\$N?'$N@_Dj$O@dBP(BRGB$B7A<0$G$J$/$F$O$$$1$J$$!#$^$?!"J8;z=qBN(B(FSSPEC) $BFb$NJ8;z%5%$%:$O0UL#$r;}$?$:!"@_Dj$7$F$bL5;k$5$l$k!#(B
        • $B=$>~9`L\$NHV9f(B + 5000 $B$r;XDj$9$k$H!";XDj$7$?%Q%?!<%s$N>e$KJ8;z$r3,D4I=<((B $B$9$k:]$NJ8;zGX7J?'$r #define WI_GSBGC(n) (5000 + (n)) /* R BG COLOR */
      • $B=$>~9`L\(B($B3Fwopn_wnd(), wset_bgp(), wchg_dsp() $B$NGX7J%Q%?!<%s$H$7$FD>@\;XDj$9$k$3$H$,$G$-$k!#(B ($BNc(B: (PAT*)WI_PANELBACK)

      3.1.4 $B%&%#%s%I%&%^%M!<%8%c$N4X?t(B


      wopn_wnd
       
      $B%&%#%s%I%&$N@8@.(B

      $B%&%#%s%I%&$NI=<(B0@-(B (atr) $B$N;XDj$OL5;k$5$l$k!#(B
      WA_GROUP $B$r;XDj$7$?>l9g!"(Bpar, org $B$O!"%0%k!<%W%&%#%s%I%&$N$=$l$>$l$N%*!<%W%s;~$KF1$8CM$r@_Dj$7$J$/$F$O$$$1$J$$!#(B

      wcls_wnd
       
      $B%&%#%s%I%&$N:o=|(B

      $B?F%&%#%s%I%&$,B8:_$7$J$$F~NOuBV$N%&%#%s%I%&$r%/%m!<%:$7$?>l9g$N@bL@$r!"(B $B0J2<$N$h$&$KJQ99$9$k!#(B

      $B?F%&%#%s%I%&$,B8:_$7$J$$F~NOuBV$N%&%#%s%I%&$r%/%m!<%:$7$?>l9g$O!"(B $B$b$C$H$bEV_SWITCH $B$,Aw$i$l$FF~NOuBV$,0\9T$9$k!#(B $B$J$*!"$3$N>l9g$O@[email protected]$OB8:_$7$J$$$b$N$H$_$J$5$l$k!#(B

      wget_evt
       
      $B%&%#%s%I%&!&%$%Y%s%H$N

      $B!Z%Q%i%a!<%?![(B

      WVENT   *evt    $B
      
      

      $B!Z2r@b![(B

      mode $B$K$h$j0J2<$N$h$&$K?6$kIq$&!#(B

      MSG :
      $B%"%/%F%#%V!&%W%m%;%9$N;~(B:
      $B%$%Y%s%H$,H/@8$9$k$^$GBT$C$F!"%$%Y%s%H$ruBV$G$J$$%&%#%s%I%&$GH/@8$7$?>l9g$G$b!"(B EV_SWITCH $B$rH/@8$;$:!"(BEV_BUTDWN $B$H$7$FLa$9(B ( $BF~NOuBV$N@Z49$O9T$J$o$J$$(B ) $B!#(B W_REDISP $B0J30$N(B EV_REQUEST $B$O $B%U%m%s%H%(%s%I%W%m%;%9$,B8:_$9$k;~$O!"(B WAIT $B;XDj$HF1$8=hM}$r9T$J$&!#(B
      $B%U%m%s%H%(%s%I%W%m%;%9$N;~(B:
      WAIT $B;XDj$N>l9g$HF1$8!#(B
      $BHs%"%/%F%#%V!&%W%m%;%9$N;~(B:
      $BBT$A>uBV$H$J$k!#(B
      MSG|NOWAIT:MSG $B;XDj$KBP$7$F!"0J2<$NE@$,0[$J$k!#(B
      • $B%"%/%F%#%V!&%W%m%;%9$N;~$G!"%$%Y%s%H$,H/@8$7$F$$$J$$>l9g$K$O!"(B $B4X?tCM$H$7$F(B EV_NULL $B$,JV$k!#(B
      • $BHs%"%/%F%#%V!&%W%m%;%9$N;~$O!"(B $B4X?tCM$H$7$F(B EV_NOMSG $B$,JV$k!#(B
      DSPEVT :
      $B%"%/%F%#%V!&%W%m%;%9$N;~(B:
      $B:FIA2hMW5a%$%Y%s%H$N$_$rEV_NOMSG $B$rJV$9!#(B $B%U%m%s%H%(%s%I%W%m%;%9$,B8:_$9$k;~$O!"(B WAIT $B;XDj$HF1$8=hM}$r9T$J$&!#(B
      $B%U%m%s%H%(%s%I%W%m%;%9$N;~(B:
      WAIT $B;XDj$N>l9g$HF1$8!#(B
      $BHs%"%/%F%#%V!&%W%m%;%9$N;~(B:
      $B:FIA2hMW5a%$%Y%s%H$N$_$rEV_NOMSG $B$rJV$9!#(B
      DSPEVT|NOWAIT:DSPEVT $B;XDj$HF1$8F0:n$r$9$k!#(B
      wugt_evt2
       
      $B%&%#%s%I%&!&%$%Y%s%H$NLa$7(B (2)

      $B!Z7A<0![(B

      ERR wugt_evt2(WEVENT *evt)
      

      $B!Z%Q%i%a!<%?![(B

      WEVENT  *evt    $B%&%#%s%I%&!&%$%Y%s%H(B
      

      $B!Z%j%?!<%sCM![(B

      $B!f(B 0  $B@5>o(B
      $B!c(B 0  $B%(%i!<(B($B%(%i!<%3!<%I(B)
      

      $B!Z2r@b![(B

      *evt $B$K3JG<$5$l$F$$$k%&%#%s%I%&!&%$%Y%s%H$rLa$7$F!"(B $BWAIT $B$^$?$O(B NOMSG $B$^$?$O(B MSG $B$N%b!<%I$Gwget_evt() $B4X?t$G$N%b!<%I$Gl9g$O

      $BLa$7$?%$%Y%s%H$O!"DL>o$N%$%Y%s%H$KM%@h$7$F

      wugt_evt()$B$GLa$7$?%$%Y%s%H$H$OJL$K!"(B1 $B%W%m%;%9$G:GBg(B16$B8D$N%&%#%s%I%&!&%$%Y%s%H$r%$%Y%s%H%-%e!<$KLa$9$3$H$,$G$-$k!#(B $BF1;~$K;HMQ$G$-$k%W%m%;%9$O%&%#%s%I%&?t8D$^$G$G$"$j!"(B $B$=$l0J>e$O%(%i!<(B ( EX_NOSPC ) $B$H$J$k!#(B

      wugt_evt2() $B$GLa$7$?%$%Y%s%H$,!"(Bwget_evt() $B$Gl9g!"(B $B%U%m%s%H%(%s%I!&%W%m%;%9$K$OEO$5$l$J$$!#(B

      $B$3$N=hM}$O(B1$B$D$N%W%m%;%9Fb$G9T$J$o$l$k$?$a!"(B $BLa$7$?%$%Y%s%H$O!"B>$N%W%m%;%9$+$i$N(B wget_evt() $B$G$O

      $B%W%m%;%9$,=*N;$7$?>l9g$O!"(B $B$=$N%W%m%;%9$K$h$C$FLa$5$l$?%$%Y%s%H$O<+F0E*$K

      $B$3$N4X?t$O!"%Q!<%D$N=hM}$G4|BT30$N%$%Y%s%H$,F@$i$l$?>l9g!"(B $B$=$N%$%Y%s%H$r0lC6La$7$F!"(B $BDL>o$N%$%Y%s%H%k!<%W$KLa$C$?8e!"(B wget_evt() $B$G

      wugt_evt2() $B$O!"(B $BFCo%"%W%j%1!<%7%g%s$O;HMQ$7$J$$!#(B

      $B!Z%(%i!<%3!<%I![(B

      EX_ADR      : $B%"%I%l%9(B(evt)$B$N%"%/%;%9$O5v$5$l$F$$$J$$!#(B
      EX_NOSPC    : $B%7%9%F%`$N%a%b%jNN0h$,ITB-$7$?(B
                    ($BLa$7$?%$%Y%s%H$,(B16$B8D0J>e(B)$B!#(B
      
      wget_sts
       
      $B%&%#%s%I%&>uBV$N

      wid $B$H$7$F%Q%M%k(BID $B$r;XDj$9$k$3$H$K$h$j!"%Q%M%k$N>uBV$rl9g!"(Bstat->r$B0J30$NCM$O0UL#$r;}$?$J$$!#(B

      $B!Z2r@b![$N9`$N8eH>$K$"$k!"0J2<$N5-=R(B:

      $BA4LL%b!<%I$N>l9g$K(B stat->attr $B$K(B WA_FULL $B$,%;%C%H$5$l$k!#(B $B$^$?(B stat->attr $B$K$h$C$F!"(B WA_STD $B;XDj;~$K$O@55,:BI8$,!"(B WA_WORK $B;XDj;~$K$O:n6HNN0h:BI8$,!"(B WA_FRAME $B;XDj;~$K$O30OH:BI8$,!"(B stat->r $B$K3JG<$5$l$k!#(B
      $B$r!"0J2<$N$h$&$KJQ99$9$k!#(B
      $B$^$?!"(Bwopn_wnd()$B$K$h$C$F;XDj$5$l$?%&%#%s%I%&B0@-$K$h$C$F!"(B WA_STD $B$,;XDj$5$l$F$$$k;~$K$O@55,:BI8$,!"(B WA_WORK $B$,;XDj$5$l$F$$$k;~$K$O:n6HNN0h:BI8$,!"(B WA_FRAME $B$,;XDj$5$l$F$$$k;~$K$O30OH:BI8$,!"(B stat->r $B$K3JG<$5$l$k!#(B
      wchg_dsp
       
      $B%&%#%s%I%&$N%G%U%)!<%k%HI=<(B0@-$NJQ99(B

      $B%&%#%s%I%&$NI=<(B0@-(B (atr) $B$N;XDj$OL5;k$5$l$k!#(B

      wera_wnd
       
      $B%&%#%s%I%&$NGX7J%Q%?!<%s$G$NEI$jDY$7(B

      wid $B$H$7$F%Q%M%k(BID $B$r;XDj$9$k$3$H$K$h$j!"%Q%M%kFb$r%Q%M%kGX7J$GEI$jDY$95!G=(B $B$rDI2C!#(B
      $B%&%#%s%I%&$d%Q%M%k$NGX7J%Q%?!<%s$,JQ99$5$l$k$3$H$KBP1~$9$k$?$a$K!"(B wera_wnd()$B$r;HMQ$7$F!"%&%#%s%I%&$d%Q%M%kFb$r>C5n$9$k$3$H$,(B $BK>$^$7$$!#$?$@$7!"(Bwera_wnd()$B$O!"(Bgset_vis()$B$G(B $B@_Dj$7$?%/%j%C%T%s%0$,Mx$+$J$$E@$KCm0U$9$kI,MW$,$"$k!#(B


      3.2 $B%a%K%e!<%^%M!<%8%c(B


      $B!T(BR4 $B$G$NJQ99FbMF!U(B

      • $BI8=`%a%K%e!<$r(B3$BCJ0J>e$N9=@.$H$9$k5!G=$,DI2C$5$l$?!#(B
      • $BB0@-%3!<%I$H$7$F!"(BMC_EATTR$B!"(BMC_MENU(n) $B$,DI2C$5$l$?!#(B
      • $BB0@-%3!<%I$,!"(BMC_FIG $B$N$H$-!"%^%9%/IU$-(B BMAP_DATA $B$KBP1~$7$?!#(B
        $B%^%9%/IU$-(B BMAP_DATA $B$N9=B$$K4X$7$F$O!"%G!<%?%^%M!<%8%c$N%T%/%H%0%i%`%$%a!<%8$N9`$r;2>H$N$3$H!#(B

      3.2.1 $B%a%K%e!<%^%M!<%8%c$N5!G=(B


      3.2.1.4 $BI8=`%a%K%e!<$N%G!<%?9=B$(B

      $B9`L\%j%9%H$N9=B$(B

      $BI8=`%a%K%e!<$r(B3$BCJ0J>e$N9=@.$H$9$k$?$a$K0J2<$N5!G=$,DI2C$5$l$?!#(B
      • MENUITEM $BG[Ns$KDj5A$5$l$F$$$k%a%K%e!<9`L\%j%9%H$N@hF,$,!"(BMC_MENU(n) $B$N$H$-$O!"B9%a%K%e!<9`L\$H8+$J$5$l!"?F%a%K%e!<$K$OI=<($5$l$J$$!#(B
        $B$?$@$7!"?F9`L\HV9f!";R9`L\HV9f$O3d$jEv$F$i$l!"DL>o$N;R%a%K%e!<$HA4$/F1MM$K #define MC_MENU(n) (0x1004 + ((n) << 4)) n : 1 $B!A(B 63
    • $B;R%a%K%e!<9`L\Fb$K!"(BMC_MENU(n) $B$r5-=R$9$k$H!"BP1~$7$?B9%a%K%e!<9`L\$r;2>H$9$k(B3$BCJ0J>e$N%a%K%e!<$H$J$k!#(B
    • MC_MENU(n) $B$K$O!"(BMC_INACT, MC_EMPHAS, MC_EATTR, MC_EATTR, MC_FIG $B$N;XDj$rF1;~$K9T$&$3$H$,$G$-$k!#(B
    • R4$B$N

      $BB0@-%3!<%I$H$7$F!"3HD%J8;zB0@-;XDj%3!<%I(B(MC_EATTR) $B$,DI2C$5$l$?!#(B
      MC_EATTR (0x1008) $B$ND>8e$K!"0J2<$N(B 20$B%P%$%H8GDj$N%G!<%?$,$/$k!#:G=i$N(B 12 $B%P%$%H$O(B MC_ATTR $B$K$h$kJ8;zB0@-$HF10l$G$"$k!#(B

      	COLOR	chcol		-- $BJ8;z?'$N;XDj(B
      				   (W)chcol < 0 $B$H$-$O;XDj$J$7(B
      	H	class		-- $BJ8;z%/%i%9$N2<0L(B16$B%S%C%H$N;XDj(B
      				   class == -1 $B$N$H$-$O;XDj$J$7(B
      	UH	attr		-- $BJ8;zB0@-$N2<0L(B16$B%S%C%H$N;XDj(B
      	PNT	csize		-- $BJ8;z%5%$%:$N;XDj(B
      				   csize.x > 0 $B$+$D(B csize.y > 0 $B$N$H$-$N$_M-8z(B
      	UH	eclass 		-- $BJ8;z%/%i%9$N>e0L(B16$B%P%$%H$N;XDj(B
      	UH	eattr  		-- $BJ8;zB0@-$N>e0L(B16$B%S%C%H$N;XDj(B
      	TC	fontnm[12] 	-- $B%U%)%s%H%U%!%_%jL>(B
      				   $B6uJ8;zNs$N$H$-$O;XDj$J$7(B
      
      $B9`L\%j%9%H$N@hF,$K3HD%J8;zB0@-;XDj%3!<%I$,$"$k>l9g!"$=$N;XDj$O0J9_$N9`L\%j%9%HA4BN$KM-8z$H$J$k$?$a!"F1$8B0@-$N$H$-$K9`L\$4$H$KB0@-%3!<%I$rF~$l$kI,MW$O$J$$!#(B

      $BB0@-%3!<%I(B ( $B%a%?%3!<%I(B ) $B$O!"(B $B6h@Z$jJ8;z$H$7$F$N0UL#$H!"(B $BB3$/9`L\$NB0@-;XDj$N0UL#$r;}$A!"B0@-%3!<%I$N=P8=$K$h$C$F%7%9%F%`%9%/%j%W%H$X$N@Z$jBX$($b9T$o$l$k!#$7$?$,$C$F!"$=$l$>$l$N9`L\J8;zNs$O!"@hF,$K8@8l@Z$jBX$(%3!<%I$,$J$$>l9g!"%7%9%F%`%9%/%j%W%H$G;O$^$k$b$N$H2r


      3.2.3 $B%a%K%e!<%^%M!<%8%c$N4X?t(B


      mchg_dsp
       
      $BI8=`%a%K%e!<$N%G%U%)%k%HI=<(B0@-$NJQ99(B

      $BI8=`%a%K%e!<$N%G%6%$%s!"?'$O%7%9%F%`$G5,Dj$7$F$$$k$?$a!"(B $B$3$N4X?t$K$h$k%G%U%)%k%HI=<(B0@-$NJQ99$OL5;k$5$l$k!#(B ($B%(%i!<$H$O$J$i$J$$!#(B)


      3.3 $B%Q!<%D%^%M!<%8%c(B


      $B!T(BR4 $B$G$NJQ99FbMF!U(B

      • $BB0@-%3!<%I$H$7$F!"(BMC_EATTR $B$,DI2C$5$l$?!#(B
        MC_EATTR $B$K4X$7$F$O!"%a%K%e!<%^%M!<%8%c$N>O$N@bL@$r;2>H$N$3$H!#(B
      • $BB0@-%3!<%I$,!"(BMC_FIG $B$N$H$-!"%^%9%/IU$-(B BMAP_DATA $B$KBP1~$7$?!#(B
        $B%^%9%/IU$-(B BMAP_DATA $B$N9=B$$K4X$7$F$O!"%G!<%?%^%M!<%8%c$N>O$N%T%/%H%0%i%`%$%a!<%8$K@bL@$r;2>H$N$3$H!#(B

      3.3.1 $B%Q!<%D%^%M!<%8%c$N5!G=(B


      3.3.1.3 $B%Q!<%D$N%G!<%?9=B$(B


      $BJ8;zB0@-;XDj%3!<%I$N(B class $B$H(B attr $B$O(B 16bits $BI}$H$9$k!#$9$J$o$A(B:

              COLOR   chcol  -- $BJ8;z?';XDj(B (-1$B$OJ8;z?';XDjL5$7(B)
              H       class  -- $B%U%)%s%H%/%i%9;XDj(B (-1$B$O%G%U%)%k%H%U%)%s%H(B)
              UH      attr   -- $B%U%)%s%HB0@-;XDj(B (0$B$ODL>oBN(B)
              PNT     csize  -- $B%U%)%s%H%5%$%:;XDj(B
                                (csize.c.h $B$^$?$O(B csize.c.v $B$,(B0$B0J2<$O%G%U%)%k%H%5%$%:(B)
      

      3.3.1.4 $B%Q!<%D$N>uBV(B


      • $BI=<((B / $BA`:n>uBV(B :
        $B%I%i%C%0Cf$NCfCG(B:P_DRAGBREAK =1: $BCfCG$9$k(B
        0: $BCfCG$7$J$$(B

      $B%Q!<%D$NE@LG$O%5%]!<%H$7$F$$$J$$$?$a!"E@LG>uBV(B (P_BLINK) $B$N;XDj$OL5;k$5$l$k!#(B
      $B$=$N$?$a!"0J9_$N8D!9$N%Q!<%D$G$NE@LG>uBV$N@bL@$O$9$Y$F0UL#$r;}$?$J$$!#(B

      3.3.2 $B%Q!<%D$N

      3.3.2.1 $B%F%-%9%H!&%\%C%/%9(B

      $B""(B $BDj5A9=B$(B
      • text $B$O=i4|$NI=<(J8;zNs$X$N%]%$%s%?$G$"$j!"(B $B=i4|I=<(J8;zNs$O!"@hF,$K8@8l@Z$jBX$(%3!<%I$,$J$$>l9g!"%7%9%F%`%9%/%j%W%H$G;O$^$k$b$N$H2r

      • txsize$B$O!"(B $BF~NO2DG=$J:GBg$NJ8;z?t$G$"$k(B ( TNULL $B$r4^$`(B)$B!#(B $B8@8l;XDj%3!<%I$bJ8;z$H$7$F?t$($k$?$a!"l9g$,$"$k!#(B

      3.3.2.2 $B%7!<%/%l%C%H!&%F%-%9%H!&%\%C%/%9(B

      $B""(B $BDj5A9=B$(B
      • text$B$O=i4|$NI=<(J8;zNs$X$N%]%$%s%?$G$"$j!"(B $B=i4|I=<(J8;zNs$O!"@hF,$K8@8l@Z$jBX$(%3!<%I$,$J$$>l9g!"%7%9%F%`%9%/%j%W%H$G;O$^$k$b$N$H2r

      • txsize $B$O!"F~NO2DG=$J:GBg$NJ8;z?t$G$"$k(B ( TNULL $B$r4^$`(B)$B!#(B $B8@8l;XDj%3!<%I$bJ8;z$H$7$F?t$($k$?$a!"l9g$,$"$k!#(B

      3.3.2.4 $B%7%j%"%k!&%\%C%/%9(B

      $B""(B $BDj5A9=B$(B
      • fmt $B$OI=<(%U%)!<%^%C%H$r;XDj$9$k%o!<%I%G!<%?Ns$G$"$j!"(B $BI=<(%U%)!<%^%C%H;XDj$O!"@hF,$K8@8l@Z$jBX$(%3!<%I$,$J$$>l9g!"%7%9%F%`%9%/%j%W%H$G;O$^$k$b$N$H2r

        $B$=$l$>$l$N8GDjJ8;zNs$O!"@hF,$K8@8l@Z$jBX$(%3!<%I$,$J$$>l9g!"%7%9%F%`%9%/%j%W%H$G;O$^$k$b$N$H2r

        $B$=$l$>$l$N8uJd9`L\$O!"@hF,$K8@8l@Z$jBX$(%3!<%I$,$J$$>l9g!"%7%9%F%`%9%/%j%W%H$G;O$^$k$b$N$H2r

      3.3.2.5 $B%F%-%9%H!&%*%k%?%M!<%H!&%9%$%C%A(B

      $B""(B $BDj5A9=B$(B
      • name $B$O%9%$%C%AL>J8;zNs$X$N%]%$%s%?$G$"$j!"(B $B%9%$%C%AL>J8;zNs$O!"@hF,$K8@8l@Z$jBX$(%3!<%I$,$J$$>l9g!"%7%9%F%`%9%/%j%W%H$G;O$^$k$b$N$H2r

      3.3.2.6 $B%F%-%9%H!&%b!<%a%s%?%j!&%9%$%C%A(B

      $B""(B $BDj5A9=B$(B
      • name $B$O%9%$%C%AL>J8;zNs$X$N%]%$%s%?$G$"$j!"(B $B%9%$%C%AL>J8;zNs$O!"@hF,$K8@8l@Z$jBX$(%3!<%I$,$J$$>l9g!"%7%9%F%`%9%/%j%W%H$G;O$^$k$b$N$H2r

      3.3.2.9 $B%9%$%C%A!&%;%l%/%?(B

      $B""(B $BDj5A9=B$(B
      • name $B$O3FA*Br;h$NJ8;zNs$rB0@-%3!<%I$G6h@Z$C$F7R$2$?$b$N$G$"$k!#(B $B$=$l$>$l$NA*Br;h$O!"@hF,$K8@8l@Z$jBX$(%3!<%I$,$J$$>l9g!"%7%9%F%`%9%/%j%W%H$G;O$^$k$b$N$H2r

      3.3.2.10 $B%9%/%m!<%k%;%l%/%?(B

      $B""(B $BDj5A9=B$(B
      • name $B$O3FA*Br;h$NJ8;zNs$rB0@-%3!<%I$G6h@Z$C$F7R$2$?$b$N$G$"$k!#(B $B$=$l$>$l$NA*Br;h$O!"@hF,$K8@8l@Z$jBX$(%3!<%I$,$J$$>l9g!"%7%9%F%`%9%/%j%W%H$G;O$^$k$b$N$H2rl9g$O!"B0@-%3!<%I$ND>8e$K%U%#!<%k%I;XDj$,B3$/$b$N$H2rl9g!":G=i$N%U%#!<%k%I$,I8=`J8;zI}$G(B4$B7eJ,!"l9g!"C1$J$kJ8;z$H$7$F07$o$l$k!#(B

      3.3.2.11 $B%\%j%e!<%`(B

      $B""(B $BI=<((B
      • $B8+$($F$$$kItJ,$,$4$/$o$:$+$N>l9g$O!"(B $B%N%V$O0J2<$N$h$&$K$J$j!"$3$l0J>e05=L$5$l$k$3$H$O$J$$!#(B $B$?$@$7(BP_NONOB$BB0@-$N>l9g$O!";XDjDL$j$NHfN($GI=<($5$l$k!#(B

      $B""(B $B>uBV(B / $BB0@-(B
      P_DRAGBREAK : 0 : $B%I%i%C%0Cf$KCfCG$7$J$$(B
      : 1 : $B%I%i%C%0(B $BCf$KCfCG$9$k(B

      P_DRAGBREAK$B$,%\%j%e!<%`%Q!<%D$KBP$7$F;XDj$5$l$?>l9g!"(Bcact_par()$B$G%\%j%e!<%`$N%8%c%s%W%9%/%m!<%kCf$K!"CM$,JQ2=$9$k$?$S$K%Q!<%D=hM}$,CfCG$9$k!#(B


      3.3.4 $B%Q!<%D%^%M!<%8%c$N4X?t(B


      cdsp_par
       
      $B%Q!<%D$NI=<(@)8f(B

      P_BLINK ($BE@LG(B) $B$N;XDj$O!"%(%i!<(B (EX_PAR)$B$H$J$k!#(B

      cdsp_pwd
       
      $B%&%#%s%I%&Fb%Q!<%D$NI=<(@)8f(B

      P_BLINK ($BE@LG(B) $B$N;XDj$O!"%(%i!<(B (EX_PAR)$B$H$J$k!#(B

      cact_par
       
      $B%Q!<%D$NF0:n

      $B!Z2r@b![(B

      $B%\%j%e!<%`$N>l9g(B

      EV_BUTDWN $B$^$?$O(B EV_SWITCH $B$N>l9g(B :
      • $B!Z%8%c%s%W0\F0![(B

        $B%Q!<%DB0@-$,(BP_DRAGBREAK$B$N>l9g!"(B $B%I%i%C%0$K$h$k8=:_CM$NJQ2=$,H/@8$9$k$H!"0J2<$N4X?tCM$rLa$7$F=hM}$rCfCG$9$k!#(B $B$3$N;~(B *ev $B$N%$%Y%s%H!&%?%$%W$O(B EV_NULL $B$K@_Dj$5$l$k!#(B

          $B4X?tCM(B:0110 0000 0000 10DD
                  D = 0: P_UP     -- $B>eJ}8~(B $B$X$N0\F0(B
                    = 1: P_DOWN   -- $B2
        

        $B%"%W%j%1!<%7%g%s$O!"BP1~$9$k=hM}$r9T$J$C$?8e!"(B $B:F$S(B cact_par() $B$r%3!<%k$9$kI,MW$,$"$k!#(B

      cchg_par
       
      $B%Q!<%D$N>uBV$NJQ99(B

      $B!Z%Q%i%a!<%?![(B

      W   pid     $B%Q!<%D(BID
      UW  cmd     cmd $B$O0J2<$N(B5$BuBV;XDj$NG$0U$NAH9g$;(B (OR) $B$H$J$k!#(B
      
      P_EMPHAS / P_NORMAL-- $B6/D4OH(B / $BDL>oOH(B
      P_NOFRAME / P_FRAME -- $BOHL5$7(B / $BOHM-$j(B
      P_DISABLE / P_ENABLE-- $BA`:n6X;_(B / $BA`:n5v2D(B
      P_INACT / P_ACT -- $BITG=>uBV(B / $B2DG=>uBV(B
      P_DRAGBREAK / P_NODRAGBREAK-- $B%I%i%C%0Cf$KCfCG$9$k(B / $B$7$J$$(B
      cidl_par
       
      $B%Q!<%D$NDj>o=hM}(B

      $B%Q!<%D$NE@LG$O%5%]!<%H$7$F$$$J$$!#(B


      3.4 $B%Q%M%k%^%M!<%8%c(B


      3.4.1 $B%Q%M%k%^%M!<%8%c$N5!G=(B


      3.4.1.5 $B%Q%M%k$N%G!<%?9=B$(B

      $B"((B
      $BJ8;zNs$O!"@hF,$K8@8l@Z$jBX$(%3!<%I$,$J$$>l9g!"(B $B%7%9%F%`%9%/%j%W%H$G;O$^$k$b$N$H2r

      3.4.3 $B%Q%M%k%^%M!<%8%c$N4X?t(B


      pdsp_tim
       
      $B%7%9%F%`%a%C%;!<%8%Q%M%k$N;~9oI=<((B

      $B$3$N4X?t$O%5%]!<%H$7$F$$$J$$!#(B $B>o$K%(%i!<(B ( EG_NOSPT )$B$rLa$9!#(B pact_msg$B$K(B NULL $B%$%Y%s%H$rEO$9$3$H$GF1Ey$N5!G=$,


      3.6 $B%G!<%?%^%M!<%8%c(B


      3.6.2 $B%G!<%?!?Dj?t$NDj5A(B


      3.6.2.2 $BI8=`%G!<%?7A<0(B


      $B""(B $B%T%/%H%0%i%`%$%a!<%8(B (PICT_DATA)

      $B%$%a!<%8$N%^%9%/!"$*$h$SJ#?t%5%$%:$X$N3HD%$r9T$C$?0J2<$N7A<0$N(B $B%T%/%H%0%i%`%$%a!<%8$r%5%]!<%H$7$F$$$k!#(B

          CBMP $B9=B$BN(B
          [ $B%^%9%/%$%a!<%8(B ]
          [$BJL%5%$%:%G!<%?$X$N%*%U%;%C%H(B] $B!]!d(B (a)
          $B%W%l!<%s%$%a!<%8(B #1
                 : :
      
          CBMP $B9=B$BN(B    $B!c!](B (a)
          [ $B%^%9%/%$%a!<%8(B ]
          [$BJL%5%$%:%G!<%?$X$N%*%U%;%C%H(B]  $B!]!d(B (b)
          $B%W%l!<%s%$%a!<%8(B #1 
                 : :
      
      • CBMAP $B9=B$BN$ND>8e$H%W%l!<%s%$%a!<%8(B #1 $B$H$N4V$N%.%c%C%W$K$h$C$F9=B$$rH=CG$9$k!#(B
        $B%.%c%C%W(B = 0                    $B%^%9%/$J$7!"JL%5%$%:%G!<%?$J$7(B
                 = 4                    $B%^%9%/$J$7!"JL%5%$%:%G!<%?$"$j(B
                 = $B%^%9%/%5%$%:(B         $B%^%9%/$"$j!"JL%5%$%:%G!<%?$J$7(B
                 = $B%^%9%/%5%$%:(B + 4     $B%^%9%/$"$j!"JL%5%$%:%G!<%?$"$j(B
        
      • $BJL%5%$%:%G!<%?$X$N%*%U%;%C%H(B(4 $B%P%$%H(B) $B$O!"JL%5%$%:$N(B CBMP $B9=B$BN$X$N%G!<%?$NAjBP%*%U%;%C%H$G!"(B0 $B$O:G8e$r0UL#$9$k!#(B
      • $B%^%9%/%$%a!<%8$O(B planes = 1, pixbits = 0x101 $B$N(B $B%S%C%H%^%C%W!#(B
      • $BJL%5%$%:%G!<%?$X$N%*%U%;%C%H$G<($5$l$k(B CBMP $B9=B$BNFb$N(B baseaddr $B$O%*%U%;%C%H$N$^$^$H$J$C$F$$$k2DG=@-$,$"$k$N$G!"%*%U%;%C%H$+$iCBMP $B9=B$BN$O!"(Bplanes = 4, pixbits = 0x101 $B$N%S%C%H%^%C%W!"$^$?$O!"(Bplanes = 1, pixbits = 0x808 $B$N9=B$$G$J$/$F$O$$$1$J$$!#$^$?!"=D$H2#$N%5%$%:$OF10l$G$J$/$O$$$1$J$$!#(B

      $B""(B $B?^7A%S%C%H%^%C%W%$%a!<%8(B (BMAP_DATA)

      pixbits, rowbytes $B$r(B UH $B$KJQ99$9$k!#(B $B$h$C$F!"!V?^(B 110 : $B?^7A%S%C%H%^%C%W%$%a!<%8!W$O0J2<$N$h$&$K$J$k!#(B

      $B?^7A%S%C%H%^%C%W%$%a!<%8(B
      $B?^(B 110 : $B?^7A%S%C%H%^%C%W%$%a!<%8(B

      3.7 $B%F%-%9%HF~NO%W%j%_%F%#%V(B


      3.7.1 $B%F%-%9%HF~NO%W%j%_%F%#%V$N5!G=(B


      3.7.1.3 $B%F%-%9%HF~NO%]!<%H(B


      TIPREC.caret$B$N%S%C%H9=@.(B:

          xxxx xxxx xxxx xxxx xPPP PPPP PPPP PPPP
      
      $B$r!"0J2<$N$h$&$KJQ99$9$k!#(B
          XPPP PPPP PPPP PPPP PPPP PPPP PPPP PPPP
      


      TIPREC.clause$B$N%S%C%H9=@.(B:

          MXXX XXXX XXXX XXXX XPPP PPPP PPPP PPPP
      
      $B$r!"0J2<$N$h$&$KJQ99$9$k!#(B
          MPPP PPPP PPPP PPPP PPPP PPPP PPPP PPPP
      


      3.7.3 $B%F%-%9%HF~NO%W%j%_%F%#%V$N4X?t(B


      iput_key
       
      $B%F%-%9%HF~NO%]!<%H$X$N%-!

      $B!Z7A<0![(B

      WERR iput_key( W tipid, EVENT *evt )
      
      

      $B!Z2r@b![(B

      tipid $B$G;XDj$7$?%F%-%9%HF~NO%]!<%H$K(B evt $B$G;XDj$7$?%$%Y%s%H$rF~NO$7!"(B $B$=$N7k2L$N%F%-%9%HF~NO%]!<%H$N>uBV$r%*!<%W%s;~$K3d$jEv$F$?(B TIPREC $B$KLa$9!#(B

      $BLaCM$K!"%F%-%9%HF~NO%]!<%H$N>uBVJQ2=Ey$r<($9
      TIP_OUT 0x01 $B3NDjJ8@a$,H/@8$7$?!#(B
      TIP_CNV 0x02 $BL$3NDjJ8;zNs$,JQ99$5$l$?!#(B
      TIP_CAR 0x04 $B%+%l%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
      • $B$h$_F~NOCf$K$h$_$H$7$FF~NO$G$-$J$$J8;z%-!<$,2!$5$l$?>l9g(B(EX_KEY)$B!#(B
      • $B$*$h$S!"$3$l$i$KN`$9$k%f!<%6!<$K7Y9p$9$kI,MW$,$"$kA`:n$,9T$o$l$?$H$-!#(B

      $B%$%Y%s%H$r=hM}$9$kA0$K!"(BTIPREC.n_out $B$G<($5$l$k3NDjJ8@a$O(B TIPREC $B$+$i:o=|$5$l$k!#(B $B%$%Y%s%H$rL5;k$7$?>l9g$bF1MM$K3NDjJ8@a$O:o=|$5$l$k!#(B

      $BJQ99E@(B

      • TIP_PUPREQ, TIP_PUPOPN, TIP_IGNORE $B$rDI2C!#(B
      • EV_KEYDWN, EV_AUTKEY $B0J30$N%$%Y%s%H$O%(%i!<(B (ER_PAR) $B$H$J$C$F$$$?$,!"$+$J4A;zJQ49$KITMW$J%$%Y%s%H$OL5;k$9$k$h$&$KJQ99!#(B
       
      ipup_sel
       
      $B8uJdA*Br%]%C%W%"%C%W$N%*!<%W%s(B ($B?75,DI2C(B)

      $B!Z7A<0![(B

      WERR ipup_sel( W tipid, W pwid, RECT *r )
      
      

      $B!Z2r@b![(B

      tipid $B$G;XDj$7$?%F%-%9%HF~NO%]!<%H$N8uJdA*Br%]%C%W%"%C%W$r3+$/!#(B
      pwid $B$O8uJdA*Br%]%C%W%"%C%W$N?F$H$J$k%&%$%s%I%&$N%&%$%s%I%&(BID$B!#(B
      r $B$O8=:_$NJQ49BP>]J8@a$NNN0h$r<($9:BI8$G!"(B pwid $B$N%&%$%s%I%&$NAjBP:BI8$GI=$o$9!#(B
      r $B$N6aK5$K8uJdA*Br%]%C%W%"%C%W$,I=<($5$l$k!#(B
      $BLaCM$K!"3+$$$?(B($B3+$$$F$$$k(B)$B8uJdA*Br%]%C%W%"%C%W$N%&%$%s%I%&(BID $B$rJV$9!#(B

      iput_key() $B$G(B TIP_PUPREQ $B$,JV$5$l$?$H$-$K(B ipup_sel() $B$r8F$S=P$9$,!"(B $B8uJdA*Br%]%C%W%"%C%W$r3+$/I,MW$,$J$$>l9g$O8F$S=P$5$J$/$F$b$h$$!#(B $B$=$N>l9g$b!"8uJdA*Br%]%C%W%"%C%W$,3+$+$J$$$@$1$G!"$+$J4A;zJQ49$NF0:n<+BN$K$O1F6A$O$J$$!#(B
      iput_key() $B$G(B TIP_PUPREQ $B$,JV$5$l$F$$$J$$>uBV$G(B ipup_sel() $B$r8F$S=P$9$H%(%i!<(B ( EX_NOEXS ) $B$H$J$k!#(B
      $B$9$G$K8uJdA*Br%]%C%W%"%C%W$,3+$$$F$$$k>uBV$G:F$S8F$S=P$7$?>l9g$O!"(B $B8=:_I=<($5$l$F$$$k%]%C%W%"%C%W$N0LCV$,(B r $B$N6aK5$K0\F0$9$k!#(B $B$3$N>l9g!"8=:_I=<(Cf$N%]%C%W%"%C%W$H(B pwid $B$,0[$J$C$F$$$k>l9g$O%(%i!<(B ( EX_PAR )$B$H$J$k!#(B

      ichg_mod
       
      $B%F%-%9%HF~NO%b!<%I$NJQ99(B ($B;EMMJQ99(B)

      $B!Z7A<0![(B

      WERR ichg_mod( W mode )
      
      

      $B!Z2r@b![(B

      mode $B$N(B TIP_ROMAN1 $B$H(B TIP_ROMAN2 $B$O%m!<%^;zF~NO%b!<%I$N;XDj$H$7$FF1$80UL#$H$9$k!#(B n $BJ}<0!"(Bnn $BJ}<0$N6hJL$O9T$o$J$$!#(B $B$7$?$,$C$F!"$+$JF~NO!?%m!<%^;zF~NO$NA*Br$N$_$N5!G=$H$J$k!#(B

      $B$3$N@ZBX$O!"%-!<%\!<%I$N%a%?%-!<>uBV$N(B ES_KBSEL $B$N8=:_>uBV$r$+$JF~NO!?%m!<%^;zF~NO$K9g$o$;$F@Z$jBX$($k!#(B

      ichg_lrn
       
      $B3X=,<-=q$NJ]B8>uBVJQ99(B ($BGQ;_M=Dj(B)

      $B!Z7A<0![(B

      WERR ichg_lrn( UW kind, W stat )
      
      

      $B!Z2r@b![(B

        kind    0x0001  $B6&DL<-=q(B
                0x0002  $BC14A;zJQ49<-=q(B($BL$%5%]!<%H(B)
                0x0004  $B8D?M<-=q(B
                $B$=$NB>(B  $BL$%5%]!<%H(B
      
        stat    0       $B3X=,(B OFF
                1       $B3X=,(B ON
      

      $B"((B $B$3$N5!G=$O!"$+$J4A;zJQ49$N%+%9%?%^%$%:5!G=$KE}9g$5$l$k!#(B $B8_49@-$N$?$a$K;D$C$F$$$k$,!">-MhE*$K$OGQ;_$NJ}8~$K$"$k!#(B

      iopn_tip
       
      $B%F%-%9%HF~NO%]!<%H$N%*!<%W%s(B ($B;EMMJQ99(B)

      $B!Z7A<0![(B

      WERR iopn_tip( TIPREC *tip, W mode )
      
      

      $B!Z2r@b![(B

        mode = ( TIP_DIRMD $B!B(B TIP_CNVMD ) |
               ( TIP_TORIGHT $B!B(B TIP_TOLEFT $B!B(B TIP_TOUP $B!B(B TIP_TODOWN ) |
               [ TIP_TCONLY ]
      
              TIP_DIRMD       0x0100  $BD>@\%b!<%I(B($BJQ49$J$7(B)
              TIP_CNVMD       0x0000  $BJQ49%b!<%I(B
      
      $B?75,(B    TIP_TORIGHT     0x0000  $B2#=q$-(B($B:8$+$i1&(B)
      $B?75,(B    TIP_TOLEFT      0x0010  $B2#=q$-(B($B1&$+$i:8(B)
      $B?75,(B    TIP_TOUP        0x0020  $B=D=q$-(B($B2<$+$i>e(B)
      $B?75,(B    TIP_TODOWN      0x0030  $B=D=q$-(B($B>e$+$i2<(B)
      
      $B?75,(B    TIP_TCONLY      0x0008  $BJ8;z$N$_(B
      
      $BGQ;_(B    TIP_AUTO        0x0000  $B<+F0JQ49%b!<%I(B
      $BGQ;_(B    TIP_MANUAL      0x0001  $B;XDjJQ49%b!<%I(B
      
      TIP_TORIGHT, TIP_TOLEFT, TIP_TOUP, TIP_TODOWN
      $B=q5-J}8~$r;XDj$9$k!#(B
      $B$3$N;XDj$K$h$j!"(B $B$+$J4A;zJQ49$NA`:n$N%-!<3d$jEv$F$*$h$S8uJdA*Br%]%C%W%"%C%W$N7A<0$,!"(B $B$=$N=q5-J}8~$KE,$7$?@_Dj$K$J$k!#(B
      TIP_TCONLY
      $B$3$N;XDj$,$"$k>l9g!"(BTIPREC $B$NJQ49CfJ8;zNs(B (cnv) $B$*$h$S$h$_J8;zNs(B (in) $B$K$OJ8;z%3!<%I$N$_$,3JG<$5$l$k!#(B $B$3$NJ8;zNs$O0l0UI=8=$H$J$k!#(B
      $B$3$N;XDj$,$J$$>l9g$O!"G$0U$N(B TAD $B%;%0%a%s%H$,3JG<$5$l$k!#(B $B$?$@$7!"4IM}>pJs%;%0%a%s%H!"J8>O3+;O!?=*N;%;%0%a%s%H$ODL>o>JN,$5$l$k!#(B $BJ8>O3+;O%;%0%a%s%H$,>JN,$5$l$F$$$k>l9g$O!"(B $B%G%U%)%k%H8@8l$,%7%9%F%`%9%/%j%W%H(B(TSC_SYS)$B$NJ8>O%G!<%?$G$"$k$H$9$k!#(B
      $B"((B $B8=.;XDjIUd5$K$h$kA43Q!?H>3Q$N(B TAD $B%;%0%a%s%H$N$_$,3JG<$5$l$k!#(B

      $B8_49@-$N$?$a!"(BTIP_AUTO $B$H(B TIP_MANUAL $B$N;XDj$OL5;k$9$k!#(B $B$3$N5!G=$O!"$+$J4A;zJQ49$N%+%9%?%^%$%:5!G=$KE}9g$5$l$k!#(B

      $BFC

      $B%-!<3d$jEv$FEy$N%+%9%?%^%$%:$K1F6A$9$k$3$H$J$/;HMQ$G$-$kFCiput_key() $B$NF~NO%$%Y%s%H$H$7$F;HMQ$G$-$k!#(B

        #define TIP_EVENT       0x80000000      /* TIP $BFC
      
      

      $B"((B WEVENT $B$NFbMF$GFC$K5-=R$N$J$$$b$N$O(B 0 $B%/%j%"$7$F$*$/!#(B

      • $B6/@)3NDj(B
          WEVENT.e.type           = TIP_EVENT | EV_KEYDWN
          WEVENT.e.data.key.code  = KC_IEND       0x0004  [$B!{(B]
        

        $BL$3NDjJ8;zNs$r6/@)E*$K$9$Y$F3NDj$9$k!#(B

      • $B6/@):o=|(B
          WEVENT.e.type           = TIP_EVENT | EV_KEYDWN
          WEVENT.e.data.key.code  = KC_DEL        0x007f  [$B:o=|(B]
        

        $BL$3NDjJ8;zNs$r$9$Y$FGK4~$9$k!#(B

      • $B8uJdA*Br(B
          WEVENT.e.type           = TIP_EVENT | EV_KEYDWN
          WEVENT.e.data.key.code  = KC_CNV        0x001e  [$BJQ49(B]
          WEVENT.e.data.key.keytop= 0     $BJQ49F0:n(B($B
             

        keytop = 0 $B$N>l9g$O!"JQ49F0:n(B($B keytop > 0 $B$N>l9g$O!";XDj$7$?8uJdHV9f$N8uJd$rA*Br$9$k!#(B

      • $B WEVENT.e.type = TIP_EVENT | EV_KEYDWN WEVENT.e.data.key.code = KC_PGDN 0x1247 [PgDn]
      • $B

      • $BA08uJd0lMw(B
          WEVENT.e.type           = TIP_EVENT | EV_KEYDWN
          WEVENT.e.data.key.code  = KC_PGUP       0x1246  [PgUp]
        

        $BA0$N8uJd0lMw$rI=<($9$k!#(B


      3.8 $B?H%^%M!<%8%c(B


      3.8.1.4 $B2>?H$NA`:n(B


      $B2>?H$NA`:n(B$B$N9`:G8e$NCJMnKAF,$NJ8(B:

      $B0J2<$O!"%"%W%j%1!<%7%g%s$NIUd5$K4X$9$kI8=`E*$JA`:nJ}K!$N@bL@$G$"$j!"(B $B?H%^%M!<%8%c$G$O!"(B $B$3$l$i$NA`:n$r9T$J$&$?$a$N4pK\E*$J5!G=$rDs6!$7$F$$$k!#(B
      $B$r0J2<$N$h$&$KJQ99$9$k!#(B
      $B0J2<$O!"%"%W%j%1!<%7%g%s$NIUd5$K4X$9$kI8=`E*$JA`:nJ}K!$N@bL@$G$"$j!"(B $B?H%^%M!<%8%c$G$O!"(B $B$3$l$i$NA`:n$r9T$J$&$?$a$N4pK\E*$J5!G=$rDs6!$7$F$$$k!#(B


      3.8.6 $B?H%^%M!<%8%c$N4X?t(B


      b_odup_vob
       
      $B2>?H$NJ#@=(B

      $B4X?tL>(B b_odup_vob $B$r(B odup_vob $B$KJQ99$9$k!#(B

      oget_vob
       
      $B2>?H$N

      $B!Z2r@b![$N:G=*CJMn$K$"$k!"FC

      $BFCvid < 0 $B$N$H$-$O(B - vid $B$r%&%#%s%I%&(BID$B$H$_$J$7!"(B $B$=$N%&%#%s%I%&$r3+$/85$H$J$C$?2>?H$rC5$7$F!"(B $B$=$N2>?H$,B0$9$k%U%!%$%k%7%9%F%`$r(B vlnk $B$K
      apnl_men
       
      $B%Q%M%k%a%K%e!<=hM}(B
      $B!Z2r@b![$NBh(B2$BJ8!"$*$h$SBh(B3$BJ8(B:
      *evt $B$O%Q%M%k$NF0:n *evt $B$,(B EV_KEYDWN $B$N$H$-$O!"(B $B%-!<%a%K%e!<$H$7$F$N=hM}$r9T$J$$!"(B $B$=$&$G$J$$$H$-$O!"0J2<$NFbMF$N%a%K%e!<$r2hLL$KI=<($7$F!"(B $BA*Br$5$l$?9`L\$K1~$8$?=hM}$r9T$J$&!#(B
      $B$r!"0J2<$N$h$&$KJQ99$9$k!#(B
      *epv $B$O%Q%M%k$NF0:n *epv $B$,(B EV_KEYDWN $B$N$H$-$O!"(B $B%-!<%a%K%e!<$H$7$F$N=hM}$r9T$J$$!"(B $B$=$&$G$J$$$H$-$O!"0J2<$NFbMF$N%a%K%e!<$r2hLL$KI=<($7$F!"(B $BA*Br$5$l$?9`L\$K1~$8$?=hM}$r9T$J$&!#(B

      3.9 $B%U%)%s%H%^%M!<%8%c(B


      3.9.2 $B%G!<%?(B / $BDj?t$NDj5A(B


      $B!T(BR4 $B$G$NJQ99FbMF!U(B

      $B%U%)%s%HB0@-$,DI2C$5$l$?!#(B

      /* $B%U%)%s%HB0@-!'8GDj%T%C%AJ8;zOH(B */
      #define		FT_BOUNDLESS	0x00080000	/* $B%$%a!<%8$rJ8;zOH$K<}$a$J$$(B*/
      
      FT_FIXED$B$H6&$K;XDj$7$?>l9g$KM-8z$H$J$j!"J8;z%$%a!<%8$,J8;zOH$r$O$_$@$9>l9g$G$b!"J8;z%$%a!<%8$r0\F0!&=L>.$7$J$$!#(B

      $B%$%s%G%C%/%9!&J8;zI}%G!<%?(B $B$O

      typedef struct {
          UB          widform;        /* $BJ8;zI}Ey%G!<%?$N7A<0(B     */
          UB          idxform;        /* $B%$%s%G%C%/%9%G!<%?7A<0(B   */
          UB          opt;            /* $B%U%)%s%HDj5A%*%W%7%g%s(B   */
          UB          fontnum;        /* $B%U%)%s%HHV9f(B             */
          OFFSET      offwidth;       /* $BJ8;zI}%G!<%?$X$N%*%U%;%C%H(B   */
          OFFSET      offidxtable;    /* $B%$%s%G%C%/%9%G!<%?$X$N%*%U%;%C%H(B */
      } IDXWDATA;
      

      3.9.3 $B%U%)%s%H%^%M!<%8%c$N4X?t(B


      fget_img
       
      $BJ8;z%$%a!<%8>pJs$N

      mode & FT_SYS != 0 $B$N>l9g!"(B $BF@$i$l$?%S%C%H%^%C%W$O!"%U%)%s%H%^%M!<%8%c$,4IM}$9$k%a%b%jNN0h>e$KB8:_$9$k!#(B $BF10l$N%U%)%s%H%G%#%9%/%j%W%?$K$h$k?7$?$J%U%)%s%H%^%M!<%8%c$N%7%9%F%`%3!<%k$r8F$S=P$9$^$G$OB8:_$7$F$$$k$3$H$,J]>Z$5$l$k!#(B $BDL>o$N%"%W%j%1!<%7%g%s$O(B FT_SYS $B$r;XDj$7$F$O$$$1$J$$!#(B


      3.9.5 $BIUO?(B


      $BFCDj$NJ8;z%$%a!<%8%G!<%?$N;XDj(B

      TrueType $B7A<0$NJ8;z%$%a!<%8%G!<%?$N>l9g!"(B $BJ#?t$NJ8;z%$%a!<%8%G!<%?$,0l$D$NJ8;z%$%a!<%8%G!<%?%l%3!<%I$K4^$^$l$k>l9g$,$"$k!#(B $B$3$N>l9g$O!"%U%)%s%HDj5A%G!<%?$N%l%3!<%I!&%5%V%?%$%W!"$b$7$/$O%$%s%G%C%/%9!&J8;zI}%G!<%?$N(B fontnum$B$K$h$j6hJL$9$k!#(B

      $BJ8;zI}!&%$%s%G%C%/%9%G!<%?(B

      $B%$%s%G%C%/%9$rI,MW$H$7$J$$I8=`%I%C%H7A<0%$%a!<%8%G!<%?$N>l9g$K!"J8;z$,L$Dj5A$G$"$k$3$H$rI=$9$?$a$K!"%$%s%G%C%/%9%G!<%?7A<0$H$7$F%S%C%H%^%C%W7A<0$,%5%]!<%H$5$l$F$$$k!#(B

      $B%S%C%H%^%C%W7A<0$O!"%U%)%s%HDj5A%G!<%?$,;XDj$9$k:G=i$NJ8;z%3!<%I$+$i!"(B $BDj5A0hFb$NJ8;zA4$F$K$D$$$F!"L$Dj5A$G$"$k$+$I$&$+$rI=$9%S%C%H%^%C%W$G$"$k!#(B $BDc0L%"%I%l%9$N%P%$%H$N(BMSB($B:G>e0L%S%C%H(B)$B$,:G=i$NJ8;z$KBP1~$9$k!#(B $B%S%C%H$,(B0$B$N>l9g$O!"$=$NJ8;z$,L$Dj5A$G$"$k$3$H$rI=$9!#(B

      $B%S%C%H%^%C%W(B
      $B?^(B : $B%S%C%H%^%C%W(B

      3.10 TCP/IP$B%^%M!<%8%c(B


      $B!T(BR4 $B$G$NJQ99FbMF!U(B

      • so_ioctl() $B$K!"(Bso_select() $B$NBT$A$r2r=|$9$k5!G=$,DI2C$5$l$?!#(B
        WERR  so_ioctl(W s, W reqid , W arg) $B$G!"(B
        reqid == SIOSELTMO (0x80000000|(4 << 16)|('s' << 8)|255) 
        $B$N$H$-!"0J2<$NF0:n$H$J$k!#(B
        
        *((W*)arg) != 0 $B$N$H$-(B
        	s $B$G;XDj$7$?(B $B%=%1%C%H$KBP$9$k%?%$%`%"%&%HMW5a$r%;%C%H$7$F!"(B
        	so_select() $B$r6/@)E*$K%?%$%`%"%&%H$G=*N;$5$;$k!#(B
        	s $B$KBP$7$F!"(Bso_select() $B$,$^$@l9g$K$b!"%?(B
        	$B%$%`%"%&%HMW5a$O%;%C%H$5$l$k$?$a!"(Bso_select() $B$r
        
      • $B%m!<%+%k%[%9%H$KBP1~$7$?!#(B
        $B%[%9%HL>$,!"(B"localhost"$B!"$^$?$O(B IP $B%"%I%l%9$,(B 127.0.0.1 $B$N$H$-!"%m!<%+%k%[%9%H$H$7$F=hM}$9$k$h$&$K$J$C$?!#$?$@$7!"(BPPP $B@\B3Cf$O!"%m!<%+%k%[%9%H$O;HMQ$G$-$J$$!#(B

      3.10.2 TCP/IP


      $B0J2<$NDj5A$,!"(BBSD $B%=%1%C%H$H$N8_49@-8~>e$N$?$aJQ99$5$l$F$$$k!#8_49@-$,$J$$$?$aCm0U$,I,MW$G$"$k!#(B

      /*  getsockopt(), setsockopt() $B$N%*%W%7%g%s(B
      */
      #define IPPROTO_TCP     0x0006      /* options for TCP level */
      #define IPPROTO_IP      0x0000      /* options for IP level */
      
      #define TCP_MAXSEG      0x0002      /* maximum segment size */
      #define TCP_NODELAY     0x0001      /* immediate send() */
      
      /*  ioctl $B$N%*%W%7%g%s(B */
      #define SIOCATMARK      (0x40000000 | (4 << 16) | ('s' << 8) | 7)
                                          /* check for out of bound data */
      #define FIONBIO         (0x80000000 | (4 << 16) | ('f' << 8) | 126)
                                          /* set/clear non-blocking I/O */
      #define FIONREAD        (0x40000000 | (4 << 16) | ('f' << 8) | 127)
                                          /* number of bytes to read */
      
      /* select $B$N%S%C%H%^%9%/(B */
      #define FD_SETSIZE      256
      #define NFDBITS         (sizeof(long) * 8)      /* bits per mask */
      #define FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
      #define FD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
      #define FD_ISSET(n, p)  ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
      #define FD_ZERO(p)      memset((void *)(p), 0, sizeof (*(p)))
      typedef struct fd_set {         /* Bit mask for select() */
              long    fds_bits[(FD_SETSIZE + NFDBITS - 1) / NFDBITS];
      } fd_set;
      

      3.10.4 $B%7%9%F%`%3!<%k(B


      EX_FAULT $B$N%(%i!<$OH/@8$7$J$$!#(BEX_ADR $B$N%(%i!<$H$J$k!#(B

      so_gethostbyname
       
      $BL>A0$K$h$k%[%9%H>pJs$N

      $B!Z2r@b![$N9`Bh(B2$BJ8$K$*$$$F!"(B

      B buf[HBUFLE] $B$GDj5A$5$l$k:n6HNN0h$r;XDj$9$kI,MW$,$"$k!#(B
      $B$H$"$k$,!"$3$l$r0J2<$N$h$&$KJQ99$9$k!#(B
      B buf[HBUFLEN] $B$GDj5A$5$l$k:n6HNN0h$r;XDj$9$kI,MW$,$"$k!#(B

      so_gethostbyaddr
       
      $B%"%I%l%9$K$h$k%[%9%H>pJs$N

      $B!Z2r@b![$N9`Bh(B2$BJ8$K$*$$$F!"(B

      B buf[HBUFLE] $B$GDj5A$5$l$k:n6HNN0h$r;XDj$9$kI,MW$,$"$k!#(B
      $B$H$"$k$,!"$3$l$r0J2<$N$h$&$KJQ99$9$k!#(B
      B buf[HBUFLEN] $B$GDj5A$5$l$k:n6HNN0h$r;XDj$9$kI,MW$,$"$k!#(B


      3.11 $B0u:~%^%M!<%8%c(B


      3.11.1 $B0u:~%^%M!<%8%c$N5!G=(B


      $BKvHx$h$j(B3$BJ8L\$K$"$k0J2<$NJ8(B:

      $B4pK\0u:~%l%$%"%&%?$O!"(B $B0u:~4IM}$r=hM}$r $B$r!"0J2<$N$h$&$KJQ99$9$k!#(B

      $B4pK\0u:~%l%$%"%&%?$O!"(B $B0u:~4IM}$N=hM}$r


      3.11.5 $B%G!<%?(B / $BDj?t$NDj5A(B


      $B""(B $B0u:~;EMM(B(spec)

      PR_PAR $B$N0u:~;EMM(B (spec) $B$K!"(B $B2<5-$N;XDj$,DI2C$5$l$F$$$k!#(B

        #define PR_ROTATE       0x100   /* $BMQ;f2sE>(B */
      

      PR_ROTATE $B$r;XDj$9$k$H!"(B $BMQ;f$r2sE>$7$J$/$F$b0u:~$G$-$k$h$&$J>l9g$K$bMQ;f$r2sE>$5$;$F0u:~$9$k!#(B PR_ROTATE $B$,;XDj$5$l$J$1$l$P!"(B $BMQ;f$r2sE>$7$J$/$F$O0u:~$G$-$J$$$h$&$J>l9g$N$_MQ;f$r2sE>$9$k!#(B $BA*Br$7$?%W%j%s%?$K$h$C$F$O!"$3$N;XDj$OL5;k$5$l$k$3$H$,$"$k!#(B


      $B$3$N>O$NL\