Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Calendar/FutureBasic/calendar-1.basic
Normal file
12
Task/Calendar/FutureBasic/calendar-1.basic
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
window 1, @"Calendar", (0, 0, 520, 520 )
|
||||
|
||||
Str255 a
|
||||
|
||||
open "UNIX", 1,"cal 1969"
|
||||
do
|
||||
line input #1, a
|
||||
print a
|
||||
until eof(1)
|
||||
close 1
|
||||
|
||||
HandleEvents
|
||||
17
Task/Calendar/FutureBasic/calendar-2.basic
Normal file
17
Task/Calendar/FutureBasic/calendar-2.basic
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
include "NSLog.incl"
|
||||
|
||||
local fn RunCommand( command as CFStringRef ) as CFStringRef
|
||||
TaskRef tsk = fn TaskInit
|
||||
TaskSetExecutableURL( tsk, fn URLFileURLWithPath( @"/bin/sh" ) )
|
||||
TaskSetArguments( tsk, @[@"-c",command] )
|
||||
PipeRef pip = fn PipeInit
|
||||
TaskSetStandardOutput( tsk, pip )
|
||||
FileHandleRef fh = fn PipeFileHandleForReading( pip )
|
||||
fn TaskLaunch( tsk, NULL )
|
||||
CFDataRef dta = fn FileHandleReadDataToEndOfFile( fh, NULL )
|
||||
CFStringRef outputStr = fn StringWithData( dta, NSUTF8StringEncoding )
|
||||
end fn = outputStr
|
||||
|
||||
NSLog( @"%@", fn RunCommand( @"cal 1969" ) )
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue