scommands.h

TinyMAZE/src/hdrs/scommands.h · 1.2 KB

From the archive TinyMAZEv2.5a.tar.gz

Download the archive   « Back to the archive contents

#ifndef SCOMMANDS_H
#define SCOMMANDS_H

#define NOARGS 0x0
#define ARG1   0x1
#define ARG2   0x2
#define PURE1  0x4
#define PURE2  0x8

struct softcode_command_struct
{
  char *name;
  void (*func)();
  unsigned long int flags;
};

struct softcode_command_struct softcode_command_set[] =
{
  {"print",         &sc_do_print,                  ARG1|ARG2},
  {"let",           &sc_do_let,                    PURE1|ARG2},
  {"if",            &sc_do_if,                     ARG1|ARG2},
  {"else",          &sc_do_else,                   NOARGS},
  {"endif",         &sc_do_endif,                  NOARGS},
  {"for",           &sc_do_for,                    PURE1|ARG2},
  {"next",          &sc_do_next,                   NOARGS},
  {"wait",          &sc_do_wait,                   ARG1},
  {"end",           &sc_do_end,                    NOARGS},
  {"goto",          &sc_do_goto,                   ARG1},
  {"gosub",         &sc_do_gosub,                  ARG1},
  {"return",        &sc_do_return,                 NOARGS},
  {"input",         &sc_do_input,                  PURE1|PURE2},
  {"set",           &sc_do_set,                    ARG1|ARG2},
  {"",              NULL,                          0}
};

typedef struct softcode_command_struct SCSET;

#endif /* SCOMMANDS_H */

Site Stats

Snippets: 1791
Codebases: 571