- Timestamp:
- Jul 31, 2011, 10:18:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/process/child/child.c
r919 r921 2 2 #include <stdlib.h> 3 3 #include <fcntl.h> 4 #include <io.h> 5 6 #ifdef __OS2__ 7 8 #define INCL_DOSFILEMGR 9 #include <os2.h> 10 11 void doDosQueryHType(HFILE hfile) 12 { 13 ULONG type, attr; 14 APIRET arc = DosQueryHType(hfile, &type, &attr); 15 if (arc == 0) 16 printf("DosQueryHType(%ld) type %lx attr %lx\r\n", hfile, type, attr); 17 else 18 printf("DosQueryHType(%ld) rc %ld\r\n", hfile, arc); 19 } 20 21 #endif 4 22 5 23 int main(int argc, char *argv[]) … … 9 27 char buffer[4096]; 10 28 11 #ifdef __OS2__ 29 #ifdef __OS2__ 12 30 _fsetmode(stdin, "b"); 13 31 _fsetmode(stdout, "b"); … … 15 33 #endif 16 34 35 printf("isatty(stdin) %d\r\n", isatty(fileno(stdin))); 36 printf("isatty(stdout) %d\r\n", isatty(fileno(stdout))); 37 printf("isatty(stderr) %d\r\n", isatty(fileno(stderr))); 38 39 #ifdef __OS2__ 40 doDosQueryHType((HFILE)0); 41 doDosQueryHType((HFILE)1); 42 doDosQueryHType((HFILE)2); 43 #endif 44 17 45 if( argc > 2 ) 18 46 {
Note:
See TracChangeset
for help on using the changeset viewer.