static void hb_gt_cgi_Exit( PHB_GT pGT ) { PHB_GTCGI pGTCGI; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_cgi_Exit(%p)", ( void * ) pGT ) ); HB_GTSELF_REFRESH( pGT ); pGTCGI = HB_GTCGI_GET( pGT ); HB_GTSUPER_EXIT( pGT ); if( pGTCGI ) { /* update cursor position on exit */ if( pGTCGI->iLastCol > 0 ) hb_gt_cgi_newLine( pGTCGI ); #ifndef HB_GT_CGI_RAWOUTPUT if( pGTCGI->iLineBufSize > 0 ) hb_xfree( pGTCGI->sLineBuf ); #endif if( pGTCGI->szCrLf ) hb_xfree( pGTCGI->szCrLf ); hb_xfree( pGTCGI ); } }
static void hb_gt_cgi_Exit( PHB_GT pGT ) { PHB_GTCGI pGTCGI; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_cgi_Exit(%p)", pGT ) ); HB_GTSELF_REFRESH( pGT ); pGTCGI = HB_GTCGI_GET( pGT ); HB_GTSUPER_EXIT( pGT ); if( pGTCGI ) { #if defined( HB_OS_WIN ) && ! defined( HB_OS_WIN_CE ) if( IsValidCodePage( CP_UTF8 ) ) SetConsoleOutputCP( pGTCGI->uiOldCP ); #endif /* update cursor position on exit */ if( pGTCGI->iLastCol > 0 ) hb_gt_cgi_newLine( pGTCGI ); #ifndef HB_GT_CGI_RAWOUTPUT if( pGTCGI->iLineBufSize > 0 ) hb_xfree( pGTCGI->sLineBuf ); #endif if( pGTCGI->szCrLf ) hb_xfree( pGTCGI->szCrLf ); hb_xfree( pGTCGI ); } }
static void hb_gt_tpl_Exit( PHB_GT pGT ) { HB_TRACE( HB_TR_DEBUG, ( "hb_gt_tpl_Exit(%p)", pGT ) ); HB_GTSUPER_EXIT( pGT ); /* TODO: */ }
static void hb_gt_std_Exit( PHB_GT pGT ) { PHB_GTSTD pGTSTD; int iRow, iCol; HB_TRACE( HB_TR_DEBUG, ( "hb_gt_std_Exit(%p)", pGT ) ); HB_GTSELF_REFRESH( pGT ); HB_GTSELF_GETPOS( pGT, &iRow, &iCol ); pGTSTD = HB_GTSTD_GET( pGT ); HB_GTSUPER_EXIT( pGT ); if( pGTSTD ) { /* update cursor position on exit */ if( pGTSTD->fStdoutConsole && pGTSTD->iLastCol > 0 ) { hb_gt_std_newLine( pGTSTD ); ++pGTSTD->iRow; } while( ++pGTSTD->iRow <= iRow ) hb_gt_std_newLine( pGTSTD ); #if defined( HB_HAS_TERMIOS ) if( pGTSTD->fRestTTY ) tcsetattr( pGTSTD->hStdin, TCSANOW, &pGTSTD->saved_TIO ); #endif if( pGTSTD->iLineBufSize > 0 ) hb_xfree( pGTSTD->sLineBuf ); if( pGTSTD->nTransBufSize > 0 ) hb_xfree( pGTSTD->sTransBuf ); if( pGTSTD->szCrLf ) hb_xfree( pGTSTD->szCrLf ); hb_xfree( pGTSTD ); } }