-- curses, I hate curses without warning procedure old_printf(integer i, sequence s, object o) printf(i,s,o) end procedure procedure old_puts(integer i, sequence s) puts(i,s) end procedure include machine.e include dll.e free_console() constant libc = open_dll("") constant c_puts = define_c_proc(libc, "puts", {C_POINTER}) --? libc --? c_puts atom a integer len len = 50 a = allocate(len) procedure puts(integer i, sequence s) if i != 1 and i != 2 then old_puts(i,s) end if s &= 0 if length(s) > len then free(a) len = length(s) a = allocate(len) end if poke(a,s) c_proc(c_puts, {a}) end procedure --puts(1,"test") procedure printf(integer i, sequence s, object o) if i != 1 and i != 2 then old_printf(i,s,o) end if puts(1, sprintf(s,o)) end procedure