X-Git-Url: https://git.dlugolecki.net.pl/?p=vlp.git;a=blobdiff_plain;f=src%2Fint%2Fcint.c;fp=src%2Fint%2Fcint.c;h=e67e8b6c10d86ee6fc4df0c261a5551893a2f59f;hp=ce16846e08f5a6ca442829709d136b2b54c1b3ce;hb=92bd051b4d3877757e094b572e11ff2dda333d38;hpb=fdd7cc36378cfdd1692885c39f0e8ccd3ea09c1d diff --git a/src/int/cint.c b/src/int/cint.c index ce16846..e67e8b6 100644 --- a/src/int/cint.c +++ b/src/int/cint.c @@ -1,5 +1,3 @@ - - #include "depend.h" #include "genint.h" #include "int.h" @@ -25,7 +23,10 @@ static void initiate(); int main(); #endif - +/** + * @file + * @brief Compiler and interpreter code + */ int internal_sock, graph_sock, net_sock, connected = 0; struct sockaddr_un svr; @@ -154,6 +155,12 @@ static void load(char *_filename) /** * 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) { @@ -249,7 +256,7 @@ static void initiate(int argc, char **argv) /** * */ -void decode(){ +void decode() { extopcode *eop; /* pointer to extended opcode in M */ @@ -295,6 +302,7 @@ int read_from_graph(G_MESSAGE *msg) /** * Reads message from net module. + * * @param msg Message to read. */ int read_from_net(MESSAGE *msg) @@ -315,7 +323,7 @@ int read_from_net(MESSAGE *msg) } -/** +/** * Gets graphic resource number */ int get_graph_res() @@ -378,6 +386,9 @@ void writeln_str(char *s) /** * 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) @@ -392,6 +403,9 @@ 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) @@ -728,7 +742,9 @@ void request_id() send_to_graph(&m1); } - +/** + * Sends MESSAGE + */ void send_ready() { int sock, len; @@ -771,12 +787,12 @@ void send_ready() * 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) {