From: Alexander Shiryaev Date: Mon, 12 Nov 2012 13:54:22 +0000 (+0400) Subject: CommV24 X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=25901a2ac5422b4a7f4741a7b096f78d9d7dd25e;p=bbcp.git CommV24 --- diff --git a/Lin/Mod/Libc.odc b/Lin/Mod/Libc.odc index 4b89389..4940bda 100644 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 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 new file mode 100644 index 0000000..9d1f951 --- /dev/null +++ b/Trurl-based/_Linux_/Lin/Mod/Ioctl.txt @@ -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. diff --git a/Trurl-based/_Linux_/Lin/Mod/Libc.odc b/Trurl-based/_Linux_/Lin/Mod/Libc.odc index 4b89389..4940bda 100644 Binary files a/Trurl-based/_Linux_/Lin/Mod/Libc.odc and b/Trurl-based/_Linux_/Lin/Mod/Libc.odc differ diff --git a/Trurl-based/_Linux_/Lin/Mod/Libc.txt b/Trurl-based/_Linux_/Lin/Mod/Libc.txt index 493ea30..d90abb0 100644 --- a/Trurl-based/_Linux_/Lin/Mod/Libc.txt +++ b/Trurl-based/_Linux_/Lin/Mod/Libc.txt @@ -236,6 +236,7 @@ MODULE LinLibc ["libc.so.6"]; 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 *) @@ -263,6 +264,7 @@ MODULE LinLibc ["libc.so.6"]; 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; @@ -449,8 +451,8 @@ MODULE LinLibc ["libc.so.6"]; 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 new file mode 100644 index 0000000..789a23d --- /dev/null +++ b/Trurl-based/_Linux_/Lin/Mod/Termios.txt @@ -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 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 9a0b30f..14a5504 100755 --- 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 <