#include <stdint.h>
#include <stddef.h>
#include <ulib.h>

#define CMDS(X)                 \
  X(rr)                         \

void main(void) {
  if (argslen() == 0) {
    return;
  }

  char *cmd = args()[0];

  #define X(name) if (string_strcmp(cmd, #name) == 0) { \
    extern void rc_ ## name(void); \
    rc_ ## name(); \
    return; \
  }
  CMDS(X)
  #undef X

  uprintf("rc: unknown command %s\n", cmd);
}
