From a1b6d715e870a25a666f17365c82a040e75cd0dd Mon Sep 17 00:00:00 2001 From: ALittlePatate Date: Sat, 20 Jan 2024 18:10:00 +0100 Subject: [PATCH] add: documented pasm_run_script function --- include/pasm.h | 5 +++++ src/pasm.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/include/pasm.h b/include/pasm.h index f5a51ea..e234cc1 100644 --- a/include/pasm.h +++ b/include/pasm.h @@ -2,4 +2,9 @@ #include #include +/* filename: path of the pasm script, will use file argument if NULL */ +/* file: char** containing the lines of a pasm script, will be used if filename is NULL */ +/* lines: number of lines in the file argument, will be used if filename is NULL */ +/* _fstream: file descriptor for the output (can be a socket), default: stderr */ +/* return value: nonzero if an error occurred */ int pasm_run_script(const char *filename, char **file, size_t lines, int _fstream); diff --git a/src/pasm.c b/src/pasm.c index 632cc48..0964a2a 100644 --- a/src/pasm.c +++ b/src/pasm.c @@ -66,6 +66,11 @@ int check_errors(char *line) { return 0; } +/* filename: path of the pasm script, will use file argument if NULL */ +/* file: char** containing the lines of a pasm script, will be used if filename is NULL */ +/* lines: number of lines in the file argument, will be used if filename is NULL */ +/* _fstream: file descriptor for the output (can be a socket), default: stderr */ +/* return value: nonzero if an error occurred */ int pasm_run_script(const char *filename, char **file, size_t lines, int _fstream) { fstream = _fstream;