17 lines
368 B
Text
17 lines
368 B
Text
include "NSLog.incl"
|
|
|
|
local fn IsOutputDeviceTerminal as BOOL
|
|
int fileDescriptor
|
|
|
|
cln fileDescriptor = fileno( stdout );
|
|
end fn = fn isatty( fileDescriptor ) != 0
|
|
|
|
BOOL isTerminal : isTerminal = fn IsOutputDeviceTerminal
|
|
|
|
if (isTerminal)
|
|
NSLog( @"Output is directed to a terminal." )
|
|
else
|
|
NSLog( @"Output is not directed to a terminal." )
|
|
end if
|
|
|
|
HandleEvents
|