Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 35 lines (24 sloc) 0.583 kB
69c9cd4 @nddrylliog Merged sdk/os with j/ooc, os/Time works =) Other not involving Array/…
nddrylliog authored
1 import os/Pipe
2
3 PipeReader: class {
4
a8a649f @nddrylliog Fixed PipeUnix read() and made PipeReader way more efficient (no mor…
nddrylliog authored
5 eof := false
69c9cd4 @nddrylliog Merged sdk/os with j/ooc, os/Time works =) Other not involving Array/…
nddrylliog authored
6 pipe: Pipe
614b9fd @nddrylliog PkgConfigFrontend also looks for pkg-config.exe now. Pipes are implem…
nddrylliog authored
7 buf: Char* = null
8
a8a649f @nddrylliog Fixed PipeUnix read() and made PipeReader way more efficient (no mor…
nddrylliog authored
9 BUF_SIZE := static 128
614b9fd @nddrylliog PkgConfigFrontend also looks for pkg-config.exe now. Pipes are implem…
nddrylliog authored
10
69c9cd4 @nddrylliog Merged sdk/os with j/ooc, os/Time works =) Other not involving Array/…
nddrylliog authored
11 init: func(=pipe) {}
12
13 read: func() -> String {
a8a649f @nddrylliog Fixed PipeUnix read() and made PipeReader way more efficient (no mor…
nddrylliog authored
14 if(eof) return ""
614b9fd @nddrylliog PkgConfigFrontend also looks for pkg-config.exe now. Pipes are implem…
nddrylliog authored
15
a8a649f @nddrylliog Fixed PipeUnix read() and made PipeReader way more efficient (no mor…
nddrylliog authored
16 buf = pipe read(This BUF_SIZE)
2620576 Revert "Revert "fixed pipe / createprocess on win32""
rofl0r authored
17 if(buf == null || buf@ == '\0') eof = true
614b9fd @nddrylliog PkgConfigFrontend also looks for pkg-config.exe now. Pipes are implem…
nddrylliog authored
18
2620576 Revert "Revert "fixed pipe / createprocess on win32""
rofl0r authored
19 return buf == null ? "" : buf as CString toString()
69c9cd4 @nddrylliog Merged sdk/os with j/ooc, os/Time works =) Other not involving Array/…
nddrylliog authored
20 }
21
419bee8 @tsion Huge SDK name change. Refer to <http://gist.github.com/489794>.
tsion authored
22 hasNext?: func() -> Bool {
a8a649f @nddrylliog Fixed PipeUnix read() and made PipeReader way more efficient (no mor…
nddrylliog authored
23 !eof
69c9cd4 @nddrylliog Merged sdk/os with j/ooc, os/Time works =) Other not involving Array/…
nddrylliog authored
24 }
614b9fd @nddrylliog PkgConfigFrontend also looks for pkg-config.exe now. Pipes are implem…
nddrylliog authored
25
69c9cd4 @nddrylliog Merged sdk/os with j/ooc, os/Time works =) Other not involving Array/…
nddrylliog authored
26 toString: func -> String {
a8a649f @nddrylliog Fixed PipeUnix read() and made PipeReader way more efficient (no mor…
nddrylliog authored
27 sb := Buffer new()
419bee8 @tsion Huge SDK name change. Refer to <http://gist.github.com/489794>.
tsion authored
28 while(hasNext?()) {
1ecff14 rock compiles, but segfaults
rofl0r authored
29 sb append(read() _buffer)
69c9cd4 @nddrylliog Merged sdk/os with j/ooc, os/Time works =) Other not involving Array/…
nddrylliog authored
30 }
31 return sb toString()
614b9fd @nddrylliog PkgConfigFrontend also looks for pkg-config.exe now. Pipes are implem…
nddrylliog authored
32
69c9cd4 @nddrylliog Merged sdk/os with j/ooc, os/Time works =) Other not involving Array/…
nddrylliog authored
33 }
34 }
Something went wrong with that request. Please try again.