-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtgj1.m
More file actions
43 lines (39 loc) · 835 Bytes
/
tgj1.m
File metadata and controls
43 lines (39 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
tgj1 ; way analysis
q
ways ;
s f="/home/80n/ways.osm"
o f:READ
s g="/home/80n/analysis1.txt"
o g:NEW
s way=0
f i=1:1 d
. u f r line
. u g
. i line["<way" d
. . i way'=0 w i," ",way," unexpected <way ",line,!
. . s way=1
. ;i line["<</way>>" d q
. ;. i way'=1 w i," ",way," unexpected <</way>> ",line,!
. ;. s way=2
. i line["</way>" d
. . i way'=1 w i," ",way," unexpected </way> ",line,!
. . s way=0
. i i#10000000=0 w i," checkpoint ",line,!
c f
q
pipe ;
s directory="/home/80n/"
s pipe=directory_"earth.pipe"
s iDateTime="dateTime"
s earthFile=directory_"earth-"_iDateTime_".temp"
zsystem "rm "_pipe_"; mkfifo "_pipe_"; cat <"_pipe_" >"_earthFile_" &"
;
o pipe:(nowrap:stream:fifo)
;
; Let's do it
u pipe
;
f i=1:1:500000000 s xml=$j(i,10)_"<tag key='value'/>"_$c(13,10) w xml
c pipe
;
;