The Boron programmer interface. More...
#include "urlan.h"Go to the source code of this file.
Defines | |
| #define | CFUNC(name) static int name( UThread* ut, UCell* a1, UCell* res ) |
| Macro to define C functions. | |
| #define | CFUNC_OPTIONS a1[-1].series.end |
| Macro to get uint32_t option flags from inside a C function. | |
Functions | |
| UThread * | boron_makeEnv (UDatatype **dtTable, unsigned int dtCount) |
| Make Boron environment and initial thread. | |
| void | boron_freeEnv (UThread *) |
| Destroy Boron environment. | |
| void | boron_addCFunc (UThread *, int(*func)(UThread *, UCell *, UCell *), const char *sig) |
| Add C function to the thread context. | |
| void | boron_addPortDevice (UThread *, UPortDevice *, UAtom name) |
| Register port device. | |
| int | boron_requestAccess (UThread *, const char *msg,...) |
| Request user permission to access a resource. | |
| void | boron_bindDefault (UThread *, UIndex blkN) |
| Bind block in thread dataStore to default contexts. | |
| int | boron_doBlock (UThread *, const UCell *blkC, UCell *res) |
| Evaluate block and get result. | |
| int | boron_doBlockN (UThread *, UIndex blkN, UCell *res) |
| Evaluate block and get result. | |
| int | boron_doCStr (UThread *, const char *cmd, int len) |
| Evaluate C string. | |
| UCell * | boron_result (UThread *) |
| Get result of last boron_doCStr() call. | |
| UCell * | boron_exception (UThread *) |
| Get most recent exception. | |
| void | boron_reset (UThread *) |
| Reset thread after exception. | |
| int | boron_throwWord (UThread *, UAtom atom) |
| Append word cell to ur_errorBlock(). | |
| char * | boron_cstr (UThread *, const UCell *strC, UBuffer *bin) |
| Make null terminated UTF-8 string in binary buffer. | |
| char * | boron_cpath (UThread *, const UCell *strC, UBuffer *bin) |
| Make null terminated UTF-8 string in binary buffer. | |
The Boron programmer interface.
Macro to define C functions.
If the function takes multiple arguments, just index off of a1. For instance, the third argument is (a1+2).
| ut | The ubiquitous thread pointer. |
| a1 | Pointer to argument cells. |
| res | Pointer to result cell. |
| #define CFUNC_OPTIONS a1[-1].series.end |
Macro to get uint32_t option flags from inside a C function.
Only use this if options were declared in the boron_addCFunc() sig.
| void boron_addPortDevice | ( | UThread * | ut, |
| UPortDevice * | dev, | ||
| UAtom | name | ||
| ) |
Register port device.
A single device may be added multiple times with different names.
| dev | Pointer to UPortDevice. |
| name | Name of device. |