home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / MNO100.ZIP / MNOTEST.C < prev    next >
C/C++ Source or Header  |  1991-05-15  |  156KB  |  6,820 lines

  1. /*------------------------------------------------------------*/
  2. /* MNOTEST.C      ( OS/2 )                                    */
  3. /*                                                            */
  4. /*                                                            */
  5. /* Test the MNOCALLS library functions.                       */
  6. /*                                                            */
  7. /*                                                            */
  8. /*------------------------------------------------------------*/
  9.  
  10. #include    <stdio.h>             /* Library I/O routines.    */
  11. #include    <stdlib.h>            /* Library common routines. */
  12. #include    <string.h>            /* Library string routines. */
  13.  
  14. #define     INCL_BASE
  15. #include    <os2.h>
  16.  
  17. #include    "SYMTYPES.H"          /* Type definitions.        */ 
  18.  
  19. #include    "MNOCALLS.H"          /* DLL function definitions.*/
  20.  
  21.  
  22. #define     SHORTSLEEP      1L
  23. #define     LONGSLEEP    5000L
  24.  
  25. PUCHAR            pchMonoBuf ;
  26. PUCHAR            pchColorBuf ;
  27.  
  28.  
  29.  
  30. VOID              CompareVideoBufs ( void ) ;
  31. VOID              CompareCharacterBufs ( void ) ;
  32. VOID              TestMnoSetCurPos ( void ) ;
  33. VOID              TestMnoWrtTTY ( void ) ;
  34. VOID              TestAnsiEsc ( void ) ;
  35. VOID              TestMnoWrtCharStr ( void ) ;
  36. VOID              TestMnoWrtCellStr ( void ) ;
  37. VOID              TestMnoReadCharStr ( void ) ;
  38. VOID              TestMnoReadCellStr ( void ) ;
  39. VOID              TestMnoWrtNAttr ( void ) ;
  40. VOID              TestMnoWrtNCell ( void ) ;
  41. VOID              TestMnoWrtNChar ( void ) ;
  42. VOID              TestMnoWrtCharStrAtt ( void ) ;
  43. VOID              TestMnoScrollDn ( void ) ;
  44. VOID              TestMnoScrollUp ( void ) ;
  45. VOID              TestMnoScrollLf ( void ) ;
  46. VOID              TestMnoScrollRt ( void ) ;
  47. VOID              TestMnoScrolling ( void ) ;
  48. VOID              MakeTestScreen ( void ) ;
  49. VOID              MonoVioExperiment ( void ) ;
  50. VOID              TestMnoGetCurType ( void ) ;
  51. VOID              TestMnoSetCurType ( void ) ;
  52. VOID              TestMnoGetPhysBuf ( void ) ;
  53. VOID              TestOK ( void ) ;
  54. VOID              TestMdaDrvr ( void ) ;
  55.  
  56.  
  57. /*------------------------------------------------------------*/
  58. /* Main function.                                             */
  59. /*------------------------------------------------------------*/
  60.  
  61. main ()
  62.    {
  63.    TestMdaDrvr () ;
  64.  
  65.    TestMnoSetCurType () ;
  66.  
  67.    TestMnoGetCurType () ;
  68.  
  69.    TestMnoReadCellStr () ;
  70.  
  71.    TestMnoReadCharStr () ;
  72.  
  73.    TestMnoGetPhysBuf () ;
  74.  
  75.    TestMnoSetCurPos () ;
  76.  
  77.    TestMnoWrtTTY () ; 
  78.  
  79.    TestAnsiEsc () ;
  80.  
  81.    TestMnoWrtCellStr () ;
  82.  
  83.    TestMnoWrtCharStr () ;
  84.  
  85.    TestMnoWrtCharStrAtt () ;
  86.  
  87.    TestMnoWrtNAttr () ;
  88.  
  89.    TestMnoWrtNCell () ;
  90.  
  91.    TestMnoWrtNChar () ;
  92.  
  93.    TestMnoScrollRt () ;
  94.  
  95.    TestMnoScrollLf () ;
  96.  
  97.    TestMnoScrollUp () ;
  98.  
  99.    TestMnoScrollDn () ;
  100.  
  101.    TestMnoScrolling () ;
  102.  
  103.    TestOK () ;
  104.  
  105.  
  106. #if 0
  107.  
  108.    MonoVioExperiment () ;
  109.  
  110. #endif
  111.  
  112.  
  113.    exit ( 0 ) ;
  114.  
  115.                /* Suppress warning message.                   */
  116.    return ( 0 ) ;
  117.  
  118.    }           /* End of main function.                       */
  119.  
  120. /*------------------------------------------------------------*/
  121. /* Test Mda Drvr.                                             */
  122. /*------------------------------------------------------------*/
  123.  
  124. VOID              TestMdaDrvr ()
  125.  
  126.    {
  127.    USHORT         usMnoStatus    = 0 ;
  128.    VIOCURSORINFO  vioCursorInfo ;
  129.    UCHAR          szText [ 200 ] = "" ;
  130.    USHORT         fAnsi          = 0 ;
  131.  
  132.    usMnoStatus = MnoGetCurType ( &vioCursorInfo, 0 ) ;
  133.  
  134.    if ( usMnoStatus )
  135.       {
  136.       if ( usMnoStatus == ERROR_OPEN_FAILED )
  137.          fprintf (
  138.             stderr,
  139.             "\nMNOTEST has failed because the MNODRVR.SYS device\n"
  140.                "driver did not open properly.  Status: %u.\n",
  141.             usMnoStatus ) ;
  142.       else
  143.          fprintf (
  144.             stderr,
  145.             "\nMNOTEST has failed on the first attempt to use\n"
  146.             "MNOCALLS.DLL.  Status: %u.\n",
  147.             usMnoStatus ) ;
  148.  
  149.       exit ( 1 ) ;
  150.       }
  151.  
  152.    usMnoStatus = MnoGetAnsi ( &fAnsi, 0 ) ;
  153.  
  154.    if ( usMnoStatus )
  155.       {
  156.       sprintf (
  157.          szText,
  158.          "\nMNOTEST cannot execute as a detached process.\r\n"
  159.             "MnoGetAnsi Status: %u.\r\n",
  160.          usMnoStatus ) ;
  161.  
  162.       usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  163.  
  164.       exit ( 1 ) ;
  165.       }
  166.  
  167.    }           /* End of TestMdaDrvr function.                */
  168.  
  169. /*------------------------------------------------------------*/
  170. /* Test OK.                                                   */
  171. /*------------------------------------------------------------*/
  172.  
  173. VOID              TestOK ()
  174.  
  175.    {
  176.    USHORT         usMnoStatus = 0 ;
  177.    USHORT         usVioStatus = 0 ;
  178.    UCHAR          szText [ 200 ] ;
  179.    VIOCURSORINFO  vioCursorInfo ;
  180.  
  181.    vioCursorInfo.yStart       = 12 ;
  182.    vioCursorInfo.cEnd         = 13 ;
  183.    vioCursorInfo.cx           = 1 ;
  184.    vioCursorInfo.attr         = 0 ;
  185.  
  186.    usVioStatus                = VioSetCurType ( &vioCursorInfo, 0 ) ;
  187.    usMnoStatus                = MnoSetCurType ( &vioCursorInfo, 0 ) ;
  188.  
  189.    strcpy (
  190.       szText,
  191.       "\033[2J\033[0mTEST SUCCESSFUL." ) ;
  192.  
  193.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  194.  
  195.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  196.  
  197.    }           /* End of TestOK function.                     */
  198.  
  199.  
  200. /*------------------------------------------------------------*/
  201. /* Compare Character Bufs.                                    */
  202. /*------------------------------------------------------------*/
  203.  
  204. VOID              CompareCharacterBufs ()
  205.  
  206.    {
  207.    USHORT         usMnoStatus    = 0 ;
  208.    USHORT         usVioStatus    = 0 ;
  209.    USHORT         usRow          = 0 ;
  210.    USHORT         usColumn       = 0 ;
  211.    PUCHAR         pchColor ;
  212.    PUCHAR         pchMono ;
  213.    UCHAR          bMonoBuffer [ 2000 ] ;
  214.    UCHAR          bColorBuffer [ 2000 ] ;
  215.    USHORT         usMonoBufLen   = 2000 ;
  216.    USHORT         usColorBufLen  = 2000 ;
  217.    USHORT         i ;
  218.    UCHAR          szText [ 2000 ] ;
  219.  
  220.    usVioStatus = VioReadCharStr (
  221.          bColorBuffer,
  222.          &usColorBufLen,
  223.          usRow,
  224.          usColumn,
  225.          0 ) ;
  226.  
  227.    usMnoStatus = MnoReadCharStr (
  228.          bMonoBuffer,
  229.          &usMonoBufLen,
  230.          usRow,
  231.          usColumn,
  232.          0 ) ;
  233.  
  234.    pchColor    = bColorBuffer ;
  235.    pchMono     = bMonoBuffer ;
  236.  
  237.    for ( i  = 0 ; i < 2000 ; i++ )
  238.       if ( *pchColor++ != *pchMono++ )
  239.          {
  240.          sprintf (
  241.             szText,
  242.             "Screens have a character mismatch. "
  243.                "Row %d Column %d  Vio %x  Mno %x",
  244.                i / 80,
  245.                i % 80,
  246.                *( pchColor - 1 ),
  247.                *( pchMono - 1 )) ;
  248.  
  249.          usMnoStatus = MnoWrtCharStr (
  250.                szText,
  251.                strlen ( szText ),
  252.                1,
  253.                0,
  254.                0 ) ;
  255.  
  256.          usVioStatus = VioSetCurPos (
  257.                i / 80,
  258.                i % 80,
  259.                0 ) ;
  260.  
  261.          usMnoStatus = MnoSetCurPos (
  262.                i / 80,
  263.                i % 80,
  264.                0 ) ;
  265.  
  266.          DosSleep ( 4 * LONGSLEEP ) ;
  267.  
  268.          exit ( 1 ) ;
  269.          }
  270.    }           /* End of CompareCharacterBufs function.       */
  271.  
  272.  
  273. /*------------------------------------------------------------*/
  274. /* Compare Video Bufs.                                        */
  275. /*------------------------------------------------------------*/
  276.  
  277. VOID              CompareVideoBufs ()
  278.  
  279.    {
  280.    USHORT         usMnoStatus    = 0 ;
  281.    USHORT         usVioStatus    = 0 ;
  282.    USHORT         usRow          = 0 ;
  283.    USHORT         usColumn       = 0 ;
  284.    PUCHAR         pchColor ;
  285.    PUCHAR         pchMono ;
  286.    UCHAR          bMonoBuffer [ 4000 ] ;
  287.    UCHAR          bColorBuffer [ 4000 ] ;
  288.    USHORT         usMonoBufLen   = 4000 ;
  289.    USHORT         usColorBufLen  = 4000 ;
  290.    USHORT         i ;
  291.    UCHAR          szText [ 2000 ] ;
  292.  
  293.    usVioStatus = VioReadCellStr (
  294.          bColorBuffer,
  295.          &usColorBufLen,
  296.          usRow,
  297.          usColumn,
  298.          0 ) ;
  299.  
  300.    usMnoStatus = MnoReadCellStr (
  301.          bMonoBuffer,
  302.          &usMonoBufLen,
  303.          usRow,
  304.          usColumn,
  305.          0 ) ;
  306.  
  307.    pchColor = bColorBuffer ;
  308.    pchMono  = bMonoBuffer ;
  309.  
  310.    for ( i  = 0 ; i < 4000 ; i++ )
  311.       if ( *pchColor++ != *pchMono++ )
  312.          {
  313.          sprintf (
  314.             szText,
  315.             "Screens have a cell mismatch. "
  316.                "Row %d Column %d  Vio %x  Mno %x",
  317.                ( i / 2 ) / 80,
  318.                ( i / 2 ) % 80,
  319.                *( pchColor - 1 ),
  320.                *( pchMono - 1 )) ;
  321.  
  322.          usMnoStatus = MnoWrtCharStr (
  323.                szText,
  324.                strlen ( szText ),
  325.                1,
  326.                0,
  327.                0 ) ;
  328.  
  329.          usVioStatus = VioSetCurPos (
  330.                ( i / 2 ) / 80,
  331.                ( i / 2 ) % 80,
  332.                0 ) ;
  333.  
  334.          usMnoStatus = MnoSetCurPos (
  335.                ( i / 2 ) / 80,
  336.                ( i / 2 ) % 80,
  337.                0 ) ;
  338.  
  339.          DosSleep ( 4 * LONGSLEEP ) ;
  340.  
  341.          exit ( 1 ) ;
  342.          }
  343.    }           /* End of CompareVideoBufs function.           */
  344.  
  345.  
  346. /*------------------------------------------------------------*/
  347. /* Test Mno Read Cell Str.                                     */
  348. /*------------------------------------------------------------*/
  349.  
  350. VOID              TestMnoReadCellStr ()
  351.  
  352.    {
  353.    USHORT         usMnoStatus       = 0 ;
  354.    USHORT         usVioStatus       = 0 ;
  355.    USHORT         usRow             = 0 ;
  356.    USHORT         usColumn          = 0 ;
  357.    USHORT         i                 = 0 ;
  358.    USHORT         cMnoText          = 0 ;
  359.    USHORT         cVioText          = 0 ;
  360.    UCHAR          szText [ 500 ]    = "" ;
  361.    UCHAR          szMnoText [ 500 ] = "" ;
  362.    UCHAR          szVioText [ 500 ] = "" ;
  363.    PUCHAR         pszMnoText        = szMnoText ;
  364.    PUCHAR         pszVioText        = szVioText ;
  365.  
  366.  
  367.    strcpy ( szText, "Test of ReadCellStr Parm errors 001" ) ;
  368.  
  369.  
  370.    usVioStatus = VioWrtCharStr (
  371.          szText,
  372.          strlen ( szText ),
  373.          1,
  374.          1,
  375.          0 ) ;
  376.  
  377.    usMnoStatus = MnoWrtCharStr (
  378.          szText,
  379.          strlen ( szText ),
  380.          1,
  381.          1,
  382.          0 ) ;
  383.  
  384.  
  385.    cVioText    = 30 ;
  386.  
  387.    usVioStatus = VioReadCellStr (
  388.          pszVioText,
  389.          &cVioText,
  390.          100,
  391.          1,
  392.          0 ) ;
  393.  
  394.    cMnoText    = 30 ;
  395.  
  396.    usMnoStatus = MnoReadCellStr (
  397.          szMnoText,
  398.          &cMnoText,
  399.          100,
  400.          1,
  401.          0 ) ;
  402.  
  403.  
  404.    if ( usVioStatus != usMnoStatus )
  405.       {
  406.       fprintf (
  407.          stderr,
  408.          "Test ReadCellStr 001 bad return, Vio=%d Mno=%d",
  409.          usVioStatus,
  410.          usMnoStatus ) ;
  411.  
  412.       exit ( 1 ) ;
  413.       }
  414.  
  415.  
  416.    if ( cVioText != cMnoText )
  417.       {
  418.       fprintf (
  419.          stderr,
  420.          "Test ReadCellStr 001 bad length, Vio=%d Mno=%d",
  421.          cVioText,
  422.          cMnoText ) ;
  423.  
  424.       exit ( 1 ) ;
  425.       }
  426.  
  427.  
  428.    strcpy ( szText, "Test of ReadCellStr Parm errors 002" ) ;
  429.  
  430.  
  431.    usVioStatus = VioWrtCharStr (
  432.          szText,
  433.          strlen ( szText ),
  434.          2,
  435.          1,
  436.          0 ) ;
  437.  
  438.    usMnoStatus = MnoWrtCharStr (
  439.          szText,
  440.          strlen ( szText ),
  441.          2,
  442.          1,
  443.          0 ) ;
  444.  
  445.  
  446.    cVioText    = 30 ;
  447.  
  448.    usVioStatus = VioReadCellStr (
  449.          pszVioText,
  450.          &cVioText,
  451.          1,
  452.          100,
  453.          0 ) ;
  454.  
  455.    cMnoText    = 30 ;
  456.  
  457.    usMnoStatus = MnoReadCellStr (
  458.          szMnoText,
  459.          &cMnoText,
  460.          1,
  461.          100,
  462.          0 ) ;
  463.  
  464.  
  465.    if ( usVioStatus != usMnoStatus )
  466.       {
  467.       fprintf (
  468.          stderr,
  469.          "Test ReadCellStr 002 bad return, Vio=%d Mno=%d",
  470.          usVioStatus,
  471.          usMnoStatus ) ;
  472.  
  473.       exit ( 1 ) ;
  474.       }
  475.  
  476.  
  477.    if ( cVioText != cMnoText )
  478.       {
  479.       fprintf (
  480.          stderr,
  481.          "Test ReadCellStr 002 bad length, Vio=%d Mno=%d",
  482.          cVioText,
  483.          cMnoText ) ;
  484.  
  485.       exit ( 1 ) ;
  486.       }
  487.  
  488.  
  489.    strcpy ( szText, "Test of ReadCellStr Parm errors 003" ) ;
  490.  
  491.  
  492.    usVioStatus = VioWrtCharStr (
  493.          szText,
  494.          strlen ( szText ),
  495.          2,
  496.          1,
  497.          0 ) ;
  498.  
  499.    usMnoStatus = MnoWrtCharStr (
  500.          szText,
  501.          strlen ( szText ),
  502.          2,
  503.          1,
  504.          0 ) ;
  505.  
  506.  
  507.    cVioText    = 30 ;
  508.  
  509.    usVioStatus = VioReadCellStr (
  510.          pszVioText,
  511.          &cVioText,
  512.          1,
  513.          1,
  514.          10 ) ;
  515.  
  516.    cMnoText    = 30 ;
  517.  
  518.    usMnoStatus = MnoReadCellStr (
  519.          szMnoText,
  520.          &cMnoText,
  521.          1,
  522.          1,
  523.          10 ) ;
  524.  
  525.  
  526.    if ( usVioStatus != usMnoStatus )
  527.       {
  528.       fprintf (
  529.          stderr,
  530.          "Test ReadCellStr 003 bad return, Vio=%d Mno=%d",
  531.          usVioStatus,
  532.          usMnoStatus ) ;
  533.  
  534.       exit ( 1 ) ;
  535.       }
  536.  
  537.  
  538.    if ( cVioText != cMnoText )
  539.       {
  540.       fprintf (
  541.          stderr,
  542.          "Test ReadCellStr 003 bad length, Vio=%d Mno=%d",
  543.          cVioText,
  544.          cMnoText ) ;
  545.  
  546.       exit ( 1 ) ;
  547.       }
  548.  
  549.  
  550.  
  551.    strcpy ( szText, "Test of ReadCellStr 004" ) ;
  552.  
  553.    for ( i  = 1 ; i < 30 ; i++ )
  554.  
  555.       {
  556.       usVioStatus = VioWrtCharStr (
  557.             szText,
  558.             strlen ( szText ),
  559.             i,
  560.             i + 30,
  561.             0 ) ;
  562.  
  563.       usMnoStatus = MnoWrtCharStr (
  564.             szText,
  565.             strlen ( szText ),
  566.             i,
  567.             i + 30,
  568.             0 ) ;
  569.       }
  570.  
  571.    cVioText    = 30 ;
  572.  
  573.    usVioStatus = VioReadCellStr (
  574.          pszVioText,
  575.          &cVioText,
  576.          1,
  577.          1,
  578.          0 ) ;
  579.  
  580.    cMnoText    = 30 ;
  581.  
  582.    usMnoStatus = MnoReadCellStr (
  583.          szMnoText,
  584.          &cMnoText,
  585.          1,
  586.          1,
  587.          0 ) ;
  588.  
  589.  
  590.    if ( usVioStatus != usMnoStatus )
  591.       {
  592.       fprintf (
  593.          stderr,
  594.          "Test ReadCellStr 004 bad return, Vio=%d Mno=%d",
  595.          usVioStatus,
  596.          usMnoStatus ) ;
  597.  
  598.       exit ( 1 ) ;
  599.       }
  600.  
  601.  
  602.    if ( cVioText != cMnoText )
  603.       {
  604.       fprintf (
  605.          stderr,
  606.          "Test ReadCellStr 004 bad length, Vio=%d Mno=%d",
  607.          cVioText,
  608.          cMnoText ) ;
  609.  
  610.       exit ( 1 ) ;
  611.       }
  612.  
  613.    szMnoText [ cMnoText ]  = '\0' ;
  614.    szVioText [ cVioText ]  = '\0' ;
  615.  
  616.    if ( strcmp(szMnoText, szVioText) != 0 )
  617.       {
  618.       fprintf (
  619.          stderr,
  620.          "Test ReadCellStr 004 not matched, \nVio=%s \nMno=%s",
  621.          szVioText,
  622.          szMnoText ) ;
  623.  
  624.       exit ( 1 ) ;
  625.       }
  626.  
  627.  
  628.  
  629.  
  630.  
  631.    cVioText    = 300 ;
  632.  
  633.    usVioStatus = VioReadCellStr (
  634.          pszVioText,
  635.          &cVioText,
  636.          1,
  637.          1,
  638.          0 ) ;
  639.  
  640.    cMnoText    = 300 ;
  641.  
  642.    usMnoStatus = MnoReadCellStr (
  643.          szMnoText,
  644.          &cMnoText,
  645.          1,
  646.          1,
  647.          0 ) ;
  648.  
  649.  
  650.    if ( usVioStatus != usMnoStatus )
  651.       {
  652.       fprintf (
  653.          stderr,
  654.          "Test ReadCellStr 005 bad return, Vio=%d Mno=%d",
  655.          usVioStatus,
  656.          usMnoStatus ) ;
  657.  
  658.       exit ( 1 ) ;
  659.       }
  660.  
  661.  
  662.    if ( cVioText != cMnoText )
  663.       {
  664.       fprintf (
  665.          stderr,
  666.          "Test ReadCellStr 005 bad length, Vio=%d Mno=%d",
  667.          cVioText,
  668.          cMnoText ) ;
  669.  
  670.       exit ( 1 ) ;
  671.       }
  672.  
  673.    szMnoText [ cMnoText ]  = '\0' ;
  674.    szVioText [ cVioText ]  = '\0' ;
  675.  
  676.    if ( strcmp(szMnoText, szVioText) != 0 )
  677.       {
  678.       fprintf (
  679.          stderr,
  680.          "Test ReadCellStr 005 not matched, \nVio=%s \nMno=%s",
  681.          szVioText,
  682.          szMnoText ) ;
  683.  
  684.       exit ( 1 ) ;
  685.       }
  686.  
  687.  
  688.    cVioText    = 30 ;
  689.  
  690.    usVioStatus = VioReadCellStr (
  691.          pszVioText,
  692.          &cVioText,
  693.          1,
  694.          70,
  695.          0 ) ;
  696.  
  697.    cMnoText    = 30 ;
  698.  
  699.    usMnoStatus = MnoReadCellStr (
  700.          szMnoText,
  701.          &cMnoText,
  702.          1,
  703.          70,
  704.          0 ) ;
  705.  
  706.  
  707.    if ( usVioStatus != usMnoStatus )
  708.       {
  709.       fprintf (
  710.          stderr,
  711.          "Test ReadCellStr 006 bad return, Vio=%d Mno=%d",
  712.          usVioStatus,
  713.          usMnoStatus ) ;
  714.  
  715.       exit ( 1 ) ;
  716.       }
  717.  
  718.  
  719.    if ( cVioText != cMnoText )
  720.       {
  721.       fprintf (
  722.          stderr,
  723.          "Test ReadCellStr 006 bad length, Vio=%d Mno=%d",
  724.          cVioText,
  725.          cMnoText ) ;
  726.  
  727.       exit ( 1 ) ;
  728.       }
  729.  
  730.    szMnoText [ cMnoText ]  = '\0' ;
  731.    szVioText [ cVioText ]  = '\0' ;
  732.  
  733.    if ( strcmp(szMnoText, szVioText) != 0 )
  734.       {
  735.       fprintf (
  736.          stderr,
  737.          "Test ReadCellStr 006 not matched, \nVio=%s \nMno=%s",
  738.          szVioText,
  739.          szMnoText ) ;
  740.  
  741.       exit ( 1 ) ;
  742.       }
  743.  
  744.  
  745.    cVioText    = 300 ;
  746.  
  747.    usVioStatus = VioReadCellStr (
  748.          pszVioText,
  749.          &cVioText,
  750.          24,
  751.          60,
  752.          0 ) ;
  753.  
  754.    cMnoText    = 300 ;
  755.  
  756.    usMnoStatus = MnoReadCellStr (
  757.          szMnoText,
  758.          &cMnoText,
  759.          24,
  760.          60,
  761.          0 ) ;
  762.  
  763.  
  764.    if ( usVioStatus != usMnoStatus )
  765.       {
  766.       fprintf (
  767.          stderr,
  768.          "Test ReadCellStr 007 bad return, Vio=%d Mno=%d",
  769.          usVioStatus,
  770.          usMnoStatus ) ;
  771.  
  772.       exit ( 1 ) ;
  773.       }
  774.  
  775.  
  776.    if ( cVioText != cMnoText )
  777.       {
  778.       fprintf (
  779.          stderr,
  780.          "Test ReadCellStr 007 bad length, Vio=%d Mno=%d",
  781.          cVioText,
  782.          cMnoText ) ;
  783.  
  784.       exit ( 1 ) ;
  785.       }
  786.  
  787.    szMnoText [ cMnoText ]  = '\0' ;
  788.    szVioText [ cVioText ]  = '\0' ;
  789.  
  790.    if ( strcmp(szMnoText, szVioText) != 0 )
  791.       {
  792.       fprintf (
  793.          stderr,
  794.          "Test ReadCellStr 007 not matched, \nVio=%s \nMno=%s",
  795.          szVioText,
  796.          szMnoText ) ;
  797.  
  798.       exit ( 1 ) ;
  799.       }
  800.  
  801.    CompareCharacterBufs () ;
  802.  
  803.    DosSleep ( SHORTSLEEP ) ;
  804.  
  805.    }           /* End of TestMnoReadCellStr function.          */
  806.  
  807.  
  808. /*------------------------------------------------------------*/
  809. /* Test Mno Read Char Str.                                     */
  810. /*------------------------------------------------------------*/
  811.  
  812. VOID              TestMnoReadCharStr ()
  813.  
  814.    {
  815.    USHORT         usMnoStatus       = 0 ;
  816.    USHORT         usVioStatus       = 0 ;
  817.    USHORT         usRow             = 0 ;
  818.    USHORT         usColumn          = 0 ;
  819.    USHORT         i                 = 0 ;
  820.    USHORT         cMnoText          = 0 ;
  821.    USHORT         cVioText          = 0 ;
  822.    UCHAR          szText [ 500 ]    = "" ;
  823.    UCHAR          szMnoText [ 500 ] = "" ;
  824.    UCHAR          szVioText [ 500 ] = "" ;
  825.    PUCHAR         pszMnoText        = szMnoText ;
  826.    PUCHAR         pszVioText        = szVioText ;
  827.  
  828.  
  829.    strcpy ( szText, "Test of ReadCharStr Parm errors 001" ) ;
  830.  
  831.  
  832.    usVioStatus = VioWrtCharStr (
  833.          szText,
  834.          strlen ( szText ),
  835.          1,
  836.          1,
  837.          0 ) ;
  838.  
  839.    usMnoStatus = MnoWrtCharStr (
  840.          szText,
  841.          strlen ( szText ),
  842.          1,
  843.          1,
  844.          0 ) ;
  845.  
  846.  
  847.    cVioText    = 30 ;
  848.  
  849.    usVioStatus = VioReadCharStr (
  850.          pszVioText,
  851.          &cVioText,
  852.          100,
  853.          1,
  854.          0 ) ;
  855.  
  856.    cMnoText    = 30 ;
  857.  
  858.    usMnoStatus = MnoReadCharStr (
  859.          szMnoText,
  860.          &cMnoText,
  861.          100,
  862.          1,
  863.          0 ) ;
  864.  
  865.  
  866.    if ( usVioStatus != usMnoStatus )
  867.       {
  868.       fprintf (
  869.          stderr,
  870.          "Test ReadCharStr 001 bad return, Vio=%d Mno=%d",
  871.          usVioStatus,
  872.          usMnoStatus ) ;
  873.  
  874.       exit ( 1 ) ;
  875.       }
  876.  
  877.  
  878.    if ( cVioText != cMnoText )
  879.       {
  880.       fprintf (
  881.          stderr,
  882.          "Test ReadCharStr 001 bad length, Vio=%d Mno=%d",
  883.          cVioText,
  884.          cMnoText ) ;
  885.  
  886.       exit ( 1 ) ;
  887.       }
  888.  
  889.  
  890.    strcpy ( szText, "Test of ReadCharStr Parm errors 002" ) ;
  891.  
  892.  
  893.    usVioStatus = VioWrtCharStr (
  894.          szText,
  895.          strlen ( szText ),
  896.          2,
  897.          1,
  898.          0 ) ;
  899.  
  900.    usMnoStatus = MnoWrtCharStr (
  901.          szText,
  902.          strlen ( szText ),
  903.          2,
  904.          1,
  905.          0 ) ;
  906.  
  907.  
  908.    cVioText    = 30 ;
  909.  
  910.    usVioStatus = VioReadCharStr (
  911.          pszVioText,
  912.          &cVioText,
  913.          1,
  914.          100,
  915.          0 ) ;
  916.  
  917.    cMnoText    = 30 ;
  918.  
  919.    usMnoStatus = MnoReadCharStr (
  920.          szMnoText,
  921.          &cMnoText,
  922.          1,
  923.          100,
  924.          0 ) ;
  925.  
  926.  
  927.    if ( usVioStatus != usMnoStatus )
  928.       {
  929.       fprintf (
  930.          stderr,
  931.          "Test ReadCharStr 002 bad return, Vio=%d Mno=%d",
  932.          usVioStatus,
  933.          usMnoStatus ) ;
  934.  
  935.       exit ( 1 ) ;
  936.       }
  937.  
  938.  
  939.    if ( cVioText != cMnoText )
  940.       {
  941.       fprintf (
  942.          stderr,
  943.          "Test ReadCharStr 002 bad length, Vio=%d Mno=%d",
  944.          cVioText,
  945.          cMnoText ) ;
  946.  
  947.       exit ( 1 ) ;
  948.       }
  949.  
  950.  
  951.    strcpy ( szText, "Test of ReadCharStr Parm errors 003" ) ;
  952.  
  953.  
  954.    usVioStatus = VioWrtCharStr (
  955.          szText,
  956.          strlen ( szText ),
  957.          2,
  958.          1,
  959.          0 ) ;
  960.  
  961.    usMnoStatus = MnoWrtCharStr (
  962.          szText,
  963.          strlen ( szText ),
  964.          2,
  965.          1,
  966.          0 ) ;
  967.  
  968.  
  969.    cVioText    = 30 ;
  970.  
  971.    usVioStatus = VioReadCharStr (
  972.          pszVioText,
  973.          &cVioText,
  974.          1,
  975.          1,
  976.          10 ) ;
  977.  
  978.    cMnoText    = 30 ;
  979.  
  980.    usMnoStatus = MnoReadCharStr (
  981.          szMnoText,
  982.          &cMnoText,
  983.          1,
  984.          1,
  985.          10 ) ;
  986.  
  987.  
  988.    if ( usVioStatus != usMnoStatus )
  989.       {
  990.       fprintf (
  991.          stderr,
  992.          "Test ReadCharStr 003 bad return, Vio=%d Mno=%d",
  993.          usVioStatus,
  994.          usMnoStatus ) ;
  995.  
  996.       exit ( 1 ) ;
  997.       }
  998.  
  999.  
  1000.    if ( cVioText != cMnoText )
  1001.       {
  1002.       fprintf (
  1003.          stderr,
  1004.          "Test ReadCharStr 003 bad length, Vio=%d Mno=%d",
  1005.          cVioText,
  1006.          cMnoText ) ;
  1007.  
  1008.       exit ( 1 ) ;
  1009.       }
  1010.  
  1011.  
  1012.  
  1013.    strcpy ( szText, "Test of ReadCharStr 004" ) ;
  1014.  
  1015.    for ( i  = 1 ; i < 30 ; i++ )
  1016.  
  1017.       {
  1018.       usVioStatus = VioWrtCharStr (
  1019.             szText,
  1020.             strlen ( szText ),
  1021.             i,
  1022.             i + 30,
  1023.             0 ) ;
  1024.  
  1025.       usMnoStatus = MnoWrtCharStr (
  1026.             szText,
  1027.             strlen ( szText ),
  1028.             i,
  1029.             i + 30,
  1030.             0 ) ;
  1031.       }
  1032.  
  1033.    cVioText    = 30 ;
  1034.  
  1035.    usVioStatus = VioReadCharStr (
  1036.          pszVioText,
  1037.          &cVioText,
  1038.          1,
  1039.          1,
  1040.          0 ) ;
  1041.  
  1042.    cMnoText    = 30 ;
  1043.  
  1044.    usMnoStatus = MnoReadCharStr (
  1045.          szMnoText,
  1046.          &cMnoText,
  1047.          1,
  1048.          1,
  1049.          0 ) ;
  1050.  
  1051.  
  1052.    if ( usVioStatus != usMnoStatus )
  1053.       {
  1054.       fprintf (
  1055.          stderr,
  1056.          "Test ReadCharStr 004 bad return, Vio=%d Mno=%d",
  1057.          usVioStatus,
  1058.          usMnoStatus ) ;
  1059.  
  1060.       exit ( 1 ) ;
  1061.       }
  1062.  
  1063.  
  1064.    if ( cVioText != cMnoText )
  1065.       {
  1066.       fprintf (
  1067.          stderr,
  1068.          "Test ReadCharStr 004 bad length, Vio=%d Mno=%d",
  1069.          cVioText,
  1070.          cMnoText ) ;
  1071.  
  1072.       exit ( 1 ) ;
  1073.       }
  1074.  
  1075.    szMnoText [ cMnoText ]  = '\0' ;
  1076.    szVioText [ cVioText ]  = '\0' ;
  1077.  
  1078.    if ( strcmp(szMnoText, szVioText) != 0 )
  1079.       {
  1080.       fprintf (
  1081.          stderr,
  1082.          "Test ReadCharStr 004 not matched, \nVio=%s \nMno=%s",
  1083.          szVioText,
  1084.          szMnoText ) ;
  1085.  
  1086.       exit ( 1 ) ;
  1087.       }
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.    cVioText    = 300 ;
  1094.  
  1095.    usVioStatus = VioReadCharStr (
  1096.          pszVioText,
  1097.          &cVioText,
  1098.          1,
  1099.          1,
  1100.          0 ) ;
  1101.  
  1102.    cMnoText    = 300 ;
  1103.  
  1104.    usMnoStatus = MnoReadCharStr (
  1105.          szMnoText,
  1106.          &cMnoText,
  1107.          1,
  1108.          1,
  1109.          0 ) ;
  1110.  
  1111.  
  1112.    if ( usVioStatus != usMnoStatus )
  1113.       {
  1114.       fprintf (
  1115.          stderr,
  1116.          "Test ReadCharStr 005 bad return, Vio=%d Mno=%d",
  1117.          usVioStatus,
  1118.          usMnoStatus ) ;
  1119.  
  1120.       exit ( 1 ) ;
  1121.       }
  1122.  
  1123.  
  1124.    if ( cVioText != cMnoText )
  1125.       {
  1126.       fprintf (
  1127.          stderr,
  1128.          "Test ReadCharStr 005 bad length, Vio=%d Mno=%d",
  1129.          cVioText,
  1130.          cMnoText ) ;
  1131.  
  1132.       exit ( 1 ) ;
  1133.       }
  1134.  
  1135.    szMnoText [ cMnoText ]  = '\0' ;
  1136.    szVioText [ cVioText ]  = '\0' ;
  1137.  
  1138.    if ( strcmp(szMnoText, szVioText) != 0 )
  1139.       {
  1140.       fprintf (
  1141.          stderr,
  1142.          "Test ReadCharStr 005 not matched, \nVio=%s \nMno=%s",
  1143.          szVioText,
  1144.          szMnoText ) ;
  1145.  
  1146.       exit ( 1 ) ;
  1147.       }
  1148.  
  1149.  
  1150.    cVioText    = 30 ;
  1151.  
  1152.    usVioStatus = VioReadCharStr (
  1153.          pszVioText,
  1154.          &cVioText,
  1155.          1,
  1156.          70,
  1157.          0 ) ;
  1158.  
  1159.    cMnoText    = 30 ;
  1160.  
  1161.    usMnoStatus = MnoReadCharStr (
  1162.          szMnoText,
  1163.          &cMnoText,
  1164.          1,
  1165.          70,
  1166.          0 ) ;
  1167.  
  1168.  
  1169.    if ( usVioStatus != usMnoStatus )
  1170.       {
  1171.       fprintf (
  1172.          stderr,
  1173.          "Test ReadCharStr 006 bad return, Vio=%d Mno=%d",
  1174.          usVioStatus,
  1175.          usMnoStatus ) ;
  1176.  
  1177.       exit ( 1 ) ;
  1178.       }
  1179.  
  1180.  
  1181.    if ( cVioText != cMnoText )
  1182.       {
  1183.       fprintf (
  1184.          stderr,
  1185.          "Test ReadCharStr 006 bad length, Vio=%d Mno=%d",
  1186.          cVioText,
  1187.          cMnoText ) ;
  1188.  
  1189.       exit ( 1 ) ;
  1190.       }
  1191.  
  1192.    szMnoText [ cMnoText ]  = '\0' ;
  1193.    szVioText [ cVioText ]  = '\0' ;
  1194.  
  1195.    if ( strcmp(szMnoText, szVioText) != 0 )
  1196.       {
  1197.       fprintf (
  1198.          stderr,
  1199.          "Test ReadCharStr 006 not matched, \nVio=%s \nMno=%s",
  1200.          szVioText,
  1201.          szMnoText ) ;
  1202.  
  1203.       exit ( 1 ) ;
  1204.       }
  1205.  
  1206.  
  1207.    cVioText    = 300 ;
  1208.  
  1209.    usVioStatus = VioReadCharStr (
  1210.          pszVioText,
  1211.          &cVioText,
  1212.          24,
  1213.          60,
  1214.          0 ) ;
  1215.  
  1216.    cMnoText    = 300 ;
  1217.  
  1218.    usMnoStatus = MnoReadCharStr (
  1219.          szMnoText,
  1220.          &cMnoText,
  1221.          24,
  1222.          60,
  1223.          0 ) ;
  1224.  
  1225.  
  1226.    if ( usVioStatus != usMnoStatus )
  1227.       {
  1228.       fprintf (
  1229.          stderr,
  1230.          "Test ReadCharStr 007 bad return, Vio=%d Mno=%d",
  1231.          usVioStatus,
  1232.          usMnoStatus ) ;
  1233.  
  1234.       exit ( 1 ) ;
  1235.       }
  1236.  
  1237.  
  1238.    if ( cVioText != cMnoText )
  1239.       {
  1240.       fprintf (
  1241.          stderr,
  1242.          "Test ReadCharStr 007 bad length, Vio=%d Mno=%d",
  1243.          cVioText,
  1244.          cMnoText ) ;
  1245.  
  1246.       exit ( 1 ) ;
  1247.       }
  1248.  
  1249.    szMnoText [ cMnoText ]  = '\0' ;
  1250.    szVioText [ cVioText ]  = '\0' ;
  1251.  
  1252.    if ( strcmp(szMnoText, szVioText) != 0 )
  1253.       {
  1254.       fprintf (
  1255.          stderr,
  1256.          "Test ReadCharStr 007 not matched, \nVio=%s \nMno=%s",
  1257.          szVioText,
  1258.          szMnoText ) ;
  1259.  
  1260.       exit ( 1 ) ;
  1261.       }
  1262.  
  1263.    CompareCharacterBufs () ;
  1264.  
  1265.    DosSleep ( SHORTSLEEP ) ;
  1266.  
  1267.  
  1268.  
  1269.  
  1270.    }           /* End of TestMnoReadCharStr function.          */
  1271.  
  1272.  
  1273. /*------------------------------------------------------------*/
  1274. /* Test Mno Get Phys Buf.                                     */
  1275. /*------------------------------------------------------------*/
  1276.  
  1277. VOID              TestMnoGetPhysBuf ()
  1278.  
  1279.    {
  1280.    USHORT         usVioStatus    = 0 ;
  1281.    USHORT         usMnoStatus    = 0 ;
  1282.    VIOPHYSBUF     vioPhysBuffer ;
  1283.    UCHAR          szText [ 200 ] = "" ;
  1284.    PBYTE          pColorBuf      = NULL ;
  1285.    PBYTE          pMonoBuf       = NULL ;
  1286.  
  1287.  
  1288.  
  1289.    vioPhysBuffer.cb  = 4000 ;
  1290.  
  1291.    usVioStatus       = VioGetPhysBuf ( &vioPhysBuffer, 0 ) ;
  1292.  
  1293.                /*---------------------------------------------*/
  1294.                /* When debugging under CodeView, VioGetPhysBuf*/
  1295.                /* will fail because the call is made from a   */
  1296.                /* background process.                         */
  1297.                /*---------------------------------------------*/
  1298.  
  1299.  
  1300.    if ( usVioStatus != 0 )
  1301.       return ;
  1302.  
  1303.    pColorBuf         = MAKEP ( vioPhysBuffer.asel [ 0 ], 0 ) ;
  1304.  
  1305.    *pColorBuf++      = 'T' ;
  1306.    *pColorBuf++      = 0x70 ;
  1307.    *pColorBuf++      = 'e' ;
  1308.    *pColorBuf++      = 0x70 ;
  1309.    *pColorBuf++      = 's' ;
  1310.    *pColorBuf++      = 0x70 ;
  1311.    *pColorBuf++      = 't' ;
  1312.    *pColorBuf++      = 0x70 ;
  1313.    *pColorBuf++      = '.' ;
  1314.    *pColorBuf++      = 0x70 ;
  1315.  
  1316.    usMnoStatus       = MnoGetPhysBuf ( &vioPhysBuffer, 0 ) ;
  1317.  
  1318.    pMonoBuf          = MAKEP ( vioPhysBuffer.asel [ 0 ], 0 ) ;
  1319.  
  1320.    *pMonoBuf++       = 'T' ;
  1321.    *pMonoBuf++       = 0x70 ;
  1322.    *pMonoBuf++       = 'e' ;
  1323.    *pMonoBuf++       = 0x70 ;
  1324.    *pMonoBuf++       = 's' ;
  1325.    *pMonoBuf++       = 0x70 ;
  1326.    *pMonoBuf++       = 't' ;
  1327.    *pMonoBuf++       = 0x70 ;
  1328.    *pMonoBuf++       = '.' ;
  1329.    *pMonoBuf++       = 0x70 ;
  1330.  
  1331.    CompareCharacterBufs () ;
  1332.    CompareVideoBufs () ;
  1333.  
  1334.    DosSleep ( SHORTSLEEP ) ;
  1335.  
  1336.    }           /* End of TestMnoGetPhysBuf function.          */
  1337.  
  1338.  
  1339. /*------------------------------------------------------------*/
  1340. /* Test Mno Get Cur Type.                                     */
  1341. /*------------------------------------------------------------*/
  1342.  
  1343. VOID              TestMnoGetCurType ()
  1344.  
  1345.    {
  1346.    USHORT         usMnoStatus    = 0 ;
  1347.    USHORT         usVioStatus    = 0 ;
  1348.    VIOCURSORINFO  vioCursorInfo ;
  1349.    UCHAR          szText [ 200 ] = "" ;
  1350.  
  1351.    usVioStatus = VioGetCurType ( &vioCursorInfo, 10 ) ;
  1352.    usMnoStatus = MnoGetCurType ( &vioCursorInfo, 10 ) ;
  1353.  
  1354.    if ( usVioStatus != usMnoStatus )
  1355.       {
  1356.       fprintf (
  1357.          stderr,
  1358.          "001 TestMnoGetCurType bad return, Vio=%d Mno=%d\n",
  1359.          usVioStatus,
  1360.          usMnoStatus ) ;
  1361.  
  1362.       exit ( 1 ) ;
  1363.       }
  1364.  
  1365.  
  1366.    usVioStatus = VioGetCurType ( &vioCursorInfo, 0 ) ;
  1367.  
  1368.    sprintf (
  1369.       szText,
  1370.       "Cursor Start=%d End=%d Width=%d attr=%x\r\n",
  1371.       vioCursorInfo.yStart,
  1372.       vioCursorInfo.cEnd,
  1373.       vioCursorInfo.cx,
  1374.       vioCursorInfo.attr ) ;
  1375.  
  1376.  
  1377.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  1378.  
  1379.  
  1380.  
  1381.    usMnoStatus = MnoGetCurType ( &vioCursorInfo, 0 ) ;
  1382.  
  1383.    sprintf (
  1384.       szText,
  1385.       "Cursor Start=%d End=%d Width=%d attr=%x\r\n",
  1386.       vioCursorInfo.yStart,
  1387.       vioCursorInfo.cEnd,
  1388.       vioCursorInfo.cx,
  1389.       vioCursorInfo.attr ) ;
  1390.  
  1391.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  1392.  
  1393.    }           /* End of TestMnoGetCurType function.          */
  1394.  
  1395.  
  1396. /*------------------------------------------------------------*/
  1397. /* Test Mno Set Cur Type.                                     */
  1398. /*------------------------------------------------------------*/
  1399.  
  1400. VOID              TestMnoSetCurType ()
  1401.  
  1402.    {
  1403.    USHORT         usMnoStatus    = 0 ;
  1404.    USHORT         usVioStatus    = 0 ;
  1405.    VIOCURSORINFO  vioCursorInfo ;
  1406.    UCHAR          szText [ 200 ] = "" ;
  1407.  
  1408.    usVioStatus = VioSetCurType ( &vioCursorInfo, 10 ) ;
  1409.    usMnoStatus = MnoSetCurType ( &vioCursorInfo, 10 ) ;
  1410.  
  1411.    if ( usVioStatus != usMnoStatus )
  1412.       {
  1413.       fprintf (
  1414.          stderr,
  1415.          "001 TestMnoSetCurType bad return, Vio=%d Mno=%d\n",
  1416.          usVioStatus,
  1417.          usMnoStatus ) ;
  1418.  
  1419.       exit ( 1 ) ;
  1420.       }
  1421.  
  1422.  
  1423.    usVioStatus          = VioGetCurType ( &vioCursorInfo, 0 ) ;
  1424.  
  1425.    sprintf (
  1426.       szText,
  1427.       "Start=%d End=%d Width=%d attr=%x\r\n",
  1428.       vioCursorInfo.yStart,
  1429.       vioCursorInfo.cEnd,
  1430.       vioCursorInfo.cx,
  1431.       vioCursorInfo.attr ) ;
  1432.  
  1433.  
  1434.    usVioStatus          = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  1435.  
  1436.  
  1437.  
  1438.    usMnoStatus          = MnoGetCurType ( &vioCursorInfo, 0 ) ;
  1439.  
  1440.    sprintf (
  1441.       szText,
  1442.       "Start=%d End=%d Width=%d attr=%x\r\n",
  1443.       vioCursorInfo.yStart,
  1444.       vioCursorInfo.cEnd,
  1445.       vioCursorInfo.cx,
  1446.       vioCursorInfo.attr ) ;
  1447.  
  1448.    usMnoStatus          = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  1449.  
  1450.                /*---------------------------------------------*/
  1451.                /* Clear the screen to avoid incorrect         */
  1452.                /* initialization of cursor size by VIO.       */
  1453.                /*---------------------------------------------*/
  1454.  
  1455.    strcpy ( szText, "\033[2J" ) ;
  1456.  
  1457.    usVioStatus          = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  1458.    usMnoStatus          = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  1459.  
  1460.  
  1461.  
  1462.    vioCursorInfo.yStart = 0 ;
  1463.    usVioStatus          = VioSetCurType ( &vioCursorInfo, 0 ) ;
  1464.    usMnoStatus          = MnoSetCurType ( &vioCursorInfo, 0 ) ;
  1465.  
  1466.    if ( usVioStatus != usMnoStatus )
  1467.       {
  1468.       fprintf (
  1469.          stderr,
  1470.          "002 TestMnoSetCurType bad return, Vio=%d Mno=%d\n",
  1471.          usVioStatus,
  1472.          usMnoStatus ) ;
  1473.  
  1474.       exit ( 1 ) ;
  1475.       }
  1476.  
  1477.    CompareCharacterBufs () ;
  1478.    CompareVideoBufs () ;
  1479.  
  1480.    DosSleep ( SHORTSLEEP ) ;
  1481.  
  1482.  
  1483.    vioCursorInfo.cEnd   = 7 ;
  1484.    usVioStatus          = VioSetCurType ( &vioCursorInfo, 0 ) ;
  1485.    usMnoStatus          = MnoSetCurType ( &vioCursorInfo, 0 ) ;
  1486.  
  1487.    if ( usVioStatus != usMnoStatus )
  1488.       {
  1489.       fprintf (
  1490.          stderr,
  1491.          "003 TestMnoSetCurType bad return, Vio=%d Mno=%d\n",
  1492.          usVioStatus,
  1493.          usMnoStatus ) ;
  1494.  
  1495.       exit ( 1 ) ;
  1496.       }
  1497.    CompareCharacterBufs () ;
  1498.    CompareVideoBufs () ;
  1499.  
  1500.    DosSleep ( SHORTSLEEP ) ;
  1501.  
  1502.  
  1503.    vioCursorInfo.attr   = 0xFFFF ;
  1504.    usVioStatus          = VioSetCurType ( &vioCursorInfo, 0 ) ;
  1505.    usMnoStatus          = MnoSetCurType ( &vioCursorInfo, 0 ) ;
  1506.  
  1507.    if ( usVioStatus != usMnoStatus )
  1508.       {
  1509.       fprintf (
  1510.          stderr,
  1511.          "004 TestMnoSetCurType bad return, Vio=%d Mno=%d\n",
  1512.          usVioStatus,
  1513.          usMnoStatus ) ;
  1514.  
  1515.       exit ( 1 ) ;
  1516.       }
  1517.    CompareCharacterBufs () ;
  1518.    CompareVideoBufs () ;
  1519.  
  1520.    DosSleep ( SHORTSLEEP ) ;
  1521.  
  1522.  
  1523.    vioCursorInfo.attr   = 0 ;
  1524.    usVioStatus          = VioSetCurType ( &vioCursorInfo, 0 ) ;
  1525.    usMnoStatus          = MnoSetCurType ( &vioCursorInfo, 0 ) ;
  1526.  
  1527.    if ( usVioStatus != usMnoStatus )
  1528.       {
  1529.       fprintf (
  1530.          stderr,
  1531.          "005 TestMnoSetCurType bad return, Vio=%d Mno=%d\n",
  1532.          usVioStatus,
  1533.          usMnoStatus ) ;
  1534.  
  1535.       exit ( 1 ) ;
  1536.       }
  1537.    CompareCharacterBufs () ;
  1538.    CompareVideoBufs () ;
  1539.  
  1540.    DosSleep ( SHORTSLEEP ) ;
  1541.  
  1542.  
  1543.    usVioStatus = VioGetCurType ( &vioCursorInfo, 0 ) ;
  1544.  
  1545.    sprintf (
  1546.       szText,
  1547.       "Start=%d End=%d Width=%d attr=%x\r\n",
  1548.       vioCursorInfo.yStart,
  1549.       vioCursorInfo.cEnd,
  1550.       vioCursorInfo.cx,
  1551.       vioCursorInfo.attr ) ;
  1552.  
  1553.  
  1554.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  1555.  
  1556.  
  1557.  
  1558.    usMnoStatus = MnoGetCurType ( &vioCursorInfo, 0 ) ;
  1559.  
  1560.    sprintf (
  1561.       szText,
  1562.       "Start=%d End=%d Width=%d attr=%x\r\n",
  1563.       vioCursorInfo.yStart,
  1564.       vioCursorInfo.cEnd,
  1565.       vioCursorInfo.cx,
  1566.       vioCursorInfo.attr ) ;
  1567.  
  1568.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  1569.  
  1570.    CompareCharacterBufs () ;
  1571.    CompareVideoBufs () ;
  1572.  
  1573.    DosSleep ( SHORTSLEEP ) ;
  1574.  
  1575.    }           /* End of TestMnoSetCurType function.          */
  1576.  
  1577.  
  1578. /*------------------------------------------------------------*/
  1579. /* Mono Vio Experiment.                                       */
  1580. /*------------------------------------------------------------*/
  1581.  
  1582. VOID              MonoVioExperiment ()
  1583.  
  1584.    {
  1585.    USHORT         usVioStatus = 0 ;
  1586.    VIOCURSORINFO  viociCursor ;
  1587.    usVioStatus                = VioGetCurType ( &viociCursor, 0 ) ;
  1588.    printf ( "usVioStatus=%d\n", usVioStatus ) ;
  1589.    printf ( "attr=%d\n", viociCursor.attr ) ;
  1590.    printf ( "Start=%d\n", viociCursor.yStart ) ;
  1591.    printf ( "End=%d\n", viociCursor.cEnd ) ;
  1592.    printf ( "Width=%d\n", viociCursor.cx ) ;
  1593.    viociCursor.attr           =
  1594.       ( viociCursor.attr == -1 ) ? 0 : -1 ;
  1595.    usVioStatus                = VioSetCurType ( &viociCursor, 0 ) ;
  1596.    printf ( "attr=%d\n", viociCursor.attr ) ;
  1597.    CompareCharacterBufs () ;
  1598.    CompareVideoBufs () ;
  1599.  
  1600.    DosSleep ( SHORTSLEEP ) ;
  1601.  
  1602.    usVioStatus                = VioGetCurType ( &viociCursor, 0 ) ;
  1603.    printf ( "usVioStatus=%d\n", usVioStatus ) ;
  1604.    printf ( "attr=%d\n", viociCursor.attr ) ;
  1605.    viociCursor.yStart   = 5 ;
  1606.    viociCursor.attr     =
  1607.       ( viociCursor.attr == -1 ) ? 0 : -1 ;
  1608.    usVioStatus                = VioSetCurType ( &viociCursor, 0 ) ;
  1609.    printf ( "attr=%d\n", viociCursor.attr ) ;
  1610.    CompareCharacterBufs () ;
  1611.    CompareVideoBufs () ;
  1612.  
  1613.    DosSleep ( SHORTSLEEP ) ;
  1614.  
  1615.  
  1616.  
  1617.    }           /* End of MonoVioExperiment function.          */
  1618.  
  1619.  
  1620. /*------------------------------------------------------------*/
  1621. /* Make Test Screen.                                          */
  1622. /*------------------------------------------------------------*/
  1623.  
  1624. VOID              MakeTestScreen ()
  1625.  
  1626.    {
  1627.    USHORT         usMnoStatus       = 0 ;
  1628.    USHORT         usVioStatus       = 0 ;
  1629.    USHORT         usRow             = 0 ;
  1630.    USHORT         usColumn          = 0 ;
  1631.    USHORT         i      = 0 ;
  1632.    BYTE           bCell [ 10 ]   =
  1633.    { '0', 0x0F,
  1634.      '1', 0x07,
  1635.      '2', 0x07,
  1636.      '3', 0x07,
  1637.      '4', 0x07 } ;
  1638.  
  1639.                /*---------------------------------------------*/
  1640.                /*                                             */
  1641.                /*  Monochrome Adapter Attribute Byte.         */
  1642.                /*                                             */
  1643.                /*                                             */
  1644.                /*  0... ....  No blinking                     */
  1645.                /*  1... ....  Blinking                        */
  1646.                /*  .... 0...  Normal foreground intensity.    */
  1647.                /*  .... 1...  Bright foreground intensity.    */
  1648.                /*  .... .001  Underlining                     */
  1649.                /*  .000 ....  Black background.               */
  1650.                /*  .111 ....  White background.               */
  1651.                /*  .... .000  Black foreground.               */
  1652.                /*  .... .111  White foreground.               */
  1653.                /*                                             */
  1654.                /*  0111 0000  \160  0x70   Reverse video.     */
  1655.                /*  1111 0000  \360  0x70   Blinking reverse.  */
  1656.                /*  1000 0111  \207  0x80   Blinking.          */
  1657.                /*  0000 1111  \017  0x0F   Bold.              */
  1658.                /*  0000 0111  \007  0x07   Normal.            */
  1659.                /*  0000 0001  \001  0x01   Underline.         */
  1660.                /*                                             */
  1661.                /*---------------------------------------------*/
  1662.  
  1663.    for ( usRow = 0 ; usRow < 25 ; usRow++ )
  1664.  
  1665.          usVioStatus = VioWrtNCell (
  1666.                ( PBYTE ) ( bCell + ( 2 * ( usRow % 5 ))),
  1667.                80,
  1668.                usRow,
  1669.                0,
  1670.                0 ) ;
  1671.  
  1672.    for ( usRow = 0 ; usRow < 25 ; usRow++ )
  1673.  
  1674.          usVioStatus = MnoWrtNCell (
  1675.                ( PBYTE ) ( bCell + ( 2 * ( usRow % 5 ))),
  1676.                80,
  1677.                usRow,
  1678.                0,
  1679.                0 ) ;
  1680.  
  1681.    }           /* End of MakeTestScreen function.          */
  1682.  
  1683.  
  1684. /*------------------------------------------------------------*/
  1685. /* Test Mno Scrolling.                                        */
  1686. /*------------------------------------------------------------*/
  1687.  
  1688. VOID              TestMnoScrolling ()
  1689.  
  1690.    {
  1691.    USHORT         usMnoStatus       = 0 ;
  1692.    USHORT         usVioStatus       = 0 ;
  1693.    USHORT         usRow             = 0 ;
  1694.    USHORT         usColumn          = 0 ;
  1695.    USHORT         i                 = 0 ;
  1696.    UCHAR          szText [ 5000 ]   = "" ;
  1697.    BYTE           chChar            = ' ' ;
  1698.    PBYTE          pchChar           = &chChar ;
  1699.    BYTE           bCell [ 2 ]       = { 0 } ;
  1700.    BYTE           bAttr = 0x00 ;
  1701.  
  1702.    bAttr                = 0x70 ;
  1703.  
  1704.  
  1705.    bCell [ 0 ]          = '.' ;
  1706.    bCell [ 1 ]          = 0x0F ;
  1707.  
  1708.    MakeTestScreen () ;
  1709.  
  1710.  
  1711.    for ( i  = 0 ; i < 200 ; i++ )
  1712.       {
  1713.  
  1714.  
  1715.                /*---------------------------------------------*/
  1716.                /* Scroll the box at  (row,col):               */
  1717.                /*                                             */
  1718.                /*            (0,0)-----------+                */
  1719.                /*              |             |                */
  1720.                /*              |             |                */
  1721.                /*              |             |                */
  1722.                /*              +----------(24,5)              */
  1723.                /*                                             */
  1724.                /* Down 1 row.                                 */
  1725.                /*---------------------------------------------*/
  1726.  
  1727.  
  1728.       usVioStatus = VioScrollDn (
  1729.             0,
  1730.             0,
  1731.             24,
  1732.             5,
  1733.             1,
  1734.             bCell,
  1735.             0 ) ;
  1736.  
  1737.       usMnoStatus = MnoScrollDn (
  1738.             0,
  1739.             0,
  1740.             24,
  1741.             5,
  1742.             1,
  1743.             bCell,
  1744.             0 ) ;
  1745.  
  1746.  
  1747.                /*---------------------------------------------*/
  1748.                /* Scroll the box at  (row,col):               */
  1749.                /*                                             */
  1750.                /*            (19,0)----------+                */
  1751.                /*              |             |                */
  1752.                /*              |             |                */
  1753.                /*              |             |                */
  1754.                /*              +----------(24,79)             */
  1755.                /*                                             */
  1756.                /* Right 1 column.                             */
  1757.                /*---------------------------------------------*/
  1758.  
  1759.  
  1760.       usVioStatus = VioScrollRt (
  1761.             19,
  1762.             0,
  1763.             24,
  1764.             79,
  1765.             1,
  1766.             bCell,
  1767.             0 ) ;
  1768.  
  1769.       usMnoStatus = MnoScrollRt (
  1770.             19,
  1771.             0,
  1772.             24,
  1773.             79,
  1774.             1,
  1775.             bCell,
  1776.             0 ) ;
  1777.  
  1778.  
  1779.  
  1780.                /*---------------------------------------------*/
  1781.                /* Scroll the box at  (row,col):               */
  1782.                /*                                             */
  1783.                /*            (0,74)----------+                */
  1784.                /*              |             |                */
  1785.                /*              |             |                */
  1786.                /*              |             |                */
  1787.                /*              +----------(24,79)             */
  1788.                /*                                             */
  1789.                /* Up 1 row.                                   */
  1790.                /*---------------------------------------------*/
  1791.  
  1792.  
  1793.       usVioStatus = VioScrollUp (
  1794.             0,
  1795.             74,
  1796.             24,
  1797.             79,
  1798.             1,
  1799.             bCell,
  1800.             0 ) ;
  1801.  
  1802.       usMnoStatus = MnoScrollUp (
  1803.             0,
  1804.             74,
  1805.             24,
  1806.             79,
  1807.             1,
  1808.             bCell,
  1809.             0 ) ;
  1810.  
  1811.  
  1812.  
  1813.                /*---------------------------------------------*/
  1814.                /* Scroll the box at  (row,col):               */
  1815.                /*                                             */
  1816.                /*            (0,0)-----------+                */
  1817.                /*              |             |                */
  1818.                /*              |             |                */
  1819.                /*              |             |                */
  1820.                /*              +----------(5,79)              */
  1821.                /*                                             */
  1822.                /* Left 1 column.                              */
  1823.                /*---------------------------------------------*/
  1824.  
  1825.  
  1826.       usVioStatus = VioScrollLf (
  1827.             0,
  1828.             0,
  1829.             5,
  1830.             79,
  1831.             1,
  1832.             bCell,
  1833.             0 ) ;
  1834.  
  1835.       usMnoStatus = MnoScrollLf (
  1836.             0,
  1837.             0,
  1838.             5,
  1839.             79,
  1840.             1,
  1841.             bCell,
  1842.             0 ) ;
  1843.  
  1844.  
  1845.       DosSleep ( SHORTSLEEP ) ;
  1846.       }
  1847.    CompareCharacterBufs () ;
  1848.    CompareVideoBufs () ;
  1849.  
  1850.    DosSleep ( SHORTSLEEP ) ;
  1851.  
  1852.  
  1853.  
  1854.                /*---------------------------------------------*/
  1855.                /* Scroll the box at  (row,col):               */
  1856.                /*                                             */
  1857.                /*            (0,0)-----------+                */
  1858.                /*              |             |                */
  1859.                /*              |             |                */
  1860.                /*              |             |                */
  1861.                /*              +----------(24,79)             */
  1862.                /*                                             */
  1863.                /* Right 80 columns.                           */
  1864.                /*---------------------------------------------*/
  1865.  
  1866.  
  1867.    bCell [ 0 ] = ' ' ;
  1868.    bCell [ 1 ] = 0x70 ;
  1869.  
  1870.  
  1871.    usVioStatus = VioScrollRt (
  1872.          0,
  1873.          0,
  1874.          0xFFFF,
  1875.          0xFFFF,
  1876.          0xFFFF,
  1877.          bCell,
  1878.          0 ) ;
  1879.  
  1880.    usMnoStatus = MnoScrollRt (
  1881.          0,
  1882.          0,
  1883.          0xFFFF,
  1884.          0xFFFF,
  1885.          0xFFFF,
  1886.          bCell,
  1887.          0 ) ;
  1888.    CompareCharacterBufs () ;
  1889.    CompareVideoBufs () ;
  1890.  
  1891.    DosSleep ( SHORTSLEEP ) ;
  1892.  
  1893.  
  1894.  
  1895.    }           /* End of TestMnoScrolling function.            */
  1896.  
  1897.  
  1898. /*------------------------------------------------------------*/
  1899. /* Test Mno Scroll Rt.                                        */
  1900. /*------------------------------------------------------------*/
  1901.  
  1902. VOID              TestMnoScrollRt ()
  1903.  
  1904.    {
  1905.    USHORT         usMnoStatus       = 0 ;
  1906.    USHORT         usVioStatus       = 0 ;
  1907.    USHORT         usRow             = 0 ;
  1908.    USHORT         usColumn          = 0 ;
  1909.    USHORT         i                 = 0 ;
  1910.    UCHAR          szText [ 5000 ]   = "" ;
  1911.    BYTE           chChar            = ' ' ;
  1912.    PBYTE          pchChar           = &chChar ;
  1913.    BYTE           bCell [ 2 ]       = { 0 } ;
  1914.    BYTE           bAttr = 0x00 ;
  1915.  
  1916.    bAttr                = 0x70 ;
  1917.  
  1918.  
  1919.    bCell [ 0 ]          = '.' ;
  1920.    bCell [ 1 ]          = 0x0F ;
  1921.  
  1922.    MakeTestScreen () ;
  1923.  
  1924.    usVioStatus          = VioScrollRt (
  1925.          75,
  1926.          80,
  1927.          0,
  1928.          81,
  1929.          0,
  1930.          bCell,
  1931.          0 ) ;
  1932.  
  1933.    usMnoStatus          = MnoScrollRt (
  1934.          75,
  1935.          80,
  1936.          0,
  1937.          81,
  1938.          0,
  1939.          bCell,
  1940.          0 ) ;
  1941.  
  1942.    if ( usVioStatus != usMnoStatus )
  1943.       {
  1944.       fprintf (
  1945.          stderr,
  1946.          "Test ScrollRt 001 bad return, Vio=%d Mno=%d",
  1947.          usVioStatus,
  1948.          usMnoStatus ) ;
  1949.  
  1950.       exit ( 1 ) ;
  1951.       }
  1952.  
  1953.  
  1954.    usVioStatus = VioScrollRt (
  1955.          0,
  1956.          65,
  1957.          0,
  1958.          61,
  1959.          0,
  1960.          bCell,
  1961.          0 ) ;
  1962.  
  1963.    usMnoStatus = MnoScrollRt (
  1964.          0,
  1965.          65,
  1966.          0,
  1967.          61,
  1968.          0,
  1969.          bCell,
  1970.          0 ) ;
  1971.  
  1972.  
  1973.    if ( usVioStatus != usMnoStatus )
  1974.       {
  1975.       fprintf (
  1976.          stderr,
  1977.          "Test ScrollRt 002 bad return, Vio=%d Mno=%d",
  1978.          usVioStatus,
  1979.          usMnoStatus ) ;
  1980.  
  1981.       exit ( 1 ) ;
  1982.       }
  1983.  
  1984.    usVioStatus = VioScrollRt (
  1985.          0,
  1986.          0,
  1987.          24,
  1988.          79,
  1989.          10,
  1990.          bCell,
  1991.          10 ) ;
  1992.  
  1993.    usMnoStatus = MnoScrollRt (
  1994.          0,
  1995.          0,
  1996.          24,
  1997.          79,
  1998.          10,
  1999.          bCell,
  2000.          10 ) ;
  2001.  
  2002.  
  2003.    if ( usVioStatus != usMnoStatus )
  2004.       {
  2005.       fprintf (
  2006.          stderr,
  2007.          "Test ScrollRt 003 bad return, Vio=%d Mno=%d",
  2008.          usVioStatus,
  2009.          usMnoStatus ) ;
  2010.  
  2011.       exit ( 1 ) ;
  2012.       }
  2013.  
  2014.  
  2015.    strcpy ( szText, "Test of ScrollRt 001" ) ;
  2016.  
  2017.  
  2018.    usVioStatus = VioWrtCharStr (
  2019.          szText,
  2020.          strlen ( szText ),
  2021.          0,
  2022.          10,
  2023.          0 ) ;
  2024.  
  2025.    usMnoStatus = MnoWrtCharStr (
  2026.          szText,
  2027.          strlen ( szText ),
  2028.          0,
  2029.          10,
  2030.          0 ) ;
  2031.  
  2032.  
  2033.    usVioStatus = VioWrtNAttr (
  2034.          &bAttr,
  2035.          strlen ( szText ),
  2036.          0,
  2037.          10,
  2038.          0 ) ;
  2039.  
  2040.    usMnoStatus = MnoWrtNAttr (
  2041.          &bAttr,
  2042.          strlen ( szText ),
  2043.          0,
  2044.          10,
  2045.          0 ) ;
  2046.  
  2047.                /*---------------------------------------------*/
  2048.                /* Scroll the character at (0,0):              */
  2049.                /*                                             */
  2050.                /* Right 1 column.                             */
  2051.                /*---------------------------------------------*/
  2052.  
  2053.    usVioStatus = VioScrollRt (
  2054.          0,
  2055.          0,
  2056.          0,
  2057.          0,
  2058.          1,
  2059.          bCell,
  2060.          0 ) ;
  2061.  
  2062.    usMnoStatus = MnoScrollRt (
  2063.          0,
  2064.          0,
  2065.          0,
  2066.          0,
  2067.          1,
  2068.          bCell,
  2069.          0 ) ;
  2070.    CompareCharacterBufs () ;
  2071.    CompareVideoBufs () ;
  2072.  
  2073.    DosSleep ( SHORTSLEEP ) ;
  2074.  
  2075.  
  2076.                /*---------------------------------------------*/
  2077.                /* Scroll the box at  (row,col):               */
  2078.                /*                                             */
  2079.                /*            (1,1)-----------+                */
  2080.                /*              |             |                */
  2081.                /*              |             |                */
  2082.                /*              |             |                */
  2083.                /*              +-----------(2,2)              */
  2084.                /*                                             */
  2085.                /* Right 1 column.                             */
  2086.                /*---------------------------------------------*/
  2087.  
  2088.  
  2089.    usVioStatus = VioScrollRt (
  2090.          1,
  2091.          1,
  2092.          2,
  2093.          2,
  2094.          1,
  2095.          bCell,
  2096.          0 ) ;
  2097.  
  2098.    usMnoStatus = MnoScrollRt (
  2099.          1,
  2100.          1,
  2101.          2,
  2102.          2,
  2103.          1,
  2104.          bCell,
  2105.          0 ) ;
  2106.    CompareCharacterBufs () ;
  2107.    CompareVideoBufs () ;
  2108.  
  2109.    DosSleep ( SHORTSLEEP ) ;
  2110.  
  2111.  
  2112.  
  2113.    strcpy ( szText, "Test of ScrollRt 002" ) ;
  2114.  
  2115.    usVioStatus = VioWrtCharStr (
  2116.          szText,
  2117.          strlen ( szText ),
  2118.          0,
  2119.          10,
  2120.          0 ) ;
  2121.  
  2122.    usMnoStatus = MnoWrtCharStr (
  2123.          szText,
  2124.          strlen ( szText ),
  2125.          0,
  2126.          10,
  2127.          0 ) ;
  2128.  
  2129.                /*---------------------------------------------*/
  2130.                /* Scroll the box at  (row,col):               */
  2131.                /*                                             */
  2132.                /*            (2,2)-----------+                */
  2133.                /*              |             |                */
  2134.                /*              |             |                */
  2135.                /*              |             |                */
  2136.                /*              +-----------(6,79)             */
  2137.                /*                                             */
  2138.                /* Right 1 column.                             */
  2139.                /*---------------------------------------------*/
  2140.  
  2141.  
  2142.    usVioStatus = VioScrollRt (
  2143.          2,
  2144.          2,
  2145.          6,
  2146.          0xFFFF,
  2147.          2,
  2148.          bCell,
  2149.          0 ) ;
  2150.  
  2151.    usMnoStatus = MnoScrollRt (
  2152.          2,
  2153.          2,
  2154.          6,
  2155.          0xFFFF,
  2156.          2,
  2157.          bCell,
  2158.          0 ) ;
  2159.    CompareCharacterBufs () ;
  2160.    CompareVideoBufs () ;
  2161.  
  2162.    DosSleep ( SHORTSLEEP ) ;
  2163.  
  2164.  
  2165.    strcpy ( szText, "Test of ScrollRt 003" ) ;
  2166.  
  2167.    usVioStatus = VioWrtCharStr (
  2168.          szText,
  2169.          strlen ( szText ),
  2170.          0,
  2171.          10,
  2172.          0 ) ;
  2173.  
  2174.    usMnoStatus = MnoWrtCharStr (
  2175.          szText,
  2176.          strlen ( szText ),
  2177.          0,
  2178.          10,
  2179.          0 ) ;
  2180.  
  2181.                /*---------------------------------------------*/
  2182.                /* Scroll the box at  (row,col):               */
  2183.                /*                                             */
  2184.                /*           (15,10)----------+                */
  2185.                /*              |             |                */
  2186.                /*              |             |                */
  2187.                /*              |             |                */
  2188.                /*              +----------(20,79)             */
  2189.                /*                                             */
  2190.                /* Right 2 columns.                            */
  2191.                /*---------------------------------------------*/
  2192.  
  2193.  
  2194.    usVioStatus = VioScrollRt (
  2195.          15,
  2196.          10,
  2197.          20,
  2198.          79,
  2199.          2,
  2200.          bCell,
  2201.          0 ) ;
  2202.  
  2203.    usMnoStatus = MnoScrollRt (
  2204.          15,
  2205.          10,
  2206.          20,
  2207.          79,
  2208.          2,
  2209.          bCell,
  2210.          0 ) ;
  2211.    CompareCharacterBufs () ;
  2212.    CompareVideoBufs () ;
  2213.  
  2214.    DosSleep ( SHORTSLEEP ) ;
  2215.  
  2216.  
  2217.  
  2218.    strcpy ( szText, "Test of ScrollRt 004" ) ;
  2219.  
  2220.    usVioStatus = VioWrtCharStr (
  2221.          szText,
  2222.          strlen ( szText ),
  2223.          0,
  2224.          10,
  2225.          0 ) ;
  2226.  
  2227.    usMnoStatus = MnoWrtCharStr (
  2228.          szText,
  2229.          strlen ( szText ),
  2230.          0,
  2231.          10,
  2232.          0 ) ;
  2233.  
  2234.                /*---------------------------------------------*/
  2235.                /* Scroll the box at  (row,col):               */
  2236.                /*                                             */
  2237.                /*           (15,0)-----------+                */
  2238.                /*              |             |                */
  2239.                /*              |             |                */
  2240.                /*              |             |                */
  2241.                /*              +----------(15,30)             */
  2242.                /*                                             */
  2243.                /* Right 6 columns.                            */
  2244.                /*---------------------------------------------*/
  2245.  
  2246.  
  2247.    bCell [ 0 ] = '/' ;
  2248.    bCell [ 1 ] = 0x0F ;
  2249.  
  2250.  
  2251.    usVioStatus = VioScrollRt (
  2252.          15,
  2253.          0,
  2254.          15,
  2255.          30,
  2256.          6,
  2257.          bCell,
  2258.          0 ) ;
  2259.  
  2260.    usMnoStatus = MnoScrollRt (
  2261.          15,
  2262.          0,
  2263.          15,
  2264.          30,
  2265.          6,
  2266.          bCell,
  2267.          0 ) ;
  2268.  
  2269.    CompareCharacterBufs () ;
  2270.    CompareVideoBufs () ;
  2271.  
  2272.    DosSleep ( SHORTSLEEP ) ;
  2273.  
  2274.  
  2275.  
  2276.    strcpy ( szText, "Test of ScrollRt 005" ) ;
  2277.  
  2278.    usVioStatus = VioWrtCharStr (
  2279.          szText,
  2280.          strlen ( szText ),
  2281.          0,
  2282.          10,
  2283.          0 ) ;
  2284.  
  2285.    usMnoStatus = MnoWrtCharStr (
  2286.          szText,
  2287.          strlen ( szText ),
  2288.          0,
  2289.          10,
  2290.          0 ) ;
  2291.  
  2292.                /*---------------------------------------------*/
  2293.                /* Scroll the box at  (row,col):               */
  2294.                /*                                             */
  2295.                /*            (6,70)----------+                */
  2296.                /*              |             |                */
  2297.                /*              |             |                */
  2298.                /*              |             |                */
  2299.                /*              +----------(24,79)             */
  2300.                /*                                             */
  2301.                /* Right 5 columns.                            */
  2302.                /*---------------------------------------------*/
  2303.  
  2304.  
  2305.    bCell [ 0 ] = '-' ;
  2306.    bCell [ 1 ] = 0x0F ;
  2307.  
  2308.  
  2309.    usVioStatus = VioScrollRt (
  2310.          6,
  2311.          70,
  2312.          24,
  2313.          79,
  2314.          18,
  2315.          bCell,
  2316.          0 ) ;
  2317.  
  2318.    usMnoStatus = MnoScrollRt (
  2319.          6,
  2320.          70,
  2321.          24,
  2322.          79,
  2323.          18,
  2324.          bCell,
  2325.          0 ) ;
  2326.  
  2327.    CompareCharacterBufs () ;
  2328.    CompareVideoBufs () ;
  2329.  
  2330.    DosSleep ( SHORTSLEEP ) ;
  2331.  
  2332.  
  2333.  
  2334.    strcpy ( szText, "Test of ScrollRt 006" ) ;
  2335.  
  2336.    usVioStatus = VioWrtCharStr (
  2337.          szText,
  2338.          strlen ( szText ),
  2339.          0,
  2340.          10,
  2341.          0 ) ;
  2342.  
  2343.    usMnoStatus = MnoWrtCharStr (
  2344.          szText,
  2345.          strlen ( szText ),
  2346.          0,
  2347.          10,
  2348.          0 ) ;
  2349.  
  2350.                /*---------------------------------------------*/
  2351.                /* Scroll the box at  (row,col):               */
  2352.                /*                                             */
  2353.                /*            (8,60)----------+                */
  2354.                /*              |             |                */
  2355.                /*              |             |                */
  2356.                /*              |             |                */
  2357.                /*              +----------(20,75)             */
  2358.                /*                                             */
  2359.                /* Right 9 columns.                            */
  2360.                /*---------------------------------------------*/
  2361.  
  2362.  
  2363.    bCell [ 0 ] = '#' ;
  2364.    bCell [ 1 ] = 0x0F ;
  2365.  
  2366.  
  2367.    usVioStatus = VioScrollRt (
  2368.          8,
  2369.          60,
  2370.          20,
  2371.          75,
  2372.          9,
  2373.          bCell,
  2374.          0 ) ;
  2375.  
  2376.    usMnoStatus = MnoScrollRt (
  2377.          8,
  2378.          60,
  2379.          20,
  2380.          75,
  2381.          9,
  2382.          bCell,
  2383.          0 ) ;
  2384.  
  2385.    CompareCharacterBufs () ;
  2386.    CompareVideoBufs () ;
  2387.  
  2388.    DosSleep ( SHORTSLEEP ) ;
  2389.  
  2390.  
  2391.  
  2392.                /*---------------------------------------------*/
  2393.                /* Scroll the box at  (row,col):               */
  2394.                /*                                             */
  2395.                /*            (0,0)-----------+                */
  2396.                /*              |             |                */
  2397.                /*              |             |                */
  2398.                /*              |             |                */
  2399.                /*              +----------(24,79)             */
  2400.                /*                                             */
  2401.                /* Right 80 columns.                           */
  2402.                /*---------------------------------------------*/
  2403.  
  2404.  
  2405.    bCell [ 0 ] = ' ' ;
  2406.    bCell [ 1 ] = 0x70 ;
  2407.  
  2408.  
  2409.    usVioStatus = VioScrollRt (
  2410.          0,
  2411.          0,
  2412.          0xFFFF,
  2413.          0xFFFF,
  2414.          0xFFFF,
  2415.          bCell,
  2416.          0 ) ;
  2417.  
  2418.    usMnoStatus = MnoScrollRt (
  2419.          0,
  2420.          0,
  2421.          0xFFFF,
  2422.          0xFFFF,
  2423.          0xFFFF,
  2424.          bCell,
  2425.          0 ) ;
  2426.    CompareCharacterBufs () ;
  2427.    CompareVideoBufs () ;
  2428.  
  2429.    DosSleep ( SHORTSLEEP ) ;
  2430.  
  2431.  
  2432.  
  2433.    }           /* End of TestMnoScrollRt function.            */
  2434.  
  2435.  
  2436. /*------------------------------------------------------------*/
  2437. /* Test Mno Scroll Lf.                                        */
  2438. /*------------------------------------------------------------*/
  2439.  
  2440. VOID              TestMnoScrollLf ()
  2441.  
  2442.    {
  2443.    USHORT         usMnoStatus       = 0 ;
  2444.    USHORT         usVioStatus       = 0 ;
  2445.    USHORT         usRow             = 0 ;
  2446.    USHORT         usColumn          = 0 ;
  2447.    USHORT         i                 = 0 ;
  2448.    UCHAR          szText [ 5000 ]   = "" ;
  2449.    BYTE           chChar            = ' ' ;
  2450.    PBYTE          pchChar           = &chChar ;
  2451.    BYTE           bCell [ 2 ]       = { 0 } ;
  2452.    BYTE           bAttr = 0x00 ;
  2453.  
  2454.    bAttr                = 0x70 ;
  2455.  
  2456.  
  2457.    bCell [ 0 ]          = '.' ;
  2458.    bCell [ 1 ]          = 0x0F ;
  2459.  
  2460.    MakeTestScreen () ;
  2461.  
  2462.    usVioStatus          = VioScrollLf (
  2463.          75,
  2464.          80,
  2465.          0,
  2466.          81,
  2467.          0,
  2468.          bCell,
  2469.          0 ) ;
  2470.  
  2471.    usMnoStatus          = MnoScrollLf (
  2472.          75,
  2473.          80,
  2474.          0,
  2475.          81,
  2476.          0,
  2477.          bCell,
  2478.          0 ) ;
  2479.  
  2480.    if ( usVioStatus != usMnoStatus )
  2481.       {
  2482.       fprintf (
  2483.          stderr,
  2484.          "Test ScrollLf 001 bad return, Vio=%d Mno=%d",
  2485.          usVioStatus,
  2486.          usMnoStatus ) ;
  2487.  
  2488.       exit ( 1 ) ;
  2489.       }
  2490.  
  2491.  
  2492.    usVioStatus = VioScrollLf (
  2493.          0,
  2494.          65,
  2495.          0,
  2496.          61,
  2497.          0,
  2498.          bCell,
  2499.          0 ) ;
  2500.  
  2501.    usMnoStatus = MnoScrollLf (
  2502.          0,
  2503.          65,
  2504.          0,
  2505.          61,
  2506.          0,
  2507.          bCell,
  2508.          0 ) ;
  2509.  
  2510.  
  2511.    if ( usVioStatus != usMnoStatus )
  2512.       {
  2513.       fprintf (
  2514.          stderr,
  2515.          "Test ScrollLf 002 bad return, Vio=%d Mno=%d",
  2516.          usVioStatus,
  2517.          usMnoStatus ) ;
  2518.  
  2519.       exit ( 1 ) ;
  2520.       }
  2521.  
  2522.    usVioStatus = VioScrollLf (
  2523.          0,
  2524.          0,
  2525.          24,
  2526.          79,
  2527.          10,
  2528.          bCell,
  2529.          10 ) ;
  2530.  
  2531.    usMnoStatus = MnoScrollLf (
  2532.          0,
  2533.          0,
  2534.          24,
  2535.          79,
  2536.          10,
  2537.          bCell,
  2538.          10 ) ;
  2539.  
  2540.  
  2541.    if ( usVioStatus != usMnoStatus )
  2542.       {
  2543.       fprintf (
  2544.          stderr,
  2545.          "Test ScrollLf 003 bad return, Vio=%d Mno=%d",
  2546.          usVioStatus,
  2547.          usMnoStatus ) ;
  2548.  
  2549.       exit ( 1 ) ;
  2550.       }
  2551.  
  2552.  
  2553.    strcpy ( szText, "Test of ScrollLf 001" ) ;
  2554.  
  2555.  
  2556.    usVioStatus = VioWrtCharStr (
  2557.          szText,
  2558.          strlen ( szText ),
  2559.          0,
  2560.          10,
  2561.          0 ) ;
  2562.  
  2563.    usMnoStatus = MnoWrtCharStr (
  2564.          szText,
  2565.          strlen ( szText ),
  2566.          0,
  2567.          10,
  2568.          0 ) ;
  2569.  
  2570.  
  2571.    usVioStatus = VioWrtNAttr (
  2572.          &bAttr,
  2573.          strlen ( szText ),
  2574.          0,
  2575.          10,
  2576.          0 ) ;
  2577.  
  2578.    usMnoStatus = MnoWrtNAttr (
  2579.          &bAttr,
  2580.          strlen ( szText ),
  2581.          0,
  2582.          10,
  2583.          0 ) ;
  2584.  
  2585.                /*---------------------------------------------*/
  2586.                /* Scroll the character at (0,0):              */
  2587.                /*                                             */
  2588.                /* Left 1 column.                              */
  2589.                /*---------------------------------------------*/
  2590.  
  2591.    usVioStatus = VioScrollLf (
  2592.          0,
  2593.          0,
  2594.          0,
  2595.          0,
  2596.          1,
  2597.          bCell,
  2598.          0 ) ;
  2599.  
  2600.    usMnoStatus = MnoScrollLf (
  2601.          0,
  2602.          0,
  2603.          0,
  2604.          0,
  2605.          1,
  2606.          bCell,
  2607.          0 ) ;
  2608.    CompareCharacterBufs () ;
  2609.    CompareVideoBufs () ;
  2610.  
  2611.    DosSleep ( SHORTSLEEP ) ;
  2612.  
  2613.  
  2614.                /*---------------------------------------------*/
  2615.                /* Scroll the box at  (row,col):               */
  2616.                /*                                             */
  2617.                /*            (1,1)-----------+                */
  2618.                /*              |             |                */
  2619.                /*              |             |                */
  2620.                /*              |             |                */
  2621.                /*              +-----------(2,2)              */
  2622.                /*                                             */
  2623.                /* Left 1 column.                              */
  2624.                /*---------------------------------------------*/
  2625.  
  2626.  
  2627.    usVioStatus = VioScrollLf (
  2628.          1,
  2629.          1,
  2630.          2,
  2631.          2,
  2632.          1,
  2633.          bCell,
  2634.          0 ) ;
  2635.  
  2636.    usMnoStatus = MnoScrollLf (
  2637.          1,
  2638.          1,
  2639.          2,
  2640.          2,
  2641.          1,
  2642.          bCell,
  2643.          0 ) ;
  2644.    CompareCharacterBufs () ;
  2645.    CompareVideoBufs () ;
  2646.  
  2647.    DosSleep ( SHORTSLEEP ) ;
  2648.  
  2649.  
  2650.  
  2651.    strcpy ( szText, "Test of ScrollLf 002" ) ;
  2652.  
  2653.    usVioStatus = VioWrtCharStr (
  2654.          szText,
  2655.          strlen ( szText ),
  2656.          0,
  2657.          10,
  2658.          0 ) ;
  2659.  
  2660.    usMnoStatus = MnoWrtCharStr (
  2661.          szText,
  2662.          strlen ( szText ),
  2663.          0,
  2664.          10,
  2665.          0 ) ;
  2666.  
  2667.                /*---------------------------------------------*/
  2668.                /* Scroll the box at  (row,col):               */
  2669.                /*                                             */
  2670.                /*            (2,2)-----------+                */
  2671.                /*              |             |                */
  2672.                /*              |             |                */
  2673.                /*              |             |                */
  2674.                /*              +-----------(6,79)             */
  2675.                /*                                             */
  2676.                /* Left 1 column.                              */
  2677.                /*---------------------------------------------*/
  2678.  
  2679.  
  2680.    usVioStatus = VioScrollLf (
  2681.          2,
  2682.          2,
  2683.          6,
  2684.          0xFFFF,
  2685.          2,
  2686.          bCell,
  2687.          0 ) ;
  2688.  
  2689.    usMnoStatus = MnoScrollLf (
  2690.          2,
  2691.          2,
  2692.          6,
  2693.          0xFFFF,
  2694.          2,
  2695.          bCell,
  2696.          0 ) ;
  2697.    CompareCharacterBufs () ;
  2698.    CompareVideoBufs () ;
  2699.  
  2700.    DosSleep ( SHORTSLEEP ) ;
  2701.  
  2702.  
  2703.    strcpy ( szText, "Test of ScrollLf 003" ) ;
  2704.  
  2705.    usVioStatus = VioWrtCharStr (
  2706.          szText,
  2707.          strlen ( szText ),
  2708.          0,
  2709.          10,
  2710.          0 ) ;
  2711.  
  2712.    usMnoStatus = MnoWrtCharStr (
  2713.          szText,
  2714.          strlen ( szText ),
  2715.          0,
  2716.          10,
  2717.          0 ) ;
  2718.  
  2719.                /*---------------------------------------------*/
  2720.                /* Scroll the box at  (row,col):               */
  2721.                /*                                             */
  2722.                /*           (15,10)----------+                */
  2723.                /*              |             |                */
  2724.                /*              |             |                */
  2725.                /*              |             |                */
  2726.                /*              +----------(20,79)             */
  2727.                /*                                             */
  2728.                /* Left 2 columns.                             */
  2729.                /*---------------------------------------------*/
  2730.  
  2731.  
  2732.    usVioStatus = VioScrollLf (
  2733.          15,
  2734.          10,
  2735.          20,
  2736.          79,
  2737.          2,
  2738.          bCell,
  2739.          0 ) ;
  2740.  
  2741.    usMnoStatus = MnoScrollLf (
  2742.          15,
  2743.          10,
  2744.          20,
  2745.          79,
  2746.          2,
  2747.          bCell,
  2748.          0 ) ;
  2749.    CompareCharacterBufs () ;
  2750.    CompareVideoBufs () ;
  2751.  
  2752.    DosSleep ( SHORTSLEEP ) ;
  2753.  
  2754.  
  2755.  
  2756.    strcpy ( szText, "Test of ScrollLf 004" ) ;
  2757.  
  2758.    usVioStatus = VioWrtCharStr (
  2759.          szText,
  2760.          strlen ( szText ),
  2761.          0,
  2762.          10,
  2763.          0 ) ;
  2764.  
  2765.    usMnoStatus = MnoWrtCharStr (
  2766.          szText,
  2767.          strlen ( szText ),
  2768.          0,
  2769.          10,
  2770.          0 ) ;
  2771.  
  2772.                /*---------------------------------------------*/
  2773.                /* Scroll the box at  (row,col):               */
  2774.                /*                                             */
  2775.                /*           (15,0)-----------+                */
  2776.                /*              |             |                */
  2777.                /*              |             |                */
  2778.                /*              |             |                */
  2779.                /*              +----------(15,30)             */
  2780.                /*                                             */
  2781.                /* Left 6 columns.                             */
  2782.                /*---------------------------------------------*/
  2783.  
  2784.  
  2785.    bCell [ 0 ] = '/' ;
  2786.    bCell [ 1 ] = 0x0F ;
  2787.  
  2788.  
  2789.    usVioStatus = VioScrollLf (
  2790.          15,
  2791.          0,
  2792.          15,
  2793.          30,
  2794.          6,
  2795.          bCell,
  2796.          0 ) ;
  2797.  
  2798.    usMnoStatus = MnoScrollLf (
  2799.          15,
  2800.          0,
  2801.          15,
  2802.          30,
  2803.          6,
  2804.          bCell,
  2805.          0 ) ;
  2806.  
  2807.    CompareCharacterBufs () ;
  2808.    CompareVideoBufs () ;
  2809.  
  2810.    DosSleep ( SHORTSLEEP ) ;
  2811.  
  2812.  
  2813.  
  2814.    strcpy ( szText, "Test of ScrollLf 005" ) ;
  2815.  
  2816.    usVioStatus = VioWrtCharStr (
  2817.          szText,
  2818.          strlen ( szText ),
  2819.          0,
  2820.          10,
  2821.          0 ) ;
  2822.  
  2823.    usMnoStatus = MnoWrtCharStr (
  2824.          szText,
  2825.          strlen ( szText ),
  2826.          0,
  2827.          10,
  2828.          0 ) ;
  2829.  
  2830.                /*---------------------------------------------*/
  2831.                /* Scroll the box at  (row,col):               */
  2832.                /*                                             */
  2833.                /*            (6,70)----------+                */
  2834.                /*              |             |                */
  2835.                /*              |             |                */
  2836.                /*              |             |                */
  2837.                /*              +----------(24,79)             */
  2838.                /*                                             */
  2839.                /* Left 5 columns.                             */
  2840.                /*---------------------------------------------*/
  2841.  
  2842.  
  2843.    bCell [ 0 ] = '-' ;
  2844.    bCell [ 1 ] = 0x0F ;
  2845.  
  2846.  
  2847.    usVioStatus = VioScrollLf (
  2848.          6,
  2849.          70,
  2850.          24,
  2851.          79,
  2852.          18,
  2853.          bCell,
  2854.          0 ) ;
  2855.  
  2856.    usMnoStatus = MnoScrollLf (
  2857.          6,
  2858.          70,
  2859.          24,
  2860.          79,
  2861.          18,
  2862.          bCell,
  2863.          0 ) ;
  2864.  
  2865.    CompareCharacterBufs () ;
  2866.    CompareVideoBufs () ;
  2867.  
  2868.    DosSleep ( SHORTSLEEP ) ;
  2869.  
  2870.  
  2871.  
  2872.    strcpy ( szText, "Test of ScrollLf 006" ) ;
  2873.  
  2874.    usVioStatus = VioWrtCharStr (
  2875.          szText,
  2876.          strlen ( szText ),
  2877.          0,
  2878.          10,
  2879.          0 ) ;
  2880.  
  2881.    usMnoStatus = MnoWrtCharStr (
  2882.          szText,
  2883.          strlen ( szText ),
  2884.          0,
  2885.          10,
  2886.          0 ) ;
  2887.  
  2888.                /*---------------------------------------------*/
  2889.                /* Scroll the box at  (row,col):               */
  2890.                /*                                             */
  2891.                /*            (8,60)----------+                */
  2892.                /*              |             |                */
  2893.                /*              |             |                */
  2894.                /*              |             |                */
  2895.                /*              +----------(20,75)             */
  2896.                /*                                             */
  2897.                /* Left 9 columns.                             */
  2898.                /*---------------------------------------------*/
  2899.  
  2900.  
  2901.    bCell [ 0 ] = '#' ;
  2902.    bCell [ 1 ] = 0x0F ;
  2903.  
  2904.  
  2905.    usVioStatus = VioScrollLf (
  2906.          8,
  2907.          60,
  2908.          20,
  2909.          75,
  2910.          9,
  2911.          bCell,
  2912.          0 ) ;
  2913.  
  2914.    usMnoStatus = MnoScrollLf (
  2915.          8,
  2916.          60,
  2917.          20,
  2918.          75,
  2919.          9,
  2920.          bCell,
  2921.          0 ) ;
  2922.  
  2923.    CompareCharacterBufs () ;
  2924.    CompareVideoBufs () ;
  2925.  
  2926.    DosSleep ( SHORTSLEEP ) ;
  2927.  
  2928.  
  2929.  
  2930.                /*---------------------------------------------*/
  2931.                /* Scroll the box at  (row,col):               */
  2932.                /*                                             */
  2933.                /*            (0,0)-----------+                */
  2934.                /*              |             |                */
  2935.                /*              |             |                */
  2936.                /*              |             |                */
  2937.                /*              +----------(24,79)             */
  2938.                /*                                             */
  2939.                /* Left 80 columns.                            */
  2940.                /*---------------------------------------------*/
  2941.  
  2942.  
  2943.    bCell [ 0 ] = ' ' ;
  2944.    bCell [ 1 ] = 0x70 ;
  2945.  
  2946.  
  2947.    usVioStatus = VioScrollLf (
  2948.          0,
  2949.          0,
  2950.          0xFFFF,
  2951.          0xFFFF,
  2952.          0xFFFF,
  2953.          bCell,
  2954.          0 ) ;
  2955.  
  2956.    usMnoStatus = MnoScrollLf (
  2957.          0,
  2958.          0,
  2959.          0xFFFF,
  2960.          0xFFFF,
  2961.          0xFFFF,
  2962.          bCell,
  2963.          0 ) ;
  2964.    CompareCharacterBufs () ;
  2965.    CompareVideoBufs () ;
  2966.  
  2967.    DosSleep ( SHORTSLEEP ) ;
  2968.  
  2969.  
  2970.  
  2971.    }           /* End of TestMnoScrollLf function.            */
  2972.  
  2973.  
  2974. /*------------------------------------------------------------*/
  2975. /* Test Mno Scroll Up.                                       */
  2976. /*------------------------------------------------------------*/
  2977.  
  2978. VOID              TestMnoScrollUp ()
  2979.  
  2980.    {
  2981.    USHORT         usMnoStatus       = 0 ;
  2982.    USHORT         usVioStatus       = 0 ;
  2983.    USHORT         usRow             = 0 ;
  2984.    USHORT         usColumn          = 0 ;
  2985.    USHORT         i                 = 0 ;
  2986.    UCHAR          szText [ 5000 ]   = "" ;
  2987.    BYTE           chChar            = ' ' ;
  2988.    PBYTE          pchChar           = &chChar ;
  2989.    BYTE           bCell [ 2 ]       = { 0 } ;
  2990.    BYTE           bAttr             = 0x00 ;
  2991.  
  2992.    bAttr                            = 0x70 ;
  2993.  
  2994.  
  2995.    bCell [ 0 ] = '.' ;
  2996.    bCell [ 1 ] = 0x0F ;
  2997.  
  2998.    MakeTestScreen () ;
  2999.  
  3000.    usVioStatus                      = VioScrollUp (
  3001.          75,
  3002.          80,
  3003.          0,
  3004.          81,
  3005.          0,
  3006.          bCell,
  3007.          0 ) ;
  3008.  
  3009.    usMnoStatus                      = MnoScrollUp (
  3010.          75,
  3011.          80,
  3012.          0,
  3013.          81,
  3014.          0,
  3015.          bCell,
  3016.          0 ) ;
  3017.  
  3018.    if ( usVioStatus != usMnoStatus )
  3019.       {
  3020.       fprintf (
  3021.          stderr,
  3022.          "Test ScrollUp 001 bad return, Vio=%d Mno=%d",
  3023.          usVioStatus,
  3024.          usMnoStatus ) ;
  3025.  
  3026.       exit ( 1 ) ;
  3027.       }
  3028.  
  3029.  
  3030.    usVioStatus = VioScrollUp (
  3031.          0,
  3032.          65,
  3033.          0,
  3034.          61,
  3035.          0,
  3036.          bCell,
  3037.          0 ) ;
  3038.  
  3039.    usMnoStatus = MnoScrollUp (
  3040.          0,
  3041.          65,
  3042.          0,
  3043.          61,
  3044.          0,
  3045.          bCell,
  3046.          0 ) ;
  3047.  
  3048.  
  3049.    if ( usVioStatus != usMnoStatus )
  3050.       {
  3051.       fprintf (
  3052.          stderr,
  3053.          "Test ScrollUp 002 bad return, Vio=%d Mno=%d",
  3054.          usVioStatus,
  3055.          usMnoStatus ) ;
  3056.  
  3057.       exit ( 1 ) ;
  3058.       }
  3059.  
  3060.    usVioStatus = VioScrollUp (
  3061.          0,
  3062.          0,
  3063.          24,
  3064.          79,
  3065.          10,
  3066.          bCell,
  3067.          10 ) ;
  3068.  
  3069.    usMnoStatus = MnoScrollUp (
  3070.          0,
  3071.          0,
  3072.          24,
  3073.          79,
  3074.          10,
  3075.          bCell,
  3076.          10 ) ;
  3077.  
  3078.  
  3079.    if ( usVioStatus != usMnoStatus )
  3080.       {
  3081.       fprintf (
  3082.          stderr,
  3083.          "Test ScrollUp 003 bad return, Vio=%d Mno=%d",
  3084.          usVioStatus,
  3085.          usMnoStatus ) ;
  3086.  
  3087.       exit ( 1 ) ;
  3088.       }
  3089.  
  3090.  
  3091.    strcpy ( szText, "Test of ScrollUp 001" ) ;
  3092.  
  3093.  
  3094.    usVioStatus = VioWrtCharStr (
  3095.          szText,
  3096.          strlen ( szText ),
  3097.          0,
  3098.          10,
  3099.          0 ) ;
  3100.  
  3101.    usMnoStatus = MnoWrtCharStr (
  3102.          szText,
  3103.          strlen ( szText ),
  3104.          0,
  3105.          10,
  3106.          0 ) ;
  3107.  
  3108.  
  3109.    usVioStatus = VioWrtNAttr (
  3110.          &bAttr,
  3111.          strlen ( szText ),
  3112.          0,
  3113.          10,
  3114.          0 ) ;
  3115.  
  3116.    usMnoStatus = MnoWrtNAttr (
  3117.          &bAttr,
  3118.          strlen ( szText ),
  3119.          0,
  3120.          10,
  3121.          0 ) ;
  3122.  
  3123.                /*---------------------------------------------*/
  3124.                /* Scroll the character at (0,0):              */
  3125.                /*                                             */
  3126.                /* up 1 line.                                  */
  3127.                /*---------------------------------------------*/
  3128.  
  3129.    usVioStatus = VioScrollUp (
  3130.          0,
  3131.          0,
  3132.          0,
  3133.          0,
  3134.          1,
  3135.          bCell,
  3136.          0 ) ;
  3137.  
  3138.    usMnoStatus = MnoScrollUp (
  3139.          0,
  3140.          0,
  3141.          0,
  3142.          0,
  3143.          1,
  3144.          bCell,
  3145.          0 ) ;
  3146.    CompareCharacterBufs () ;
  3147.    CompareVideoBufs () ;
  3148.  
  3149.    DosSleep ( SHORTSLEEP ) ;
  3150.  
  3151.  
  3152.                /*---------------------------------------------*/
  3153.                /* Scroll the box at  (row,col):               */
  3154.                /*                                             */
  3155.                /*            (1,1)-----------+                */
  3156.                /*              |             |                */
  3157.                /*              |             |                */
  3158.                /*              |             |                */
  3159.                /*              +-----------(2,2)              */
  3160.                /*                                             */
  3161.                /* Up 1 line.                                  */
  3162.                /*---------------------------------------------*/
  3163.  
  3164.  
  3165.    usVioStatus = VioScrollUp (
  3166.          1,
  3167.          1,
  3168.          2,
  3169.          2,
  3170.          1,
  3171.          bCell,
  3172.          0 ) ;
  3173.  
  3174.    usMnoStatus = MnoScrollUp (
  3175.          1,
  3176.          1,
  3177.          2,
  3178.          2,
  3179.          1,
  3180.          bCell,
  3181.          0 ) ;
  3182.    CompareCharacterBufs () ;
  3183.    CompareVideoBufs () ;
  3184.  
  3185.    DosSleep ( SHORTSLEEP ) ;
  3186.  
  3187.  
  3188.  
  3189.    strcpy ( szText, "Test of ScrollUp 002" ) ;
  3190.  
  3191.    usVioStatus = VioWrtCharStr (
  3192.          szText,
  3193.          strlen ( szText ),
  3194.          0,
  3195.          10,
  3196.          0 ) ;
  3197.  
  3198.    usMnoStatus = MnoWrtCharStr (
  3199.          szText,
  3200.          strlen ( szText ),
  3201.          0,
  3202.          10,
  3203.          0 ) ;
  3204.  
  3205.                /*---------------------------------------------*/
  3206.                /* Scroll the box at  (row,col):               */
  3207.                /*                                             */
  3208.                /*            (2,2)-----------+                */
  3209.                /*              |             |                */
  3210.                /*              |             |                */
  3211.                /*              |             |                */
  3212.                /*              +-----------(6,79)             */
  3213.                /*                                             */
  3214.                /* Up 1 line.                                  */
  3215.                /*---------------------------------------------*/
  3216.  
  3217.  
  3218.    usVioStatus = VioScrollUp (
  3219.          2,
  3220.          2,
  3221.          6,
  3222.          0xFFFF,
  3223.          2,
  3224.          bCell,
  3225.          0 ) ;
  3226.  
  3227.    usMnoStatus = MnoScrollUp (
  3228.          2,
  3229.          2,
  3230.          6,
  3231.          0xFFFF,
  3232.          2,
  3233.          bCell,
  3234.          0 ) ;
  3235.    CompareCharacterBufs () ;
  3236.    CompareVideoBufs () ;
  3237.  
  3238.    DosSleep ( SHORTSLEEP ) ;
  3239.  
  3240.  
  3241.    strcpy ( szText, "Test of ScrollUp 003" ) ;
  3242.  
  3243.    usVioStatus = VioWrtCharStr (
  3244.          szText,
  3245.          strlen ( szText ),
  3246.          0,
  3247.          10,
  3248.          0 ) ;
  3249.  
  3250.    usMnoStatus = MnoWrtCharStr (
  3251.          szText,
  3252.          strlen ( szText ),
  3253.          0,
  3254.          10,
  3255.          0 ) ;
  3256.  
  3257.                /*---------------------------------------------*/
  3258.                /* Scroll the box at  (row,col):               */
  3259.                /*                                             */
  3260.                /*           (15,10)----------+                */
  3261.                /*              |             |                */
  3262.                /*              |             |                */
  3263.                /*              |             |                */
  3264.                /*              +----------(20,79)             */
  3265.                /*                                             */
  3266.                /* Up 2 lines.                                 */
  3267.                /*---------------------------------------------*/
  3268.  
  3269.  
  3270.    usVioStatus = VioScrollUp (
  3271.          15,
  3272.          10,
  3273.          20,
  3274.          79,
  3275.          2,
  3276.          bCell,
  3277.          0 ) ;
  3278.  
  3279.    usMnoStatus = MnoScrollUp (
  3280.          15,
  3281.          10,
  3282.          20,
  3283.          79,
  3284.          2,
  3285.          bCell,
  3286.          0 ) ;
  3287.    CompareCharacterBufs () ;
  3288.    CompareVideoBufs () ;
  3289.  
  3290.    DosSleep ( SHORTSLEEP ) ;
  3291.  
  3292.  
  3293.  
  3294.    strcpy ( szText, "Test of ScrollUp 004" ) ;
  3295.  
  3296.    usVioStatus = VioWrtCharStr (
  3297.          szText,
  3298.          strlen ( szText ),
  3299.          0,
  3300.          10,
  3301.          0 ) ;
  3302.  
  3303.    usMnoStatus = MnoWrtCharStr (
  3304.          szText,
  3305.          strlen ( szText ),
  3306.          0,
  3307.          10,
  3308.          0 ) ;
  3309.  
  3310.                /*---------------------------------------------*/
  3311.                /* Scroll the box at  (row,col):               */
  3312.                /*                                             */
  3313.                /*           (15,0)-----------+                */
  3314.                /*              |             |                */
  3315.                /*              |             |                */
  3316.                /*              |             |                */
  3317.                /*              +----------(20,0)              */
  3318.                /*                                             */
  3319.                /* Up 6 lines.                                 */
  3320.                /*---------------------------------------------*/
  3321.  
  3322.  
  3323.    bCell [ 0 ] = '/' ;
  3324.    bCell [ 1 ] = 0x0F ;
  3325.  
  3326.  
  3327.    usVioStatus = VioScrollUp (
  3328.          15,
  3329.          0,
  3330.          20,
  3331.          0,
  3332.          6,
  3333.          bCell,
  3334.          0 ) ;
  3335.  
  3336.    usMnoStatus = MnoScrollUp (
  3337.          15,
  3338.          0,
  3339.          20,
  3340.          0,
  3341.          6,
  3342.          bCell,
  3343.          0 ) ;
  3344.    CompareCharacterBufs () ;
  3345.    CompareVideoBufs () ;
  3346.  
  3347.    DosSleep ( SHORTSLEEP ) ;
  3348.  
  3349.  
  3350.  
  3351.    strcpy ( szText, "Test of ScrollUp 005" ) ;
  3352.  
  3353.    usVioStatus = VioWrtCharStr (
  3354.          szText,
  3355.          strlen ( szText ),
  3356.          0,
  3357.          10,
  3358.          0 ) ;
  3359.  
  3360.    usMnoStatus = MnoWrtCharStr (
  3361.          szText,
  3362.          strlen ( szText ),
  3363.          0,
  3364.          10,
  3365.          0 ) ;
  3366.  
  3367.                /*---------------------------------------------*/
  3368.                /* Scroll the box at  (row,col):               */
  3369.                /*                                             */
  3370.                /*            (6,70)----------+                */
  3371.                /*              |             |                */
  3372.                /*              |             |                */
  3373.                /*              |             |                */
  3374.                /*              +----------(24,79)             */
  3375.                /*                                             */
  3376.                /* Up 18 lines.                                */
  3377.                /*---------------------------------------------*/
  3378.  
  3379.  
  3380.    bCell [ 0 ] = '-' ;
  3381.    bCell [ 1 ] = 0x0F ;
  3382.  
  3383.  
  3384.    usVioStatus = VioScrollUp (
  3385.          6,
  3386.          70,
  3387.          24,
  3388.          79,
  3389.          18,
  3390.          bCell,
  3391.          0 ) ;
  3392.  
  3393.    usMnoStatus = MnoScrollUp (
  3394.          6,
  3395.          70,
  3396.          24,
  3397.          79,
  3398.          18,
  3399.          bCell,
  3400.          0 ) ;
  3401.  
  3402.    CompareCharacterBufs () ;
  3403.    CompareVideoBufs () ;
  3404.  
  3405.    DosSleep ( SHORTSLEEP ) ;
  3406.  
  3407.  
  3408.  
  3409.    strcpy ( szText, "Test of ScrollUp 006" ) ;
  3410.  
  3411.    usVioStatus = VioWrtCharStr (
  3412.          szText,
  3413.          strlen ( szText ),
  3414.          0,
  3415.          10,
  3416.          0 ) ;
  3417.  
  3418.    usMnoStatus = MnoWrtCharStr (
  3419.          szText,
  3420.          strlen ( szText ),
  3421.          0,
  3422.          10,
  3423.          0 ) ;
  3424.  
  3425.                /*---------------------------------------------*/
  3426.                /* Scroll the box at  (row,col):               */
  3427.                /*                                             */
  3428.                /*            (8,60)----------+                */
  3429.                /*              |             |                */
  3430.                /*              |             |                */
  3431.                /*              |             |                */
  3432.                /*              +----------(20,75)             */
  3433.                /*                                             */
  3434.                /* Up 9 lines.                                 */
  3435.                /*---------------------------------------------*/
  3436.  
  3437.  
  3438.    bCell [ 0 ] = '#' ;
  3439.    bCell [ 1 ] = 0x0F ;
  3440.  
  3441.  
  3442.    usVioStatus = VioScrollUp (
  3443.          8,
  3444.          60,
  3445.          20,
  3446.          75,
  3447.          9,
  3448.          bCell,
  3449.          0 ) ;
  3450.  
  3451.    usMnoStatus = MnoScrollUp (
  3452.          8,
  3453.          60,
  3454.          20,
  3455.          75,
  3456.          9,
  3457.          bCell,
  3458.          0 ) ;
  3459.  
  3460.    CompareCharacterBufs () ;
  3461.    CompareVideoBufs () ;
  3462.  
  3463.    DosSleep ( SHORTSLEEP ) ;
  3464.  
  3465.  
  3466.  
  3467.                /*---------------------------------------------*/
  3468.                /* Scroll the box at  (row,col):               */
  3469.                /*                                             */
  3470.                /*            (0,0)-----------+                */
  3471.                /*              |             |                */
  3472.                /*              |             |                */
  3473.                /*              |             |                */
  3474.                /*              +----------(24,79)             */
  3475.                /*                                             */
  3476.                /* Up 25 lines.                                */
  3477.                /*---------------------------------------------*/
  3478.  
  3479.  
  3480.    bCell [ 0 ] = ' ' ;
  3481.    bCell [ 1 ] = 0x70 ;
  3482.  
  3483.  
  3484.    usVioStatus = VioScrollUp (
  3485.          0,
  3486.          0,
  3487.          0xFFFF,
  3488.          0xFFFF,
  3489.          0xFFFF,
  3490.          bCell,
  3491.          0 ) ;
  3492.  
  3493.    usMnoStatus = MnoScrollUp (
  3494.          0,
  3495.          0,
  3496.          0xFFFF,
  3497.          0xFFFF,
  3498.          0xFFFF,
  3499.          bCell,
  3500.          0 ) ;
  3501.    CompareCharacterBufs () ;
  3502.    CompareVideoBufs () ;
  3503.  
  3504.    DosSleep ( SHORTSLEEP ) ;
  3505.  
  3506.  
  3507.  
  3508.    }           /* End of TestMnoScrollUp function.          */
  3509.  
  3510.  
  3511. /*------------------------------------------------------------*/
  3512. /* Test Mno Scroll Dn.                                       */
  3513. /*------------------------------------------------------------*/
  3514.  
  3515. VOID              TestMnoScrollDn ()
  3516.  
  3517.    {
  3518.    USHORT         usMnoStatus       = 0 ;
  3519.    USHORT         usVioStatus       = 0 ;
  3520.    USHORT         usRow             = 0 ;
  3521.    USHORT         usColumn          = 0 ;
  3522.    USHORT         i                 = 0 ;
  3523.    UCHAR          szText [ 5000 ]   = "" ;
  3524.    BYTE           chChar            = ' ' ;
  3525.    PBYTE          pchChar           = &chChar ;
  3526.    BYTE           bCell [ 2 ]       = { 0 } ;
  3527.    BYTE           bAttr             = 0x00 ;
  3528.  
  3529.    bAttr                            = 0x70 ;
  3530.  
  3531.  
  3532.    bCell [ 0 ] = '.' ;
  3533.    bCell [ 1 ] = 0x0F ;
  3534.  
  3535.    MakeTestScreen () ;
  3536.  
  3537.    usVioStatus                      = VioScrollDn (
  3538.          75,
  3539.          80,
  3540.          0,
  3541.          81,
  3542.          0,
  3543.          bCell,
  3544.          0 ) ;
  3545.  
  3546.    usMnoStatus                      = MnoScrollDn (
  3547.          75,
  3548.          80,
  3549.          0,
  3550.          81,
  3551.          0,
  3552.          bCell,
  3553.          0 ) ;
  3554.  
  3555.    if ( usVioStatus != usMnoStatus )
  3556.       {
  3557.       fprintf (
  3558.          stderr,
  3559.          "Test ScrollDn 001 bad return, Vio=%d Mno=%d",
  3560.          usVioStatus,
  3561.          usMnoStatus ) ;
  3562.  
  3563.       exit ( 1 ) ;
  3564.       }
  3565.  
  3566.  
  3567.    usVioStatus = VioScrollDn (
  3568.          0,
  3569.          65,
  3570.          0,
  3571.          61,
  3572.          0,
  3573.          bCell,
  3574.          0 ) ;
  3575.  
  3576.    usMnoStatus = MnoScrollDn (
  3577.          0,
  3578.          65,
  3579.          0,
  3580.          61,
  3581.          0,
  3582.          bCell,
  3583.          0 ) ;
  3584.  
  3585.  
  3586.    if ( usVioStatus != usMnoStatus )
  3587.       {
  3588.       fprintf (
  3589.          stderr,
  3590.          "Test ScrollDn 002 bad return, Vio=%d Mno=%d",
  3591.          usVioStatus,
  3592.          usMnoStatus ) ;
  3593.  
  3594.       exit ( 1 ) ;
  3595.       }
  3596.  
  3597.    usVioStatus = VioScrollDn (
  3598.          0,
  3599.          0,
  3600.          24,
  3601.          79,
  3602.          10,
  3603.          bCell,
  3604.          10 ) ;
  3605.  
  3606.    usMnoStatus = MnoScrollDn (
  3607.          0,
  3608.          0,
  3609.          24,
  3610.          79,
  3611.          10,
  3612.          bCell,
  3613.          10 ) ;
  3614.  
  3615.  
  3616.    if ( usVioStatus != usMnoStatus )
  3617.       {
  3618.       fprintf (
  3619.          stderr,
  3620.          "Test ScrollDn 003 bad return, Vio=%d Mno=%d",
  3621.          usVioStatus,
  3622.          usMnoStatus ) ;
  3623.  
  3624.       exit ( 1 ) ;
  3625.       }
  3626.  
  3627.  
  3628.    strcpy ( szText, "Test of ScrollDn 001" ) ;
  3629.  
  3630.  
  3631.    usVioStatus = VioWrtCharStr (
  3632.          szText,
  3633.          strlen ( szText ),
  3634.          0,
  3635.          10,
  3636.          0 ) ;
  3637.  
  3638.    usMnoStatus = MnoWrtCharStr (
  3639.          szText,
  3640.          strlen ( szText ),
  3641.          0,
  3642.          10,
  3643.          0 ) ;
  3644.  
  3645.  
  3646.    usVioStatus = VioWrtNAttr (
  3647.          &bAttr,
  3648.          strlen ( szText ),
  3649.          0,
  3650.          10,
  3651.          0 ) ;
  3652.  
  3653.    usMnoStatus = MnoWrtNAttr (
  3654.          &bAttr,
  3655.          strlen ( szText ),
  3656.          0,
  3657.          10,
  3658.          0 ) ;
  3659.  
  3660.                /*---------------------------------------------*/
  3661.                /* Scroll the character at (0,0):              */
  3662.                /*                                             */
  3663.                /* Down 1 line.                                */
  3664.                /*---------------------------------------------*/
  3665.  
  3666.    usVioStatus = VioScrollDn (
  3667.          0,
  3668.          0,
  3669.          0,
  3670.          0,
  3671.          1,
  3672.          bCell,
  3673.          0 ) ;
  3674.  
  3675.    usMnoStatus = MnoScrollDn (
  3676.          0,
  3677.          0,
  3678.          0,
  3679.          0,
  3680.          1,
  3681.          bCell,
  3682.          0 ) ;
  3683.    CompareCharacterBufs () ;
  3684.    CompareVideoBufs () ;
  3685.  
  3686.    DosSleep ( SHORTSLEEP ) ;
  3687.  
  3688.  
  3689.                /*---------------------------------------------*/
  3690.                /* Scroll the box at  (row,col):               */
  3691.                /*                                             */
  3692.                /*            (1,1)-----------+                */
  3693.                /*              |             |                */
  3694.                /*              |             |                */
  3695.                /*              |             |                */
  3696.                /*              +-----------(2,2)              */
  3697.                /*                                             */
  3698.                /* Down 1 line.                                */
  3699.                /*---------------------------------------------*/
  3700.  
  3701.  
  3702.    usVioStatus = VioScrollDn (
  3703.          1,
  3704.          1,
  3705.          2,
  3706.          2,
  3707.          1,
  3708.          bCell,
  3709.          0 ) ;
  3710.  
  3711.    usMnoStatus = MnoScrollDn (
  3712.          1,
  3713.          1,
  3714.          2,
  3715.          2,
  3716.          1,
  3717.          bCell,
  3718.          0 ) ;
  3719.    CompareCharacterBufs () ;
  3720.    CompareVideoBufs () ;
  3721.  
  3722.    DosSleep ( SHORTSLEEP ) ;
  3723.  
  3724.  
  3725.  
  3726.    strcpy ( szText, "Test of ScrollDn 002" ) ;
  3727.  
  3728.    usVioStatus = VioWrtCharStr (
  3729.          szText,
  3730.          strlen ( szText ),
  3731.          0,
  3732.          10,
  3733.          0 ) ;
  3734.  
  3735.    usMnoStatus = MnoWrtCharStr (
  3736.          szText,
  3737.          strlen ( szText ),
  3738.          0,
  3739.          10,
  3740.          0 ) ;
  3741.  
  3742.                /*---------------------------------------------*/
  3743.                /* Scroll the box at  (row,col):               */
  3744.                /*                                             */
  3745.                /*            (2,2)-----------+                */
  3746.                /*              |             |                */
  3747.                /*              |             |                */
  3748.                /*              |             |                */
  3749.                /*              +-----------(6,79)             */
  3750.                /*                                             */
  3751.                /* Down 1 line.                                */
  3752.                /*---------------------------------------------*/
  3753.  
  3754.  
  3755.    usVioStatus = VioScrollDn (
  3756.          2,
  3757.          2,
  3758.          6,
  3759.          0xFFFF,
  3760.          2,
  3761.          bCell,
  3762.          0 ) ;
  3763.  
  3764.    usMnoStatus = MnoScrollDn (
  3765.          2,
  3766.          2,
  3767.          6,
  3768.          0xFFFF,
  3769.          2,
  3770.          bCell,
  3771.          0 ) ;
  3772.    CompareCharacterBufs () ;
  3773.    CompareVideoBufs () ;
  3774.  
  3775.    DosSleep ( SHORTSLEEP ) ;
  3776.  
  3777.  
  3778.    strcpy ( szText, "Test of ScrollDn 003" ) ;
  3779.  
  3780.    usVioStatus = VioWrtCharStr (
  3781.          szText,
  3782.          strlen ( szText ),
  3783.          0,
  3784.          10,
  3785.          0 ) ;
  3786.  
  3787.    usMnoStatus = MnoWrtCharStr (
  3788.          szText,
  3789.          strlen ( szText ),
  3790.          0,
  3791.          10,
  3792.          0 ) ;
  3793.  
  3794.                /*---------------------------------------------*/
  3795.                /* Scroll the box at  (row,col):               */
  3796.                /*                                             */
  3797.                /*           (15,10)----------+                */
  3798.                /*              |             |                */
  3799.                /*              |             |                */
  3800.                /*              |             |                */
  3801.                /*              +----------(20,79)             */
  3802.                /*                                             */
  3803.                /* Down 2 lines.                               */
  3804.                /*---------------------------------------------*/
  3805.  
  3806.  
  3807.    usVioStatus = VioScrollDn (
  3808.          15,
  3809.          10,
  3810.          20,
  3811.          79,
  3812.          2,
  3813.          bCell,
  3814.          0 ) ;
  3815.  
  3816.    usMnoStatus = MnoScrollDn (
  3817.          15,
  3818.          10,
  3819.          20,
  3820.          79,
  3821.          2,
  3822.          bCell,
  3823.          0 ) ;
  3824.    CompareCharacterBufs () ;
  3825.    CompareVideoBufs () ;
  3826.  
  3827.    DosSleep ( SHORTSLEEP ) ;
  3828.  
  3829.  
  3830.  
  3831.    strcpy ( szText, "Test of ScrollDn 004" ) ;
  3832.  
  3833.    usVioStatus = VioWrtCharStr (
  3834.          szText,
  3835.          strlen ( szText ),
  3836.          0,
  3837.          10,
  3838.          0 ) ;
  3839.  
  3840.    usMnoStatus = MnoWrtCharStr (
  3841.          szText,
  3842.          strlen ( szText ),
  3843.          0,
  3844.          10,
  3845.          0 ) ;
  3846.  
  3847.                /*---------------------------------------------*/
  3848.                /* Scroll the box at  (row,col):               */
  3849.                /*                                             */
  3850.                /*           (15,0)-----------+                */
  3851.                /*              |             |                */
  3852.                /*              |             |                */
  3853.                /*              |             |                */
  3854.                /*              +----------(20,0)              */
  3855.                /*                                             */
  3856.                /* Down 6 lines.                               */
  3857.                /*---------------------------------------------*/
  3858.  
  3859.  
  3860.    bCell [ 0 ] = '/' ;
  3861.    bCell [ 1 ] = 0x0F ;
  3862.  
  3863.  
  3864.    usVioStatus = VioScrollDn (
  3865.          15,
  3866.          0,
  3867.          20,
  3868.          0,
  3869.          6,
  3870.          bCell,
  3871.          0 ) ;
  3872.  
  3873.    usMnoStatus = MnoScrollDn (
  3874.          15,
  3875.          0,
  3876.          20,
  3877.          0,
  3878.          6,
  3879.          bCell,
  3880.          0 ) ;
  3881.    CompareCharacterBufs () ;
  3882.    CompareVideoBufs () ;
  3883.  
  3884.    DosSleep ( SHORTSLEEP ) ;
  3885.  
  3886.  
  3887.  
  3888.    strcpy ( szText, "Test of ScrollDn 005" ) ;
  3889.  
  3890.    usVioStatus = VioWrtCharStr (
  3891.          szText,
  3892.          strlen ( szText ),
  3893.          0,
  3894.          10,
  3895.          0 ) ;
  3896.  
  3897.    usMnoStatus = MnoWrtCharStr (
  3898.          szText,
  3899.          strlen ( szText ),
  3900.          0,
  3901.          10,
  3902.          0 ) ;
  3903.  
  3904.                /*---------------------------------------------*/
  3905.                /* Scroll the box at  (row,col):               */
  3906.                /*                                             */
  3907.                /*            (6,70)----------+                */
  3908.                /*              |             |                */
  3909.                /*              |             |                */
  3910.                /*              |             |                */
  3911.                /*              +----------(24,79)             */
  3912.                /*                                             */
  3913.                /* Down 18 lines.                              */
  3914.                /*---------------------------------------------*/
  3915.  
  3916.  
  3917.    bCell [ 0 ] = '-' ;
  3918.    bCell [ 1 ] = 0x0F ;
  3919.  
  3920.  
  3921.    usVioStatus = VioScrollDn (
  3922.          6,
  3923.          70,
  3924.          24,
  3925.          79,
  3926.          18,
  3927.          bCell,
  3928.          0 ) ;
  3929.  
  3930.    usMnoStatus = MnoScrollDn (
  3931.          6,
  3932.          70,
  3933.          24,
  3934.          79,
  3935.          18,
  3936.          bCell,
  3937.          0 ) ;
  3938.  
  3939.    CompareCharacterBufs () ;
  3940.    CompareVideoBufs () ;
  3941.  
  3942.    DosSleep ( SHORTSLEEP ) ;
  3943.  
  3944.  
  3945.  
  3946.    strcpy ( szText, "Test of ScrollDn 006" ) ;
  3947.  
  3948.    usVioStatus = VioWrtCharStr (
  3949.          szText,
  3950.          strlen ( szText ),
  3951.          0,
  3952.          10,
  3953.          0 ) ;
  3954.  
  3955.    usMnoStatus = MnoWrtCharStr (
  3956.          szText,
  3957.          strlen ( szText ),
  3958.          0,
  3959.          10,
  3960.          0 ) ;
  3961.  
  3962.                /*---------------------------------------------*/
  3963.                /* Scroll the box at  (row,col):               */
  3964.                /*                                             */
  3965.                /*            (8,60)----------+                */
  3966.                /*              |             |                */
  3967.                /*              |             |                */
  3968.                /*              |             |                */
  3969.                /*              +----------(20,75)             */
  3970.                /*                                             */
  3971.                /* Down 9 lines.                               */
  3972.                /*---------------------------------------------*/
  3973.  
  3974.  
  3975.    bCell [ 0 ] = '#' ;
  3976.    bCell [ 1 ] = 0x0F ;
  3977.  
  3978.  
  3979.    usVioStatus = VioScrollDn (
  3980.          8,
  3981.          60,
  3982.          20,
  3983.          75,
  3984.          9,
  3985.          bCell,
  3986.          0 ) ;
  3987.  
  3988.    usMnoStatus = MnoScrollDn (
  3989.          8,
  3990.          60,
  3991.          20,
  3992.          75,
  3993.          9,
  3994.          bCell,
  3995.          0 ) ;
  3996.  
  3997.    CompareCharacterBufs () ;
  3998.    CompareVideoBufs () ;
  3999.  
  4000.    DosSleep ( SHORTSLEEP ) ;
  4001.  
  4002.  
  4003.  
  4004.                /*---------------------------------------------*/
  4005.                /* Scroll the box at  (row,col):               */
  4006.                /*                                             */
  4007.                /*            (0,0)-----------+                */
  4008.                /*              |             |                */
  4009.                /*              |             |                */
  4010.                /*              |             |                */
  4011.                /*              +----------(24,79)             */
  4012.                /*                                             */
  4013.                /* Down 25 lines.                              */
  4014.                /*---------------------------------------------*/
  4015.  
  4016.  
  4017.    bCell [ 0 ] = ' ' ;
  4018.    bCell [ 1 ] = 0x70 ;
  4019.  
  4020.  
  4021.    usVioStatus = VioScrollDn (
  4022.          0,
  4023.          0,
  4024.          0xFFFF,
  4025.          0xFFFF,
  4026.          0xFFFF,
  4027.          bCell,
  4028.          0 ) ;
  4029.  
  4030.    usMnoStatus = MnoScrollDn (
  4031.          0,
  4032.          0,
  4033.          0xFFFF,
  4034.          0xFFFF,
  4035.          0xFFFF,
  4036.          bCell,
  4037.          0 ) ;
  4038.    CompareCharacterBufs () ;
  4039.    CompareVideoBufs () ;
  4040.  
  4041.    DosSleep ( SHORTSLEEP ) ;
  4042.  
  4043.  
  4044.  
  4045.    }           /* End of TestMnoScrollDn function.          */
  4046.  
  4047.  
  4048. /*------------------------------------------------------------*/
  4049. /* Test Mno Wrt N Char.                                       */
  4050. /*------------------------------------------------------------*/
  4051.  
  4052. VOID              TestMnoWrtNChar ()
  4053.  
  4054.    {
  4055.    USHORT         usMnoStatus       = 0 ;
  4056.    USHORT         usVioStatus       = 0 ;
  4057.    USHORT         usRow             = 0 ;
  4058.    USHORT         usColumn          = 0 ;
  4059.    USHORT         i                 = 0 ;
  4060.    UCHAR          szText [ 5000 ]   = "" ;
  4061.    BYTE           chChar            = ' ' ;
  4062.    PBYTE          pchChar           = &chChar ;
  4063.  
  4064.    chChar                           = 'E' ;
  4065.  
  4066.    usVioStatus                      = VioWrtNChar (
  4067.          pchChar,
  4068.          1,
  4069.          100,
  4070.          1,
  4071.          0 ) ;
  4072.  
  4073.    usMnoStatus                      = MnoWrtNChar (
  4074.          pchChar,
  4075.          1,
  4076.          100,
  4077.          1,
  4078.          0 ) ;
  4079.  
  4080.    if ( usVioStatus != usMnoStatus )
  4081.       {
  4082.       fprintf (
  4083.          stderr,
  4084.          "Test WrtNChar 001 bad return, Vio=%d Mno=%d",
  4085.          usVioStatus,
  4086.          usMnoStatus ) ;
  4087.  
  4088.       exit ( 1 ) ;
  4089.       }
  4090.  
  4091.  
  4092.    usVioStatus = VioWrtNChar (
  4093.          pchChar,
  4094.          1,
  4095.          1,
  4096.          100,
  4097.          0 ) ;
  4098.  
  4099.    usMnoStatus = MnoWrtNChar (
  4100.          pchChar,
  4101.          1,
  4102.          1,
  4103.          100,
  4104.          0 ) ;
  4105.  
  4106.  
  4107.    if ( usVioStatus != usMnoStatus )
  4108.       {
  4109.       fprintf (
  4110.          stderr,
  4111.          "Test WrtNChar 002 bad return, Vio=%d Mno=%d",
  4112.          usVioStatus,
  4113.          usMnoStatus ) ;
  4114.  
  4115.       exit ( 1 ) ;
  4116.       }
  4117.  
  4118.    usVioStatus = VioWrtNChar (
  4119.          pchChar,
  4120.          1,
  4121.          1,
  4122.          1,
  4123.          10 ) ;
  4124.  
  4125.    usMnoStatus = MnoWrtNChar (
  4126.          pchChar,
  4127.          1,
  4128.          1,
  4129.          1,
  4130.          10 ) ;
  4131.  
  4132.  
  4133.    if ( usVioStatus != usMnoStatus )
  4134.       {
  4135.       fprintf (
  4136.          stderr,
  4137.          "Test WrtNChar 003 bad return, Vio=%d Mno=%d",
  4138.          usVioStatus,
  4139.          usMnoStatus ) ;
  4140.  
  4141.       exit ( 1 ) ;
  4142.       }
  4143.  
  4144.  
  4145.    strcpy ( szText, "Test of WrtNChar 001" ) ;
  4146.  
  4147.  
  4148.    usVioStatus = VioWrtCharStr (
  4149.          szText,
  4150.          strlen ( szText ),
  4151.          0,
  4152.          0,
  4153.          0 ) ;
  4154.  
  4155.    usMnoStatus = MnoWrtCharStr (
  4156.          szText,
  4157.          strlen ( szText ),
  4158.          0,
  4159.          0,
  4160.          0 ) ;
  4161.  
  4162.    chChar  = 'F' ;
  4163.  
  4164.  
  4165.    usVioStatus = VioWrtNChar (
  4166.          pchChar,
  4167.          0,
  4168.          0,
  4169.          0,
  4170.          0 ) ;
  4171.  
  4172.    usMnoStatus = MnoWrtNChar (
  4173.          pchChar,
  4174.          0,
  4175.          0,
  4176.          0,
  4177.          0 ) ;
  4178.  
  4179.    CompareCharacterBufs () ;
  4180.    CompareVideoBufs () ;
  4181.  
  4182.    DosSleep ( SHORTSLEEP ) ;
  4183.  
  4184.  
  4185.  
  4186.    strcpy ( szText, "Test of WrtNChar 002" ) ;
  4187.  
  4188.  
  4189.    usVioStatus = VioWrtCharStr (
  4190.          szText,
  4191.          strlen ( szText ),
  4192.          1,
  4193.          0,
  4194.          0 ) ;
  4195.  
  4196.    usMnoStatus = MnoWrtCharStr (
  4197.          szText,
  4198.          strlen ( szText ),
  4199.          1,
  4200.          0,
  4201.          0 ) ;
  4202.  
  4203.    chChar  = 'G' ;
  4204.  
  4205.  
  4206.    usVioStatus = VioWrtNChar (
  4207.          pchChar,
  4208.          2000,
  4209.          0,
  4210.          0,
  4211.          0 ) ;
  4212.  
  4213.    usMnoStatus = MnoWrtNChar (
  4214.          pchChar,
  4215.          2000,
  4216.          0,
  4217.          0,
  4218.          0 ) ;
  4219.  
  4220.    CompareCharacterBufs () ;
  4221.    CompareVideoBufs () ;
  4222.  
  4223.    DosSleep ( SHORTSLEEP ) ;
  4224.  
  4225.  
  4226.  
  4227.    chChar = 'H' ;
  4228.  
  4229.  
  4230.    for ( i  = 0 ; i < 25 ; i++ )
  4231.       {
  4232.       usVioStatus = VioWrtNChar (
  4233.             pchChar,
  4234.             25,
  4235.             i,
  4236.             i+10,
  4237.             0 ) ;
  4238.  
  4239.       usMnoStatus = MnoWrtNChar (
  4240.             pchChar,
  4241.             25,
  4242.             i,
  4243.             i+10,
  4244.             0 ) ;
  4245.       }
  4246.    CompareCharacterBufs () ;
  4247.    CompareVideoBufs () ;
  4248.  
  4249.    DosSleep ( SHORTSLEEP ) ;
  4250.  
  4251.  
  4252.    chChar = 'I' ;
  4253.  
  4254.    for ( i  = 0 ; i < 25 ; i++ )
  4255.       {
  4256.       usVioStatus = VioWrtNChar (
  4257.             pchChar,
  4258.             30,
  4259.             i,
  4260.             65,
  4261.             0 ) ;
  4262.  
  4263.       usMnoStatus = MnoWrtNChar (
  4264.             pchChar,
  4265.             30,
  4266.             i,
  4267.             65,
  4268.             0 ) ;
  4269.       }
  4270.    CompareCharacterBufs () ;
  4271.    CompareVideoBufs () ;
  4272.  
  4273.    DosSleep ( SHORTSLEEP ) ;
  4274.  
  4275.  
  4276.  
  4277.  
  4278.    }           /* End of TestMnoWrtNChar function.          */
  4279.  
  4280.  
  4281. /*------------------------------------------------------------*/
  4282. /* Test Mno Wrt N Cell.                                       */
  4283. /*------------------------------------------------------------*/
  4284.  
  4285. VOID              TestMnoWrtNCell ()
  4286.  
  4287.    {
  4288.    USHORT         usMnoStatus       = 0 ;
  4289.    USHORT         usVioStatus       = 0 ;
  4290.    USHORT         usRow             = 0 ;
  4291.    USHORT         usColumn          = 0 ;
  4292.    USHORT         i                 = 0 ;
  4293.    UCHAR          szText [ 5000 ]   = "" ;
  4294.    BYTE           bCell [ 2 ]       = { 0 } ;
  4295.  
  4296.    bCell [ 0 ] = 'A' ;
  4297.    bCell [ 1 ] = 0x07 ;
  4298.  
  4299.    usVioStatus = VioWrtNCell (
  4300.          bCell,
  4301.          1,
  4302.          100,
  4303.          1,
  4304.          0 ) ;
  4305.  
  4306.    usMnoStatus = MnoWrtNCell (
  4307.          bCell,
  4308.          1,
  4309.          100,
  4310.          1,
  4311.          0 ) ;
  4312.  
  4313.    if ( usVioStatus != usMnoStatus )
  4314.       {
  4315.       fprintf (
  4316.          stderr,
  4317.          "Test WrtNCell 001 bad return, Vio=%d Mno=%d",
  4318.          usVioStatus,
  4319.          usMnoStatus ) ;
  4320.  
  4321.       exit ( 1 ) ;
  4322.       }
  4323.  
  4324.  
  4325.    usVioStatus = VioWrtNCell (
  4326.          bCell,
  4327.          1,
  4328.          1,
  4329.          100,
  4330.          0 ) ;
  4331.  
  4332.    usMnoStatus = MnoWrtNCell (
  4333.          bCell,
  4334.          1,
  4335.          1,
  4336.          100,
  4337.          0 ) ;
  4338.  
  4339.  
  4340.    if ( usVioStatus != usMnoStatus )
  4341.       {
  4342.       fprintf (
  4343.          stderr,
  4344.          "Test WrtNCell 002 bad return, Vio=%d Mno=%d",
  4345.          usVioStatus,
  4346.          usMnoStatus ) ;
  4347.  
  4348.       exit ( 1 ) ;
  4349.       }
  4350.  
  4351.    usVioStatus = VioWrtNCell (
  4352.          bCell,
  4353.          1,
  4354.          1,
  4355.          1,
  4356.          10 ) ;
  4357.  
  4358.    usMnoStatus = MnoWrtNCell (
  4359.          bCell,
  4360.          1,
  4361.          1,
  4362.          1,
  4363.          10 ) ;
  4364.  
  4365.  
  4366.    if ( usVioStatus != usMnoStatus )
  4367.       {
  4368.       fprintf (
  4369.          stderr,
  4370.          "Test WrtNCell 003 bad return, Vio=%d Mno=%d",
  4371.          usVioStatus,
  4372.          usMnoStatus ) ;
  4373.  
  4374.       exit ( 1 ) ;
  4375.       }
  4376.  
  4377.  
  4378.    strcpy ( szText, "Test of WrtNCell 001" ) ;
  4379.  
  4380.  
  4381.    usVioStatus = VioWrtCharStr (
  4382.          szText,
  4383.          strlen ( szText ),
  4384.          0,
  4385.          0,
  4386.          0 ) ;
  4387.  
  4388.    usMnoStatus = MnoWrtCharStr (
  4389.          szText,
  4390.          strlen ( szText ),
  4391.          0,
  4392.          0,
  4393.          0 ) ;
  4394.  
  4395.    bCell [ 0 ] = 'X' ;
  4396.    bCell [ 1 ] = 0x70 ;
  4397.  
  4398.  
  4399.    usVioStatus = VioWrtNCell (
  4400.          bCell,
  4401.          0,
  4402.          0,
  4403.          0,
  4404.          0 ) ;
  4405.  
  4406.    usMnoStatus = MnoWrtNCell (
  4407.          bCell,
  4408.          0,
  4409.          0,
  4410.          0,
  4411.          0 ) ;
  4412.  
  4413.    CompareCharacterBufs () ;
  4414.    CompareVideoBufs () ;
  4415.  
  4416.    DosSleep ( SHORTSLEEP ) ;
  4417.  
  4418.  
  4419.  
  4420.    strcpy ( szText, "Test of WrtNCell 002" ) ;
  4421.  
  4422.  
  4423.    usVioStatus = VioWrtCharStr (
  4424.          szText,
  4425.          strlen ( szText ),
  4426.          1,
  4427.          0,
  4428.          0 ) ;
  4429.  
  4430.    usMnoStatus = MnoWrtCharStr (
  4431.          szText,
  4432.          strlen ( szText ),
  4433.          1,
  4434.          0,
  4435.          0 ) ;
  4436.  
  4437.    bCell [ 0 ] = 'B' ;
  4438.    bCell [ 1 ] = 0x70 ;
  4439.  
  4440.  
  4441.    usVioStatus = VioWrtNCell (
  4442.          bCell,
  4443.          2000,
  4444.          0,
  4445.          0,
  4446.          0 ) ;
  4447.  
  4448.    usMnoStatus = MnoWrtNCell (
  4449.          bCell,
  4450.          2000,
  4451.          0,
  4452.          0,
  4453.          0 ) ;
  4454.  
  4455.    CompareCharacterBufs () ;
  4456.    CompareVideoBufs () ;
  4457.  
  4458.    DosSleep ( SHORTSLEEP ) ;
  4459.  
  4460.  
  4461.  
  4462.    bCell [ 0 ] = 'C' ;
  4463.    bCell [ 1 ] = 0x0F ;
  4464.  
  4465.  
  4466.    for ( i  = 0 ; i < 25 ; i++ )
  4467.       {
  4468.       usVioStatus = VioWrtNCell (
  4469.             bCell,
  4470.             30,
  4471.             i,
  4472.             i,
  4473.             0 ) ;
  4474.  
  4475.       usMnoStatus = MnoWrtNCell (
  4476.             bCell,
  4477.             30,
  4478.             i,
  4479.             i,
  4480.             0 ) ;
  4481.       }
  4482.    CompareCharacterBufs () ;
  4483.    CompareVideoBufs () ;
  4484.  
  4485.    DosSleep ( SHORTSLEEP ) ;
  4486.  
  4487.  
  4488.    bCell [ 0 ] = 'D' ;
  4489.    bCell [ 1 ] = 0x01 ;
  4490.  
  4491.  
  4492.    for ( i  = 0 ; i < 25 ; i++ )
  4493.       {
  4494.       usVioStatus = VioWrtNCell (
  4495.             bCell,
  4496.             30,
  4497.             i,
  4498.             65,
  4499.             0 ) ;
  4500.  
  4501.       usMnoStatus = MnoWrtNCell (
  4502.             bCell,
  4503.             30,
  4504.             i,
  4505.             65,
  4506.             0 ) ;
  4507.       }
  4508.    CompareCharacterBufs () ;
  4509.    CompareVideoBufs () ;
  4510.  
  4511.    DosSleep ( SHORTSLEEP ) ;
  4512.  
  4513.  
  4514.  
  4515.  
  4516.    }           /* End of TestMnoWrtNCell function.          */
  4517.  
  4518.  
  4519. /*------------------------------------------------------------*/
  4520. /* Test Mno Wrt N Attr.                                       */
  4521. /*------------------------------------------------------------*/
  4522.  
  4523. VOID              TestMnoWrtNAttr ()
  4524.  
  4525.    {
  4526.    USHORT         usMnoStatus       = 0 ;
  4527.    USHORT         usVioStatus       = 0 ;
  4528.    USHORT         usRow             = 0 ;
  4529.    USHORT         usColumn          = 0 ;
  4530.    USHORT         i                 = 0 ;
  4531.    BYTE           bAttr             = 0x00 ;
  4532.    UCHAR          szText [ 5000 ]   = "" ;
  4533.  
  4534.    bAttr                            = 0x07 ;
  4535.  
  4536.  
  4537.    usVioStatus                      = VioWrtNAttr (
  4538.          &bAttr,
  4539.          1,
  4540.          100,
  4541.          1,
  4542.          0 ) ;
  4543.  
  4544.    usMnoStatus                      = MnoWrtNAttr (
  4545.          &bAttr,
  4546.          1,
  4547.          100,
  4548.          1,
  4549.          0 ) ;
  4550.  
  4551.  
  4552.    if ( usVioStatus != usMnoStatus )
  4553.       {
  4554.       fprintf (
  4555.          stderr,
  4556.          "Test WrtNAttr 001 bad return, Vio=%d Mno=%d",
  4557.          usVioStatus,
  4558.          usMnoStatus ) ;
  4559.  
  4560.       exit ( 1 ) ;
  4561.       }
  4562.  
  4563.  
  4564.    usVioStatus = VioWrtNAttr (
  4565.          &bAttr,
  4566.          1,
  4567.          1,
  4568.          100,
  4569.          0 ) ;
  4570.  
  4571.    usMnoStatus = MnoWrtNAttr (
  4572.          &bAttr,
  4573.          1,
  4574.          1,
  4575.          100,
  4576.          0 ) ;
  4577.  
  4578.  
  4579.    if ( usVioStatus != usMnoStatus )
  4580.       {
  4581.       fprintf (
  4582.          stderr,
  4583.          "Test WrtNAttr 002 bad return, Vio=%d Mno=%d",
  4584.          usVioStatus,
  4585.          usMnoStatus ) ;
  4586.  
  4587.       exit ( 1 ) ;
  4588.       }
  4589.  
  4590.    usVioStatus = VioWrtNAttr (
  4591.          &bAttr,
  4592.          1,
  4593.          1,
  4594.          1,
  4595.          10 ) ;
  4596.  
  4597.    usMnoStatus = MnoWrtNAttr (
  4598.          &bAttr,
  4599.          1,
  4600.          1,
  4601.          1,
  4602.          10 ) ;
  4603.  
  4604.  
  4605.    if ( usVioStatus != usMnoStatus )
  4606.       {
  4607.       fprintf (
  4608.          stderr,
  4609.          "Test WrtNAttr 003 bad return, Vio=%d Mno=%d",
  4610.          usVioStatus,
  4611.          usMnoStatus ) ;
  4612.  
  4613.       exit ( 1 ) ;
  4614.       }
  4615.  
  4616.  
  4617.    strcpy ( szText, "Test of WrtNAttr 001" ) ;
  4618.  
  4619.  
  4620.    usVioStatus = VioWrtCharStr (
  4621.          szText,
  4622.          strlen ( szText ),
  4623.          0,
  4624.          0,
  4625.          0 ) ;
  4626.  
  4627.    usMnoStatus = MnoWrtCharStr (
  4628.          szText,
  4629.          strlen ( szText ),
  4630.          0,
  4631.          0,
  4632.          0 ) ;
  4633.  
  4634.    bAttr       = 0x70 ;
  4635.  
  4636.  
  4637.    usVioStatus = VioWrtNAttr (
  4638.          &bAttr,
  4639.          0,
  4640.          0,
  4641.          0,
  4642.          0 ) ;
  4643.  
  4644.    usMnoStatus = MnoWrtNAttr (
  4645.          &bAttr,
  4646.          0,
  4647.          0,
  4648.          0,
  4649.          0 ) ;
  4650.  
  4651.    CompareCharacterBufs () ;
  4652.    CompareVideoBufs () ;
  4653.  
  4654.    DosSleep ( SHORTSLEEP ) ;
  4655.  
  4656.  
  4657.  
  4658.    strcpy ( szText, "Test of WrtNAttr 002" ) ;
  4659.  
  4660.  
  4661.    usVioStatus = VioWrtCharStr (
  4662.          szText,
  4663.          strlen ( szText ),
  4664.          1,
  4665.          0,
  4666.          0 ) ;
  4667.  
  4668.    usMnoStatus = MnoWrtCharStr (
  4669.          szText,
  4670.          strlen ( szText ),
  4671.          1,
  4672.          0,
  4673.          0 ) ;
  4674.  
  4675.    bAttr       = 0x70 ;
  4676.  
  4677.  
  4678.    usVioStatus = VioWrtNAttr (
  4679.          &bAttr,
  4680.          2000,
  4681.          0,
  4682.          0,
  4683.          0 ) ;
  4684.  
  4685.    usMnoStatus = MnoWrtNAttr (
  4686.          &bAttr,
  4687.          2000,
  4688.          0,
  4689.          0,
  4690.          0 ) ;
  4691.  
  4692.    CompareCharacterBufs () ;
  4693.    CompareVideoBufs () ;
  4694.  
  4695.    DosSleep ( SHORTSLEEP ) ;
  4696.  
  4697.  
  4698.  
  4699.    bAttr       = 0x0F ;
  4700.  
  4701.  
  4702.    for ( i  = 0 ; i < 25 ; i++ )
  4703.       {
  4704.       usVioStatus = VioWrtNAttr (
  4705.             &bAttr,
  4706.             30,
  4707.             i,
  4708.             i,
  4709.             0 ) ;
  4710.  
  4711.       usMnoStatus = MnoWrtNAttr (
  4712.             &bAttr,
  4713.             30,
  4714.             i,
  4715.             i,
  4716.             0 ) ;
  4717.       }
  4718.    CompareCharacterBufs () ;
  4719.    CompareVideoBufs () ;
  4720.  
  4721.    DosSleep ( SHORTSLEEP ) ;
  4722.  
  4723.  
  4724.    bAttr       = 0x01 ;
  4725.  
  4726.  
  4727.    for ( i  = 0 ; i < 25 ; i++ )
  4728.       {
  4729.       usVioStatus = VioWrtNAttr (
  4730.             &bAttr,
  4731.             30,
  4732.             i,
  4733.             65,
  4734.             0 ) ;
  4735.  
  4736.       usMnoStatus = MnoWrtNAttr (
  4737.             &bAttr,
  4738.             30,
  4739.             i,
  4740.             65,
  4741.             0 ) ;
  4742.       }
  4743.    CompareCharacterBufs () ;
  4744.    CompareVideoBufs () ;
  4745.  
  4746.    DosSleep ( SHORTSLEEP ) ;
  4747.  
  4748.  
  4749.  
  4750.  
  4751.    }           /* End of TestMnoWrtNAttr function.          */
  4752.  
  4753.  
  4754. /*------------------------------------------------------------*/
  4755. /* Test Mno Wrt Cell Str.                                     */
  4756. /*------------------------------------------------------------*/
  4757.  
  4758. VOID              TestMnoWrtCellStr ()
  4759.  
  4760.    {
  4761.    USHORT         usMnoStatus       = 0 ;
  4762.    USHORT         usVioStatus       = 0 ;
  4763.    USHORT         usRow             = 0 ;
  4764.    USHORT         usColumn          = 0 ;
  4765.    USHORT         i                 = 0 ;
  4766.  
  4767.    UCHAR          szText [ 5000 ]   = "" ;
  4768.  
  4769.  
  4770.                /*---------------------------------------------*/
  4771.                /*                                             */
  4772.                /*  Monochrome Adapter Attribute Byte.         */
  4773.                /*                                             */
  4774.                /*                                             */
  4775.                /*  0... ....  No blinking                     */
  4776.                /*  1... ....  Blinking                        */
  4777.                /*  .... 0...  Normal foreground intensity.    */
  4778.                /*  .... 1...  Bright foreground intensity.    */
  4779.                /*  .... .001  Underlining                     */
  4780.                /*  .000 ....  Black background.               */
  4781.                /*  .111 ....  White background.               */
  4782.                /*  .... .000  Black foreground.               */
  4783.                /*  .... .111  White foreground.               */
  4784.                /*                                             */
  4785.                /*  0111 0000  \160   Reverse video.           */
  4786.                /*  1111 0000  \360   Blinking reverse video.  */
  4787.                /*  1000 0111  \207   Blinking.                */
  4788.                /*  0000 1111  \017   Bold.                    */
  4789.                /*  0000 0111  \007   Normal                   */
  4790.                /*                                             */
  4791.                /*---------------------------------------------*/
  4792.  
  4793.    strcpy (
  4794.       szText,
  4795.       "T\07e\07s\07t\07 \07o\07f\07 \07"
  4796.          "W\07r\07t\07C\07e\07l\07l\07S\07"
  4797.          "t\07r\07 \07P\07a\07r\07m\07 \07"
  4798.          "e\07r\07r\07o\07r\07s\07" ) ;
  4799.  
  4800.  
  4801.    usVioStatus                      = VioWrtCellStr (
  4802.          szText,
  4803.          strlen ( szText ),
  4804.          100,
  4805.          1,
  4806.          0 ) ;
  4807.  
  4808.    usMnoStatus                      = MnoWrtCellStr (
  4809.          szText,
  4810.          strlen ( szText ),
  4811.          100,
  4812.          1,
  4813.          0 ) ;
  4814.  
  4815.  
  4816.    if ( usVioStatus != usMnoStatus )
  4817.       {
  4818.       fprintf (
  4819.          stderr,
  4820.          "Test WrtCellStr 001 bad return, Vio=%d Mno=%d",
  4821.          usVioStatus,
  4822.          usMnoStatus ) ;
  4823.  
  4824.       exit ( 1 ) ;
  4825.       }
  4826.  
  4827.  
  4828.    usVioStatus                      = VioWrtCellStr (
  4829.          szText,
  4830.          strlen ( szText ),
  4831.          1,
  4832.          100,
  4833.          0 ) ;
  4834.  
  4835.    usMnoStatus                      = MnoWrtCellStr (
  4836.          szText,
  4837.          strlen ( szText ),
  4838.          1,
  4839.          100,
  4840.          0 ) ;
  4841.  
  4842.  
  4843.    if ( usVioStatus != usMnoStatus )
  4844.       {
  4845.       fprintf (
  4846.          stderr,
  4847.          "Test WrtCellStr 002 bad return, Vio=%d Mno=%d",
  4848.          usVioStatus,
  4849.          usMnoStatus ) ;
  4850.  
  4851.       exit ( 1 ) ;
  4852.       }
  4853.  
  4854.    usVioStatus                      = VioWrtCellStr (
  4855.          szText,
  4856.          strlen ( szText ),
  4857.          1,
  4858.          1,
  4859.          10 ) ;
  4860.  
  4861.    usMnoStatus                      = MnoWrtCellStr (
  4862.          szText,
  4863.          strlen ( szText ),
  4864.          1,
  4865.          1,
  4866.          10 ) ;
  4867.  
  4868.  
  4869.    if ( usVioStatus != usMnoStatus )
  4870.       {
  4871.       fprintf (
  4872.          stderr,
  4873.          "Test WrtCellStr 003 bad return, Vio=%d Mno=%d",
  4874.          usVioStatus,
  4875.          usMnoStatus ) ;
  4876.  
  4877.       exit ( 1 ) ;
  4878.       }
  4879.  
  4880.    strcpy (
  4881.       szText,
  4882.       "T\160e\160s\160t\160 \160o\160f\160 \160"
  4883.          "W\017r\017t\017C\017e\017l\017l\017S\017t\017r\007" ) ;
  4884.  
  4885.    for ( i  = 1 ; i < 30 ; i++ )
  4886.  
  4887.       {
  4888.       usVioStatus = VioWrtCellStr (
  4889.             szText,
  4890.             strlen ( szText ),
  4891.             i,
  4892.             i + 25,
  4893.             0 ) ;
  4894.  
  4895.       usMnoStatus = MnoWrtCellStr (
  4896.             szText,
  4897.             strlen ( szText ),
  4898.             i,
  4899.             i + 25,
  4900.             0 ) ;
  4901.       }
  4902.  
  4903.    CompareCharacterBufs () ;
  4904.    CompareVideoBufs () ;
  4905.  
  4906.    DosSleep ( SHORTSLEEP ) ;
  4907.  
  4908.  
  4909.  
  4910.  
  4911.    }           /* End of TestMnoWrtCellStr function.          */
  4912.  
  4913.  
  4914. /*------------------------------------------------------------*/
  4915. /* Test Mno Wrt Char Str.                                     */
  4916. /*------------------------------------------------------------*/
  4917.  
  4918. VOID              TestMnoWrtCharStr ()
  4919.  
  4920.    {
  4921.    USHORT         usMnoStatus       = 0 ;
  4922.    USHORT         usVioStatus       = 0 ;
  4923.    USHORT         usRow             = 0 ;
  4924.    USHORT         usColumn          = 0 ;
  4925.    USHORT         i                 = 0 ;
  4926.  
  4927.    UCHAR          szText [ 5000 ]   = "" ;
  4928.  
  4929.    strcpy ( szText, "Test of WrtCharStr Parm errors 001" ) ;
  4930.  
  4931.  
  4932.    usVioStatus                      = VioWrtCharStr (
  4933.          szText,
  4934.          strlen ( szText ),
  4935.          100,
  4936.          1,
  4937.          0 ) ;
  4938.  
  4939.    usMnoStatus                      = MnoWrtCharStr (
  4940.          szText,
  4941.          strlen ( szText ),
  4942.          100,
  4943.          1,
  4944.          0 ) ;
  4945.  
  4946.  
  4947.    if ( usVioStatus != usMnoStatus )
  4948.       {
  4949.       fprintf (
  4950.          stderr,
  4951.          "Test WrtCharStr 001 bad return, Vio=%d Mno=%d",
  4952.          usVioStatus,
  4953.          usMnoStatus ) ;
  4954.  
  4955.       exit ( 1 ) ;
  4956.       }
  4957.  
  4958.  
  4959.    usVioStatus                      = VioWrtCharStr (
  4960.          szText,
  4961.          strlen ( szText ),
  4962.          1,
  4963.          100,
  4964.          0 ) ;
  4965.  
  4966.    usMnoStatus                      = MnoWrtCharStr (
  4967.          szText,
  4968.          strlen ( szText ),
  4969.          1,
  4970.          100,
  4971.          0 ) ;
  4972.  
  4973.  
  4974.    if ( usVioStatus != usMnoStatus )
  4975.       {
  4976.       fprintf (
  4977.          stderr,
  4978.          "Test WrtCharStr 002 bad return, Vio=%d Mno=%d",
  4979.          usVioStatus,
  4980.          usMnoStatus ) ;
  4981.  
  4982.       exit ( 1 ) ;
  4983.       }
  4984.  
  4985.    usVioStatus                      = VioWrtCharStr (
  4986.          szText,
  4987.          strlen ( szText ),
  4988.          1,
  4989.          1,
  4990.          10 ) ;
  4991.  
  4992.    usMnoStatus                      = MnoWrtCharStr (
  4993.          szText,
  4994.          strlen ( szText ),
  4995.          1,
  4996.          1,
  4997.          10 ) ;
  4998.  
  4999.  
  5000.    if ( usVioStatus != usMnoStatus )
  5001.       {
  5002.       fprintf (
  5003.          stderr,
  5004.          "Test WrtCharStr 003 bad return, Vio=%d Mno=%d",
  5005.          usVioStatus,
  5006.          usMnoStatus ) ;
  5007.  
  5008.       exit ( 1 ) ;
  5009.       }
  5010.  
  5011.    strcpy ( szText, "Test of WrtCharStr 004" ) ;
  5012.  
  5013.    for ( i  = 1 ; i < 30 ; i++ )
  5014.  
  5015.       {
  5016.       usVioStatus = VioWrtCharStr (
  5017.             szText,
  5018.             strlen ( szText ),
  5019.             i,
  5020.             i,
  5021.             0 ) ;
  5022.  
  5023.       usMnoStatus = MnoWrtCharStr (
  5024.             szText,
  5025.             strlen ( szText ),
  5026.             i,
  5027.             i,
  5028.             0 ) ;
  5029.       }
  5030.  
  5031.    CompareCharacterBufs () ;
  5032.    CompareVideoBufs () ;
  5033.  
  5034.    DosSleep ( SHORTSLEEP ) ;
  5035.  
  5036.  
  5037.  
  5038.  
  5039.    }           /* End of TestMnoWrtCharStr function.          */
  5040.  
  5041.  
  5042. /*------------------------------------------------------------*/
  5043. /* Test Mno Wrt Char Str Att.                                 */
  5044. /*------------------------------------------------------------*/
  5045.  
  5046. VOID              TestMnoWrtCharStrAtt ()
  5047.  
  5048.    {
  5049.    USHORT         usMnoStatus = 0 ;
  5050.    USHORT         usVioStatus = 0 ;
  5051.    USHORT         usRow       = 0 ;
  5052.    USHORT         usColumn    = 0 ;
  5053.    USHORT         i           = 0 ;
  5054.    BYTE           bAttr       = 0x07 ;
  5055.  
  5056.  
  5057.    UCHAR          szText [ 5000 ]   = "" ;
  5058.  
  5059.    strcpy ( szText, "Test of WrtCharStrAtt Parm errors 001" ) ;
  5060.  
  5061.  
  5062.    usVioStatus = VioWrtCharStrAtt (
  5063.          szText,
  5064.          strlen ( szText ),
  5065.          100,
  5066.          1,
  5067.          &bAttr,
  5068.          0 ) ;
  5069.  
  5070.    usMnoStatus = MnoWrtCharStrAtt (
  5071.          szText,
  5072.          strlen ( szText ),
  5073.          100,
  5074.          1,
  5075.          &bAttr,
  5076.          0 ) ;
  5077.  
  5078.  
  5079.    if ( usVioStatus != usMnoStatus )
  5080.       {
  5081.       fprintf (
  5082.          stderr,
  5083.          "Test WrtCharStrAtt 001 bad return, Vio=%d Mno=%d",
  5084.          usVioStatus,
  5085.          usMnoStatus ) ;
  5086.  
  5087.       exit ( 1 ) ;
  5088.       }
  5089.  
  5090.  
  5091.    usVioStatus = VioWrtCharStrAtt (
  5092.          szText,
  5093.          strlen ( szText ),
  5094.          1,
  5095.          100,
  5096.          &bAttr,
  5097.          0 ) ;
  5098.  
  5099.    usMnoStatus = MnoWrtCharStrAtt (
  5100.          szText,
  5101.          strlen ( szText ),
  5102.          1,
  5103.          100,
  5104.          &bAttr,
  5105.          0 ) ;
  5106.  
  5107.  
  5108.    if ( usVioStatus != usMnoStatus )
  5109.       {
  5110.       fprintf (
  5111.          stderr,
  5112.          "Test WrtCharStrAtt 002 bad return, Vio=%d Mno=%d",
  5113.          usVioStatus,
  5114.          usMnoStatus ) ;
  5115.  
  5116.       exit ( 1 ) ;
  5117.       }
  5118.  
  5119.    usVioStatus = VioWrtCharStrAtt (
  5120.          szText,
  5121.          strlen ( szText ),
  5122.          1,
  5123.          1,
  5124.          &bAttr,
  5125.          10 ) ;
  5126.  
  5127.    usMnoStatus = MnoWrtCharStrAtt (
  5128.          szText,
  5129.          strlen ( szText ),
  5130.          1,
  5131.          1,
  5132.          &bAttr,
  5133.          10 ) ;
  5134.  
  5135.  
  5136.    if ( usVioStatus != usMnoStatus )
  5137.       {
  5138.       fprintf (
  5139.          stderr,
  5140.          "Test WrtCharStrAtt 003 bad return, Vio=%d Mno=%d",
  5141.          usVioStatus,
  5142.          usMnoStatus ) ;
  5143.  
  5144.       exit ( 1 ) ;
  5145.       }
  5146.  
  5147.    strcpy ( szText, "Test of WrtCharStrAtt 004" ) ;
  5148.  
  5149.    for ( i  = 1 ; i < 30 ; i++ )
  5150.  
  5151.       {
  5152.       switch ( i % 5 )
  5153.          {
  5154.          case  0 :
  5155.             bAttr = 0x07 ;
  5156.             break ;
  5157.  
  5158.          case  1 :
  5159.             bAttr = 0x0F ;
  5160.             break ;
  5161.  
  5162.          case  2 :
  5163.             bAttr = 0x70 ;
  5164.             break ;
  5165.  
  5166.          case  3 :
  5167.             bAttr = 0x01 ;
  5168.             break ;
  5169.  
  5170.          case  4 :
  5171.             bAttr = 0x87 ;
  5172.             break ;
  5173.          }
  5174.  
  5175.       usVioStatus = VioWrtCharStrAtt (
  5176.             szText,
  5177.             strlen ( szText ),
  5178.             i,
  5179.             i,
  5180.             &bAttr,
  5181.             0 ) ;
  5182.  
  5183.       usMnoStatus = MnoWrtCharStrAtt (
  5184.             szText,
  5185.             strlen ( szText ),
  5186.             i,
  5187.             i,
  5188.             &bAttr,
  5189.             0 ) ;
  5190.       }
  5191.  
  5192.    CompareCharacterBufs () ;
  5193.    CompareVideoBufs () ;
  5194.  
  5195.    DosSleep ( LONGSLEEP ) ;
  5196.  
  5197.  
  5198.  
  5199.  
  5200.    }           /* End of TestMnoWrtCharStrAtt function.       */
  5201.  
  5202.  
  5203. /*------------------------------------------------------------*/
  5204. /* Test Ansi Esc.                                             */
  5205. /*------------------------------------------------------------*/
  5206.  
  5207. VOID              TestAnsiEsc ()
  5208.    {
  5209.    USHORT         usMnoStatus    = 0 ;
  5210.    USHORT         usVioStatus    = 0 ;
  5211.    USHORT         usRow          = 0 ;
  5212.    USHORT         usColumn       = 0 ;
  5213.    USHORT         i              = 0 ;
  5214.  
  5215.    UCHAR          szText [ 5000 ]  = "" ;
  5216.  
  5217.  
  5218.  
  5219.    strcpy (szText,"\033[2J");
  5220.  
  5221.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5222.  
  5223.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5224.    CompareCharacterBufs () ;
  5225.    CompareVideoBufs () ;
  5226.  
  5227.    DosSleep ( SHORTSLEEP ) ;
  5228.  
  5229.  
  5230.  
  5231.    strcpy (szText,"\033[2JAnsi Test 001");
  5232.  
  5233.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5234.  
  5235.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5236.    CompareCharacterBufs () ;
  5237.    CompareVideoBufs () ;
  5238.  
  5239.    DosSleep ( SHORTSLEEP ) ;
  5240.  
  5241.  
  5242.  
  5243.    strcpy (szText,"\033[2;2fAnsi Test 002");
  5244.  
  5245.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5246.  
  5247.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5248.    CompareCharacterBufs () ;
  5249.    CompareVideoBufs () ;
  5250.  
  5251.    DosSleep ( SHORTSLEEP ) ;
  5252.  
  5253.  
  5254.  
  5255.    strcpy (szText,"\033[0003;0003fAnsi Test 003");
  5256.  
  5257.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5258.  
  5259.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5260.    CompareCharacterBufs () ;
  5261.    CompareVideoBufs () ;
  5262.  
  5263.    DosSleep ( SHORTSLEEP ) ;
  5264.  
  5265.  
  5266.  
  5267.    strcpy (szText,"\033[24;74HAnsi Test 004");
  5268.  
  5269.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5270.  
  5271.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5272.    CompareCharacterBufs () ;
  5273.    CompareVideoBufs () ;
  5274.  
  5275.    DosSleep ( SHORTSLEEP ) ;
  5276.  
  5277.  
  5278.  
  5279.    strcpy (szText,"\033[HAnsi Test 005");
  5280.  
  5281.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5282.  
  5283.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5284.    CompareCharacterBufs () ;
  5285.    CompareVideoBufs () ;
  5286.  
  5287.    DosSleep ( SHORTSLEEP ) ;
  5288.  
  5289.  
  5290.  
  5291.    strcpy (szText,"\033[25;74HAnsi Test 006");
  5292.  
  5293.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5294.  
  5295.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5296.    CompareCharacterBufs () ;
  5297.    CompareVideoBufs () ;
  5298.  
  5299.    DosSleep ( SHORTSLEEP ) ;
  5300.  
  5301.  
  5302.  
  5303.    strcpy (szText,"\033[;HAnsi Test 007");
  5304.  
  5305.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5306.  
  5307.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5308.    CompareCharacterBufs () ;
  5309.    CompareVideoBufs () ;
  5310.  
  5311.    DosSleep ( SHORTSLEEP ) ;
  5312.  
  5313.  
  5314.  
  5315.    strcpy (szText,"\033[5;HAnsi Test 008");
  5316.  
  5317.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5318.  
  5319.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5320.    CompareCharacterBufs () ;
  5321.    CompareVideoBufs () ;
  5322.  
  5323.    DosSleep ( SHORTSLEEP ) ;
  5324.  
  5325.  
  5326.  
  5327. #if 0
  5328.  
  5329.    strcpy (szText,"\033[;24HVIO fails Ansi Test 009");
  5330.  
  5331.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5332.  
  5333.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5334.    CompareCharacterBufs () ;
  5335.    CompareVideoBufs () ;
  5336.  
  5337.    DosSleep ( SHORTSLEEP ) ;
  5338.  
  5339. #endif
  5340.  
  5341.  
  5342.    strcpy (szText,"\033[2J\033[10;24HAnsi Test 010");
  5343.  
  5344.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5345.  
  5346.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5347.    CompareCharacterBufs () ;
  5348.    CompareVideoBufs () ;
  5349.  
  5350.    DosSleep ( SHORTSLEEP ) ;
  5351.  
  5352.  
  5353.  
  5354.    strcpy (szText,"\033[AAnsi Test 011");
  5355.  
  5356.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5357.  
  5358.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5359.    CompareCharacterBufs () ;
  5360.    CompareVideoBufs () ;
  5361.  
  5362.    DosSleep ( SHORTSLEEP ) ;
  5363.  
  5364.  
  5365.    strcpy (szText,"\033[1AAnsi Test 012");
  5366.  
  5367.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5368.  
  5369.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5370.  
  5371.    CompareCharacterBufs () ;
  5372.    CompareVideoBufs () ;
  5373.  
  5374.    DosSleep ( SHORTSLEEP ) ;
  5375.  
  5376.  
  5377.    strcpy (szText,"\033[2AAnsi Test 013");
  5378.  
  5379.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5380.  
  5381.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5382.    CompareCharacterBufs () ;
  5383.    CompareVideoBufs () ;
  5384.  
  5385.    DosSleep ( SHORTSLEEP ) ;
  5386.  
  5387.  
  5388.  
  5389.  
  5390.    strcpy (szText,"\033[3AAnsi Test 014");
  5391.  
  5392.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5393.  
  5394.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5395.    CompareCharacterBufs () ;
  5396.    CompareVideoBufs () ;
  5397.  
  5398.    DosSleep ( SHORTSLEEP ) ;
  5399.  
  5400.  
  5401.  
  5402.  
  5403.    strcpy (szText,"\033[4AAnsi Test 015");
  5404.  
  5405.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5406.  
  5407.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5408.    CompareCharacterBufs () ;
  5409.    CompareVideoBufs () ;
  5410.  
  5411.    DosSleep ( SHORTSLEEP ) ;
  5412.  
  5413.  
  5414.  
  5415.    strcpy (szText,"\033[2J\033[10;24HAnsi Test 016");
  5416.  
  5417.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5418.  
  5419.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5420.    CompareCharacterBufs () ;
  5421.    CompareVideoBufs () ;
  5422.  
  5423.    DosSleep ( SHORTSLEEP ) ;
  5424.  
  5425.  
  5426.  
  5427.    strcpy (szText,"\033[BAnsi Test 017");
  5428.  
  5429.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5430.  
  5431.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5432.    CompareCharacterBufs () ;
  5433.    CompareVideoBufs () ;
  5434.  
  5435.    DosSleep ( SHORTSLEEP ) ;
  5436.  
  5437.  
  5438.    strcpy (szText,"\033[1BAnsi Test 018");
  5439.  
  5440.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5441.  
  5442.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5443.  
  5444.    CompareCharacterBufs () ;
  5445.    CompareVideoBufs () ;
  5446.  
  5447.    DosSleep ( SHORTSLEEP ) ;
  5448.  
  5449.  
  5450.    strcpy (szText,"\033[2BAnsi Test 019");
  5451.  
  5452.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5453.  
  5454.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5455.    CompareCharacterBufs () ;
  5456.    CompareVideoBufs () ;
  5457.  
  5458.    DosSleep ( SHORTSLEEP ) ;
  5459.  
  5460.  
  5461.  
  5462.  
  5463.    strcpy (szText,"\033[3BAnsi Test 020");
  5464.  
  5465.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5466.  
  5467.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5468.    CompareCharacterBufs () ;
  5469.    CompareVideoBufs () ;
  5470.  
  5471.    DosSleep ( SHORTSLEEP ) ;
  5472.  
  5473.  
  5474.  
  5475.  
  5476.    strcpy (szText,"\033[4BAnsi Test 021");
  5477.  
  5478.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5479.  
  5480.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5481.    CompareCharacterBufs () ;
  5482.    CompareVideoBufs () ;
  5483.  
  5484.    DosSleep ( SHORTSLEEP ) ;
  5485.  
  5486.  
  5487.  
  5488.  
  5489.    strcpy (szText,"\033[5BAnsi Test 022");
  5490.  
  5491.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5492.  
  5493.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5494.    CompareCharacterBufs () ;
  5495.    CompareVideoBufs () ;
  5496.  
  5497.    DosSleep ( SHORTSLEEP ) ;
  5498.  
  5499.  
  5500.  
  5501.    strcpy (szText,"\033[2J\033[10;24HAnsi Test 023");
  5502.  
  5503.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5504.  
  5505.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5506.    CompareCharacterBufs () ;
  5507.    CompareVideoBufs () ;
  5508.  
  5509.    DosSleep ( SHORTSLEEP ) ;
  5510.  
  5511.  
  5512.  
  5513.    strcpy (szText,"\033[CAnsi Test 024");
  5514.  
  5515.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5516.  
  5517.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5518.    CompareCharacterBufs () ;
  5519.    CompareVideoBufs () ;
  5520.  
  5521.    DosSleep ( SHORTSLEEP ) ;
  5522.  
  5523.  
  5524.    strcpy (szText,"\033[1CAnsi Test 025");
  5525.  
  5526.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5527.  
  5528.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5529.  
  5530.    CompareCharacterBufs () ;
  5531.    CompareVideoBufs () ;
  5532.  
  5533.    DosSleep ( SHORTSLEEP ) ;
  5534.  
  5535.  
  5536.    strcpy (szText,"\033[2CAnsi Test 026");
  5537.  
  5538.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5539.  
  5540.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5541.    CompareCharacterBufs () ;
  5542.    CompareVideoBufs () ;
  5543.  
  5544.    DosSleep ( SHORTSLEEP ) ;
  5545.  
  5546.  
  5547.  
  5548.  
  5549.    strcpy (szText,"\033[3CAnsi Test 027");
  5550.  
  5551.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5552.  
  5553.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5554.    CompareCharacterBufs () ;
  5555.    CompareVideoBufs () ;
  5556.  
  5557.    DosSleep ( SHORTSLEEP ) ;
  5558.  
  5559.  
  5560.  
  5561.  
  5562.    strcpy (szText,"\033[4CAnsi Test 028");
  5563.  
  5564.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5565.  
  5566.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5567.    CompareCharacterBufs () ;
  5568.    CompareVideoBufs () ;
  5569.  
  5570.    DosSleep ( SHORTSLEEP ) ;
  5571.  
  5572.  
  5573.  
  5574.  
  5575.    strcpy (szText,"\033[5CAnsi Test 029");
  5576.  
  5577.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5578.  
  5579.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5580.    CompareCharacterBufs () ;
  5581.    CompareVideoBufs () ;
  5582.  
  5583.    DosSleep ( SHORTSLEEP ) ;
  5584.  
  5585.  
  5586.  
  5587.    strcpy (szText,"\033[2J\033[10;24HAnsi Test 030");
  5588.  
  5589.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5590.  
  5591.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5592.    CompareCharacterBufs () ;
  5593.    CompareVideoBufs () ;
  5594.  
  5595.    DosSleep ( SHORTSLEEP ) ;
  5596.  
  5597.  
  5598.  
  5599.    strcpy (szText,"\033[DAnsi Test 031");
  5600.  
  5601.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5602.  
  5603.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5604.    CompareCharacterBufs () ;
  5605.    CompareVideoBufs () ;
  5606.  
  5607.    DosSleep ( SHORTSLEEP ) ;
  5608.  
  5609.  
  5610.    strcpy (szText,"\033[1DAnsi Test 032");
  5611.  
  5612.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5613.  
  5614.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5615.  
  5616.    CompareCharacterBufs () ;
  5617.    CompareVideoBufs () ;
  5618.  
  5619.    DosSleep ( SHORTSLEEP ) ;
  5620.  
  5621.  
  5622.    strcpy (szText,"\033[2DAnsi Test 034");
  5623.  
  5624.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5625.  
  5626.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5627.    CompareCharacterBufs () ;
  5628.    CompareVideoBufs () ;
  5629.  
  5630.    DosSleep ( SHORTSLEEP ) ;
  5631.  
  5632.  
  5633.  
  5634.  
  5635.    strcpy (szText,"\033[3DAnsi Test 035");
  5636.  
  5637.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5638.  
  5639.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5640.    CompareCharacterBufs () ;
  5641.    CompareVideoBufs () ;
  5642.  
  5643.    DosSleep ( SHORTSLEEP ) ;
  5644.  
  5645.  
  5646.  
  5647.  
  5648.    strcpy (szText,"\033[4DAnsi Test 036");
  5649.  
  5650.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5651.  
  5652.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5653.    CompareCharacterBufs () ;
  5654.    CompareVideoBufs () ;
  5655.  
  5656.    DosSleep ( SHORTSLEEP ) ;
  5657.  
  5658.  
  5659.  
  5660.  
  5661.    strcpy (szText,"\033[5DAnsi Test 037");
  5662.  
  5663.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5664.  
  5665.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5666.    CompareCharacterBufs () ;
  5667.    CompareVideoBufs () ;
  5668.  
  5669.    DosSleep ( SHORTSLEEP ) ;
  5670.  
  5671.  
  5672.  
  5673.    strcpy (szText,"\033[99DAnsi Test 038");
  5674.  
  5675.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5676.  
  5677.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5678.    CompareCharacterBufs () ;
  5679.    CompareVideoBufs () ;
  5680.  
  5681.    DosSleep ( SHORTSLEEP ) ;
  5682.  
  5683.  
  5684.    strcpy (szText,"\033[10DAnsi Test 039");
  5685.  
  5686.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5687.  
  5688.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5689.    CompareCharacterBufs () ;
  5690.    CompareVideoBufs () ;
  5691.  
  5692.    DosSleep ( SHORTSLEEP ) ;
  5693.  
  5694.  
  5695.  
  5696.  
  5697.    strcpy (szText,"\033[2J\033[s\033[10;10HAnsi Test 040");
  5698.  
  5699.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5700.  
  5701.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5702.    CompareCharacterBufs () ;
  5703.    CompareVideoBufs () ;
  5704.  
  5705.    DosSleep ( SHORTSLEEP ) ;
  5706.  
  5707.  
  5708.  
  5709.    strcpy (szText,"\033[5;50HAnsi Test 041");
  5710.  
  5711.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5712.  
  5713.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5714.    CompareCharacterBufs () ;
  5715.    CompareVideoBufs () ;
  5716.  
  5717.    DosSleep ( SHORTSLEEP ) ;
  5718.  
  5719.  
  5720.  
  5721.    strcpy (szText,"\033[uAnsi Test 042");
  5722.  
  5723.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5724.  
  5725.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5726.    CompareCharacterBufs () ;
  5727.    CompareVideoBufs () ;
  5728.  
  5729.    DosSleep ( SHORTSLEEP ) ;
  5730.  
  5731.  
  5732.  
  5733.    strcpy (szText,"\033[5;50HAnsi Test 043");
  5734.  
  5735.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5736.  
  5737.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5738.    CompareCharacterBufs () ;
  5739.    CompareVideoBufs () ;
  5740.  
  5741.    DosSleep ( SHORTSLEEP ) ;
  5742.  
  5743.  
  5744.  
  5745.    strcpy (szText,"\033[uAnsi Test 044");
  5746.  
  5747.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5748.  
  5749.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5750.    CompareCharacterBufs () ;
  5751.    CompareVideoBufs () ;
  5752.  
  5753.    DosSleep ( SHORTSLEEP ) ;
  5754.  
  5755.  
  5756.  
  5757.    strcpy (szText,"\033[2J\033[s\033[10;1HAnsi Test 045 abcdefghijklmnopqrs");
  5758.  
  5759.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5760.  
  5761.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5762.    CompareCharacterBufs () ;
  5763.    CompareVideoBufs () ;
  5764.  
  5765.    DosSleep ( SHORTSLEEP ) ;
  5766.  
  5767.  
  5768.  
  5769.    strcpy (szText,"\033[10;3f");
  5770.  
  5771.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5772.  
  5773.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5774.    CompareCharacterBufs () ;
  5775.    CompareVideoBufs () ;
  5776.  
  5777.    DosSleep ( SHORTSLEEP ) ;
  5778.  
  5779.  
  5780.  
  5781.    strcpy (szText,"\033[K");
  5782.  
  5783.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5784.  
  5785.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5786.    CompareCharacterBufs () ;
  5787.    CompareVideoBufs () ;
  5788.  
  5789.    DosSleep ( SHORTSLEEP ) ;
  5790.  
  5791.  
  5792.  
  5793.    strcpy ( szText, "\033[2J\033[B" ) ;
  5794.  
  5795.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5796.  
  5797.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5798.    CompareCharacterBufs () ;
  5799.    CompareVideoBufs () ;
  5800.  
  5801.    DosSleep ( SHORTSLEEP ) ;
  5802.  
  5803.  
  5804.  
  5805.    for ( i  = 0 ; i < 500 ; i++ )
  5806.       {
  5807.       strcpy ( szText, "ABCD" ) ;
  5808.  
  5809.       usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5810.  
  5811.       usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5812.       }
  5813.  
  5814.  
  5815.    strcpy (szText,"\033[1;79f\033[K");
  5816.  
  5817.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5818.  
  5819.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5820.    CompareCharacterBufs () ;
  5821.    CompareVideoBufs () ;
  5822.  
  5823.    DosSleep ( SHORTSLEEP ) ;
  5824.  
  5825.  
  5826.    strcpy (szText,"\033[2;1f\033[K");
  5827.  
  5828.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5829.  
  5830.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5831.    CompareCharacterBufs () ;
  5832.    CompareVideoBufs () ;
  5833.  
  5834.    DosSleep ( SHORTSLEEP ) ;
  5835.  
  5836.  
  5837.    strcpy (szText,"\033[10;10f\033[K");
  5838.  
  5839.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5840.  
  5841.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5842.    CompareCharacterBufs () ;
  5843.    CompareVideoBufs () ;
  5844.  
  5845.    DosSleep ( SHORTSLEEP ) ;
  5846.  
  5847.  
  5848.    strcpy (szText,"\033[11;80f\033[K");
  5849.  
  5850.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5851.  
  5852.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5853.    CompareCharacterBufs () ;
  5854.    CompareVideoBufs () ;
  5855.  
  5856.    DosSleep ( SHORTSLEEP ) ;
  5857.  
  5858.  
  5859.    strcpy (szText,"\033[24;25f\033[K");
  5860.  
  5861.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5862.  
  5863.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5864.    CompareCharacterBufs () ;
  5865.    CompareVideoBufs () ;
  5866.  
  5867.    DosSleep ( SHORTSLEEP ) ;
  5868.  
  5869.  
  5870.    strcpy (szText,"\033[1;79f\033[K");
  5871.  
  5872.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5873.  
  5874.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5875.    CompareCharacterBufs () ;
  5876.    CompareVideoBufs () ;
  5877.  
  5878.    DosSleep ( SHORTSLEEP ) ;
  5879.  
  5880.  
  5881.    strcpy (szText,"\033[19;2f\033[K");
  5882.  
  5883.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5884.  
  5885.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  5886.    CompareCharacterBufs () ;
  5887.    CompareVideoBufs () ;
  5888.  
  5889.    DosSleep ( SHORTSLEEP ) ;
  5890.  
  5891.  
  5892.    strcpy (
  5893.       szText,
  5894.       "\033[2J\033[B\r\n" ) ;
  5895.  
  5896.    strcat (
  5897.       szText,
  5898.       "\033[0mAll attributes off   ABCDEFGH\r\n" ) ;
  5899.  
  5900.    strcat (
  5901.       szText,
  5902.       "\033[0;1mBold on              ABCDEFGH\r\n" ) ;
  5903.  
  5904.    strcat (
  5905.       szText,
  5906.       "\033[0;2mFaint on             ABCDEFGH\r\n" ) ;
  5907.  
  5908.    strcat (
  5909.       szText,
  5910.       "\033[0;3mItalic on            ABCDEFGH\r\n" ) ;
  5911.  
  5912.    strcat (
  5913.       szText,
  5914.       "\033[0;5mBlink on ABCDEFGH \033[1mBold on " ) ;
  5915.  
  5916.    strcat (
  5917.       szText,
  5918.       "\033[7mRevrse Video on " ) ;
  5919.  
  5920.    strcat (
  5921.       szText,
  5922.       "\033[6mRapid-Blink on \033[2mFaint on \r\n" ) ;
  5923.  
  5924.    strcat (
  5925.       szText,
  5926.       "\033[0;6mRapid-Blink on       ABCDEFGH\r\n" ) ;
  5927.  
  5928.    strcat (
  5929.       szText,
  5930.       "\033[0;7mRevrse Video on      ABCDEFGH\r\n" ) ;
  5931.  
  5932.    strcat (
  5933.       szText,
  5934.       "\033[0;8mConcealed on         ABCDEFGH\r\n" ) ;
  5935.  
  5936.    strcat (
  5937.       szText,
  5938.       "\033[30mBlack   Foreground  ABCDEFGH" ) ;
  5939.  
  5940.    strcat (
  5941.       szText,
  5942.       "\033[31mRed     Foreground  ABCDEFGH\r\n" ) ;
  5943.  
  5944.    strcat (
  5945.       szText,
  5946.       "\033[32mGreen   Foreground  ABCDEFGH" ) ;
  5947.  
  5948.    strcat (
  5949.       szText,
  5950.       "\033[33mYellow  Foreground  ABCDEF\r\n" ) ;
  5951.  
  5952.    strcat (
  5953.       szText,
  5954.       "\033[34mBlue    Foreground  ABCDEFGH" ) ;
  5955.  
  5956.    strcat (
  5957.       szText,
  5958.       "\033[35mMagenta Foreground  ABCDEFGH\r\n" ) ;
  5959.  
  5960.    strcat (
  5961.       szText,
  5962.       "\033[36mCyan    Foreground  ABCDEFGH" ) ;
  5963.  
  5964.    strcat (
  5965.       szText,
  5966.       "\033[37mWhite   Foreground  ABCDEF\r\n" ) ;
  5967.  
  5968.    strcat (
  5969.       szText,
  5970.       "\033[40mBlack   Background  ABCDEFGH" ) ;
  5971.  
  5972.    strcat (
  5973.       szText,
  5974.       "\033[41mRed     Background  ABCDEFGH\r\n" ) ;
  5975.  
  5976.    strcat (
  5977.       szText,
  5978.       "\033[42mGreen   Background  ABCDEFGH" ) ;
  5979.  
  5980.    strcat (
  5981.       szText,
  5982.       "\033[43mYellow  Background  ABCDEF\r\n" ) ;
  5983.  
  5984.    strcat (
  5985.       szText,
  5986.       "\033[44mBlue    Background  ABCDEFGH" ) ;
  5987.  
  5988.    strcat (
  5989.       szText,
  5990.       "\033[45mMagenta Background  ABCDEFGH\r\n" ) ;
  5991.  
  5992.    strcat (
  5993.       szText,
  5994.       "\033[46mCyan    Background  ABCDEFGH" ) ;
  5995.  
  5996.    strcat (
  5997.       szText,
  5998.       "\033[47mWhite   Background  ABCDEF\r\n" ) ;
  5999.  
  6000.    strcat (
  6001.       szText,
  6002.       "\033[48mSubscript           ABCDEFGH\r\n" ) ;
  6003.  
  6004.    strcat (
  6005.       szText,
  6006.       "\033[49mSuperscript         ABCDEFGH\r\n" ) ;
  6007.  
  6008.    strcat (
  6009.       szText,
  6010.       "\033[0;1mBold onXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r\n" ) ;
  6011.  
  6012.    strcat (
  6013.       szText,
  6014.       "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r\n" ) ;
  6015.  
  6016.    strcat (
  6017.       szText,
  6018.       "\033[A\033[0;2m Some faint text\r\n" ) ;
  6019.  
  6020.    strcat (
  6021.       szText,
  6022.       "\033[34mUnderline \033[0;7mRevrse Video on  \r\n" ) ;
  6023.  
  6024.  
  6025.  
  6026.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6027.  
  6028.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6029.    CompareCharacterBufs () ;
  6030.    CompareVideoBufs () ;
  6031.  
  6032.    DosSleep ( LONGSLEEP ) ;
  6033.  
  6034.  
  6035.  
  6036.    strcpy (
  6037.       szText,
  6038.       "\033[2J\033[0m\033[B\r\n" ) ;
  6039.  
  6040.    strcat (
  6041.       szText,
  6042.       "\033[=7hTest line wrap ON BbCcDdEeFfGgIi"
  6043.          "AaBbCcDdEeFfGgIiAaBbCcDdEeFfGgIi"
  6044.          "AaBbCcDdEeFfGgIiAaBbCcDdEeFfGgIi Last\r\n" ) ;
  6045.  
  6046.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6047.  
  6048.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6049.    CompareCharacterBufs () ;
  6050.    CompareVideoBufs () ;
  6051.  
  6052.    DosSleep ( SHORTSLEEP ) ;
  6053.  
  6054.  
  6055.  
  6056.    strcpy (
  6057.       szText,
  6058.       "AaBbCcDdEeFfGgI Last\r\n" ) ;
  6059.  
  6060.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6061.  
  6062.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6063.    CompareCharacterBufs () ;
  6064.    CompareVideoBufs () ;
  6065.  
  6066.    DosSleep ( SHORTSLEEP ) ;
  6067.  
  6068.  
  6069.  
  6070.    strcpy (
  6071.       szText,
  6072.       "AaBbCcDdEeFfGgIiAaBbCcDdEeFfGgIi"
  6073.          "AaBbCcDdEeFfGgIiAaBbCcDdEeFfGgIiAaBbCcDdEeF Last\r\n" ) ;
  6074.  
  6075.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6076.  
  6077.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6078.    CompareCharacterBufs () ;
  6079.    CompareVideoBufs () ;
  6080.  
  6081.    DosSleep ( SHORTSLEEP ) ;
  6082.  
  6083.  
  6084.    strcpy (
  6085.       szText,
  6086.       "\033[=7lTest line wrap OFF bCcDdEeFfGgIi"
  6087.          "AaBbCcDdEeFfGgIiAaBbCcDdEeFfGgIi"
  6088.          "AaBbCcDdEeFfGgIiAaBbCcDdEeFfGgIi Last\r\n" ) ;
  6089.  
  6090.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6091.  
  6092.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6093.    CompareCharacterBufs () ;
  6094.    CompareVideoBufs () ;
  6095.  
  6096.    DosSleep ( SHORTSLEEP ) ;
  6097.  
  6098.  
  6099.    strcpy (
  6100.       szText,
  6101.       "AaBbCcDdEeFfGgI Last\r\n" ) ;
  6102.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6103.  
  6104.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6105.    CompareCharacterBufs () ;
  6106.    CompareVideoBufs () ;
  6107.  
  6108.    DosSleep ( SHORTSLEEP ) ;
  6109.  
  6110.  
  6111.    strcpy (
  6112.       szText,
  6113.       "AaBbCcDdEeFfGgIiAaBbCcDdEeFfGgIi"
  6114.          "AaBbCcDdEeFfGgIiAaBbCcDdEeFfGgIiAaBbCcDdEeF Last\r\n" ) ;
  6115.  
  6116.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6117.  
  6118.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6119.    CompareCharacterBufs () ;
  6120.    CompareVideoBufs () ;
  6121.  
  6122.    DosSleep ( SHORTSLEEP ) ;
  6123.  
  6124.  
  6125.  
  6126.    strcpy (
  6127.       szText,
  6128.       "\033[=7hTest line wrap ON BbCcDdEeFfGgIi"
  6129.          "AaBbCcDdEeFfGgIiAaBbCcDdEeFfGgIi"
  6130.          "AaBbCcDdEeFfGgIiAaBbCcDdEeFfGgIi Last\r\n" ) ;
  6131.  
  6132.    usVioStatus = VioWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6133.  
  6134.    usMnoStatus = MnoWrtTTY ( szText, strlen ( szText ), 0 ) ;
  6135.    CompareCharacterBufs () ;
  6136.    CompareVideoBufs () ;
  6137.  
  6138.    DosSleep ( SHORTSLEEP ) ;
  6139.  
  6140.    }           /* End of TestAnsiEsc function.                */
  6141.  
  6142.  
  6143. /*------------------------------------------------------------*/
  6144. /* Test Mno Wrt TTY.                                          */
  6145. /*------------------------------------------------------------*/
  6146.  
  6147. VOID              TestMnoWrtTTY ()
  6148.  
  6149.    {
  6150.    USHORT         usMnoStatus = 0 ;
  6151.    USHORT         usVioStatus = 0 ;
  6152.    USHORT         usRow       = 0 ;
  6153.    USHORT         usColumn    = 0 ;
  6154.  
  6155.  
  6156.    usVioStatus = VioWrtTTY ( "001 Test of VioWrtTTY", 21, 10 ) ;
  6157.  
  6158.    usMnoStatus = MnoWrtTTY ( "001 Test of VioWrtTTY", 21, 10 ) ;
  6159.  
  6160.    if ( usVioStatus != usMnoStatus )
  6161.       {
  6162.       fprintf (
  6163.          stderr,
  6164.          "001 TestMnoWrtTTY bad return, Vio=%d Mno=%d",
  6165.          usVioStatus,
  6166.          usMnoStatus ) ;
  6167.  
  6168.       exit ( 1 ) ;
  6169.       }
  6170.  
  6171.    usRow                      = 10 ;
  6172.    usColumn                   = 0 ;
  6173.  
  6174.    usVioStatus                = VioSetCurPos (
  6175.          usRow,
  6176.          usColumn,
  6177.          0 ) ;
  6178.  
  6179.    usMnoStatus                = MnoSetCurPos (
  6180.          usRow,
  6181.          usColumn,
  6182.          0 ) ;
  6183.  
  6184.    usVioStatus = VioWrtTTY ( "002 Test of VioWrtTTY", 21, 0 ) ;
  6185.  
  6186.    usMnoStatus = MnoWrtTTY ( "002 Test of VioWrtTTY", 21, 0 ) ;
  6187.  
  6188.    if ( usVioStatus != usMnoStatus )
  6189.       {
  6190.       fprintf (
  6191.          stderr,
  6192.          "002 TestMnoWrtTTY bad return, Vio=%d Mno=%d",
  6193.          usVioStatus,
  6194.          usMnoStatus ) ;
  6195.  
  6196.       exit ( 1 ) ;
  6197.       }
  6198.    CompareCharacterBufs () ;
  6199.    CompareVideoBufs () ;
  6200.  
  6201.    DosSleep ( SHORTSLEEP ) ;
  6202.  
  6203.    usRow       = 12 ;
  6204.    usColumn    = 0 ;
  6205.  
  6206.  
  6207.    usVioStatus = VioSetCurPos (
  6208.          usRow,
  6209.          usColumn,
  6210.          0 ) ;
  6211.  
  6212.    usMnoStatus = MnoSetCurPos (
  6213.          usRow,
  6214.          usColumn,
  6215.          0 ) ;
  6216.  
  6217.    usVioStatus = VioWrtTTY ( "003 Test of VioWrtTTY", 21, 0 ) ;
  6218.  
  6219.    usMnoStatus = MnoWrtTTY ( "003 Test of VioWrtTTY", 21, 0 ) ;
  6220.    CompareCharacterBufs () ;
  6221.    CompareVideoBufs () ;
  6222.  
  6223.    DosSleep ( SHORTSLEEP ) ;
  6224.  
  6225.  
  6226.    usRow       = 24 ;
  6227.    usColumn    = 59 ;
  6228.  
  6229.  
  6230.    usVioStatus = VioSetCurPos (
  6231.          usRow,
  6232.          usColumn,
  6233.          0 ) ;
  6234.  
  6235.    usMnoStatus = MnoSetCurPos (
  6236.          usRow,
  6237.          usColumn,
  6238.          0 ) ;
  6239.  
  6240.    usVioStatus = VioWrtTTY ( "004 Test of VioWrtTTY", 21, 0 ) ;
  6241.  
  6242.    usMnoStatus = MnoWrtTTY ( "004 Test of VioWrtTTY", 21, 0 ) ;
  6243.    CompareCharacterBufs () ;
  6244.    CompareVideoBufs () ;
  6245.  
  6246.    DosSleep ( SHORTSLEEP ) ;
  6247.  
  6248.    usVioStatus = VioWrtTTY ( "005 Test of VioWrtTTY", 21, 0 ) ;
  6249.  
  6250.    usMnoStatus = MnoWrtTTY ( "005 Test of VioWrtTTY", 21, 0 ) ;
  6251.    CompareCharacterBufs () ;
  6252.    CompareVideoBufs () ;
  6253.  
  6254.    DosSleep ( SHORTSLEEP ) ;
  6255.  
  6256.    usRow       = 24 ;
  6257.    usColumn    = 50 ;
  6258.  
  6259.  
  6260.    usVioStatus = VioSetCurPos (
  6261.          usRow,
  6262.          usColumn,
  6263.          0 ) ;
  6264.  
  6265.    usMnoStatus = MnoSetCurPos (
  6266.          usRow,
  6267.          usColumn,
  6268.          0 ) ;
  6269.  
  6270.    usVioStatus = VioWrtTTY ( "006 Test of VioWrtTTY", 21, 0 ) ;
  6271.  
  6272.    usMnoStatus = MnoWrtTTY ( "006 Test of VioWrtTTY", 21, 0 ) ;
  6273.    CompareCharacterBufs () ;
  6274.    CompareVideoBufs () ;
  6275.  
  6276.    DosSleep ( SHORTSLEEP ) ;
  6277.  
  6278.    usVioStatus = VioWrtTTY ( "007 Test of VioWrtTTY", 21, 0 ) ;
  6279.  
  6280.    usMnoStatus = MnoWrtTTY ( "007 Test of VioWrtTTY", 21, 0 ) ;
  6281.    CompareCharacterBufs () ;
  6282.    CompareVideoBufs () ;
  6283.  
  6284.    DosSleep ( SHORTSLEEP ) ;
  6285.  
  6286.    usRow       = 0 ;
  6287.    usColumn    = 0 ;
  6288.  
  6289.  
  6290.    usVioStatus = VioSetCurPos (
  6291.          usRow,
  6292.          usColumn,
  6293.          0 ) ;
  6294.  
  6295.    usMnoStatus = MnoSetCurPos (
  6296.          usRow,
  6297.          usColumn,
  6298.          0 ) ;
  6299.  
  6300.    usVioStatus = VioWrtTTY (
  6301.          "0         1         2         3         ",
  6302.          40,
  6303.          0 ) ;
  6304.  
  6305.  
  6306.    usVioStatus = VioWrtTTY (
  6307.          "4         5         6         7         ",
  6308.          40,
  6309.          0 ) ;
  6310.  
  6311.  
  6312.    usVioStatus = VioWrtTTY (
  6313.          "0123.5678.0123.5678.0123.5678.0123.5678.",
  6314.          40,
  6315.          0 ) ;
  6316.  
  6317.  
  6318.    usVioStatus = VioWrtTTY (
  6319.          "0123.5678.0123.5678.0123.5678.0123.5678.",
  6320.          40,
  6321.          0 ) ;
  6322.  
  6323.  
  6324.    usMnoStatus = MnoWrtTTY (
  6325.          "0         1         2         3         ",
  6326.          40,
  6327.          0 ) ;
  6328.  
  6329.    usMnoStatus = MnoWrtTTY (
  6330.          "4         5         6         7         ",
  6331.          40,
  6332.          0 ) ;
  6333.  
  6334.    usMnoStatus = MnoWrtTTY (
  6335.          "0123.5678.0123.5678.0123.5678.0123.5678.",
  6336.          40,
  6337.          0 ) ;
  6338.  
  6339.    usMnoStatus = MnoWrtTTY (
  6340.          "0123.5678.0123.5678.0123.5678.0123.5678.",
  6341.          40,
  6342.          0 ) ;
  6343.  
  6344.    usRow       = 3 ;
  6345.    usColumn    = 0 ;
  6346.  
  6347.    usVioStatus = VioWrtTTY ( "008 Test Backspace", 18, 0 ) ;
  6348.  
  6349.    usMnoStatus = MnoWrtTTY ( "008 Test Backspace", 18, 0 ) ;
  6350.    CompareCharacterBufs () ;
  6351.    CompareVideoBufs () ;
  6352.  
  6353.    DosSleep ( SHORTSLEEP ) ;
  6354.  
  6355.    usVioStatus = VioWrtTTY ( "\b\b\b\b\b", 5, 0 ) ;
  6356.  
  6357.    usMnoStatus = MnoWrtTTY ( "\b\b\b\b\b", 5, 0 ) ;
  6358.    CompareCharacterBufs () ;
  6359.    CompareVideoBufs () ;
  6360.  
  6361.    DosSleep ( SHORTSLEEP ) ;
  6362.  
  6363.    usVioStatus = VioWrtTTY ( "009 Test Backspace", 18, 0 ) ;
  6364.  
  6365.    usMnoStatus = MnoWrtTTY ( "009 Test Backspace", 18, 0 ) ;
  6366.    CompareCharacterBufs () ;
  6367.    CompareVideoBufs () ;
  6368.  
  6369.    DosSleep ( SHORTSLEEP ) ;
  6370.  
  6371.    usRow       = 4 ;
  6372.    usColumn    = 4 ;
  6373.  
  6374.  
  6375.    usVioStatus = VioSetCurPos (
  6376.          usRow,
  6377.          usColumn,
  6378.          0 ) ;
  6379.  
  6380.    usMnoStatus = MnoSetCurPos (
  6381.          usRow,
  6382.          usColumn,
  6383.          0 ) ;
  6384.    CompareCharacterBufs () ;
  6385.    CompareVideoBufs () ;
  6386.  
  6387.    DosSleep ( SHORTSLEEP ) ;
  6388.  
  6389.    usVioStatus = VioWrtTTY (
  6390.          "\b\b\b\b\b010 Test Backspace",
  6391.          23,
  6392.          0 ) ;
  6393.  
  6394.    usMnoStatus = MnoWrtTTY (
  6395.          "\b\b\b\b\b010 Test Backspace",
  6396.          23,
  6397.          0 ) ;
  6398.    CompareCharacterBufs () ;
  6399.    CompareVideoBufs () ;
  6400.  
  6401.    DosSleep ( SHORTSLEEP ) ;
  6402.  
  6403.    usRow       = 2 ;
  6404.    usColumn    = 4 ;
  6405.  
  6406.  
  6407.    usVioStatus = VioSetCurPos (
  6408.          usRow,
  6409.          usColumn,
  6410.          0 ) ;
  6411.  
  6412.    usMnoStatus = MnoSetCurPos (
  6413.          usRow,
  6414.          usColumn,
  6415.          0 ) ;
  6416.  
  6417.  
  6418.    usVioStatus = VioWrtTTY (
  6419.          "\ta\tab\tabc\tabcd\tabcde\tabcdef\tabcdefg 011 Test Tab",
  6420.          48,
  6421.          0 ) ;
  6422.  
  6423.    usMnoStatus = MnoWrtTTY (
  6424.          "\ta\tab\tabc\tabcd\tabcde\tabcdef\tabcdefg 011 Test Tab",
  6425.          48,
  6426.          0 ) ;
  6427.    CompareCharacterBufs () ;
  6428.    CompareVideoBufs () ;
  6429.  
  6430.    DosSleep ( SHORTSLEEP ) ;
  6431.  
  6432.  
  6433.    usRow       = 5 ;
  6434.    usColumn    = 0 ;
  6435.  
  6436.  
  6437.    usVioStatus = VioSetCurPos (
  6438.          usRow,
  6439.          usColumn,
  6440.          0 ) ;
  6441.  
  6442.    usMnoStatus = MnoSetCurPos (
  6443.          usRow,
  6444.          usColumn,
  6445.          0 ) ;
  6446.  
  6447.  
  6448.    usVioStatus = VioWrtTTY (
  6449.          "\na\nab\nabc\nabcd\nabcde\nabcdef\nabcdefg 012 Test Newline",
  6450.          52,
  6451.          0 ) ;
  6452.  
  6453.    usMnoStatus = MnoWrtTTY (
  6454.          "\na\nab\nabc\nabcd\nabcde\nabcdef\nabcdefg 012 Test Newline",
  6455.          52,
  6456.          0 ) ;
  6457.    CompareCharacterBufs () ;
  6458.    CompareVideoBufs () ;
  6459.  
  6460.    DosSleep ( SHORTSLEEP ) ;
  6461.  
  6462.    usRow       = 23 ;
  6463.    usColumn    = 0 ;
  6464.  
  6465.  
  6466.    usVioStatus = VioSetCurPos (
  6467.          usRow,
  6468.          usColumn,
  6469.          0 ) ;
  6470.  
  6471.    usMnoStatus = MnoSetCurPos (
  6472.          usRow,
  6473.          usColumn,
  6474.          0 ) ;
  6475.  
  6476.  
  6477.    usVioStatus = VioWrtTTY (
  6478.          "\na\nab\nabc\nabcd\nabcde\nabcdef\nabcdefg 013 Test Newline",
  6479.          52,
  6480.          0 ) ;
  6481.  
  6482.    usMnoStatus = MnoWrtTTY (
  6483.          "\na\nab\nabc\nabcd\nabcde\nabcdef\nabcdefg 013 Test Newline",
  6484.          52,
  6485.          0 ) ;
  6486.    CompareCharacterBufs () ;
  6487.    CompareVideoBufs () ;
  6488.  
  6489.    DosSleep ( SHORTSLEEP ) ;
  6490.  
  6491.    usRow       = 10 ;
  6492.    usColumn    = 0 ;
  6493.  
  6494.  
  6495.    usVioStatus = VioSetCurPos (
  6496.          usRow,
  6497.          usColumn,
  6498.          0 ) ;
  6499.  
  6500.    usMnoStatus = MnoSetCurPos (
  6501.          usRow,
  6502.          usColumn,
  6503.          0 ) ;
  6504.  
  6505.    usVioStatus = VioWrtTTY (
  6506.          "014 Test Newline\r",
  6507.          17,
  6508.          0 ) ;
  6509.  
  6510.    usMnoStatus = MnoWrtTTY (
  6511.          "014 Test Newline\r",
  6512.          17,
  6513.          0 ) ;
  6514.    CompareCharacterBufs () ;
  6515.    CompareVideoBufs () ;
  6516.  
  6517.    DosSleep ( SHORTSLEEP ) ;
  6518.  
  6519.  
  6520.    usVioStatus = VioWrtTTY (
  6521.          "\r\na\r\nab\r\nabc\r\nabcd\r\nabcde\r\n"
  6522.          "abcdef\r\nabcdefg 015 Test Return\r",
  6523.          59,
  6524.          0 ) ;
  6525.  
  6526.    usMnoStatus = MnoWrtTTY (
  6527.          "\r\na\r\nab\r\nabc\r\nabcd\r\nabcde\r\n"
  6528.          "abcdef\r\nabcdefg 015 Test Return\r",
  6529.          59,
  6530.          0 ) ;
  6531.    CompareCharacterBufs () ;
  6532.    CompareVideoBufs () ;
  6533.  
  6534.    DosSleep ( SHORTSLEEP ) ;
  6535.  
  6536.  
  6537.    usRow       = 24 ;
  6538.    usColumn    = 0 ;
  6539.  
  6540.  
  6541.    usVioStatus = VioSetCurPos (
  6542.          usRow,
  6543.          usColumn,
  6544.          0 ) ;
  6545.  
  6546.    usMnoStatus = MnoSetCurPos (
  6547.          usRow,
  6548.          usColumn,
  6549.          0 ) ;
  6550.  
  6551.    usVioStatus = VioWrtTTY (
  6552.          "\a\r\n016 Test Bell\r\n\a \a\r\n",
  6553.          23,
  6554.          0 ) ;
  6555.  
  6556.    usMnoStatus = MnoWrtTTY (
  6557.          "\a\r\n016 Test Bell\r\n\a \a\r\n",
  6558.          23,
  6559.          0 ) ;
  6560.    CompareCharacterBufs () ;
  6561.    CompareVideoBufs () ;
  6562.  
  6563.    DosSleep ( SHORTSLEEP ) ;
  6564.  
  6565.    usVioStatus = VioWrtTTY (
  6566.          "\a\r\n017 Test Bell\r\n\a \a\r\n",
  6567.          23,
  6568.          0 ) ;
  6569.  
  6570.    usMnoStatus = MnoWrtTTY (
  6571.          "\a\r\n017 Test Bell\r\n\a \a\r\n",
  6572.          23,
  6573.          0 ) ;
  6574.    CompareCharacterBufs () ;
  6575.    CompareVideoBufs () ;
  6576.  
  6577.    DosSleep ( SHORTSLEEP ) ;
  6578.  
  6579.    usVioStatus = VioWrtTTY (
  6580.          "\a \a \a \a \a \a \a \a \a \a \a \r\n"
  6581.          "018 Test Bell\r\n\a     \a\r\n",
  6582.          48,
  6583.          0 ) ;
  6584.  
  6585.    usMnoStatus = MnoWrtTTY (
  6586.          "\a \a \a \a \a \a \a \a \a \a \a \r\n"
  6587.          "018 Test Bell\r\n\a     \a\r\n",
  6588.          48,
  6589.          0 ) ;
  6590.    CompareCharacterBufs () ;
  6591.    CompareVideoBufs () ;
  6592.  
  6593.    DosSleep ( SHORTSLEEP ) ;
  6594.  
  6595.  
  6596.    usRow       = 12 ;
  6597.    usColumn    = 64 ;
  6598.  
  6599.  
  6600.    usVioStatus = VioSetCurPos (
  6601.          usRow,
  6602.          usColumn,
  6603.          0 ) ;
  6604.  
  6605.    usMnoStatus = MnoSetCurPos (
  6606.          usRow,
  6607.          usColumn,
  6608.          0 ) ;
  6609.  
  6610.    usVioStatus = VioWrtTTY ( "019 Test of VioWrtTTY", 21, 0 ) ;
  6611.  
  6612.    usMnoStatus = MnoWrtTTY ( "019 Test of VioWrtTTY", 21, 0 ) ;
  6613.    CompareCharacterBufs () ;
  6614.    CompareVideoBufs () ;
  6615.  
  6616.    DosSleep ( SHORTSLEEP ) ;
  6617.  
  6618.  
  6619.  
  6620.  
  6621.    }           /* End of TestMnoWrtTTY function.              */
  6622.  
  6623.  
  6624. /*------------------------------------------------------------*/
  6625. /* Test Mno Set Cur Pos.                                      */
  6626. /*------------------------------------------------------------*/
  6627.  
  6628. VOID              TestMnoSetCurPos ()
  6629.  
  6630.    {
  6631.    USHORT         usMnoStatus = 0 ;
  6632.    USHORT         usVioStatus = 0 ;
  6633.    USHORT         usRow ;
  6634.    USHORT         usColumn ;
  6635.  
  6636.  
  6637.    usVioStatus                = VioSetCurPos (
  6638.          25,
  6639.          0,
  6640.          0 ) ;
  6641.  
  6642.    usMnoStatus                = MnoSetCurPos (
  6643.          25,
  6644.          0,
  6645.          0 ) ;
  6646.  
  6647.  
  6648.    if ( usVioStatus != usMnoStatus )
  6649.       {
  6650.       fprintf (
  6651.          stderr,
  6652.          "001 TestMnoSetCurPos bad return, Vio=%d Mno=%d",
  6653.          usVioStatus,
  6654.          usMnoStatus ) ;
  6655.  
  6656.       exit ( 1 ) ;
  6657.       }
  6658.  
  6659.  
  6660.    usVioStatus = VioSetCurPos (
  6661.          0,
  6662.          81,
  6663.          0 ) ;
  6664.  
  6665.    usMnoStatus = MnoSetCurPos (
  6666.          0,
  6667.          81,
  6668.          0 ) ;
  6669.  
  6670.  
  6671.    if ( usVioStatus != usMnoStatus )
  6672.       {
  6673.       fprintf (
  6674.          stderr,
  6675.          "002 TestMnoSetCurPos bad return, Vio=%d Mno=%d",
  6676.          usVioStatus,
  6677.          usMnoStatus ) ;
  6678.  
  6679.       exit ( 1 ) ;
  6680.       }
  6681.  
  6682.    usVioStatus = VioSetCurPos (
  6683.          0,
  6684.          0,
  6685.          10 ) ;
  6686.  
  6687.    usMnoStatus = MnoSetCurPos (
  6688.          0,
  6689.          0,
  6690.          10 ) ;
  6691.  
  6692.  
  6693.    if ( usVioStatus != usMnoStatus )
  6694.       {
  6695.       fprintf (
  6696.          stderr,
  6697.          "003 TestMnoSetCurPos bad return, Vio=%d Mno=%d",
  6698.          usVioStatus,
  6699.          usMnoStatus ) ;
  6700.  
  6701.       exit ( 1 ) ;
  6702.       }
  6703.  
  6704.  
  6705.  
  6706.  
  6707.    usRow    = 0 ;
  6708.  
  6709.    for ( usColumn = 0 ; usColumn < 80 ; usColumn++ )
  6710.       {
  6711.       usVioStatus = VioSetCurPos (
  6712.             usRow,
  6713.             usColumn,
  6714.             0 ) ;
  6715.  
  6716.       usMnoStatus = MnoSetCurPos (
  6717.             usRow,
  6718.             usColumn,
  6719.             0 ) ;
  6720.  
  6721.       if ( usVioStatus != usMnoStatus )
  6722.          {
  6723.          fprintf (
  6724.             stderr,
  6725.             "004 TestMnoSetCurPos bad return, Vio=%d Mno=%d",
  6726.             usVioStatus,
  6727.             usMnoStatus ) ;
  6728.  
  6729.          exit ( 1 ) ;
  6730.          }
  6731.  
  6732.       DosSleep ( SHORTSLEEP ) ;
  6733.       }
  6734.  
  6735.    usColumn = 79 ;
  6736.  
  6737.    for ( usRow = 0 ; usRow < 25 ; usRow++ )
  6738.       {
  6739.       usVioStatus = VioSetCurPos (
  6740.             usRow,
  6741.             usColumn,
  6742.             0 ) ;
  6743.  
  6744.       usMnoStatus = MnoSetCurPos (
  6745.             usRow,
  6746.             usColumn,
  6747.             0 ) ;
  6748.  
  6749.       if ( usVioStatus != usMnoStatus )
  6750.          {
  6751.          fprintf (
  6752.             stderr,
  6753.             "005 TestMnoSetCurPos bad return, Vio=%d Mno=%d",
  6754.             usVioStatus,
  6755.             usMnoStatus ) ;
  6756.  
  6757.          exit ( 1 ) ;
  6758.          }
  6759.  
  6760.       DosSleep ( SHORTSLEEP ) ;
  6761.       }
  6762.  
  6763.    usRow    = 24 ;
  6764.  
  6765.    for ( usColumn = 79 ; usColumn > 0 ; usColumn-- )
  6766.       {
  6767.       usVioStatus = VioSetCurPos (
  6768.             usRow,
  6769.             usColumn,
  6770.             0 ) ;
  6771.  
  6772.       usMnoStatus = MnoSetCurPos (
  6773.             usRow,
  6774.             usColumn,
  6775.             0 ) ;
  6776.  
  6777.       if ( usVioStatus != usMnoStatus )
  6778.          {
  6779.          fprintf (
  6780.             stderr,
  6781.             "006 TestMnoSetCurPos bad return, Vio=%d Mno=%d",
  6782.             usVioStatus,
  6783.             usMnoStatus ) ;
  6784.  
  6785.          exit ( 1 ) ;
  6786.          }
  6787.  
  6788.       DosSleep ( SHORTSLEEP ) ;
  6789.       }
  6790.  
  6791.    usColumn = 0 ;
  6792.  
  6793.    for ( usRow = 24 ; usRow > 0 ; usRow-- )
  6794.       {
  6795.       usVioStatus = VioSetCurPos (
  6796.             usRow,
  6797.             usColumn,
  6798.             0 ) ;
  6799.  
  6800.       usMnoStatus = MnoSetCurPos (
  6801.             usRow,
  6802.             usColumn,
  6803.             0 ) ;
  6804.  
  6805.       if ( usVioStatus != usMnoStatus )
  6806.          {
  6807.          fprintf (
  6808.             stderr,
  6809.             "007 TestMnoSetCurPos bad return, Vio=%d Mno=%d",
  6810.             usVioStatus,
  6811.             usMnoStatus ) ;
  6812.  
  6813.          exit ( 1 ) ;
  6814.          }
  6815.       }
  6816.  
  6817.    }           /* End of TestMnoSetCurPos function.           */
  6818.  
  6819.  
  6820.