Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion include/slash/slash.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
#include <termios.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

/* Configuration */
#define SLASH_SHOW_MAX 25 /* Maximum number of commands to list */
#define SLASH_ARG_MAX 16 /* Maximum number of arguments, including command name */
Expand All @@ -46,12 +50,12 @@
__attribute__((section(".slash." # _ident), used, aligned(sizeof(long)))) \
struct slash_command _ident = { \
.name = #_name, \
.parent = _group, \
.func = _func, \
.args = _args, \
.help = _help, \
.flags = _flags, \
.context = _context, \
.parent = _group, \
}

/* Top-level commands */
Expand Down Expand Up @@ -512,4 +516,8 @@ void slash_inhibit_exit(struct slash *slash, bool inhibit);
*/
void slash_set_privileged(struct slash *slash, bool privileged);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* _SLASH_H_ */
Loading