<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.blackboxframework.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bernhard</id>
	<title>BlackBox Framework Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.blackboxframework.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bernhard"/>
	<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=Special:Contributions/Bernhard"/>
	<updated>2026-05-07T13:59:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.blackboxframework.org/index.php?title=BlackBox_Component_Builder&amp;diff=529</id>
		<title>BlackBox Component Builder</title>
		<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=BlackBox_Component_Builder&amp;diff=529"/>
		<updated>2020-10-07T14:49:47Z</updated>

		<summary type="html">&lt;p&gt;Bernhard: /* External links */ dead link to Stan Warford's book revitalized, dead link to OmiSys redirected to archive.org&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''BlackBox Component Builder''' is an integrated development environment optimized for component-based software development. It consists of development tools, a library of reusable components, a framework that simplifies the development of robust custom components and applications, and a run-time environment for components.&lt;br /&gt;
&lt;br /&gt;
In BlackBox, the development of applications and their components is done in [[Component Pascal]]. This language is a descendant of Pascal, Modula-2, and Oberon. It provides modern features such as objects, full type safety, components (in the form of modules), dynamic linking of components, and garbage collection. The entire BlackBox Component Builder is written in Component Pascal: all library components, all development tools including the Component Pascal compiler, and even the low-level run-time system with its garbage collector.&lt;br /&gt;
&lt;br /&gt;
As its name implies, BlackBox Component Builder supports blackbox abstractions and reuse as opposed to whitebox as defined in &amp;lt;ref&amp;gt;Szyperski, Clemens. ''Component Software''. Addison Wesley, 2002, p. 40f and Chap.7 (p. 109ff)&amp;lt;/ref&amp;gt;. It started 1993 as Oberon/F&amp;lt;ref&amp;gt;http://www.edm2.com/0608/oberon.html&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;D. Pountain, The Oberon/F System, ''BYTE'' 20(1), Jan. 1995.&amp;lt;/ref&amp;gt; and was renamed to BlackBox Component Builder with Release 1.3 end of the 1990s. BlackBox Component Builder went open source with Release 1.5 mid-2004.&lt;br /&gt;
&lt;br /&gt;
The design principles of the BlackBox Component Framework are based on Clemens Szyperski's research, published in his PhD thesis &amp;lt;ref&amp;gt;Szyperski, Clemens. ''Insight ETHOS: On Object Orientation in Operating Systems''. PhD thesis: Swiss Federal Institute of Technology (ETH Zurich), Dissertation No 9884. vdf Hochschulverlag AG an der ETH Zürich, Zurich, Switzerland, ISBN 3-7281-1948-2, 1992, [http://e-collection.library.ethz.ch/eserv/eth:38713/eth-38713-02.pdf PDF in ETHZ E-Collection]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Clemens Szyperski's [https://groups.google.com/forum/#!search/Clemens$20Szyperski/comp.lang.oberon/M-y1bJwEYE8/VIiedaFfIfIJ post in c.l.o.]&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
BlackBox is available from the BlackBox Framework Center [http://blackboxframework.org/index.php?cID=goto-download-page,en-us Download page].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also see [[BlackBox_Component_Builder_1.7|Some notes about migration from 1.6 to 1.7]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
*[https://web.archive.org/web/20191218082105/http://www.oberon.ch/blackbox.html Official site, last known version from Archive.org]&lt;br /&gt;
*[https://www.springer.com/gp/book/9783528058289 An introductory text using BlackBox: Stan Warford - Computing Fundamentals] see also: [https://www.cslab.pepperdine.edu/warford/ComputingFundamentals/ CS-Lab at Pepperdine] and [https://blackboxframework.org/books/warford_2002.pdf a local copy]&lt;br /&gt;
*[http://www.zinnamturm.eu/ Tools and Utilities for BlackBox]&lt;/div&gt;</summary>
		<author><name>Bernhard</name></author>
	</entry>
	<entry>
		<id>http://wiki.blackboxframework.org/index.php?title=H2O&amp;diff=518</id>
		<title>H2O</title>
		<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=H2O&amp;diff=518"/>
		<updated>2019-11-05T16:26:37Z</updated>

		<summary type="html">&lt;p&gt;Bernhard: /* Linux */ removed /usr/bin from calling oo2c and added sudo (did not work on a recent Debian 9 otherwise)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;H2O — is the tool for making [[Oberon]] and [[Component Pascal]] import modules from C header files.&lt;br /&gt;
&lt;br /&gt;
= Intro and Credits =&lt;br /&gt;
&lt;br /&gt;
H2O (Header to Oberon) is a tool for creating Oberon interface modules from C-Header files for foreign libraries. It has been created by Stewart Greenhill around 2001 for use with the Optimizing Oberon Compiler OOC/oo2c, which in turn has been created by Michael van Acken end of the 1990. Ability to create interface modules for Component Pascal has been implemented by Bernhard Treutwein end of 2006 and fed back into the cvs tree at sourceforge by Stewart Greenhill in March, 2007.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
The H2O sources are distributed with [[oo2c]] compiler. The oo2c compiler is/must be used for building H2O.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
1. Download binary distribution and install it: https://sourceforge.net/projects/ooc/files/ooc2/2.1.11/&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
2. Download last sources from: https://github.com/Spirit-of-Oberon/oo2c&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/Spirit-of-Oberon/oo2c&lt;br /&gt;
&lt;br /&gt;
3. Compile last version of '''oo2c''' from repository:&lt;br /&gt;
&lt;br /&gt;
 cd oo2c&lt;br /&gt;
 make cvsclean&lt;br /&gt;
 ./configure&lt;br /&gt;
 . ENV&lt;br /&gt;
 make $OOC_DEV_ROOT/oo2crc-install.xml&lt;br /&gt;
 oo2c -M --config oo2crc-install.xml oo2c&lt;br /&gt;
 sudo make install BOOTSTRAP_COMPILER=bin/oo2c&lt;br /&gt;
&lt;br /&gt;
4. Compilation of H2O&lt;br /&gt;
&lt;br /&gt;
 oo2c -M src/TestH2O.Mod&lt;br /&gt;
 sudo cp bin/TestH2O /usr/bin/TestH2O&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
H2O can be run on windows with [http://www.cygwin.com/ Cygwin].&lt;br /&gt;
&lt;br /&gt;
The example of built distribution you can find [http://forum.oberoncore.ru/viewtopic.php?f=34&amp;amp;t=661&amp;amp;p=86819&amp;amp;hilit=H2O#p68484 here].&lt;br /&gt;
&lt;br /&gt;
[http://forum.oberoncore.ru/download/file.php?id=2847 Download]&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
There are a couple of modes in which H2O can work.&lt;br /&gt;
* With arguments &amp;quot;-cp&amp;quot; it is producing Component Pascal output.&lt;br /&gt;
* With arguments &amp;quot;--preprocess&amp;quot; it just preprocesses source, outputting tokenised symbols (not very useful).&lt;br /&gt;
* With arguments &amp;quot;--preprocess --text&amp;quot; it preprocesses source, outputting  text.&lt;br /&gt;
* Without arguments, it translates &amp;quot;C&amp;quot; definitions, producing Oberon-2 output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Processing C source code ==&lt;br /&gt;
&lt;br /&gt;
There are few C files ready for trial usage in the folder with [[oo2c]] sources.&lt;br /&gt;
&lt;br /&gt;
 cd tests/h2o&lt;br /&gt;
 TestH2O misc/test.c&lt;br /&gt;
&lt;br /&gt;
The results will be two files: '''mod.Mod''' and '''test.Mod'''.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; text-valign: top&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! C (sources)&lt;br /&gt;
! Oberon-2 (output)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| width=&amp;quot;6%&amp;quot; | mod.h&lt;br /&gt;
| width=&amp;quot;47%&amp;quot; |&lt;br /&gt;
 typedef int T;&lt;br /&gt;
 typedef int * pT;&lt;br /&gt;
| width=&amp;quot;47%&amp;quot; |&lt;br /&gt;
 MODULE mod [ INTERFACE &amp;quot;C&amp;quot; ];&lt;br /&gt;
 &lt;br /&gt;
 IMPORT SYSTEM;&lt;br /&gt;
 TYPE&lt;br /&gt;
   T* = LONGINT;&lt;br /&gt;
   pT* = POINTER TO ARRAY OF LONGINT;&lt;br /&gt;
 END mod.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| test.c&lt;br /&gt;
| &lt;br /&gt;
 #include &amp;quot;mod.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 typedef T t1;&lt;br /&gt;
 pT pt1;&lt;br /&gt;
 &lt;br /&gt;
 int i1;&lt;br /&gt;
 short int i2;&lt;br /&gt;
 long int i3;&lt;br /&gt;
 unsigned int i4;&lt;br /&gt;
 unsigned short int i5;&lt;br /&gt;
 unsigned long int i6;&lt;br /&gt;
 &lt;br /&gt;
 unsigned u;&lt;br /&gt;
 short s;&lt;br /&gt;
 long l;&lt;br /&gt;
 char c;&lt;br /&gt;
 &lt;br /&gt;
 int * pi;&lt;br /&gt;
 int ** ppi;&lt;br /&gt;
 &lt;br /&gt;
 int f1(int x, int y);&lt;br /&gt;
 int * f2(int x, int y);&lt;br /&gt;
 int (* f3)(int x, int y);&lt;br /&gt;
 void f4 (void);&lt;br /&gt;
 void f5 (int, int, ...);&lt;br /&gt;
 &lt;br /&gt;
 int ai [];&lt;br /&gt;
 int * aai1 [3][3];&lt;br /&gt;
 int (* aai2) [3][3];&lt;br /&gt;
 &lt;br /&gt;
 struct A {&lt;br /&gt;
   int a:1;&lt;br /&gt;
   int b;&lt;br /&gt;
 } sA1;&lt;br /&gt;
 &lt;br /&gt;
 struct A sA2;&lt;br /&gt;
 struct A * psA;&lt;br /&gt;
 &lt;br /&gt;
 struct A * (* next)(struct A * p);&lt;br /&gt;
 &lt;br /&gt;
 enum B { a=1, b, c } e1;&lt;br /&gt;
 &lt;br /&gt;
 typedef unsigned long long I;&lt;br /&gt;
 &lt;br /&gt;
 I i7;&lt;br /&gt;
 volatile I i8;&lt;br /&gt;
 volatile I i9, * const i10;&lt;br /&gt;
 int a[sizeof(int)];&lt;br /&gt;
| &lt;br /&gt;
 MODULE test [ INTERFACE &amp;quot;C&amp;quot; ];&lt;br /&gt;
 &lt;br /&gt;
 IMPORT SYSTEM, mod;&lt;br /&gt;
 CONST&lt;br /&gt;
   (* Constants occurring in enumeration 'B' *)&lt;br /&gt;
   a* = 1;&lt;br /&gt;
   b* = 2;&lt;br /&gt;
   c* = 3;&lt;br /&gt;
 TYPE&lt;br /&gt;
   A_tag* = RECORD &lt;br /&gt;
     a* : LONGINT;&lt;br /&gt;
     b* : LONGINT;&lt;br /&gt;
   END;&lt;br /&gt;
   B_tag* = LONGINT (* enumerated type *);&lt;br /&gt;
   AutoPtrA_tag* = POINTER TO A_tag;&lt;br /&gt;
   t1* = mod.T;&lt;br /&gt;
   I* = HUGEINT;&lt;br /&gt;
 VAR&lt;br /&gt;
   pt1* : mod.pT;&lt;br /&gt;
   i1* : LONGINT;&lt;br /&gt;
   i2* : INTEGER;&lt;br /&gt;
   i3* : LONGINT;&lt;br /&gt;
   i4* : LONGINT;&lt;br /&gt;
   i5* : INTEGER;&lt;br /&gt;
   i6* : LONGINT;&lt;br /&gt;
   u* : LONGINT;&lt;br /&gt;
   s* : INTEGER;&lt;br /&gt;
   l* : LONGINT;&lt;br /&gt;
   c* : CHAR;&lt;br /&gt;
   pi* : POINTER TO ARRAY OF LONGINT;&lt;br /&gt;
   ppi* : POINTER TO ARRAY OF POINTER TO ARRAY OF LONGINT;&lt;br /&gt;
   f3* : PROCEDURE(x : LONGINT; y : LONGINT) : LONGINT;&lt;br /&gt;
   ai* : ARRAY OF LONGINT;&lt;br /&gt;
   aai1* : ARRAY 3 OF ARRAY 3 OF POINTER TO ARRAY OF LONGINT;&lt;br /&gt;
   aai2* : POINTER TO ARRAY 3 OF ARRAY 3 OF LONGINT;&lt;br /&gt;
   sA1* : A_tag;&lt;br /&gt;
   sA2* : A_tag;&lt;br /&gt;
   psA* : POINTER TO A_tag;&lt;br /&gt;
   next* : PROCEDURE(p : AutoPtrA_tag) : AutoPtrA_tag;&lt;br /&gt;
   e1* : B_tag;&lt;br /&gt;
   i7* : I;&lt;br /&gt;
   i8* : I;&lt;br /&gt;
   i9* : I;&lt;br /&gt;
   i10* : POINTER TO ARRAY OF I;&lt;br /&gt;
   a* : ARRAY 4 OF LONGINT;&lt;br /&gt;
   PROCEDURE f1* (x : LONGINT; y : LONGINT) : LONGINT;&lt;br /&gt;
   PROCEDURE f2* (x : LONGINT; y : LONGINT) : mod.pT;&lt;br /&gt;
   PROCEDURE f4* ();&lt;br /&gt;
   PROCEDURE f5* (p0 : LONGINT; p1 : LONGINT);&lt;br /&gt;
 END test.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Processing with outer H2O directive ==&lt;br /&gt;
&lt;br /&gt;
Directive file have structure:&lt;br /&gt;
&lt;br /&gt;
 H2O {&lt;br /&gt;
   ... translation options here ...&lt;br /&gt;
 }&lt;br /&gt;
 #include &amp;quot;topLevelFile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If we want to translate '''test.c''' from previous example we would make '''test.h2o''' that looks like this:&lt;br /&gt;
&lt;br /&gt;
 H2O {&lt;br /&gt;
   OPTIONS {&lt;br /&gt;
     MapChar = &amp;quot;SHORTCHAR&amp;quot;;&lt;br /&gt;
     MapShort = &amp;quot;SHORTINT&amp;quot;;&lt;br /&gt;
     MapLong = &amp;quot;INTEGER&amp;quot;;&lt;br /&gt;
     MapLongLong = &amp;quot;LONGINT&amp;quot;;&lt;br /&gt;
     MapFloat = &amp;quot;SHORTREAL&amp;quot;;&lt;br /&gt;
     MapDouble = &amp;quot;REAL&amp;quot;;&lt;br /&gt;
     MapPointer = &amp;quot;ANYPTR&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   MODULE &amp;quot;test&amp;quot; {&lt;br /&gt;
       LinkLib = &amp;quot;libtest.so&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   MODULE &amp;quot;mod&amp;quot; {&lt;br /&gt;
       LinkLib = &amp;quot;libmod.so&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 #include &amp;quot;test.c&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To initiate the translation you would do:&lt;br /&gt;
&lt;br /&gt;
 TestH2O misc/test.h2o&lt;br /&gt;
&lt;br /&gt;
For making of Component Pascal import modules we can use key '''-cp'''.&lt;br /&gt;
&lt;br /&gt;
 TestH2O -cp misc/test.h2o&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; text-valign: top&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! C (sources)&lt;br /&gt;
! Component Pascal (output)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| width=&amp;quot;6%&amp;quot; | mod.h&lt;br /&gt;
| width=&amp;quot;47%&amp;quot; |&lt;br /&gt;
 typedef int T;&lt;br /&gt;
 typedef int * pT;&lt;br /&gt;
| width=&amp;quot;47%&amp;quot; |&lt;br /&gt;
 MODULE mod [ &amp;quot;libmod.so&amp;quot; ];&lt;br /&gt;
 &lt;br /&gt;
 IMPORT SYSTEM;&lt;br /&gt;
 TYPE&lt;br /&gt;
   T* = INTEGER;&lt;br /&gt;
   pT* = POINTER TO ARRAY [untagged] OF INTEGER;&lt;br /&gt;
 END mod.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| test.c&lt;br /&gt;
| &lt;br /&gt;
 #include &amp;quot;mod.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 typedef T t1;&lt;br /&gt;
 pT pt1;&lt;br /&gt;
 &lt;br /&gt;
 int i1;&lt;br /&gt;
 short int i2;&lt;br /&gt;
 long int i3;&lt;br /&gt;
 unsigned int i4;&lt;br /&gt;
 unsigned short int i5;&lt;br /&gt;
 unsigned long int i6;&lt;br /&gt;
 &lt;br /&gt;
 unsigned u;&lt;br /&gt;
 short s;&lt;br /&gt;
 long l;&lt;br /&gt;
 char c;&lt;br /&gt;
 &lt;br /&gt;
 int * pi;&lt;br /&gt;
 int ** ppi;&lt;br /&gt;
 &lt;br /&gt;
 int f1(int x, int y);&lt;br /&gt;
 int * f2(int x, int y);&lt;br /&gt;
 int (* f3)(int x, int y);&lt;br /&gt;
 void f4 (void);&lt;br /&gt;
 void f5 (int, int, ...);&lt;br /&gt;
 &lt;br /&gt;
 int ai [];&lt;br /&gt;
 int * aai1 [3][3];&lt;br /&gt;
 int (* aai2) [3][3];&lt;br /&gt;
 &lt;br /&gt;
 struct A {&lt;br /&gt;
   int a:1;&lt;br /&gt;
   int b;&lt;br /&gt;
 } sA1;&lt;br /&gt;
 &lt;br /&gt;
 struct A sA2;&lt;br /&gt;
 struct A * psA;&lt;br /&gt;
 &lt;br /&gt;
 struct A * (* next)(struct A * p);&lt;br /&gt;
 &lt;br /&gt;
 enum B { a=1, b, c } e1;&lt;br /&gt;
 &lt;br /&gt;
 typedef unsigned long long I;&lt;br /&gt;
 &lt;br /&gt;
 I i7;&lt;br /&gt;
 volatile I i8;&lt;br /&gt;
 volatile I i9, * const i10;&lt;br /&gt;
 int a[sizeof(int)];&lt;br /&gt;
| &lt;br /&gt;
 MODULE test [ &amp;quot;libtest.so&amp;quot; ];&lt;br /&gt;
 &lt;br /&gt;
 IMPORT SYSTEM, mod;&lt;br /&gt;
 CONST&lt;br /&gt;
   (* Constants occurring in enumeration 'B' *)&lt;br /&gt;
   a* = 1;&lt;br /&gt;
   b* = 2;&lt;br /&gt;
   c* = 3;&lt;br /&gt;
 TYPE&lt;br /&gt;
   A_tag* = RECORD [untagged] &lt;br /&gt;
     a* : INTEGER;&lt;br /&gt;
     b* : INTEGER;&lt;br /&gt;
   END;&lt;br /&gt;
   B_tag* = INTEGER (* enumerated type *);&lt;br /&gt;
   AutoPtrA_tag* = POINTER TO A_tag;&lt;br /&gt;
   t1* = mod.T;&lt;br /&gt;
   I* = HUGEINT;&lt;br /&gt;
 VAR&lt;br /&gt;
   pt1* : mod.pT;&lt;br /&gt;
   i1* : INTEGER;&lt;br /&gt;
   i2* : SHORTINT;&lt;br /&gt;
   i3* : INTEGER;&lt;br /&gt;
   i4* : INTEGER;&lt;br /&gt;
   i5* : INTEGER;&lt;br /&gt;
   i6* : INTEGER;&lt;br /&gt;
   u* : INTEGER;&lt;br /&gt;
   s* : SHORTINT;&lt;br /&gt;
   l* : INTEGER;&lt;br /&gt;
   c* : SHORTCHAR;&lt;br /&gt;
   pi* : POINTER TO ARRAY [untagged] OF INTEGER;&lt;br /&gt;
   ppi* : POINTER TO ARRAY [untagged] OF&lt;br /&gt;
      POINTER TO ARRAY [untagged] OF INTEGER;&lt;br /&gt;
   f3* : PROCEDURE(x : INTEGER; y : INTEGER) : INTEGER;&lt;br /&gt;
   ai* : ARRAY [untagged] OF INTEGER;&lt;br /&gt;
   aai1* : ARRAY [untagged] 3 OF ARRAY [untagged] 3 OF&lt;br /&gt;
      POINTER TO ARRAY [untagged] OF INTEGER;&lt;br /&gt;
   aai2* : POINTER TO ARRAY [untagged] 3 OF&lt;br /&gt;
      ARRAY [untagged] 3 OF INTEGER;&lt;br /&gt;
   sA1* : A_tag;&lt;br /&gt;
   sA2* : A_tag;&lt;br /&gt;
   psA* : POINTER TO A_tag;&lt;br /&gt;
   next* : PROCEDURE(p : AutoPtrA_tag) : AutoPtrA_tag;&lt;br /&gt;
   e1* : B_tag;&lt;br /&gt;
   i7* : I;&lt;br /&gt;
   i8* : I;&lt;br /&gt;
   i9* : I;&lt;br /&gt;
   i10* : POINTER TO ARRAY [untagged] OF I;&lt;br /&gt;
   a* : ARRAY [untagged] 4 OF INTEGER;&lt;br /&gt;
   PROCEDURE f1* (x : INTEGER; y : INTEGER) : INTEGER;&lt;br /&gt;
   PROCEDURE f2* (x : INTEGER; y : INTEGER) : mod.pT;&lt;br /&gt;
   PROCEDURE f4* ();&lt;br /&gt;
   PROCEDURE f5* (p0 : INTEGER; p1 : INTEGER);&lt;br /&gt;
 END test.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For included modules, the behavior depends on the type of include. If you do:&lt;br /&gt;
  #include &amp;lt;mod.h&amp;gt;&lt;br /&gt;
it looks in the search path specified by the Include option. If you do:&lt;br /&gt;
  #include &amp;quot;mod.h&amp;quot;&lt;br /&gt;
it looks in the same directory as the file that does the #include.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;OPTIONS&amp;quot; directive is global to the translation, and includes  things like:&lt;br /&gt;
&lt;br /&gt;
* '''OutputDirectory''' — where to put the generated module files&lt;br /&gt;
* '''Include''' — list of paths to get include files &lt;br /&gt;
* '''Exclude''' — list of files to not include (#include ignored)&lt;br /&gt;
* '''AutoPrefix''' — prefix for auto-generated type names (default &amp;quot;Auto&amp;quot;) &lt;br /&gt;
* '''TagSuffix''' — suffix to be added to structure tags (default &amp;quot;_tag&amp;quot;) &lt;br /&gt;
* '''RenameProcedures''' — when set to &amp;quot;1&amp;quot; (the default) renames procedures using module &amp;quot;StripPrefix&amp;quot; specification. &lt;br /&gt;
* '''RenameVariables''' — when set to &amp;quot;1&amp;quot; (default is &amp;quot;0&amp;quot;, since this is  unsupported in OOC V2) renames variables using module &amp;quot;StripPrefix&amp;quot;  specification.&lt;br /&gt;
* '''ModuleSuffix''' — suffix for module file names (default &amp;quot;Mod&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
In this section, you can also specify the type mappings for scalar types:&lt;br /&gt;
&lt;br /&gt;
   OPTION symbol          C type                Default output type&lt;br /&gt;
   ----------------------------------------------------------------&lt;br /&gt;
   MapChar                &amp;quot;char&amp;quot;                &amp;quot;CHAR&amp;quot;&lt;br /&gt;
   MapUnsignedChar        &amp;quot;unsigned char&amp;quot;       &amp;quot;CHAR&amp;quot;&lt;br /&gt;
   MapShort               &amp;quot;short&amp;quot;               &amp;quot;INTEGER&amp;quot;&lt;br /&gt;
   MapUnsignedShort       &amp;quot;unsigned short&amp;quot;      &amp;quot;INTEGER&amp;quot;&lt;br /&gt;
   MapLong                &amp;quot;long&amp;quot;                &amp;quot;LONGINT&amp;quot;&lt;br /&gt;
   MapUnsignedLong        &amp;quot;unsigned long&amp;quot;       &amp;quot;LONGINT&amp;quot;&lt;br /&gt;
   MapLongLong            &amp;quot;long long&amp;quot;           &amp;quot;HUGEINT&amp;quot;&lt;br /&gt;
   MapUnsignedLongLong    &amp;quot;unsigned long long&amp;quot;  &amp;quot;HUGEINT&amp;quot;&lt;br /&gt;
   MapFloat               &amp;quot;float&amp;quot;               &amp;quot;REAL&amp;quot;&lt;br /&gt;
   MapDouble              &amp;quot;double&amp;quot;              &amp;quot;LONGREAL&amp;quot;&lt;br /&gt;
   MapLongDouble          &amp;quot;long double&amp;quot;         &amp;quot;LONGDOUBLE&amp;quot;&lt;br /&gt;
   MapPointer             &amp;quot;void *&amp;quot;              &amp;quot;SYSTEM.PTR&amp;quot;&lt;br /&gt;
   MapEnum                &amp;quot;enum ...&amp;quot;            &amp;quot;LONGINT&amp;quot;&lt;br /&gt;
   MapVoid                &amp;quot;void&amp;quot;                &amp;quot;C_VOID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;MODULE&amp;quot; directive controls how to treat the named module. The base  module name comes from the name of the corresponding &amp;quot;.h&amp;quot; file. Options  per module include:&lt;br /&gt;
&lt;br /&gt;
* '''OutputName''' — Output name for this module (defaults to header name)&lt;br /&gt;
* '''StripPrefix''' — list of prefixes to be removed from symbol names &lt;br /&gt;
* '''LinkLib''', '''LinkFile''', '''LinkFramework''' — specifies libraries, files and frameworks to link to this module (OOC-specific directive) &lt;br /&gt;
* '''Prolog''' — &amp;quot;C&amp;quot; definitions to be processed at the start of this module &lt;br /&gt;
* '''Epilog''' — &amp;quot;C&amp;quot; definitions to be processed at the end of this module &lt;br /&gt;
* '''Merge''' — when set to &amp;quot;1&amp;quot;, causes all files included by this module to be declared within this module, rather than in separate modules.&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;VARIANT&amp;quot; directive specifies how to translate particular symbols. As you would know, there are many ways of interpreting C declarations, and the default rules don't always work. For example:&lt;br /&gt;
 f(char * arg);&lt;br /&gt;
could be:&lt;br /&gt;
 PROCEDURE f (arg : POINTER TO ARRAY OF CHAR);&lt;br /&gt;
 PROCEDURE f (arg : ARRAY OF CHAR);&lt;br /&gt;
 PROCEDURE f (VAR arg : ARRAY OF CHAR);&lt;br /&gt;
 PROCEDURE f (VAR arg : CHAR);&lt;br /&gt;
&lt;br /&gt;
So VARIANT directives allow you to place particular interpretations on  the &amp;quot;C&amp;quot; declarations. Normally, you can see some specific patterns, but  it varies from API to API.&lt;br /&gt;
&lt;br /&gt;
The format of variants is a form of designator. The designators are composed of:&lt;br /&gt;
* '''strings''' — which match the names of globally declared objects &lt;br /&gt;
* '''[n]''' — which matches item &amp;lt;n&amp;gt; in a compound type or parameter list &lt;br /&gt;
* '''^''' — which matches the item referenced by a pointer type &lt;br /&gt;
* '''.symbol''' — which matches a named item in a type or paramter list&lt;br /&gt;
&lt;br /&gt;
Strings or symbols use OOC's regexp string format. Basically, &amp;quot;.*&amp;quot;  matches an string of characters, &amp;quot;$&amp;quot; matches the end of a string, and  &amp;quot;[]&amp;quot; matches one of a set of characters.&lt;br /&gt;
&lt;br /&gt;
===Examples:===&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;gl.*v$&amp;quot;.params : ARRAY;&lt;br /&gt;
This means any symbol (here, procedure) starting with &amp;quot;gl&amp;quot; and ending  with &amp;quot;v&amp;quot; has its &amp;quot;params&amp;quot; parameter interpreted as an array.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;gl.*Matrix[fd]$&amp;quot;[0] : ARRAY;&lt;br /&gt;
This means any symbol starting with &amp;quot;gl&amp;quot; and ending with &amp;quot;Matrixf&amp;quot; or  &amp;quot;Matrixd&amp;quot; has its first parameter interpreted as an array.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;String$&amp;quot; : CSTRING POINTER;&lt;br /&gt;
This means that the type &amp;quot;String&amp;quot; is to be interpreted as a POINTER to a  C string (in OOC, it assigns the &amp;quot;CSTRING&amp;quot; attribute to the pointer,  which means that you can use a string literal or CHAR array for this type).&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;glutInit$&amp;quot;.argcp : VAR;&lt;br /&gt;
This means that the &amp;quot;argcp&amp;quot; parameter of function &amp;quot;glutInit&amp;quot; is to be  treated as a VAR parameter.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;cvRelease[^D].*$&amp;quot;[0] : VAR;&lt;br /&gt;
This means that symbols starting &amp;quot;cvRelease&amp;quot; followed by any character  EXCEPT &amp;quot;D&amp;quot; has its first parameter interpreted as a VAR parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Complex examples ==&lt;br /&gt;
&lt;br /&gt;
[[Media:Interfaces.tar.gz]]&lt;/div&gt;</summary>
		<author><name>Bernhard</name></author>
	</entry>
	<entry>
		<id>http://wiki.blackboxframework.org/index.php?title=H2O&amp;diff=254</id>
		<title>H2O</title>
		<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=H2O&amp;diff=254"/>
		<updated>2015-03-31T08:11:45Z</updated>

		<summary type="html">&lt;p&gt;Bernhard: /* Installation */ Intro &amp;amp; Credits added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;H2O — is the tool for making [[Oberon]] and [[Component Pascal]] import modules from C header files.&lt;br /&gt;
&lt;br /&gt;
= Intro and Credits =&lt;br /&gt;
&lt;br /&gt;
H2O (Header to Oberon) is a tool fro creating Oberon interface modules from C-Header files for foreign libraries. It has been created by Stewart Greenhill around 2001 for use with the Optiizing Oberon Compiler OOC/oo2c, which in turn has been created by Michael van Acken end of the 1990. Ability to create interface modules for Component Pascal has been implemented by Bernhard Treutwein end of  2006 and fed back into the cvs tree at sourceforge by Stewart Greenhill in March, 2007.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
The H2O sources are distributed with [[oo2c]] compiler. The oo2c compiler is/must be used for building H2O.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
1. Download sources from: http://github.com/AlexIljin/oo2c&lt;br /&gt;
&lt;br /&gt;
 git clone http://github.com/AlexIljin/oo2c.git&lt;br /&gt;
&lt;br /&gt;
2. Compilation of [[oo2c]]:&lt;br /&gt;
&lt;br /&gt;
 cd oo2c&lt;br /&gt;
 export LDFLAGS=&amp;quot;-lm&amp;quot;&lt;br /&gt;
 chmod +x configure&lt;br /&gt;
 ./configure --prefix /usr&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
3. Compilation of H2O&lt;br /&gt;
&lt;br /&gt;
 oo2c -M src/TestH2O.Mod&lt;br /&gt;
 sudo cp bin/TestH2O /usr/bin/TestH2O&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
H2O can be run on windows with [http://www.cygwin.com/ Cygwin].&lt;br /&gt;
&lt;br /&gt;
The example of built distribution you can find [http://forum.oberoncore.ru/viewtopic.php?f=34&amp;amp;t=661&amp;amp;p=86819&amp;amp;hilit=H2O#p68484 here].&lt;br /&gt;
&lt;br /&gt;
[http://forum.oberoncore.ru/download/file.php?id=2847 Download]&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
There are a couple of modes in which H2O can work.&lt;br /&gt;
&lt;br /&gt;
* With arguments &amp;quot;--preprocess&amp;quot; it just preprocesses source, outputting tokenised symbols (not very useful).&lt;br /&gt;
* With arguments &amp;quot;--preprocess --text&amp;quot; it preprocesses source, outputting  text.&lt;br /&gt;
* Without arguments, it translates &amp;quot;C&amp;quot; definitions, producing Oberon-2 output.&lt;br /&gt;
&lt;br /&gt;
== Processing C source code ==&lt;br /&gt;
&lt;br /&gt;
There are few C files ready for trial usage in the folder with [[oo2c]] sources.&lt;br /&gt;
&lt;br /&gt;
 cd tests/h2o&lt;br /&gt;
 TestH2O misc/test.c&lt;br /&gt;
&lt;br /&gt;
The results will be two files: '''mod.Mod''' and '''test.Mod'''.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; text-valign: top&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! C (sources)&lt;br /&gt;
! Oberon-2 (output)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| width=&amp;quot;6%&amp;quot; | mod.h&lt;br /&gt;
| width=&amp;quot;47%&amp;quot; |&lt;br /&gt;
 typedef int T;&lt;br /&gt;
 typedef int * pT;&lt;br /&gt;
| width=&amp;quot;47%&amp;quot; |&lt;br /&gt;
 MODULE mod [ INTERFACE &amp;quot;C&amp;quot; ];&lt;br /&gt;
 &lt;br /&gt;
 IMPORT SYSTEM;&lt;br /&gt;
 TYPE&lt;br /&gt;
   T* = LONGINT;&lt;br /&gt;
   pT* = POINTER TO ARRAY OF LONGINT;&lt;br /&gt;
 END mod.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| test.c&lt;br /&gt;
| &lt;br /&gt;
 #include &amp;quot;mod.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 typedef T t1;&lt;br /&gt;
 pT pt1;&lt;br /&gt;
 &lt;br /&gt;
 int i1;&lt;br /&gt;
 short int i2;&lt;br /&gt;
 long int i3;&lt;br /&gt;
 unsigned int i4;&lt;br /&gt;
 unsigned short int i5;&lt;br /&gt;
 unsigned long int i6;&lt;br /&gt;
 &lt;br /&gt;
 unsigned u;&lt;br /&gt;
 short s;&lt;br /&gt;
 long l;&lt;br /&gt;
 char c;&lt;br /&gt;
 &lt;br /&gt;
 int * pi;&lt;br /&gt;
 int ** ppi;&lt;br /&gt;
 &lt;br /&gt;
 int f1(int x, int y);&lt;br /&gt;
 int * f2(int x, int y);&lt;br /&gt;
 int (* f3)(int x, int y);&lt;br /&gt;
 void f4 (void);&lt;br /&gt;
 void f5 (int, int, ...);&lt;br /&gt;
 &lt;br /&gt;
 int ai [];&lt;br /&gt;
 int * aai1 [3][3];&lt;br /&gt;
 int (* aai2) [3][3];&lt;br /&gt;
 &lt;br /&gt;
 struct A {&lt;br /&gt;
   int a:1;&lt;br /&gt;
   int b;&lt;br /&gt;
 } sA1;&lt;br /&gt;
 &lt;br /&gt;
 struct A sA2;&lt;br /&gt;
 struct A * psA;&lt;br /&gt;
 &lt;br /&gt;
 struct A * (* next)(struct A * p);&lt;br /&gt;
 &lt;br /&gt;
 enum B { a=1, b, c } e1;&lt;br /&gt;
 &lt;br /&gt;
 typedef unsigned long long I;&lt;br /&gt;
 &lt;br /&gt;
 I i7;&lt;br /&gt;
 volatile I i8;&lt;br /&gt;
 volatile I i9, * const i10;&lt;br /&gt;
 int a[sizeof(int)];&lt;br /&gt;
| &lt;br /&gt;
 MODULE test [ INTERFACE &amp;quot;C&amp;quot; ];&lt;br /&gt;
 &lt;br /&gt;
 IMPORT SYSTEM, mod;&lt;br /&gt;
 CONST&lt;br /&gt;
   (* Constants occurring in enumeration 'B' *)&lt;br /&gt;
   a* = 1;&lt;br /&gt;
   b* = 2;&lt;br /&gt;
   c* = 3;&lt;br /&gt;
 TYPE&lt;br /&gt;
   A_tag* = RECORD &lt;br /&gt;
     a* : LONGINT;&lt;br /&gt;
     b* : LONGINT;&lt;br /&gt;
   END;&lt;br /&gt;
   B_tag* = LONGINT (* enumerated type *);&lt;br /&gt;
   AutoPtrA_tag* = POINTER TO A_tag;&lt;br /&gt;
   t1* = mod.T;&lt;br /&gt;
   I* = HUGEINT;&lt;br /&gt;
 VAR&lt;br /&gt;
   pt1* : mod.pT;&lt;br /&gt;
   i1* : LONGINT;&lt;br /&gt;
   i2* : INTEGER;&lt;br /&gt;
   i3* : LONGINT;&lt;br /&gt;
   i4* : LONGINT;&lt;br /&gt;
   i5* : INTEGER;&lt;br /&gt;
   i6* : LONGINT;&lt;br /&gt;
   u* : LONGINT;&lt;br /&gt;
   s* : INTEGER;&lt;br /&gt;
   l* : LONGINT;&lt;br /&gt;
   c* : CHAR;&lt;br /&gt;
   pi* : POINTER TO ARRAY OF LONGINT;&lt;br /&gt;
   ppi* : POINTER TO ARRAY OF POINTER TO ARRAY OF LONGINT;&lt;br /&gt;
   f3* : PROCEDURE(x : LONGINT; y : LONGINT) : LONGINT;&lt;br /&gt;
   ai* : ARRAY OF LONGINT;&lt;br /&gt;
   aai1* : ARRAY 3 OF ARRAY 3 OF POINTER TO ARRAY OF LONGINT;&lt;br /&gt;
   aai2* : POINTER TO ARRAY 3 OF ARRAY 3 OF LONGINT;&lt;br /&gt;
   sA1* : A_tag;&lt;br /&gt;
   sA2* : A_tag;&lt;br /&gt;
   psA* : POINTER TO A_tag;&lt;br /&gt;
   next* : PROCEDURE(p : AutoPtrA_tag) : AutoPtrA_tag;&lt;br /&gt;
   e1* : B_tag;&lt;br /&gt;
   i7* : I;&lt;br /&gt;
   i8* : I;&lt;br /&gt;
   i9* : I;&lt;br /&gt;
   i10* : POINTER TO ARRAY OF I;&lt;br /&gt;
   a* : ARRAY 4 OF LONGINT;&lt;br /&gt;
   PROCEDURE f1* (x : LONGINT; y : LONGINT) : LONGINT;&lt;br /&gt;
   PROCEDURE f2* (x : LONGINT; y : LONGINT) : mod.pT;&lt;br /&gt;
   PROCEDURE f4* ();&lt;br /&gt;
   PROCEDURE f5* (p0 : LONGINT; p1 : LONGINT);&lt;br /&gt;
 END test.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Processing with outer H2O directive ==&lt;br /&gt;
&lt;br /&gt;
Directive file have structure:&lt;br /&gt;
&lt;br /&gt;
 H2O {&lt;br /&gt;
   ... translation options here ...&lt;br /&gt;
 }&lt;br /&gt;
 #include &amp;quot;topLevelFile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If we want to translate '''test.c''' from previous example we would make '''test.h2o''' that looks like this:&lt;br /&gt;
&lt;br /&gt;
 H2O {&lt;br /&gt;
   OPTIONS {&lt;br /&gt;
     MapChar = &amp;quot;SHORTCHAR&amp;quot;;&lt;br /&gt;
     MapShort = &amp;quot;SHORTINT&amp;quot;;&lt;br /&gt;
     MapLong = &amp;quot;INTEGER&amp;quot;;&lt;br /&gt;
     MapLongLong = &amp;quot;LONGINT&amp;quot;;&lt;br /&gt;
     MapFloat = &amp;quot;SHORTREAL&amp;quot;;&lt;br /&gt;
     MapDouble = &amp;quot;REAL&amp;quot;;&lt;br /&gt;
     MapPointer = &amp;quot;ANYPTR&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   MODULE &amp;quot;test&amp;quot; {&lt;br /&gt;
       LinkLib = &amp;quot;libtest.so&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   MODULE &amp;quot;mod&amp;quot; {&lt;br /&gt;
       LinkLib = &amp;quot;libmod.so&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 #include &amp;quot;test.c&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To initiate the translation you would do:&lt;br /&gt;
&lt;br /&gt;
 TestH2O misc/test.h2o&lt;br /&gt;
&lt;br /&gt;
For making of Component Pascal import modules we can use key '''-cp'''.&lt;br /&gt;
&lt;br /&gt;
 TestH2O -cp misc/test.h2o&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 100%; text-valign: top&amp;quot;&lt;br /&gt;
! Name&lt;br /&gt;
! C (sources)&lt;br /&gt;
! Component Pascal (output)&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| width=&amp;quot;6%&amp;quot; | mod.h&lt;br /&gt;
| width=&amp;quot;47%&amp;quot; |&lt;br /&gt;
 typedef int T;&lt;br /&gt;
 typedef int * pT;&lt;br /&gt;
| width=&amp;quot;47%&amp;quot; |&lt;br /&gt;
 MODULE mod [ &amp;quot;libmod.so&amp;quot; ];&lt;br /&gt;
 &lt;br /&gt;
 IMPORT SYSTEM;&lt;br /&gt;
 TYPE&lt;br /&gt;
   T* = INTEGER;&lt;br /&gt;
   pT* = POINTER TO ARRAY [untagged] OF INTEGER;&lt;br /&gt;
 END mod.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| test.c&lt;br /&gt;
| &lt;br /&gt;
 #include &amp;quot;mod.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 typedef T t1;&lt;br /&gt;
 pT pt1;&lt;br /&gt;
 &lt;br /&gt;
 int i1;&lt;br /&gt;
 short int i2;&lt;br /&gt;
 long int i3;&lt;br /&gt;
 unsigned int i4;&lt;br /&gt;
 unsigned short int i5;&lt;br /&gt;
 unsigned long int i6;&lt;br /&gt;
 &lt;br /&gt;
 unsigned u;&lt;br /&gt;
 short s;&lt;br /&gt;
 long l;&lt;br /&gt;
 char c;&lt;br /&gt;
 &lt;br /&gt;
 int * pi;&lt;br /&gt;
 int ** ppi;&lt;br /&gt;
 &lt;br /&gt;
 int f1(int x, int y);&lt;br /&gt;
 int * f2(int x, int y);&lt;br /&gt;
 int (* f3)(int x, int y);&lt;br /&gt;
 void f4 (void);&lt;br /&gt;
 void f5 (int, int, ...);&lt;br /&gt;
 &lt;br /&gt;
 int ai [];&lt;br /&gt;
 int * aai1 [3][3];&lt;br /&gt;
 int (* aai2) [3][3];&lt;br /&gt;
 &lt;br /&gt;
 struct A {&lt;br /&gt;
   int a:1;&lt;br /&gt;
   int b;&lt;br /&gt;
 } sA1;&lt;br /&gt;
 &lt;br /&gt;
 struct A sA2;&lt;br /&gt;
 struct A * psA;&lt;br /&gt;
 &lt;br /&gt;
 struct A * (* next)(struct A * p);&lt;br /&gt;
 &lt;br /&gt;
 enum B { a=1, b, c } e1;&lt;br /&gt;
 &lt;br /&gt;
 typedef unsigned long long I;&lt;br /&gt;
 &lt;br /&gt;
 I i7;&lt;br /&gt;
 volatile I i8;&lt;br /&gt;
 volatile I i9, * const i10;&lt;br /&gt;
 int a[sizeof(int)];&lt;br /&gt;
| &lt;br /&gt;
 MODULE test [ &amp;quot;libtest.so&amp;quot; ];&lt;br /&gt;
 &lt;br /&gt;
 IMPORT SYSTEM, mod;&lt;br /&gt;
 CONST&lt;br /&gt;
   (* Constants occurring in enumeration 'B' *)&lt;br /&gt;
   a* = 1;&lt;br /&gt;
   b* = 2;&lt;br /&gt;
   c* = 3;&lt;br /&gt;
 TYPE&lt;br /&gt;
   A_tag* = RECORD [untagged] &lt;br /&gt;
     a* : INTEGER;&lt;br /&gt;
     b* : INTEGER;&lt;br /&gt;
   END;&lt;br /&gt;
   B_tag* = INTEGER (* enumerated type *);&lt;br /&gt;
   AutoPtrA_tag* = POINTER TO A_tag;&lt;br /&gt;
   t1* = mod.T;&lt;br /&gt;
   I* = HUGEINT;&lt;br /&gt;
 VAR&lt;br /&gt;
   pt1* : mod.pT;&lt;br /&gt;
   i1* : INTEGER;&lt;br /&gt;
   i2* : SHORTINT;&lt;br /&gt;
   i3* : INTEGER;&lt;br /&gt;
   i4* : INTEGER;&lt;br /&gt;
   i5* : INTEGER;&lt;br /&gt;
   i6* : INTEGER;&lt;br /&gt;
   u* : INTEGER;&lt;br /&gt;
   s* : SHORTINT;&lt;br /&gt;
   l* : INTEGER;&lt;br /&gt;
   c* : SHORTCHAR;&lt;br /&gt;
   pi* : POINTER TO ARRAY [untagged] OF INTEGER;&lt;br /&gt;
   ppi* : POINTER TO ARRAY [untagged] OF&lt;br /&gt;
      POINTER TO ARRAY [untagged] OF INTEGER;&lt;br /&gt;
   f3* : PROCEDURE(x : INTEGER; y : INTEGER) : INTEGER;&lt;br /&gt;
   ai* : ARRAY [untagged] OF INTEGER;&lt;br /&gt;
   aai1* : ARRAY [untagged] 3 OF ARRAY [untagged] 3 OF&lt;br /&gt;
      POINTER TO ARRAY [untagged] OF INTEGER;&lt;br /&gt;
   aai2* : POINTER TO ARRAY [untagged] 3 OF&lt;br /&gt;
      ARRAY [untagged] 3 OF INTEGER;&lt;br /&gt;
   sA1* : A_tag;&lt;br /&gt;
   sA2* : A_tag;&lt;br /&gt;
   psA* : POINTER TO A_tag;&lt;br /&gt;
   next* : PROCEDURE(p : AutoPtrA_tag) : AutoPtrA_tag;&lt;br /&gt;
   e1* : B_tag;&lt;br /&gt;
   i7* : I;&lt;br /&gt;
   i8* : I;&lt;br /&gt;
   i9* : I;&lt;br /&gt;
   i10* : POINTER TO ARRAY [untagged] OF I;&lt;br /&gt;
   a* : ARRAY [untagged] 4 OF INTEGER;&lt;br /&gt;
   PROCEDURE f1* (x : INTEGER; y : INTEGER) : INTEGER;&lt;br /&gt;
   PROCEDURE f2* (x : INTEGER; y : INTEGER) : mod.pT;&lt;br /&gt;
   PROCEDURE f4* ();&lt;br /&gt;
   PROCEDURE f5* (p0 : INTEGER; p1 : INTEGER);&lt;br /&gt;
 END test.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For included modules, the behavior depends on the type of include. If you do:&lt;br /&gt;
  #include &amp;lt;mod.h&amp;gt;&lt;br /&gt;
it looks in the search path specified by the Include option. If you do:&lt;br /&gt;
  #include &amp;quot;mod.h&amp;quot;&lt;br /&gt;
it looks in the same directory as the file that does the #include.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;OPTIONS&amp;quot; directive is global to the translation, and includes  things like:&lt;br /&gt;
&lt;br /&gt;
* '''OutputDirectory''' — where to put the generated module files&lt;br /&gt;
* '''Include''' — list of paths to get include files &lt;br /&gt;
* '''Exclude''' — list of files to not include (#include ignored)&lt;br /&gt;
* '''AutoPrefix''' — prefix for auto-generated type names (default &amp;quot;Auto&amp;quot;) &lt;br /&gt;
* '''TagSuffix''' — suffix to be added to structure tags (default &amp;quot;_tag&amp;quot;) &lt;br /&gt;
* '''RenameProcedures''' — when set to &amp;quot;1&amp;quot; (the default) renames procedures using module &amp;quot;StripPrefix&amp;quot; specification. &lt;br /&gt;
* '''RenameVariables''' — when set to &amp;quot;1&amp;quot; (default is &amp;quot;0&amp;quot;, since this is  unsupported in OOC V2) renames variables using module &amp;quot;StripPrefix&amp;quot;  specification.&lt;br /&gt;
* '''ModuleSuffix''' — suffix for module file names (default &amp;quot;Mod&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
In this section, you can also specify the type mappings for scalar types:&lt;br /&gt;
&lt;br /&gt;
   OPTION symbol          C type                Default output type&lt;br /&gt;
   ----------------------------------------------------------------&lt;br /&gt;
   MapChar                &amp;quot;char&amp;quot;                &amp;quot;CHAR&amp;quot;&lt;br /&gt;
   MapUnsignedChar        &amp;quot;unsigned char&amp;quot;       &amp;quot;CHAR&amp;quot;&lt;br /&gt;
   MapShort               &amp;quot;short&amp;quot;               &amp;quot;INTEGER&amp;quot;&lt;br /&gt;
   MapUnsignedShort       &amp;quot;unsigned short&amp;quot;      &amp;quot;INTEGER&amp;quot;&lt;br /&gt;
   MapLong                &amp;quot;long&amp;quot;                &amp;quot;LONGINT&amp;quot;&lt;br /&gt;
   MapUnsignedLong        &amp;quot;unsigned long&amp;quot;       &amp;quot;LONGINT&amp;quot;&lt;br /&gt;
   MapLongLong            &amp;quot;long long&amp;quot;           &amp;quot;HUGEINT&amp;quot;&lt;br /&gt;
   MapUnsignedLongLong    &amp;quot;unsigned long long&amp;quot;  &amp;quot;HUGEINT&amp;quot;&lt;br /&gt;
   MapFloat               &amp;quot;float&amp;quot;               &amp;quot;REAL&amp;quot;&lt;br /&gt;
   MapDouble              &amp;quot;double&amp;quot;              &amp;quot;LONGREAL&amp;quot;&lt;br /&gt;
   MapLongDouble          &amp;quot;long double&amp;quot;         &amp;quot;LONGDOUBLE&amp;quot;&lt;br /&gt;
   MapPointer             &amp;quot;void *&amp;quot;              &amp;quot;SYSTEM.PTR&amp;quot;&lt;br /&gt;
   MapEnum                &amp;quot;enum ...&amp;quot;            &amp;quot;LONGINT&amp;quot;&lt;br /&gt;
   MapVoid                &amp;quot;void&amp;quot;                &amp;quot;C_VOID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;MODULE&amp;quot; directive controls how to treat the named module. The base  module name comes from the name of the corresponding &amp;quot;.h&amp;quot; file. Options  per module include:&lt;br /&gt;
&lt;br /&gt;
* '''OutputName''' — Output name for this module (defaults to header name)&lt;br /&gt;
* '''StripPrefix''' — list of prefixes to be removed from symbol names &lt;br /&gt;
* '''LinkLib''', '''LinkFile''', '''LinkFramework''' — specifies libraries, files and frameworks to link to this module (OOC-specific directive) &lt;br /&gt;
* '''Prolog''' — &amp;quot;C&amp;quot; definitions to be processed at the start of this module &lt;br /&gt;
* '''Epilog''' — &amp;quot;C&amp;quot; definitions to be processed at the end of this module &lt;br /&gt;
* '''Merge''' — when set to &amp;quot;1&amp;quot;, causes all files included by this module to be declared within this module, rather than in separate modules.&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;VARIANT&amp;quot; directive specifies how to translate particular symbols. As you would know, there are many ways of interpreting C declarations, and the default rules don't always work. For example:&lt;br /&gt;
 f(char * arg);&lt;br /&gt;
could be:&lt;br /&gt;
 PROCEDURE f (arg : POINTER TO ARRAY OF CHAR);&lt;br /&gt;
 PROCEDURE f (arg : ARRAY OF CHAR);&lt;br /&gt;
 PROCEDURE f (VAR arg : ARRAY OF CHAR);&lt;br /&gt;
 PROCEDURE f (VAR arg : CHAR);&lt;br /&gt;
&lt;br /&gt;
So VARIANT directives allow you to place particular interpretations on  the &amp;quot;C&amp;quot; declarations. Normally, you can see some specific patterns, but  it varies from API to API.&lt;br /&gt;
&lt;br /&gt;
The format of variants is a form of designator. The designators are composed of:&lt;br /&gt;
* '''strings''' — which match the names of globally declared objects &lt;br /&gt;
* '''[n]''' — which matches item &amp;lt;n&amp;gt; in a compound type or parameter list &lt;br /&gt;
* '''^''' — which matches the item referenced by a pointer type &lt;br /&gt;
* '''.symbol''' — which matches a named item in a type or paramter list&lt;br /&gt;
&lt;br /&gt;
Strings or symbols use OOC's regexp string format. Basically, &amp;quot;.*&amp;quot;  matches an string of characters, &amp;quot;$&amp;quot; matches the end of a string, and  &amp;quot;[]&amp;quot; matches one of a set of characters.&lt;br /&gt;
&lt;br /&gt;
===Examples:===&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;gl.*v$&amp;quot;.params : ARRAY;&lt;br /&gt;
This means any symbol (here, procedure) starting with &amp;quot;gl&amp;quot; and ending  with &amp;quot;v&amp;quot; has its &amp;quot;params&amp;quot; parameter interpreted as an array.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;gl.*Matrix[fd]$&amp;quot;[0] : ARRAY;&lt;br /&gt;
This means any symbol starting with &amp;quot;gl&amp;quot; and ending with &amp;quot;Matrixf&amp;quot; or  &amp;quot;Matrixd&amp;quot; has its first parameter interpreted as an array.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;String$&amp;quot; : CSTRING POINTER;&lt;br /&gt;
This means that the type &amp;quot;String&amp;quot; is to be interpreted as a POINTER to a  C string (in OOC, it assigns the &amp;quot;CSTRING&amp;quot; attribute to the pointer,  which means that you can use a string literal or CHAR array for this type).&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;glutInit$&amp;quot;.argcp : VAR;&lt;br /&gt;
This means that the &amp;quot;argcp&amp;quot; parameter of function &amp;quot;glutInit&amp;quot; is to be  treated as a VAR parameter.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;cvRelease[^D].*$&amp;quot;[0] : VAR;&lt;br /&gt;
This means that symbols starting &amp;quot;cvRelease&amp;quot; followed by any character  EXCEPT &amp;quot;D&amp;quot; has its first parameter interpreted as a VAR parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Complex examples ==&lt;br /&gt;
&lt;br /&gt;
[[Media:Interfaces.tar.gz]]&lt;/div&gt;</summary>
		<author><name>Bernhard</name></author>
	</entry>
	<entry>
		<id>http://wiki.blackboxframework.org/index.php?title=BlackBox_Component_Builder&amp;diff=196</id>
		<title>BlackBox Component Builder</title>
		<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=BlackBox_Component_Builder&amp;diff=196"/>
		<updated>2014-10-23T16:32:23Z</updated>

		<summary type="html">&lt;p&gt;Bernhard: Link to Insight ETHOS added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''BlackBox Component Builder''' is an integrated development environment optimized for component-based software development. It consists of development tools, a library of reusable components, a framework that simplifies the development of robust custom components and applications, and a run-time environment for components.&lt;br /&gt;
&lt;br /&gt;
In BlackBox, the development of applications and their components is done in [[Component Pascal]]. This language is a descendant of Pascal, Modula-2, and Oberon. It provides modern features such as objects, full type safety, components (in the form of modules), dynamic linking of components, and garbage collection. The entire BlackBox Component Builder is written in Component Pascal: all library components, all development tools including the Component Pascal compiler, and even the low-level run-time system with its garbage collector.&lt;br /&gt;
&lt;br /&gt;
As its name implies, BlackBox Component Builder supports blackbox abstractions and reuse as opposed to whitebox as defined in.&amp;lt;ref&amp;gt;Szyperski, Clemens. ''Component Software''. Addison Wesley, 2002, p. 40f and Chap.7 (p. 109ff)&amp;lt;/ref&amp;gt; It started 1993 as Oberon/F&amp;lt;ref&amp;gt;http://www.edm2.com/0608/oberon.html&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;D. Pountain, The Oberon/F System, ''BYTE'' 20(1), Jan. 1995.&amp;lt;/ref&amp;gt; and was renamed to BlackBox Component Builder with Release 1.3 end of the 1990s. BlackBox Component Builder went open source with Release 1.5 mid-2004.&lt;br /&gt;
&lt;br /&gt;
The design principles of the BlackBox Component Framework are based on Clemens Szyperski's research, published in his PhD thesis.&amp;lt;ref&amp;gt;Szyperski, Clemens. ''Insight ETHOS: On Object Orientation in Operating Systems''. PhD thesis: Swiss Federal Institute of Technology (ETH Zurich), Dissertation No 9884. vdf Hochschulverlag AG an der ETH Zürich, Zurich, Switzerland, ISBN 3-7281-1948-2, 1992, [http://e-collection.library.ethz.ch/eserv/eth:38713/eth-38713-02.pdf PDF in ETHZ E-Collection]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Clemens Szyperski's [https://groups.google.com/forum/#!search/Clemens$20Szyperski/comp.lang.oberon/M-y1bJwEYE8/VIiedaFfIfIJ post in c.l.o.]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
*[http://www.oberon.ch/BlackBox.html Official site]&lt;br /&gt;
*[http://userserv.reutlingen-university.de/~hug/buch/cf.htm An introductory text using BlackBox: Stan Warford - Computing Fundamentals]&lt;br /&gt;
*[http://www.zinnamturm.eu/ Tools and Utilities for BlackBox]&lt;/div&gt;</summary>
		<author><name>Bernhard</name></author>
	</entry>
	<entry>
		<id>http://wiki.blackboxframework.org/index.php?title=Center&amp;diff=192</id>
		<title>Center</title>
		<link rel="alternate" type="text/html" href="http://wiki.blackboxframework.org/index.php?title=Center&amp;diff=192"/>
		<updated>2014-09-15T11:00:34Z</updated>

		<summary type="html">&lt;p&gt;Bernhard: /* Looking beyond our noses */ typo Nicklaus -&amp;gt; Niklaus&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;BlackBox Center&amp;quot; is a non-profit voluntary organization dedicated to maintaining the vision and values of the BlackBox/Component Pascal software  developed by Oberon microsystems Inc. (Zurich Switzerland). Today the Center is the ''de facto'' standard for BlackBox developers, users, and project managers. The members spearhead projects that, through a collaborative and meritocratic development process, deliver enterprise-quality software attractive to large user communities. We operate under [http://opensource.org/licenses/BSD-2-Clause BSD 2-clause license] to deploy products for business and individuals.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Mission==&lt;br /&gt;
&lt;br /&gt;
To provide software for the public good, based on the [[Oberon Spirit]]. We do this by keeping alive, adapting, and developing [[Component Pascal]], [[BlackBox Framework]] and [[BlackBox Component Builder]] starting with the [http://www.oberon.ch/blackbox.html last official release (v 1.6)] provided by [[Oberon microsystems AG]] (the &amp;quot;software&amp;quot;) and growing and maintaining an international user community.&lt;br /&gt;
&lt;br /&gt;
''The Blackbox Center provides and ensures guidelines and policies to keep the community centered around the mission described above. We are not the sole developers of the software, nor the only providers of the software, but we provide a clearing house to centralize efforts.''&lt;br /&gt;
&lt;br /&gt;
==Values==&lt;br /&gt;
As a community we strive to:&lt;br /&gt;
* cooperate for the common good;&lt;br /&gt;
* make things as simple as possible but not simpler;&lt;br /&gt;
* use the idea of component building and let everybody add what they are good at to form something more than the sum of the parts;&lt;br /&gt;
* work democratically and meritocratically;&lt;br /&gt;
* be good citizens.&lt;br /&gt;
&lt;br /&gt;
==How is the BlackBox Center and its projects governed?==&lt;br /&gt;
&lt;br /&gt;
Members decide issues by vote, with 80% constituting a quorum. Every vote has the option &amp;quot;none of the above&amp;quot;. Such a vote is counted for the quorum, but it does not take a side.&lt;br /&gt;
&lt;br /&gt;
Votes are called by the [[Chair]] only (who is elected by vote on a yearly basis), whose responsibility it is:&lt;br /&gt;
&lt;br /&gt;
* to start a voting thread after sufficient prior discussion;&lt;br /&gt;
* to make sure that each member is informed about pending votes (at least about important questions);&lt;br /&gt;
* to make sure that each member voted (Robert: &amp;quot;But only 80% need to vote&amp;quot;);&lt;br /&gt;
* to close the voting thread.&lt;br /&gt;
&lt;br /&gt;
New members can be added by vote.&lt;br /&gt;
&lt;br /&gt;
Members can apply for leaving the Center and stay in touch in the special board group 'exCenter' with posting privileges and without voting rights.&lt;br /&gt;
&lt;br /&gt;
Contributions to the software come from the wider community, and the Center members decide what to add, and when, in compliance with our mission, our vision and our values.&lt;br /&gt;
&lt;br /&gt;
==Visions of development for the software==&lt;br /&gt;
&lt;br /&gt;
The following sections illustrate possible projects and priorities for the future of BlackBox. These visions will mature and evolve in the light of experience and input from the wider user community.&lt;br /&gt;
&lt;br /&gt;
===Keeping alive===&lt;br /&gt;
&lt;br /&gt;
* All parts of the software are documented both in source and in an overview document (no &amp;quot;this module is internal&amp;quot; documentations!)&lt;br /&gt;
* All OS function calls are checked regularly and if necessary changed so that the software does not use deprecated functions.&lt;br /&gt;
* Known bugs are fixed&lt;br /&gt;
* There are regular &amp;quot;working releases&amp;quot; and once a year or so there are &amp;quot;major releases&amp;quot;, to make sure that the user can rely on the stability of the software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Adapting===&lt;br /&gt;
BlackBox is now 10 years old, and the world has changed. We need to adapt.&lt;br /&gt;
&lt;br /&gt;
* Providing a 64-bit version of the software&lt;br /&gt;
* Adapting to the changed native look and feel of the OS&lt;br /&gt;
* Internationalization of user documentation and user interface&lt;br /&gt;
* Implementation of additional GUI elements provided by the OS as part of the standard distribution&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Developing===&lt;br /&gt;
Source-Code compatible versions with local look-and-feel for&lt;br /&gt;
* Mac OS&lt;br /&gt;
* Linux&lt;br /&gt;
* JVM&lt;br /&gt;
* Dalvik VM&lt;br /&gt;
* .NET&lt;br /&gt;
* Raspbian…&lt;br /&gt;
&lt;br /&gt;
==Looking beyond our noses==&lt;br /&gt;
&lt;br /&gt;
* When Niklaus Wirth designed the Oberon System, he discouraged multi-tasking on single processor systems, because it only adds complexity (i.e. it is against the values). Over 20 years later, most of our systems are multi-processor systems. Is the current handling of “Actions” still the best practice, or should be implement – in the spirit of Oberon – multi-threading, and if so, how? For instance, we are faced with the problem that the run time system freezes when you keep a mouse key pressed. Is this really necessary, and how can we solve this in the Oberon Spirit?&lt;br /&gt;
&lt;br /&gt;
* Are there new paradigms of user interaction in software development that we could (and probably should) integrate, such as MS IntelliSense? Is it inherently against the Oberon Spirit, or are there ways to provide similar functionality in keeping the Spirit?&lt;br /&gt;
&lt;br /&gt;
==Center tasks==&lt;br /&gt;
&lt;br /&gt;
* to make first version with all known bug fixes&lt;br /&gt;
* to maintain stable versions of [[BlackBox Component Builder]]&lt;br /&gt;
* provide it's distribution and promotion.&lt;br /&gt;
&lt;br /&gt;
To maintain means:&lt;br /&gt;
* regularly (period?) publish new versions of the BlackBox Component Builder;&lt;br /&gt;
* support the international BlackBox open-source community;&lt;br /&gt;
* adapt the BlackBox Component Builder to modern challenges.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://blackboxframework.org/ Main website]&lt;br /&gt;
* [http://forum.blackboxframework.org Center Forum]&lt;br /&gt;
* [http://github.com/BlackBoxCenter Public repository and issues tracker]&lt;br /&gt;
* [http://redmine.blackboxframework.org/projects/blackbox-component-builder Center project tracker]&lt;/div&gt;</summary>
		<author><name>Bernhard</name></author>
	</entry>
</feed>