summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cff32b0)
raw | patch | inline | side by side (parent: cff32b0)
author | Alexander Shiryaev <aixp@mail.ru> | |
Mon, 12 Nov 2012 13:54:22 +0000 (17:54 +0400) | ||
committer | Alexander Shiryaev <aixp@mail.ru> | |
Mon, 12 Nov 2012 13:54:22 +0000 (17:54 +0400) |
Lin/Mod/Libc.odc | patch | blob | history | |
Trurl-based/_LinuxOpenBSD_/Comm/Mod/V24.odc | [new file with mode: 0644] | patch | blob |
Trurl-based/_Linux_/Lin/Mod/Ioctl.txt | [new file with mode: 0644] | patch | blob |
Trurl-based/_Linux_/Lin/Mod/Libc.odc | patch | blob | history | |
Trurl-based/_Linux_/Lin/Mod/Libc.txt | patch | blob | history | |
Trurl-based/_Linux_/Lin/Mod/Termios.txt | [new file with mode: 0644] | patch | blob |
Trurl-based/_OpenBSD_/Comm/Mod/V24.odc | [deleted file] | patch | blob | history |
Trurl-based/build | patch | blob | history |
diff --git a/Lin/Mod/Libc.odc b/Lin/Mod/Libc.odc
index 4b89389dd30d3712a19f78c438aeebe520cba4b0..4940bdab271c42da04735c2097d9718806e25b93 100644 (file)
Binary files a/Lin/Mod/Libc.odc and b/Lin/Mod/Libc.odc differ
Binary files a/Lin/Mod/Libc.odc and b/Lin/Mod/Libc.odc differ
diff --git a/Trurl-based/_LinuxOpenBSD_/Comm/Mod/V24.odc b/Trurl-based/_LinuxOpenBSD_/Comm/Mod/V24.odc
new file mode 100644 (file)
index 0000000..b5a3d07
Binary files /dev/null and b/Trurl-based/_LinuxOpenBSD_/Comm/Mod/V24.odc differ
index 0000000..b5a3d07
Binary files /dev/null and b/Trurl-based/_LinuxOpenBSD_/Comm/Mod/V24.odc differ
diff --git a/Trurl-based/_Linux_/Lin/Mod/Ioctl.txt b/Trurl-based/_Linux_/Lin/Mod/Ioctl.txt
--- /dev/null
@@ -0,0 +1,40 @@
+MODULE LinIoctl ["libc.so.6"];
+
+ (*
+ A. V. Shiryaev, 2012.11
+
+ Linux
+ i386
+ *)
+
+ CONST
+ (* /usr/include/i386-linux-gnu/bits/ioctl-types.h *)
+ TIOCM_LE* = 001H;
+ TIOCM_DTR* = 002H;
+ TIOCM_RTS* = 004H;
+ TIOCM_ST* = 008H;
+ TIOCM_SR* = 010H;
+ TIOCM_CTS* = 020H;
+ TIOCM_CAR* = 040H;
+ TIOCM_RNG* = 080H;
+ TIOCM_DSR* = 100H;
+
+ FIOCLEX* = 21585;
+ FIONCLEX* = 21584;
+ FIONREAD* = 21531;
+ FIONBIO* = 21537;
+ FIOASYNC* = 21586;
+ TIOCMGET* = 21525;
+ TIOCMSET* = 21528;
+ TIOCEXCL* = 21516;
+ TIOCNXCL* = 21517;
+ TIOCOUTQ* = 21521;
+ TIOCSBRK* = 21543;
+ TIOCCBRK* = 21544;
+ TIOCMBIS* = 21526;
+ TIOCMBIC* = 21527;
+
+ PROCEDURE [ccall] ioctl0* ["ioctl"] (d: INTEGER; req: INTEGER): INTEGER;
+ PROCEDURE [ccall] ioctl1* ["ioctl"] (d: INTEGER; req: INTEGER; VAR arg: INTEGER): INTEGER;
+
+END LinIoctl.
index 4b89389dd30d3712a19f78c438aeebe520cba4b0..4940bdab271c42da04735c2097d9718806e25b93 100644 (file)
Binary files a/Trurl-based/_Linux_/Lin/Mod/Libc.odc and b/Trurl-based/_Linux_/Lin/Mod/Libc.odc differ
Binary files a/Trurl-based/_Linux_/Lin/Mod/Libc.odc and b/Trurl-based/_Linux_/Lin/Mod/Libc.odc differ
index 493ea300862d90290f0be9a89002009c224cb705..d90abb0197a88b38f9e7813d00fac16dcd1512e4 100644 (file)
O_RDONLY* = {} ; (* Open read-only *)
O_WRONLY* = {0} ; (* Open write-only *)
O_RDWR* = {1} ; (* Open read/write *)
+ O_NONBLOCK* = {11};
SIG_BLOCK* = 0; (* Block signals *)
SIG_UNBLOCK* = 1; (* Unblock signals *)
SelectorFunc* = PROCEDURE (dirent: Dirent): INTEGER;
CmpFunc* = PROCEDURE (VAR [nil] dirent1, dirent2: PtrDirent): INTEGER;
size_t* = INTEGER; (* should be unsigned int *)
+ ssize_t* = INTEGER;
sigjmp_buf* = RECORD [untagged]
buf*: jmp_buf;
mask_was_saved*: INTEGER;
PROCEDURE [ccall] open* (name: PtrSTR; flags: SET; mode: mode_t): INTEGER;
PROCEDURE [ccall] close* (d: INTEGER): INTEGER;
- PROCEDURE [ccall] read* (d: INTEGER; buf: PtrVoid; nbytes: size_t): INTEGER;
- PROCEDURE [ccall] write* (d: INTEGER; buf: PtrVoid; nBytes: size_t): INTEGER;
+ PROCEDURE [ccall] read* (d: INTEGER; buf: PtrVoid; nbytes: size_t): ssize_t;
+ PROCEDURE [ccall] write* (d: INTEGER; buf: PtrVoid; nBytes: size_t): ssize_t;
PROCEDURE [ccall] mmap* (addr: PtrVoid; len: size_t; prot: SET; flags: SET; fd, offset: off_t): PtrVoid;
PROCEDURE [ccall] munmap* (addr: PtrVoid; len: size_t): INTEGER;
diff --git a/Trurl-based/_Linux_/Lin/Mod/Termios.txt b/Trurl-based/_Linux_/Lin/Mod/Termios.txt
--- /dev/null
@@ -0,0 +1,148 @@
+MODULE LinTermios ["libc.so.6"];
+
+ (*
+ A. V. Shiryaev, 2012.11
+
+ Linux
+ i386
+ *)
+
+ CONST
+ NCCS* = 32;
+ _HAVE_STRUCT_TERMIOS_C_ISPEED* = 1;
+ _HAVE_STRUCT_TERMIOS_C_OSPEED* = 1;
+ VINTR* = 0;
+ VQUIT* = 1;
+ VERASE* = 2;
+ VKILL* = 3;
+ VEOF* = 4;
+ VTIME* = 5;
+ VMIN* = 6;
+ VSWTC* = 7;
+ VSTART* = 8;
+ VSTOP* = 9;
+ VSUSP* = 10;
+ VEOL* = 11;
+ VREPRINT* = 12;
+ VDISCARD* = 13;
+ VWERASE* = 14;
+ VLNEXT* = 15;
+ VEOL2* = 16;
+ IGNBRK* = 1;
+ BRKINT* = 2;
+ IGNPAR* = 4;
+ PARMRK* = 8;
+ INPCK* = 16;
+ ISTRIP* = 32;
+ INLCR* = 64;
+ IGNCR* = 128;
+ ICRNL* = 256;
+ IUCLC* = 512;
+ IXON* = 1024;
+ IXANY* = 2048;
+ IXOFF* = 4096;
+ IMAXBEL* = 8192;
+ IUTF8* = 16384;
+ OPOST* = 1;
+ OLCUC* = 2;
+ ONLCR* = 4;
+ OCRNL* = 8;
+ ONOCR* = 16;
+ ONLRET* = 32;
+ OFILL* = 64;
+ OFDEL* = 128;
+ VTDLY* = 16384;
+ VT0* = 0;
+ VT1* = 16384;
+ B0* = 0; (* hang up *)
+ B50* = 1;
+ B75* = 2;
+ B110* = 3;
+ B134* = 4;
+ B150* = 5;
+ B200* = 6;
+ B300* = 7;
+ B600* = 8;
+ B1200* = 9;
+ B1800* = 10;
+ B2400* = 11;
+ B4800* = 12;
+ B9600* = 13;
+ B19200* = 14;
+ B38400* = 15;
+ CSIZE* = 48;
+ CS5* = 0;
+ CS6* = 16;
+ CS7* = 32;
+ CS8* = 48;
+ CSTOPB* = 64;
+ CREAD* = 128;
+ PARENB* = 256;
+ PARODD* = 512;
+ HUPCL* = 1024;
+ CLOCAL* = 2048;
+ B57600* = 4097;
+ B115200* = 4098;
+ B230400* = 4099;
+ B460800* = 4100;
+ B500000* = 4101;
+ B576000* = 4102;
+ B921600* = 4103;
+ B1000000* = 4104;
+ B1152000* = 4105;
+ B1500000* = 4106;
+ B2000000* = 4107;
+ B2500000* = 4108;
+ B3000000* = 4109;
+ B3500000* = 4110;
+ B4000000* = 4111;
+ __MAX_BAUD* = B4000000;
+ ISIG* = 1;
+ ICANON* = 2;
+ ECHO* = 8;
+ ECHOE* = 16;
+ ECHOK* = 32;
+ ECHONL* = 64;
+ NOFLSH* = 128;
+ TOSTOP* = 256;
+ IEXTEN* = 32768;
+ TCOOFF* = 0;
+ TCOON* = 1;
+ TCIOFF* = 2;
+ TCION* = 3;
+ TCIFLUSH* = 0;
+ TCOFLUSH* = 1;
+ TCIOFLUSH* = 2;
+ TCSANOW* = 0;
+ TCSADRAIN* = 1;
+ TCSAFLUSH* = 2;
+
+ TYPE
+ tcflag_t* = INTEGER; (* unsigned int *)
+ cc_t* = SHORTCHAR; (* unsigned char *)
+ speed_t* = INTEGER; (* unsigned int *)
+ termios* = RECORD [untagged]
+ c_iflag*: tcflag_t; (* input mode flags *)
+ c_oflag*: tcflag_t; (* output mode flags *)
+ c_cflag*: tcflag_t; (* control mode flags *)
+ c_lflag*: tcflag_t; (* local mode flags *)
+ c_line*: cc_t; (* line discipline *)
+ cc_c*: ARRAY [untagged] NCCS OF cc_t; (* control chars *)
+ c_ispeed*: INTEGER; (* input speed *)
+ c_ospeed*: INTEGER; (* output speed *)
+ END;
+
+ (* POSIX.1 *)
+ PROCEDURE [ccall] cfgetispeed* (VAR tp: termios): speed_t;
+ PROCEDURE [ccall] cfsetispeed* (VAR tp: termios; ispeed: speed_t): INTEGER;
+ PROCEDURE [ccall] cfgetospeed* (VAR tp: termios): speed_t;
+ PROCEDURE [ccall] cfsetospeed* (VAR tp: termios; ospeed: speed_t): INTEGER;
+ PROCEDURE [ccall] tcgetattr* (fd: INTEGER; VAR tp: termios): INTEGER;
+ PROCEDURE [ccall] tcsetattr* (fd: INTEGER; action: INTEGER; VAR tp: termios): INTEGER;
+
+ PROCEDURE [ccall] tcdrain* (fd: INTEGER): INTEGER;
+ PROCEDURE [ccall] tcflow* (fd: INTEGER; action: INTEGER): INTEGER;
+ PROCEDURE [ccall] tcflush* (fd: INTEGER; action: INTEGER): INTEGER;
+ PROCEDURE [ccall] tcsendbreak* (fd: INTEGER; len: INTEGER): INTEGER;
+
+END LinTermios.
diff --git a/Trurl-based/_OpenBSD_/Comm/Mod/V24.odc b/Trurl-based/_OpenBSD_/Comm/Mod/V24.odc
deleted file mode 100644 (file)
index 3d7ae49..0000000
Binary files a/Trurl-based/_OpenBSD_/Comm/Mod/V24.odc and /dev/null differ
index 3d7ae49..0000000
Binary files a/Trurl-based/_OpenBSD_/Comm/Mod/V24.odc and /dev/null differ
diff --git a/Trurl-based/build b/Trurl-based/build
index 9a0b30f80d69654de12fc8e7d7a627ebafec4db4..14a550473fc6cd3f4764971d5c2bee331fcb95dd 100755 (executable)
--- a/Trurl-based/build
+++ b/Trurl-based/build
@@ -124,8 +124,8 @@ DevCompiler.CompileThis XhtmlEntitySets XhtmlWriters XhtmlStdFileWriters XhtmlTe
DevCompiler.CompileThis ObxHello0 ObxPi ObxRandom ObxTrap
DATA
-#./run-BlackBox <<DATA
-#ConsCompiler.Compile('Lin/Mod', 'Termios.txt')
-#ConsCompiler.Compile('Lin/Mod', 'Ioctl.txt')
-#DevCompiler.CompileThis CommV24
-#DATA
+./run-BlackBox <<DATA
+ConsCompiler.Compile('Lin/Mod', 'Termios.txt')
+ConsCompiler.Compile('Lin/Mod', 'Ioctl.txt')
+DevCompiler.CompileThis CommV24
+DATA