Loading forthker-linux.fi (59.7 KiB) File changed.No diff preview for this file type. View original file View changed file serial.fs +9 −7 Original line number Diff line number Diff line Loading @@ -64,7 +64,8 @@ Create t_buf sizeof DCB allot Create tout_buf sizeof COMMTIMEOUTS allot : set-baud ( baud fd -- ) >r : fileno ( file -- fd ) filehandle @ ; : set-baud ( baud file -- ) fileno >r r@ t_old GetCommState drop 1 t_old DCB flags ! r@ tout_buf GetCommTimeouts drop Loading @@ -78,8 +79,8 @@ t_buf DCB BaudRate ! 8 t_buf DCB ByteSize c! r> t_buf SetCommState drop ; : reset-baud ( fd -- ) t_old SetCommState drop ; : reset-baud ( file -- ) fileno t_old SetCommState drop ; [ELSE] also DOS also legacy on Loading Loading @@ -197,7 +198,8 @@ $541B Constant FIONREAD [THEN] : set-baud ( baud fd -- ) >r : fileno ( file -- fd ) filehandle @ ; : set-baud ( baud fd -- ) fileno >r t_old r@ tcgetattr drop t_old t_buf sizeof termios move \ t_buf sizeof termios erase Loading @@ -215,10 +217,10 @@ t_buf 1 r> tcsetattr drop ; : reset-baud ( fd -- ) t_old 1 rot tcsetattr drop ; fileno t_old 1 rot tcsetattr drop ; : check-read ( fd -- n ) >r 0 sp@ FIONREAD r> filehandle @ ioctl drop ; : check-read ( fd -- n ) fileno >r 0 sp@ FIONREAD r> ioctl drop ; previous previous [THEN] widgets.fs +7 −7 Original line number Diff line number Diff line Loading @@ -25,13 +25,13 @@ how: : >callback ( cb -- ) \ widget 28aug99py : DOPRESS ( dx dy -- dx dy x y ) BEGIN BEGIN dpy click? 0= WHILE dpy moved? IF 2dup dpy mouse drop r@ execute dpy sync THEN dpy invoke dpy do-idle REPEAT dpy click nip 1 and WHILE 2drop REPEAT dpy moved! ; : DOPRESS ( dx dy -- dx dy x y ) dpy with BEGIN BEGIN click? 0= WHILE moved? IF 2dup mouse endwith drop r@ execute dpy with sync THEN invoke do-idle REPEAT click nip 1 and WHILE 2drop REPEAT moved! endwith ; [defined] doNotSin [IF] doNotSin [THEN] \ widget 01mar98py Loading Loading
forthker-linux.fi (59.7 KiB) File changed.No diff preview for this file type. View original file View changed file
serial.fs +9 −7 Original line number Diff line number Diff line Loading @@ -64,7 +64,8 @@ Create t_buf sizeof DCB allot Create tout_buf sizeof COMMTIMEOUTS allot : set-baud ( baud fd -- ) >r : fileno ( file -- fd ) filehandle @ ; : set-baud ( baud file -- ) fileno >r r@ t_old GetCommState drop 1 t_old DCB flags ! r@ tout_buf GetCommTimeouts drop Loading @@ -78,8 +79,8 @@ t_buf DCB BaudRate ! 8 t_buf DCB ByteSize c! r> t_buf SetCommState drop ; : reset-baud ( fd -- ) t_old SetCommState drop ; : reset-baud ( file -- ) fileno t_old SetCommState drop ; [ELSE] also DOS also legacy on Loading Loading @@ -197,7 +198,8 @@ $541B Constant FIONREAD [THEN] : set-baud ( baud fd -- ) >r : fileno ( file -- fd ) filehandle @ ; : set-baud ( baud fd -- ) fileno >r t_old r@ tcgetattr drop t_old t_buf sizeof termios move \ t_buf sizeof termios erase Loading @@ -215,10 +217,10 @@ t_buf 1 r> tcsetattr drop ; : reset-baud ( fd -- ) t_old 1 rot tcsetattr drop ; fileno t_old 1 rot tcsetattr drop ; : check-read ( fd -- n ) >r 0 sp@ FIONREAD r> filehandle @ ioctl drop ; : check-read ( fd -- n ) fileno >r 0 sp@ FIONREAD r> ioctl drop ; previous previous [THEN]
widgets.fs +7 −7 Original line number Diff line number Diff line Loading @@ -25,13 +25,13 @@ how: : >callback ( cb -- ) \ widget 28aug99py : DOPRESS ( dx dy -- dx dy x y ) BEGIN BEGIN dpy click? 0= WHILE dpy moved? IF 2dup dpy mouse drop r@ execute dpy sync THEN dpy invoke dpy do-idle REPEAT dpy click nip 1 and WHILE 2drop REPEAT dpy moved! ; : DOPRESS ( dx dy -- dx dy x y ) dpy with BEGIN BEGIN click? 0= WHILE moved? IF 2dup mouse endwith drop r@ execute dpy with sync THEN invoke do-idle REPEAT click nip 1 and WHILE 2drop REPEAT moved! endwith ; [defined] doNotSin [IF] doNotSin [THEN] \ widget 01mar98py Loading