-#undef I3__FILE__
-#define I3__FILE__ "commands_parser.c"
/*
* vim:ts=4:sw=4:expandtab
*
* instead of actually calling any function).
*
*/
+#include "all.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
-#include "all.h"
-
// Macros to make the YAJL API a bit easier to use.
#define y(x, ...) (command_output.json_gen != NULL ? yajl_gen_##x(command_output.json_gen, ##__VA_ARGS__) : 0)
#define ystr(str) (command_output.json_gen != NULL ? yajl_gen_string(command_output.json_gen, (unsigned char *)str, strlen(str)) : 0)
exit(1);
}
-// XXX: ideally, this would be const char. need to check if that works with all
-// called functions.
// TODO move to a common util
-static char *get_string(const char *identifier) {
+static const char *get_string(const char *identifier) {
for (int c = 0; c < 10; c++) {
if (stack[c].identifier == NULL)
break;