43 NSLOG(netsurf, INFO,
"Unable to allocate handler");
81 argv = malloc(
sizeof *argv);
88 for (p = r =
buffer; *p !=
'\0'; p++) {
90 nargv = realloc(argv,
sizeof(*argv) * (argc + 1));
99 argv[argc++] = r = p + 1;
105 if (strcmp(argv[0], handler->cmd) == 0) {
static osspriteop_area * buffer
The buffer characteristics.
static monkey_cmdhandler_t * handler_ring
void monkey_process_command(void)
nserror monkey_register_handler(const char *cmd, handle_command_fn fn)
void monkey_free_handlers(void)
struct cmdhandler monkey_cmdhandler_t
void(* handle_command_fn)(int argc, char **argv)
nserror
Enumeration of error codes.
@ NSERROR_NOMEM
Memory exhaustion.
#define NSLOG(catname, level, logmsg, args...)
#define RING_ITERATE_STOP(ring, iteratorptr)
#define RING_REMOVE(ring, element)
Remove the given element from the specified ring.
#define RING_INSERT(ring, element)
Insert the given item into the specified ring.
#define RING_ITERATE_END(ring, iteratorptr)
#define RING_ITERATE_START(ringtype, ring, iteratorptr)
Interface to utility string handling.
struct cmdhandler * r_next
struct cmdhandler * r_prev
Interface to a number of general purpose functionality.