diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-07-13 15:59:30 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-13 15:59:30 +0200 |
commit | ae0520e57267dbd866fc8cd25f66f4e6af2ac118 (patch) | |
tree | 22788688f1b588c3ad00c1ce3fe13da68b3a9382 /src/program.h | |
parent | a1ca82847eb356c6b85ada2ac11f38d98f6e085e (diff) |
Move c files into src directory
Diffstat (limited to 'src/program.h')
-rw-r--r-- | src/program.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/program.h b/src/program.h new file mode 100644 index 0000000..265dfa5 --- /dev/null +++ b/src/program.h @@ -0,0 +1,15 @@ +#ifndef PROGRAM_H +#define PROGRAM_H + +/* Return 0 if you want to continue reading. @data is null-terminated */ +typedef int (*ProgramOutputCallback)(char *data, int size, void *userdata); + +int program_buffer_write_callback(char *data, int size, void *userdata); + +/* + @args need to have at least 2 arguments. The first which is the program name + and the last which is NULL, which indicates end of args +*/ +int program_exec(const char **args, ProgramOutputCallback output_callback, void *userdata); + +#endif |