breakoff.gml

来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 50 行

GML
50
字号
.func break Functions
.func2 break_off
.func2 break_on
#include <stdlib.h>
void break_off( void );
void break_on( void );
.funcend
.desc begin
The
.kw break_off
function can be used with DOS to restrict break checking (Ctrl/C,
Ctrl/Break) to screen output and keyboard input.
The
.kw break_on
function can be used with DOS to add break checking (Ctrl/C,
Ctrl/Break) to other activities such as disk file input/output.
.desc end
.return begin
The
.kw break_off
and
.kw break_on
functions to not return anything.
.return end
.see begin
.seelist break_off signal
.see end
.exmp begin
#include <stdio.h>
#include <stdlib.h>

void main()
  {
    long i;
    FILE *tmpf;
.exmp break
    tmpf = tmpfile();
    if( tmpf != NULL ) {
      printf( "Start\n" );
      break_off();
      for( i = 1; i < 100000; i++ )
        fprintf( tmpf, "%ld\n", i );
      break_on();
      printf( "Finish\n" );
    }
  }
.exmp end
.class DOS
.system

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?