                      ConsLIB V0.28 -- Console Library

                   Copyright (C) 1997-1999, Eiichiro Ito
                           (GHC02331@nifty.ne.jp)

* Introduction

     ́ACER\[Av쐬̂ɕKvȃCuɊւ
     łB̃Cup邱ƂŁArIeՂCẼR\[
     AvP[V쐬邱Ƃł܂BAۂɓ삳
     ɂConsoleKvƂȂ܂B

     ̃vO̍ŐVłƓɕKvȃt@C

          http://www.oohito.com/

     肷邱Ƃ\łB

* How to make CE Console Application

     CER\[Av쐬ɂ͈ȉ̂悤ɂ܂B

       1. AppName`AvP[Vݒ肵܂B
       2. Main֐쐬AvÕGg|CgƂ܂B
       3. vbgtH[ɑΉConsLIB.LIBN܂B

     Ƃ΁A

          TCHAR   AppName[] = TEXT("Hello") ;

          int Main( DWORD argc, LPTSTR argv[] )
          {
              Cputs( TEXT("Hello World") ) ;
              return 0 ;
          }

     ̂悤ȃvORpCConsLIBƃN΁A
     Hello Worldo͂vO쐬ł܂BȂACẼAv
     P[V͊{IUnicodep܂̂ŕ̐錾ɂ͓ɒ
     ӂĂB

      AppName͕K`Ă

* Brief description of ConsLIB Functions

     ConsLIBł́ACER\[Av쐬̂ɕKvȍŒ̋@\
     񋟂Ă܂B̋@\͑傫āA

        * ʕ\
        * L[{[h
        * ϐ
        * fBNg
        * ̑

     Ȃǂ܂B̋@\Ɋ֐̐܂B

   * ʕ\

     Putch      1ʂɕ\
                void Putch( TCHAR c ) ;
                c : o͂镶R[h(Unicode)

     Cputs      ʂɕ\
                void Cputs( LPCTSTR buf ) ;
                buf : o͂镶(Unicode)

     CputsVT    VT100[hŕʂɕ\
                void Cputs( LPCTSTR buf ) ;
                buf : o͂镶(Unicode)

     Cls        ʂNA
                void Cls( void ) ;
                Ȃ

     ClearEol   J[\ʒus܂ŃNA
                void ClearEol( void ) ;
                Ȃ

     ScrollUp   ʂɃXN[
                void ScrollUp( DWORD from, DWORD to ) ;
                from : Jns
                to : Is

     ScrollDown ʂɃXN[
                void ScrollDown( DWORD from, DWORD to ) ;
                from : Jns
                to : Is

     GetWH      ʂɕ\ł鉡Əcs߂
                void GetWH( LPDWORD w, LPDWORD h ) ;
                w : ւ̃|C^
                h : csւ̃|C^

     GetCurPos  ݂̃J[\ʒu擾
                void GetCurPos( LPDWORD col, LPDWORD line ) ;
                col : ʒuւ̃|C^
                line : sʒuւ̃|C^

     SetCurPos  J[\ʒuݒ肷
                void SetCurPos( DWORD col, DWORD line ) ;
                col : ʒu
                line : sʒu

   * L[{[h

     Getch          1͂҂
                    TCHAR Getch( void ) ;
                     ߂l : R[h(Unicode)

     Kbhit          L[͂邩`FbN
                    BOOL Kbhit( void ) ;
                     ߂l : L[͂ꍇTRUE

     Cgets          1s͂s
                    LPTSTR Cgets( LPTSTR buf ) ;
                     buf : ͕i[̈
                     ߂l : bufƓ

     CgetsVT        VT100[h1s͂s
                    int CgetsVT( char *buf, int len ) ;
                     buf : ͕i[̈
                     len : i[̈̃TCY
                     ߂l : ͕

     ResetBreak     Break͂LZ
                    void ResetBreak( void ) ;
                     Ȃ

     SleepWithBreak Break͂܂ŃX[v
                    BOOL SleepWithBreak( DWORD msec ) ;
                     msec : X[vb
                     ߂l : Break̏ꍇTRUE

     SendBreak      vOBreak͂s
                    void SendBreak( void ) ;
                     Ȃ

   * ϐ

     SetEnvVar        ϐݒ肷
                      BOOL SetEnvVar( LPCTSTR name, LPCTSTR value ) ;
                        name : ϐ
                        value : ݒe

     GetEnvVar        ϐ̓e擾
                      DWORD GetEnvVar( LPCTSTR name, LPTSTR value, DWORD
                      size ) ;
                        name : ϐ
                        value : 擾ei[̈
                        size : ̈̑傫()

     ExpandEnvVar     ̊ϐQƂeŒu
                      void ExpandEnvVar( LPTSTR buf ) ;
                        buf : 

     ExpandVar        ̕ʂ̕Œu
                      void ExpandVar( LPTSTR ptr, LPCTSTR var, LPCTSTR arg
                      ) ;
                        ptr : 
                        var : 
                        arg : u

     PrintEnvVar      ϐ̓e\
                      void PrintEnvVar( LPCTSTR name ) ;
                        name : \ϐ
                        (NULL̏ꍇ͑S)

     ClearUndefEnvVar ϐQƂSăNA
                      void ClearUndefEnvVar( LPTSTR src ) ;
                        src : 

   * fBNg

     SetCurDir  JgfBNgݒ肷
                BOOL SetCurDir( LPCTSTR dir ) ;
                  dir : fBNg

     GetCurDir  JgfBNg擾
                DWORD GetCurDir( DWORD size, LPTSTR buf ) ;
                  size : 擾̈̕
                  buf : 擾̈

     catdir     pX̌
                void catdir( LPTSTR body, LPCTSTR adddir ) ;
                  body : fBNg
                  adddir : ΃fBNg

     rel2absdir ΃pX΃pXɕϊ
                void rel2absdir( LPTSTR dst, DWORD chDst, LPCTSTR src ) ;
                  dst : ΃pX
                  chDst : ΃pX̕
                  src : ΃pX

     is_dir     fBNgǂ̔
                BOOL is_dir( LPCTSTR path ) ;
                  path : ΃pX
                  ߂l : fBNgȂTRUE

     is_file    t@Cǂ̔
                BOOL is_file( LPCTSTR path ) ;
                  path : ΃pX
                  ߂l : t@CȂTRUE

     UpDir      efBNg̎擾
                BOOL UpDir( LPTSTR dir ) ;
                  dir : ΃fBNg
                  ߂l : TRUE

   * ̑

     GetIndex       Consoleł̃NCAgԍ𓾂
                    DWORD GetIndex( HWND hWnd ) ;
                      hWnd : EBhEnh
                      ߂l : NCAgԍ

     SwitchClient   w肳ꂽNCAgԍɐڂ
                    BOOL SwitchClient( DWORD index ) ;
                      index : NCAgԍ
                      ߂l : TRUE

     ExecuteProcess vZXs
                    BOOL ExecuteProcess( LPCTSTR cmd, LPTSTR arg ) ;
                      cmd : vO
                      arg : 
                      ߂l : TRUE

     Exit           CER\[AvI
                    void Exit( int code ) ;
                      code : vZXIl

     cmdline2args   𕪉ăp[^̃Xgɂ
                    void cmdline2args( LPTSTR cmdline, LPDWORD argc,
                    LPTSTR *argv, LPBOOL quote, LPTSTR args ) ;
                      cmdline : 
                      argc : p[^ւ̃|C^
                      argv : p[^zւ̃|C^
                      quote : NI[gtOzւ̃|C^
                      args : 2Ԗڂ̃p[^ȍ~

     chop_quote     ̑O̓dp폜
                    void chop_quote( LPTSTR dst ) ;
                      dst : 

     _wcsistr       񂩂ʂ̕T
                    LPTSTR _wcsistr( LPCTSTR org, LPCTSTR find ) ;
                      org : 
                      find : 

     GetConsoleVer  Consolẽo[Wԍ擾
                    DWORD GetConsoleVer( void ) ;
                      ߂l : o[Wԍ

     ResetTerminal  VT100[hʏConsole[hɖ߂
                    void ResetTerminal( void ) ;
                      ߂l : Ȃ

     ̑AvO痘płϐ͈ȉ̂Ƃ

          TCHAR       AppName[]
               CER\[AṽAvP[V

          HINSTANCE   hInst
               CER\[AṽCX^Xnh

          HWND        hMainWnd
               CER\[AṽEBhEnh

          HWND        hServer
               Console.EXE ̃EBhEnh

          DWORD       Argc
               CER\[Avɓnꂽ̌(MainargcƓ)

          LPTSTR      Argv[]
               CER\[Avɓnꂽ(MainargvƓ)

          LPTSTR      CmdLine
               CER\[AvɓnꂽẌ

* About VT100 mode

     ConsoleNCAg CputsVT() ĂԂƃ[h TTY_VT100  
     ܂B[h TTY_VT100 ɂȂ CgetsVT() g ESCV[P
     X̉, J[\L[R[h擾ł܂BʏConsolẽ
     [hɖ߂ɂResetTerminal() ĂяoĉB

* Support

     ̃vÕT|[ǵC

        * windowsce_users_jp [OXg
          (₢킹Fhttp://www.tt.rim.or.jp/~hiraide/index.html)
        * Niftyserve FWINCEU6ԉc
        * GHC02331@niftyserve.or.jp ւ̃[

     ōs܂B

* Copyright

     This program is a copyrighted freeware. Its copyright is owned by
     its author. You may use it freely, but you are not permitted to
     use it for any commercial purpose. If you want to post this
     program to other BBS, ftp site or network, or if you want to
     bundle it to other program or publication, you should receive
     prior permission from its author. The author is in no way liable
     to any damage, which may be caused by the use of or inability to
     use this software.

     ̃vO̓t[\tgEFAłB쌠͈ɓ@hY
     Ă܂B̃vOBBSftpTCgȂǂŔzzꍇ
     炩ߒ쌠҂܂ŋĂB

     ܂C̃vO͖ۏ؂łB̃vO𗘗pĔ
     QɊւĒ쌠҂͐ӔC𕉂Ȃ̂Ƃ܂BSėp҂
     ȐӔCɂẴvO𗘗pĂB

* History

     ConsolẽhLgQƂĂB

ConsLIB -- Copyright (C) 1997-1999, Eiichiro Ito
