summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c4b4bdb)
raw | patch | inline | side by side (parent: c4b4bdb)
author | Alexander Shiryaev <aixp@mail.ru> | |
Tue, 15 Nov 2016 21:18:09 +0000 (00:18 +0300) | ||
committer | Alexander Shiryaev <aixp@mail.ru> | |
Tue, 15 Nov 2016 21:18:09 +0000 (00:18 +0300) |
20 files changed:
diff --git a/BlackBox/_FreeBSDLinuxOpenBSD_/Lin/Mod/gen-LibW/LibW.txt.templ b/BlackBox/_FreeBSDLinuxOpenBSD_/Lin/Mod/gen-LibW/LibW.txt.templ
--- /dev/null
@@ -0,0 +1,47 @@
+MODULE LinLibW ["libc.so%%libver%%"];
+
+ (*
+ %%osname%%
+ %%machine%%
+ *)
+
+ IMPORT Libc := LinLibc;
+
+ CONST
+%%defs-lc%%
+ TYPE
+ (* int, wchar_t, wint_t, size_t, mbstate_t *)
+%%defs-basictypes%%
+ PtrWSTR* = POINTER [untagged] TO ARRAY [untagged] OF wchar_t;
+
+ PROCEDURE [ccall] setlocale* (category: int; locale: Libc.PtrSTR): Libc.PtrSTR;
+
+ PROCEDURE [ccall] mbsinit* (VAR [nil] ps: mbstate_t): int;
+
+ PROCEDURE [ccall] wctomb* (s: Libc.PtrSTR; wchar: wchar_t): int;
+ PROCEDURE [ccall] wcstombs* (s: Libc.PtrSTR; pwcs: PtrWSTR; n: size_t): size_t;
+
+ PROCEDURE [ccall] wcrtomb* (s: Libc.PtrSTR; wc: wchar_t; VAR [nil] ps: mbstate_t): size_t;
+ PROCEDURE [ccall] wcsrtombs* (dst: Libc.PtrSTR; VAR src: PtrWSTR; len: size_t; VAR [nil] ps: mbstate_t): size_t;
+ PROCEDURE [ccall] wcsnrtombs* (dst: Libc.PtrSTR; VAR src: PtrWSTR; nwc: size_t; len: size_t; VAR [nil] ps: mbstate_t): size_t;
+
+ PROCEDURE [ccall] mbtowc* (pwc: PtrWSTR; s: Libc.PtrSTR; n: size_t): int;
+ PROCEDURE [ccall] mbstowcs* (pwcs: PtrWSTR; s: Libc.PtrSTR; n: size_t): size_t;
+ PROCEDURE [ccall] mblen* (s: Libc.PtrSTR; n: size_t): int;
+
+ PROCEDURE [ccall] mbrtowc* (wc: PtrWSTR; s: Libc.PtrSTR; n: size_t; VAR [nil] mbs: mbstate_t): size_t;
+ PROCEDURE [ccall] mbsrtowcs* (dst: PtrWSTR; VAR src: Libc.PtrSTR; len: size_t; VAR [nil] ps: mbstate_t): size_t;
+ PROCEDURE [ccall] mbsnrtowcs* (dst: PtrWSTR; VAR src: Libc.PtrSTR; nmc: size_t; len: size_t; VAR [nil] ps: mbstate_t): size_t;
+ PROCEDURE [ccall] mbrlen* (s: Libc.PtrSTR; n: size_t; VAR [nil] ps: mbstate_t): size_t;
+
+ PROCEDURE [ccall] iswalpha* (wc: wint_t): int;
+ PROCEDURE [ccall] iswlower* (wc: wint_t): int;
+ PROCEDURE [ccall] iswupper* (wc: wint_t): int;
+ PROCEDURE [ccall] towlower* (wc: wint_t): wint_t;
+ PROCEDURE [ccall] towupper* (wc: wint_t): wint_t;
+
+ PROCEDURE [ccall] wprintf* (fmt: PtrWSTR): int;
+ PROCEDURE [ccall] fputws* (ws: PtrWSTR; fp: Libc.PtrFILE): int;
+ PROCEDURE [ccall] fgetws* (ws: PtrWSTR; n: int; fp: Libc.PtrFILE): PtrWSTR;
+
+END LinLibW.
\ No newline at end of file
diff --git a/BlackBox/_FreeBSDLinuxOpenBSD_/Lin/Mod/gen-LibW/sizeofs.c b/BlackBox/_FreeBSDLinuxOpenBSD_/Lin/Mod/gen-LibW/sizeofs.c
--- /dev/null
@@ -0,0 +1,61 @@
+#include <sys/types.h>
+#include <wctype.h>
+#include <wchar.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#define TABS "\t\t"
+
+#define FALSE (0)
+#define TRUE (1)
+
+static void D (const char *s, int sz, int set, int export)
+{
+ int res;
+
+ res = printf("%s%s", TABS, s);
+ if (export) {
+ res = printf("*");
+ }
+ res = printf(" = ");
+ if (sz == 1) {
+ res = printf("SHORTCHAR");
+ } else if (sz == 2) {
+ res = printf("SHORTINT");
+ } else if (sz == 4) {
+ if (set) {
+ res = printf("SET");
+ } else {
+ res = printf("INTEGER");
+ }
+ } else if (sz == 8) {
+ if (set) {
+ res = printf("ARRAY [untagged] 2 OF SET");
+ } else {
+ res = printf("LONGINT");
+ }
+ } else {
+ res = printf("ARRAY [untagged] ");
+ if (sz % 4 == 0) {
+ if (set) {
+ res = printf("%d OF SET", sz / 4);
+ } else {
+ res = printf("%d OF INTEGER", sz / 4);
+ }
+ } else {
+ res = printf("%d OF SHORTCHAR", sz);
+ }
+ }
+ res = printf(";\n");
+}
+
+int main ()
+{\
+ D("int", sizeof(int), FALSE, TRUE);
+ D("wchar_t", sizeof(wchar_t), FALSE, TRUE);
+ D("wint_t", sizeof(wint_t), FALSE, TRUE);
+ D("size_t", sizeof(size_t), FALSE, TRUE);
+ D("mbstate_t", sizeof(mbstate_t), FALSE, TRUE);
+
+ return 0;
+}
diff --git a/BlackBox/_FreeBSDLinuxOpenBSD_GUI/Build-Tool.odc b/BlackBox/_FreeBSDLinuxOpenBSD_GUI/Build-Tool.odc
index 08a0d8f5bf4b2bd8d232bf6dd2b484b5d9630350..165169f60e2e0dc8860a87c8b40eb8b960390f95 100644 (file)
Binary files a/BlackBox/_FreeBSDLinuxOpenBSD_GUI/Build-Tool.odc and b/BlackBox/_FreeBSDLinuxOpenBSD_GUI/Build-Tool.odc differ
Binary files a/BlackBox/_FreeBSDLinuxOpenBSD_GUI/Build-Tool.odc and b/BlackBox/_FreeBSDLinuxOpenBSD_GUI/Build-Tool.odc differ
index 864343469e9adf3b06d2ccb2097d0c72c718920b..cbd67bd7738478fa31c698eb06f0d401db7bf13d 100755 (executable)
./run-dev0 <<DATA
ConsCompiler.Compile('Lin/Mod', 'Dl.txt')
ConsCompiler.Compile('Lin/Mod', 'Libc.txt')
+ConsCompiler.Compile('Lin/Mod', 'LibW.txt')
ConsCompiler.Compile('Lin/Mod', 'Iconv.txt')
# Linux only
diff --git a/BlackBox/_FreeBSDLinuxOpenBSD_Interp/build b/BlackBox/_FreeBSDLinuxOpenBSD_Interp/build
index 87180f45227f389ec45446ade6569b9eaf437ec6..eecfe7d6330d9a2a5bdcafc930c456db13fd8ed7 100755 (executable)
./run-dev0 <<DATA
ConsCompiler.Compile('Lin/Mod', 'Dl.txt')
ConsCompiler.Compile('Lin/Mod', 'Libc.txt')
+ConsCompiler.Compile('Lin/Mod', 'LibW.txt')
ConsCompiler.Compile('Lin/Mod', 'Iconv.txt')
# Linux only
diff --git a/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/GLib.odc b/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/GLib.odc
index 2e103e379cd2bcd2e506d2558e719e7afbcfcce1..ce8c73589c62a703b5e76a8ca1106fdd93d117d5 100644 (file)
Binary files a/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/GLib.odc and b/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/GLib.odc differ
Binary files a/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/GLib.odc and b/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/GLib.odc differ
diff --git a/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gdk.odc b/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gdk.odc
index aec7de5378431d04f20e97a73d7e2196b401e681..7084d15c594aff0a50dd5883765d9f565eb95f1c 100644 (file)
Binary files a/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gdk.odc and b/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gdk.odc differ
Binary files a/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gdk.odc and b/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gdk.odc differ
diff --git a/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gtk.odc b/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gtk.odc
index 3cc8c8149183df9c13f2d0a28456d1824c09012e..170876bed7e0f9a30b9d5fad3abfc4dea637a929 100644 (file)
Binary files a/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gtk.odc and b/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gtk.odc differ
Binary files a/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gtk.odc and b/BlackBox/_FreeBSDOpenBSD_GUI/Gtk2/Mod/Gtk.odc differ
index 2faa926fa5c57a8dce41b3c70bbf20e763613a11..349307ff8dc18f96e6c122a488887da827d4f93f 100644 (file)
Binary files a/BlackBox/_OpenBSD_/Host/Mod/Files.odc and b/BlackBox/_OpenBSD_/Host/Mod/Files.odc differ
Binary files a/BlackBox/_OpenBSD_/Host/Mod/Files.odc and b/BlackBox/_OpenBSD_/Host/Mod/Files.odc differ
diff --git a/BlackBox/_OpenBSD_/Host/Mod/Files16.odc b/BlackBox/_OpenBSD_/Host/Mod/Files16.odc
new file mode 100644 (file)
index 0000000..2faa926
Binary files /dev/null and b/BlackBox/_OpenBSD_/Host/Mod/Files16.odc differ
index 0000000..2faa926
Binary files /dev/null and b/BlackBox/_OpenBSD_/Host/Mod/Files16.odc differ
diff --git a/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/Makefile b/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/Makefile
--- /dev/null
@@ -0,0 +1,25 @@
+# This is BSD Makefile
+# BSD GNU
+# ${.TARGET} $@
+# ${.ALLSRC} $^
+# ${.IMPSRC} $<
+
+INCDIR ?= /usr/include
+
+PY = python2.7
+
+DEFS = defs-basictypes defs-lc
+
+all: LibW.txt ${DEFS}
+
+LibW.txt: LibW.txt.templ ${DEFS} libver osname machine
+ ${PY} ./untempl.py LibW.txt.templ ${.TARGET}
+
+defs-basictypes: sizeofs
+ ./sizeofs > ${.TARGET}
+
+defs-lc:
+ ./dumpdefs.py 2 1 i ${INCDIR}/locale.h | grep " LC_" > ${.TARGET}
+
+clean:
+ rm -f ${DEFS} Net.txt sizeofs
diff --git a/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/dumpdefs.py b/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/dumpdefs.py
--- /dev/null
@@ -0,0 +1 @@
+../gen-Libc/dumpdefs.py
\ No newline at end of file
diff --git a/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/libver b/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/libver
--- /dev/null
@@ -0,0 +1 @@
+.89.2
\ No newline at end of file
diff --git a/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/machine b/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/machine
--- /dev/null
@@ -0,0 +1 @@
+i386
\ No newline at end of file
diff --git a/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/osname b/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/osname
--- /dev/null
@@ -0,0 +1 @@
+OpenBSD 6.0
\ No newline at end of file
diff --git a/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/untempl.py b/BlackBox/_OpenBSD_/Lin/Mod/gen-LibW/untempl.py
--- /dev/null
@@ -0,0 +1 @@
+../gen-Libc/untempl.py
\ No newline at end of file
index d754e3daa6fc10688f542f9396e1323e298b5878..e24dba950d2d061d844be87e3251ea316c5dddb7 100644 (file)
Binary files a/BlackBox/_OpenBSD_/System/Mod/Kernel.odc and b/BlackBox/_OpenBSD_/System/Mod/Kernel.odc differ
Binary files a/BlackBox/_OpenBSD_/System/Mod/Kernel.odc and b/BlackBox/_OpenBSD_/System/Mod/Kernel.odc differ
diff --git a/BlackBox/_OpenBSD_/System/Mod/Kernel16.odc b/BlackBox/_OpenBSD_/System/Mod/Kernel16.odc
new file mode 100644 (file)
index 0000000..d754e3d
Binary files /dev/null and b/BlackBox/_OpenBSD_/System/Mod/Kernel16.odc differ
index 0000000..d754e3d
Binary files /dev/null and b/BlackBox/_OpenBSD_/System/Mod/Kernel16.odc differ
index 2f57f6b65afb88d3cfec9b54c9a57557b9ab4c5a..da82cdda1d1c9e7981c4bfbfe593e9fae4a55841 100644 (file)
Binary files a/BlackBox/_OpenBSD_/libBB.so and b/BlackBox/_OpenBSD_/libBB.so differ
Binary files a/BlackBox/_OpenBSD_/libBB.so and b/BlackBox/_OpenBSD_/libBB.so differ
index 8c5cfb051fe7461ce1cb9ecbb5a06f1f195123b1..ed0f3776d7ab057949e8d95af8a0d1b588518fc1 100644 (file)
Binary files a/BlackBox/_OpenBSD_/libBB0.so and b/BlackBox/_OpenBSD_/libBB0.so differ
Binary files a/BlackBox/_OpenBSD_/libBB0.so and b/BlackBox/_OpenBSD_/libBB0.so differ