setcbrk
raw OCR
Sets control-break setting.
Defined in header <dos.h>
Syntax
#include <dos.h>
int setcbrk(int cbrkvalue);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ |
Remarks
setcbrk uses the DOS system call 0x33 to turn control-break checking on or off.
value - 0 Turns checking off (check only during I/O to console, printer, or communications devices).
value = 1 Turns checking on (check at every system call).
Return value
setcbrk returns cbrkvalue, the value passed.
See also
Example
#include <dos.h>
#include <conio.h>
#include <stdio.h>
int main(void)
{
int break_flag;
printf("Enter 0 to turn control break off\n")
printf("Enter 1 to turn control break on\n");
break_flag = getchO - 0;
setcbrk (break_flag);
if (getcbrkO)
printf ("Cntrl-brk flag is on\n");
else
printf ("Cntrl-brk flag is off\n");
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/dos.h/setcbrk/
· short form /3.1/setcbrk/