Changeset 11 for trunk/txlib/txcon.c
- Timestamp:
- 05/09/06 22:21:53 (3 years ago)
- Files:
-
- 1 modified
-
trunk/txlib/txcon.c (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/txlib/txcon.c
r7 r11 53 53 #include <txtpriv.h> // private text interface 54 54 55 static SCREEN_STATE screen_act = SCREEN_ON; 55 static DEVICE_STATE screen_act = DEVICE_ON; 56 static DEVICE_STATE logfile_act = DEVICE_ON; 56 57 57 58 #if defined (USEWINDOWING) … … 427 428 // Test and set TxScreenState 428 429 /*****************************************************************************/ 429 SCREEN_STATE TxScreenState // RET screen active430 ( 431 SCREEN_STATE action // IN screen action432 ) 433 { 434 if (action != SCREEN_TEST)430 DEVICE_STATE TxScreenState // RET screen active 431 ( 432 DEVICE_STATE action // IN screen action 433 ) 434 { 435 if (action != DEVICE_TEST) 435 436 { 436 437 screen_act = action; … … 438 439 return (screen_act); 439 440 } // end 'TxScreenState' 441 /*---------------------------------------------------------------------------*/ 442 443 444 /*****************************************************************************/ 445 // Test and set TxLogfileState, logging when state = ON and file opened 446 /*****************************************************************************/ 447 DEVICE_STATE TxLogfileState // RET logfile active 448 ( 449 DEVICE_STATE action // IN screen action 450 ) 451 { 452 if (action != DEVICE_TEST) 453 { 454 logfile_act = action; 455 } 456 return (logfile_act); 457 } // end 'TxLogfileState' 440 458 /*---------------------------------------------------------------------------*/ 441 459 … … 471 489 } 472 490 473 if ((screen_act == SCREEN_ON) && // screen output ON491 if ((screen_act == DEVICE_ON) && // screen output ON 474 492 (txh_raw == NULL)) // and not redirected to a RAW 475 493 { // stream (like scrollbuffer) … … 484 502 { 485 503 if ((size < hinfo->size) && (hinfo->active) && 486 ((screen_act == SCREEN_ON) ||504 ((screen_act == DEVICE_ON) || 487 505 (hinfo->follow_screen_toggle == FALSE))) 488 506 { … … 497 515 { 498 516 if ((size < hinfo->size) && (hinfo->active) && 499 ((screen_act == SCREEN_ON) ||517 ((screen_act == DEVICE_ON) || 500 518 (hinfo->follow_screen_toggle == FALSE))) 501 519 { … … 504 522 } 505 523 } 506 if ( log_handle != 0)524 if ((log_handle != 0) && (logfile_act == DEVICE_ON)) 507 525 { 508 526 if (!txc_ascii7 && log7bit) // 7-bit ASCII for log only ? … … 695 713 int ll; // real max line length 696 714 int lines; // nr of lines 697 SCREEN_STATE sa = screen_act;715 DEVICE_STATE sa = screen_act; 698 716 699 717 if ((ll = TxScreenCols() -12) < 20) // ScreenCols will be 0 if … … 703 721 if ((txwa->desktop != NULL) && (!TxaExeSwitch('p'))) 704 722 { 705 screen_act = SCREEN_OFF; // no regular text if windowed723 screen_act = DEVICE_OFF; // no regular text if windowed 706 724 } // and not 'pedantic mode' 707 725 else 708 726 { 709 screen_act = SCREEN_ON; // force screen for confirm727 screen_act = DEVICE_ON; // force screen for confirm 710 728 } 711 729 va_start(varargs, fmt); … … 717 735 txFreeText( mText); // free the text memory 718 736 737 screen_act = sa; // restore screen state 738 // to allow sbView output while 739 // MsgBox is up (other threads!) 719 740 #if defined (USEWINDOWING) 720 741 if (txwa->desktop != NULL) // there is a desktop … … 774 795 TxPrint("%c\n", reply); 775 796 776 screen_act = sa; // restore screen state777 797 return (cf); 778 798 } // end 'TxConfirm' … … 797 817 int ll; // real max line length 798 818 int lines; // nr of lines 799 SCREEN_STATE sa = screen_act;819 DEVICE_STATE sa = screen_act; 800 820 801 821 if ((ll = TxScreenCols() -4) < 20) // ScreenCols will be 0 if … … 805 825 if ((txwa->desktop != NULL) && (acknowledge) && (!TxaExeSwitch('p'))) 806 826 { 807 screen_act = SCREEN_OFF; // no regular text if windowed827 screen_act = DEVICE_OFF; // no regular text if windowed 808 828 } // and not 'pedantic mode' 809 829 else if (acknowledge) 810 830 { 811 screen_act = SCREEN_ON; // force screen on for confirm831 screen_act = DEVICE_ON; // force screen on for confirm 812 832 } 813 833 va_start(varargs, fmt); … … 820 840 TxPrint("\n"); 821 841 842 screen_act = sa; // restore screen state 843 // to allow sbView output while 844 // MsgBox is up (other threads!) 822 845 if (acknowledge) 823 846 { … … 845 868 } 846 869 } 847 screen_act = sa; // restore screen state848 870 return (rc); 849 871 } // end 'TxMessage'