---
# System prepended metadata

title: old commands

---

old commands
============

```c
int cmd_old(RCore *cmd, const char *input) {
    int argc;
    char **argv = r_str_argv (input, &argc);
    RCmdArgs *args = r_cmd_args (argc, argv, cmd_old_argtypes);
    
    ut64 arg0 = r_cmd_arg (args, 0)
    //  TOO MUCH BOILERPLATE
    ...
}
```
new commands
============

```c
int cmd_new(RCore *core, int argc, char **argv) {
    const char *cmd_old_argtypes = "$flag $brkp";
    RCmdArgs *args = r_cmd_args (argc, argv, cmd_old_argtypes);
    if (!args) {
        eprintf ("Invalid arguments\n");
        return -1;
    }
    ut64 arg0 = r_cmd_arg_u64 (args, 0)
    //  TOO MUCH BOILERPLATE
    ...
}