mirror of
https://github.com/tailix/libkernaux.git
synced 2024-10-30 11:54:01 -04:00
40 lines
695 B
C
40 lines
695 B
C
#ifndef KERNAUX_INCLUDED_CMDLINE
|
|
#define KERNAUX_INCLUDED_CMDLINE
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <kernaux/generic/file.h>
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
|
|
#define KERNAUX_CMDLINE_ERROR_MSG_SIZE_MAX 256
|
|
#define KERNAUX_CMDLINE_ERROR_MSG_SLEN_MAX \
|
|
(KERNAUX_CMDLINE_ERROR_MSG_SIZE_MAX - 1)
|
|
|
|
bool kernaux_cmdline(
|
|
const char *cmdline,
|
|
char *error_msg,
|
|
size_t *argc,
|
|
char **argv,
|
|
char *buffer,
|
|
size_t arg_count_max,
|
|
size_t buffer_size
|
|
);
|
|
|
|
bool kernaux_cmdline_file(
|
|
const char *cmdline,
|
|
char *error_msg,
|
|
size_t *argc,
|
|
KernAux_File file,
|
|
size_t *arg_idxs,
|
|
size_t arg_count_max
|
|
);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|