mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 07:30:54 +00:00
22 lines
385 B
C++
22 lines
385 B
C++
/* Deviance Test 17.3.0.1: Ensure illegal setvbuf calls are detected */
|
|
|
|
#include <stdio.h>
|
|
|
|
main ()
|
|
{
|
|
FILE *f1;
|
|
char buf [80];
|
|
int i;
|
|
|
|
i = setvbuf (f1, buf, _IOLBF, 0); /* call setvbuf before file opened */
|
|
if (!i)
|
|
goto Fail;
|
|
|
|
printf ("Passed Deviance Test 17.3.0.1\n");
|
|
return;
|
|
|
|
Fail:
|
|
printf ("Failed Deviance Test 17.3.0.1\n");
|
|
return;
|
|
}
|