IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 13, 2008, 3:20:49 PM (18 years ago)
Author:
eugene
Message:

add FreeBasic, real to Command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.basic/init.c

    r16211 r16426  
    1313int file            PROTO((int, char **));
    1414int getchr_func     PROTO((int, char **));
    15 int help            PROTO((int, char **));
    16 int input           PROTO((int, char **));
    17 int list            PROTO((int, char **));
    18 int list_help       PROTO((int, char **));
    19 int list_vars       PROTO((int, char **));
     15int help            PROTO((int, char **));
     16int input           PROTO((int, char **));
     17int list            PROTO((int, char **));
     18int list_help       PROTO((int, char **));
     19int list_vars       PROTO((int, char **));
    2020int local           PROTO((int, char **)); /* data? */
    21 int macro           PROTO((int, char **));
     21int macro           PROTO((int, char **));
    2222int memory          PROTO((int, char **));
    23 int mkdir_opihi     PROTO((int, char **));
    24 int module          PROTO((int, char **));
    25 int output          PROTO((int, char **));
    26 int pwd             PROTO((int, char **));
    27 int quit            PROTO((int, char **));
    28 int run_for         PROTO((int, char **));
    29 int run_if          PROTO((int, char **));
    30 int run_while       PROTO((int, char **));
    31 int scan            PROTO((int, char **));
    32 int shell           PROTO((int, char **));
     23int mkdir_opihi     PROTO((int, char **));
     24int module          PROTO((int, char **));
     25int output          PROTO((int, char **));
     26int pwd             PROTO((int, char **));
     27int quit            PROTO((int, char **));
     28int run_for         PROTO((int, char **));
     29int run_if          PROTO((int, char **));
     30int run_while       PROTO((int, char **));
     31int scan            PROTO((int, char **));
     32int shell           PROTO((int, char **));
    3333int sprintf_opihi   PROTO((int, char **));
    3434int fprintf_opihi   PROTO((int, char **));
     
    3737int strpop          PROTO((int, char **));
    3838int strsub          PROTO((int, char **));
    39 int wait_func       PROTO((int, char **));
    40 int which           PROTO((int, char **));
     39int wait_func       PROTO((int, char **));
     40int which           PROTO((int, char **));
    4141
    4242/** mapping of the command names to command functions **/
    4343static Command cmds[] = { 
    44   {"config",        config,             "(re)load config file?"},
    45   {"sleep",         exec_sleep,         "sleep for N seconds"},
    46   {"usleep",        exec_usleep,        "sleep for N microseconds"},
    47   {"cd",            cd,                 "change directory"},
    48   {"date",          date,               "get current date"},
    49   {"dirname",       dirname_opihi,      "built-in dirname function"},
    50   {"echo",          echo,               "type this line *"},
    51   {"break",         exec_break,         "escape from function *"},
    52   {"continue",      exec_next,          "next loop iteration"},
    53   {"next",          exec_next,          "next loop iteration"},
    54   {"last",          exec_last,          "last loop iteration"},
    55   {"return",        exec_last,          "exit from macro"},
    56   {"file",          file,               "test file existence"},
    57   {"getchr",        getchr_func,        "find character in string"},
    58   {"help",          help,               "get help on a function *"},
    59   {"input",         input,              "read command lines from a file *"},
    60   {"list",          list,               "get variable list"},
    61   {"?",             list_help,          "list commands *"},
    62   {"??",            list_vars,          "list variables *"},
    63   {"local",         local,              "define local variables"},
    64   {"macro",         macro,              "deal with the macros *"},
    65   {"memory",        memory,             "long listing of the allocated memory"},
    66   {"mkdir",         mkdir_opihi,        "built-in mkdir command"},
    67   {"module",        module,             "load script file from the modules directories"},
    68   {"output",        output,             "redirect output to file"},
    69   {"pwd",           pwd,                "print current working directory"},
    70   {"exit",          quit,               "exit program *"},
    71   {"quit",          quit,               "exit program *"},
    72   {"for",           run_for,            "for loop"},
    73   {"if",            run_if,             "logical cases *"},
    74   {"while",         run_while,          "while loop"},
    75   {"scan",          scan,               "scan line from keyboard or file to variable *"},
    76   {"!",             shell,              "system call"},
    77   {"exec",          shell,              "system call"},
    78   {"sprintf",       sprintf_opihi,      "formatted print to a variable"},
    79   {"fprintf",       fprintf_opihi,      "formatted print to standard output"},
    80   {"strlen",        strlen_func,        "string length"},
    81   {"substr",        substr_func,        "substring"},
    82   {"strpop",        strpop,             "pop a string"},
    83   {"strsub",        strsub,             "replace instances of a key in a string"},
    84   {"wait",          wait_func,          "wait until return is typed"},
    85   {"which",         which,              "show command *"}
     44  {1, "config",        config,             "(re)load config file?"},
     45  {1, "sleep",         exec_sleep,         "sleep for N seconds"},
     46  {1, "usleep",        exec_usleep,        "sleep for N microseconds"},
     47  {1, "cd",            cd,                 "change directory"},
     48  {1, "date",          date,               "get current date"},
     49  {1, "dirname",       dirname_opihi,      "built-in dirname function"},
     50  {1, "echo",          echo,               "type this line *"},
     51  {1, "break",         exec_break,         "escape from function *"},
     52  {1, "continue",      exec_next,          "next loop iteration"},
     53  {1, "next",          exec_next,          "next loop iteration"},
     54  {1, "last",          exec_last,          "last loop iteration"},
     55  {1, "return",        exec_last,          "exit from macro"},
     56  {1, "file",          file,               "test file existence"},
     57  {1, "getchr",        getchr_func,        "find character in string"},
     58  {1, "help",          help,               "get help on a function *"},
     59  {1, "input",         input,              "read command lines from a file *"},
     60  {1, "list",          list,               "get variable list"},
     61  {1, "?",             list_help,          "list commands *"},
     62  {1, "??",            list_vars,          "list variables *"},
     63  {1, "local",         local,              "define local variables"},
     64  {1, "macro",         macro,              "deal with the macros *"},
     65  {1, "memory",        memory,             "long listing of the allocated memory"},
     66  {1, "mkdir",         mkdir_opihi,        "built-in mkdir command"},
     67  {1, "module",        module,             "load script file from the modules directories"},
     68  {1, "output",        output,             "redirect output to file"},
     69  {1, "pwd",           pwd,                "print current working directory"},
     70  {1, "exit",          quit,               "exit program *"},
     71  {1, "quit",          quit,               "exit program *"},
     72  {1, "for",           run_for,            "for loop"},
     73  {1, "if",            run_if,             "logical cases *"},
     74  {1, "while",         run_while,          "while loop"},
     75  {1, "scan",          scan,               "scan line from keyboard or file to variable *"},
     76  {1, "!",             shell,              "system call"},
     77  {1, "exec",          shell,              "system call"},
     78  {1, "sprintf",       sprintf_opihi,      "formatted print to a variable"},
     79  {1, "fprintf",       fprintf_opihi,      "formatted print to standard output"},
     80  {1, "strlen",        strlen_func,        "string length"},
     81  {1, "substr",        substr_func,        "substring"},
     82  {1, "strpop",        strpop,             "pop a string"},
     83  {1, "strsub",        strsub,             "replace instances of a key in a string"},
     84  {1, "wait",          wait_func,          "wait until return is typed"},
     85  {1, "which",         which,              "show command *"}
    8686};
    8787
     
    125125  }
    126126}
     127
     128void FreeBasic () {
     129
     130  FreeCommands ();
     131  FreeMacros ();
     132  FreeBuffers ();
     133  FreeVectors ();
     134  FreeVariables ();
     135  FreeLists ();
     136}
Note: See TracChangeset for help on using the changeset viewer.