home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 11 / FM Towns Free Software Collection 11.iso / t_os / lib / objcol2 / sample / test3.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-12  |  969 b   |  47 lines

  1. /* Sample of "strin.o", linked with strin.o vircon.o symbol.o
  2.                                     By SAKU        */
  3. #include <stdio.h>
  4. #include <egb.h>
  5. #include "strin.h"
  6. #include "vircon.h"
  7.  
  8. #define    ERR        1
  9. #define    NOERR    0
  10.  
  11. char    egbwork[1536];
  12.  
  13. int        main()
  14. {
  15.     char    str[256];
  16.     int        n;
  17.  
  18.     EGB_init( egbwork, 1536 );
  19.     EGB_resolution( egbwork, 1, 3 );
  20.     EGB_writePage( egbwork, 1 );
  21.     EGB_displayPage( egbwork, 0, 3 );
  22.     VC_init( egbwork, 0, 240, 60, 8, 15, 1 );
  23.     VC_printf( "[ESC] 終了\n" );
  24.     ST_locate( 100, 100 );
  25.     n = 10;
  26.     while( n > 0 )
  27.     {
  28.         switch( ( n = ST_inputStrings( egbwork, str, 256, "何か文字列を入力して下さい" ) ) )
  29.         {
  30.             case -3:
  31.                 VC_printf( "input abort!\n" );
  32.                 break;
  33.             case 0:
  34.                 VC_printf( "input = (NULL)\n" );
  35.                 break;
  36.             default:
  37.                 VC_printf( "input = %s\n入力文字数 = %d\n", POINTER, str, L_INT, n );
  38.                 break;
  39.         }
  40.     }
  41.  
  42.     EGB_writePage( egbwork, 0 );
  43.     screenterm( egbwork );
  44.  
  45.     return NOERR;
  46. }
  47.