Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Bernd Paysan
bigforth
Commits
e9ae5033
Verified
Commit
e9ae5033
authored
Nov 04, 2015
by
Bernd Paysan
Browse files
serial changes, DOPRESS use dpy context
parent
2bb3b084
Changes
3
Hide whitespace changes
Inline
Side-by-side
forthker-linux.fi
View file @
e9ae5033
No preview for this file type
serial.fs
View file @
e9ae5033
...
...
@@ -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
...
...
@@ -78,8 +79,8 @@
t_buf
DCB
BaudRate
!
8
t_buf
DCB
ByteSize
c
!
r
>
t_buf
SetCommState
drop
;
:
reset
-
baud
(
f
d
--
)
t_old
SetCommState
drop
;
:
reset
-
baud
(
f
ile
--
)
fileno
t_old
SetCommState
drop
;
[
ELSE
]
also
DOS
also
legacy
on
...
...
@@ -197,7 +198,8 @@
$
541
B
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
...
...
@@ -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
View file @
e9ae5033
...
...
@@ -25,13 +25,13 @@ how: : >callback ( cb -- )
\
widget
28
aug99py
:
DOPRESS
(
dx
dy
--
dx
dy
x
y
)
BEGIN
BEGIN
dpy
click
?
0
=
WHILE
dpy
moved
?
IF
2
dup
dpy
mouse
drop
r
@
execute
dpy
sync
THEN
dpy
invoke
dpy
do
-
idle
REPEAT
dpy
click
nip
1
and
WHILE
2
drop
REPEAT
dpy
moved
!
;
:
DOPRESS
(
dx
dy
--
dx
dy
x
y
)
dpy
with
BEGIN
BEGIN
click
?
0
=
WHILE
moved
?
IF
2
dup
mouse
endwith
drop
r
@
execute
dpy
with
sync
THEN
invoke
do
-
idle
REPEAT
click
nip
1
and
WHILE
2
drop
REPEAT
moved
!
endwith
;
[
defined
]
doNotSin
[
IF
]
doNotSin
[
THEN
]
\
widget
01
mar98py
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment