1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2026-08-15 11:00:07 -04:00

Add dummy command line parser

This commit is contained in:
Alex Kotov 2020-12-02 01:22:38 +05:00
parent 761fb821d8
commit 5ad5a1300b
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
3 changed files with 68 additions and 0 deletions

View file

@ -1,10 +1,26 @@
#ifndef KERNAUX_INCLUDED_CMDLINE
#define KERNAUX_INCLUDED_CMDLINE 1
#include <kernaux/stdlib.h>
#define KERNAUX_CMDLINE_ERROR_MSG_SIZE_MAX 256
#define KERNAUX_CMDLINE_ERROR_MSG_SLEN_MAX \
(KERNAUX_CMDLINE_ERROR_MSG_SIZE_MAX - 1)
#ifdef __cplusplus
extern "C" {
#endif
kernaux_bool kernaux_cmdline_parse(
const char *cmdline,
char *error_msg,
unsigned int *argc,
char **argv,
char *buffer,
unsigned int argv_count_max,
unsigned int arg_size_max
);
#ifdef __cplusplus
}
#endif