#include "ui/dialogs/FindDialog.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
namespace dialog {
#include "ui/dialogs/PreferencesDialog.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
namespace dialog {
#include "ui/dialogs/ProgramStructureDialog.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
namespace dialog {
#include "ui/dialogs/UnitStructureDialog.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
namespace dialog {
#include "ui/editor.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
-/* Communication structures */
+/**
+ * @file
+ * @brief Communication structures
+ */
#ifndef LOGLAN_COMM_H
#define LOGLAN_COMM_H
} paddr;
typedef struct {
- paddr sender; /* address of the sender and */
- paddr receiver; /* receiver of the message */
- int type; /* message type */
- int par; /* prototype or error signal number */
+ paddr sender; /** address of the sender and */
+ paddr receiver; /** receiver of the message */
+ int type; /** message type */
+ int par; /** prototype or error signal number */
} ctrl_msg;
typedef struct {
int program_id;
} ctx_struct;
-/* Commm struct for GRAPH element */
-
+/**
+ * \defgroup GRAPH
+ * \brief Comm struct for GRAPH element
+ */
+/** @{ */
#define GRAPH_ALLOCATE 1
#define GRAPH_EXIT 2
#define GRAPH_FREE 3
#define GRAPH_MAGIC 37
#define GRAPH_MAGIC_RESPONSE 38
+/** @} */
-/* INT element */
-
+/**
+ * \defgroup INT
+ * \brief Comm struct for INT element
+ */
+/** @{ */
#define INT_CONNECTED 1
#define INT_EXITING 2
#define INT_CTX 3
#define INT_CLOSE_INSTANCE 8
#define INT_KILL 9
#define INT_START_OK 10
+/** @} */
-
-
-/* NET element */
-
+/**
+ * \defgroup NET
+ * \brief Comm struct for NET element
+ */
+/** @{ */
#define NET_PROPAGATE 0
#define NET_PROPAGATE_OUT 1
/*
#define NET_INFO_END 25
#define NET_NODES_NUM 26
#define NET_NODES_NUM_RESPONSE 27
+/** @} */
-/* VLP message */
-
+/**
+ * \defgroup VLP
+ * \brief VLP message
+ */
+/** @{ */
#define VLP_WRITE 0
#define VLP_REMOTE_INSTANCE 1
#define VLP_REMOTE_INSTANCE_OK 2
#define VLP_REMOTE_INSTANCE_HERE 5
#define VLP_CLOSE_INSTANCE 6
#define VLP_INTERPRETER_DOWN 7
-/* ------------------------------------------------------------ */
-/* Message structure */
-/*------------------------------------------------------------*/
+/** @} */
+/**
+ * \defgroup VLP
+ * \brief Message structure
+ */
+/** @{ */
#define MSG_VLP 0
#define MSG_NET 1
#define MSG_GRAPH 2
} G_MESSAGE;
#define TCP_BUFFER_SIZE 30*sizeof(MESSAGE);
+/** @} */
#endif /* LOGLAN_COMM_H */
#ifndef __GENINT_H
#define __GENINT_H
+/**
+ * @file
+ */
+
#if GEN
#define word address
#endif
-
-
#include "depend.h"
#include "genint.h"
#include "int.h"
int main();
#endif
-
+/**
+ * @file
+ * @brief Compiler and interpreter code
+ */
int internal_sock, graph_sock, net_sock, connected = 0;
struct sockaddr_un svr;
/**
* Establishes configuration parameters
* Creates two sockets for program run
+ *
+ * @param argc number of passed values in argv array
+ * @param argv[1]
+ * @param argv[2]
+ * @param argv[3] if value is equal to: "r", sets global #remote variable to
+ * TRUE, FALSE otherwise
*/
static void initiate(int argc, char **argv)
{
/**
*
*/
-void decode(){
+void decode() {
extopcode *eop;
/* pointer to extended opcode in M */
/**
* Reads message from net module.
+ *
* @param msg Message to read.
*/
int read_from_net(MESSAGE *msg)
}
-/**
+/**
* Gets graphic resource number
*/
int get_graph_res()
/**
* Writes string
+ *
+ * Passed string is send to graph module by G_MESSAGE packet using send_to_graph
+ *
* @param s String to write
*/
void write_str(char *s)
/**
* Writes char
+ *
+ * Passed char is send to graph module by G_MESSAGE packet using send_to_graph
+ *
* @param a Character to write
*/
void write_char(char a)
send_to_graph(&m1);
}
-
+/**
+ * Sends MESSAGE
+ */
void send_ready()
{
int sock, len;
* strcpy(filename, argv[2]);
* strcpy(ProgName, argv[2]);
*
- * argv[1] = base name of this interpreter instance.
+ * @param argv[1] = base name of this interpreter instance.
* For network there is created argv[1].net socket
* For graphics there is created argv[1].gr socket
- * argv[2] = up to 80 characters string (with terminating \0). It is used to
+ * @param argv[2] = up to 80 characters string (with terminating \0). It is used to
* load selected program
- * argv[3] = if exists and is equal to 'r', this is a remote call
+ * @param argv[3] = if exists and is equal to 'r', this is a remote call
*/
int main(int argc, char **argv)
{
#include <assert.h>
+/**
+ * @file
+ */
-/* Execute one L-code instruction */
-
-
+/** Execute one L-code instruction */
void execute()
{
word t1, t2;
#include "genint1.h"
-
+/**
+ * @file
+ */
/* Variables : */
extern protdescr *prototype[];
#include "process.h"
#include "intproto.h"
+/**
+ * @file
+ */
+
/**
* \defgroup Variables common with generator :
* @{
word a1, a2, a3;
/**
- * \defgroup kernel variables for the running system:
+ * \defgroup kernel
+ * \brief variables for the running system
*/
-/**@{*/
+/** @{ */
/**
* code and data memory size
*/
**/
word mnoff;
-/**@}*/
+/** @} */
/**
* default: no compactification message
#include "intproto.h"
/**
- * @file Memory management routines
+ * @file
+ * @brief Memory management routines
*/
#ifndef NO_PROTOTYPES
#include "nonstand.h"
-/* Call (non)standard procedures.
- * Almost totaly implementation dependent.
+/**
+ * @file
+ * @brief Call (non)standard procedures.
+ * @brief Almost totaly implementation dependent.
*/
/** TRUE if graphics mode active */
-/* Standard class IIUWGRAPH graphics primitives
-
-GRON:procedure(mode:integer)
-GROFF:procedure
-CLS:procedure
-POINT:procedure(x, y:integer)
-MOVE:procedure(x, y:integer)
-DRAW:procedure(x, y:integer)
-HFILL:procedure(x:integer)
-VFILL:procedure(y:integer)
-COLOR:procedure(color:integer)
-STYLE:procedure(style:integer)
-PATERN:procedure(p1, p2, p3, p4:integer)
-INTENS:procedure(intens:integer)
-PALLET:procedure(p:integer)
-BORDER:procedure(b:integer)
-VIDEO:procedure(buffer:arrayof integer)
-HPAGE:procedure(p, q, r:integer)
-NOCARD:function:integer
-PUSHXY:procedure
-POPXY:procedure
-INXPOS:function:integer
-INYPOS:function:integer
-INPIX:function(x, y:integer):integer
-GETMAP:function(x, y:integer):arrayof integer
-PUTMAP:procedure(arrayof integer)
-ORMAP:procedure(arrayof integer)
-XORMAP:procedure(arrayof integer)
-TRACK:procedure(x, y:integer)
-INKEY:function:integer
-HASCII:procedure(ch:integer)
-HFONT:procedure(off, seg:integer)
-HFONT8:procedure(output off, seg:integer)
-OUTSTRING:procedure(s:string)
-CIRB:procedure(x, y, r:integer, alpha, beta:real, b, i, p, q:integer)
-
-*/
-
+/**
+ * @file
+ */
+/**
+ * @defgroup IIUWGRAPH
+ * @brief Standard class IIUWGRAPH graphics primitives
+ */
+/** @{ */
+/** GRON:procedure(mode:integer) */
#define GRON 100
+
+/** GROFF:procedure */
#define GROFF 101
+
+/** CLS:procedure */
#define CLS 102
+
+/** POINT:procedure(x, y:integer) */
#define POINT 103
+
+/** MOVE:procedure(x, y:integer) */
#define MOVE 104
+
+/** DRAW:procedure(x, y:integer) */
#define DRAW 105
+
+/** HFILL:procedure(x:integer) */
#define HFILL 106
+
+/** VFILL:procedure(y:integer) */
#define VFILL 107
+
+/** COLOR:procedure(color:integer) */
#define COLOR 108
+
+/** STYLE:procedure(style:integer) */
#define STYLE 109
+
+/** PATERN:procedure(p1, p2, p3, p4:integer) */
#define PATERN 110
+
+/** INTENS:procedure(intens:integer) */
#define INTENS 111
+
+/** PALLET:procedure(p:integer) */
#define PALLET 112
+
+/** BORDER:procedure(b:integer) */
#define BORDER 113
+
+/** VIDEO:procedure(buffer:arrayof integer) */
#define VIDEO 114
+
+/** HPAGE:procedure(p, q, r:integer) */
#define HPAGE 115
+
+/** NOCARD:function:integer */
#define NOCARD 116
+
+/** PUSHXY:procedure */
#define PUSHXY 117
+
+/** POPXY:procedure */
#define POPHXY 118
+
+/** INXPOS:function:integer */
#define INXPOS 119
+
+/** INYPOS:function:integer */
#define INYPOS 120
+
+/** INPIX:function(x, y:integer):integer */
#define INPIX 121
+
+/** GETMAP:function(x, y:integer):arrayof integer */
#define GETMAP 122
+
+/** PUTMAP:procedure(arrayof integer) */
#define PUTMAP 123
+
+/** ORMAP:procedure(arrayof integer) */
#define ORMAP 124
+
+/** XORMAP:procedure(arrayof integer) */
#define XORMAP 125
+
+/** TRACK:procedure(x, y:integer) */
#define TRACK 126
+
+/** INKEY:function:integer */
#define INKEY 127
-#define HASCII 128
-#define HFONT 129
-#define HFONT8 130
-#define OUTSTRING 131
-#define CIRB 132
+/** HASCII:procedure(ch:integer) */
+#define HASCII 128
-/* Standard class MOUSE mouse support
+/** HFONT:procedure(off, seg:integer) */
+#define HFONT 129
-INIT:function(output butttons:integer):boolean
-SHOWCURSOR:procedure
-HIDECURSOR:procedure
-STATUS:procedure(output x,y:integer, l,r,c:boolean)
-SETPOSITION:procedure(x, y:integer)
-GETPRESS:procedure(b:integer; output x,y,p:integer, l, r, c:boolean)
-GETRELEASE:procedure(b:integer; output x,y,p:integer, l, r, c:boolean)
-SETWINDOW:procedure(l, r, t, b:integer)
-DEFCURSOR:procedure(select, p, q:integer)
-GETMOVEMENT:procedure(output x, y:integer)
-SETSPEED:procedure(x, y:integer)
-SETMARGINS:procedure(l, r, t, b:integer)
-SETTHRESHOLD:procedure(t:integer)
+/** HFONT8:procedure(output off, seg:integer) */
+#define HFONT8 130
-*/
+/** OUTSTRING:procedure(s:string) */
+#define OUTSTRING 131
+/** CIRB:procedure(x, y, r:integer, alpha, beta:real, b, i, p, q:integer) */
+#define CIRB 132
+/** @} */
+/**
+ * @defgroup MOUSE
+ * @brief Standard class MOUSE mouse support
+ */
+/** @{ */
+/** INIT:function(output butttons:integer):boolean */
#define INIT 200
+
+/** SHOWCURSOR:procedure */
#define SHOWCURSOR 201
+
+/** HIDECURSOR:procedure */
#define HIDECURSOR 202
+
+/** STATUS:procedure(output x,y:integer, l,r,c:boolean) */
#define STATUS 203
+
+/** SETPOSITION:procedure(x, y:integer) */
#define SETPOSITION 204
+
+/** GETPRESS:procedure(b:integer; output x,y,p:integer, l, r, c:boolean) */
#define GETPRESS 205
+
+/** GETRELEASE:procedure(b:integer; output x,y,p:integer, l, r, c:boolean) */
#define GETRELEASE 206
+
+/** SETWINDOW:procedure(l, r, t, b:integer) */
#define SETWINDOW 207
+
+/** DEFCURSOR:procedure(select, p, q:integer) */
#define DEFCURSOR 210
+
+/** GETMOVEMENT:procedure(output x, y:integer) */
#define GETMOVEMENT 211
+
+/** SETSPEED:procedure(x, y:integer) */
#define SETSPEED 215
+
+/** SETMARGINS:procedure(l, r, t, b:integer) */
#define SETMARGINS 216
+
+/** SETTHRESHOLD:procedure(t:integer) */
#define SETTHRESHOLD 219
+/** @} */
#include "process.h"
#include "intproto.h"
-/* object management routines */
+
+/**
+ * @file
+ * @brief object management routines
+ */
/**
* Open new field for a record.
#define staddr(node, pix) ((word) ((pix << 8) | node))
-/*
- These are converters from global to process pointers in memory
- to global process pointers in message.
- M denotes memory in which pair (pointer,object) exists or has to exist.
- We want to create object denoting remote process instead of
- dummy pointer without object.
- The object will be like an arrayof integer of size 2.
- arr[1..3] : arr[1]=node, arr[2]=pix.
-*/
+/**
+ * @file
+ * These are converters from global to process pointers in memory
+ * to global process pointers in message.
+ * M denotes memory in which pair (pointer,object) exists or has to exist.
+ * We want to create object denoting remote process instead of
+ * dummy pointer without object.
+ * The object will be like an arrayof integer of size 2.
+ * arr[1..3] : arr[1]=node, arr[2]=pix.
+ */
void obj2mess(word *M, virtaddr *obj, procaddr *mess)
{
#include <assert.h>
-/* Process management */
+/**
+ * @file
+ * @brief Process management
+ */
/** process descriptor table */
procdescr process[MAXPROCESS];
#include "queue.h"
-/* Process management definitions : */
-/* maximum number of processes on one node */
+/**
+ * @defgroup
+ * @brief Process management definitions
+ */
+/** @{ */
+
+/** maximum number of processes on one node */
#define MAXPROCESS 64
-/* maximum number of waiting messages */
+
+/** maximum number of waiting messages */
#define MAXMSGQUEUE 16
-/* message length defined by me (PS) */
+/** message length defined by me (PS) */
#define MSGLENGTH 256
+/** @} */
-
-/* Process state : */
-
+/**
+ * @defgroup
+ * @brief Process states
+ */
+/** @{ */
/* during generation of process object */
#define GENERATING 0
-/* non-active process (suspended by STOP) */
+
+/** non-active process (suspended by STOP) */
#define STOPPED 1
-/* active process (ready to execute) */
+
+/** active process (ready to execute) */
#define EXECUTING 2
-/* waiting for NEW of another process */
+
+/** waiting for NEW of another process */
#define WAITFORNEW 3
-/* waiting for remote procedure call */
+
+/** waiting for remote procedure call */
#define WAITFORRPC 4
-/* during execution of ACCEPT statement */
+
+/** during execution of ACCEPT statement */
#define ACCEPTING 5
-/* waiting for process prototype */
-#define WAITASKPRO 6
-/* Process descriptor : */
+/** waiting for process prototype */
+#define WAITASKPRO 6
+/** @} */
+/** Process descriptor */
typedef struct
{
/* TRUE if in use by some process */
#include "intproto.h"
+/**
+ * @file
+ */
/* Queue management */
/* Single linked circular lists with queue represented as pointer to rear */
#include "process.h"
#include "intproto.h"
+/**
+ * @file
+ */
#ifndef NO_PROTOTYPES
static bool isenabled(word,word);
#include "process.h"
#include "intproto.h"
+/**
+ * @file
+ */
+
/**
* Initialize memory structures for objects, main object and a few goodies more.
*/
#include <math.h>
#include <time.h>
-/* Call standard procedure */
+/**
+ * @file
+ * @brief Call standard procedure
+ */
-/* Process call to a standard proc. */
+/** Process call to a standard proc. */
void standard(word nrproc)
{
word t1, t2, t3, t5, t6;
#include "process.h"
#include "intproto.h"
-/* Type checking routines */
-
-
-/* Determine if prot occurs in the prefix sequence of object am
+/**
+ * @defgroup
+ * @brief Type checking routines
*/
#ifndef NO_PROTOTYPES
static bool typef();
#endif
-
+/** Determine if prot occurs in the prefix sequence of object am */
static bool pref(word am, word prot)
{
word t1, t2;
return FALSE;
}
-/* Validate qualification of object */
+/** Validate qualification of object */
void qua(virtaddr *virt, word tp)
{
if (virt->mark != M[virt->addr + 1])
errsignal(RTEINCQA);
}
-/* Determine if A in B */
+/** Determine if A in B */
bool inl(virtaddr *virt, word tp)
{
/* none is in everything */
return pref(M[virt->addr], M[tp + 1]);
}
-/* Determine if A is B */
+/** Determine if A is B */
bool is(virtaddr *virt, word tp)
{
if (virt->mark != M[virt->addr + 1] || M[tp] != CLASSTYPE)
#include <time.h>
-/* Utility routines */
+/**
+ * @file
+ * @brief Utility routines
+ */
/**
* Compute entier (floor)
static int ranpat1 = 7, ranpat2 = 503, ranpat3 = 15661;
/**
- * Initialize generator
+ * Initializes random number generator
*/
void ranset()
{
}
/**
- * Produce next pseudo random number
+ * Produces next pseudo random number
+ *
+ * @see ranset must be invoked before running this function
*/
double prandom()
{
/**
* Copy a block of memory
+ *
+ * @param from[in] source block to copy from
+ * @param to[out] destination block to copy to
+ * @param len number of character to copy
*/
void moveblock(char *from, char *to, word len)
{
#include "ui/dialogs/ConnectDialog.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
namespace dialog {
#include "ui/dialogs/KillDialog.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
namespace dialog {
#include "ui/dialogs/LockDialog.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
namespace dialog {
#include "ui/dialogs/MessageDialog.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
namespace dialog {
#include "ui/dialogs/OptionsDialog.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
namespace dialog {
#define WARN_COL 1
#define NORM_COL 2
+/**
+ * @file
+ */
namespace loglan {
namespace vlp {
#include "ui/dialogs/AddNodeDialog.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
namespace dialog {
#include "ui/dialogs/NodeListDialog.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {
namespace dialog {
#include "ui/VLPConfigWindow.h"
+/**
+ * @file
+ */
+
namespace loglan {
namespace vlp {