libscomp/exec.h

20 lines
318 B
C

#pragma once
#include "input.h"
enum libscomm_cmd_r {
LIBSCOMM_NOT_FOUND = -1,
LIBSCOMM_CMD_OK = 0
};
struct libscomm_cmd {
const char *name;
int (*exec)(struct libscomm_line *);
};
struct libscomm_cmd_store {
struct libscomm_cmd *arr;
size_t len;
};
#define libscomm_mkcmds(l) {l, sizeof(l) / sizeof(l[0])}