sfinx

sphincs+ inspired signing utility
git clone git://git.finwo.net/app/sfinx
Log | Files | Refs | README | LICENSE

registry.h (670B)


      1 #ifndef __SFINX_CLI_REGISTRY_H__
      2 #define __SFINX_CLI_REGISTRY_H__
      3 
      4 // Registry {{{
      5 //
      6 // Commands prepend themselves on load
      7 //   names is a NULL terminated alias list, argv[0] is the command name
      8 
      9 struct cli_command {
     10   struct cli_command *next;
     11   const char *const  *names;
     12   const char         *display;
     13   const char         *description;
     14   const char         *help;
     15   int (*fn)(int argc, const char **argv);
     16 };
     17 
     18 extern struct cli_command *cli_commands;
     19 extern char               *command_list;
     20 
     21 void                cli_command_register(struct cli_command *command);
     22 struct cli_command *cli_command_find(const char *name);
     23 // }}}
     24 
     25 #endif  // __SFINX_CLI_REGISTRY_H__