Removed
Link Here
|
1 |
--- src/progress.d.orig 2019-04-16 02:18:26 UTC |
2 |
+++ src/progress.d |
3 |
@@ -7,6 +7,20 @@ import std.datetime; |
4 |
import core.sys.posix.unistd; |
5 |
import core.sys.posix.sys.ioctl; |
6 |
|
7 |
+// core.sys.posix.sys.ioccom; |
8 |
+enum uint IOCPARM_MASK = 0x1fff; // parameter length, at most 13 bits |
9 |
+enum uint IOC_OUT = 0x40000000; // copy parameters back |
10 |
+ |
11 |
+uint _IOC(T=typeof(null))(uint inorout, uint group, uint num, size_t len) |
12 |
+{ |
13 |
+ return (inorout | ((len & IOCPARM_MASK) << 16) | (group << 8) | num); |
14 |
+} |
15 |
+uint _IOR(T)(char g, int n) |
16 |
+{ |
17 |
+ return _IOC!(T)(IOC_OUT, cast(uint)g, cast(uint)n, T.sizeof); |
18 |
+} |
19 |
+enum uint TIOCGWINSZ = _IOR!(winsize)('t', 104); |
20 |
+ |
21 |
class Progress |
22 |
{ |
23 |
private: |