File:
[Coherent Logic Development] /
freem /
contrib /
%KEY.m
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs
Sun Jan 19 02:04:04 2025 UTC (2 months, 2 weeks ago) by
snw
Branches:
MAIN,
CoherentLogicDevelopment
CVS tags:
v0-63-1-rc1,
v0-63-0-rc1,
v0-63-0,
v0-62-3,
v0-62-2,
v0-62-1,
v0-62-0,
start,
HEAD
FreeM
%KEY(to,mode) ; A.Trocha ; keyb-handler [1999/01/29- 6:01:56]
; $Source: /home/cvsroot/freem/contrib/%KEY.m,v $
; $Revision: 1.1.1.1 $ $Date: 2025/01/19 02:04:04 $
; <to> timeout (sec) default: no timeout
; <mode> 0 or "" or n.d : return values
; 1 : interpret
;
N buf,x,exec
;
S to=$G(to)
I to="" S to=-1,exec="R *x"
E S exec="R *x:"_to
;
S buf=""
;
get X exec I '$T Q ""
;
D add(x)
;
loop R *x:0 I '$T G interp
D add(x)
G loop
;
interp ;--- interpret buffer and return string
I $G(mode)=1 Q $$^%KEYINT(buf)
Q buf
;
add(x) ;--- add key-value to buffer
I buf'="" S buf=buf_"-"
S buf=buf_x
Q
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>