Changeset aad166a


Ignore:
Timestamp:
Jun 19, 2011, 1:49:34 AM (13 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
117c21c
Parents:
ea68035
git-author:
Anders Kaseorg <andersk@mit.edu> (06/18/11 20:40:55)
git-committer:
Anders Kaseorg <andersk@mit.edu> (06/19/11 01:49:34)
Message:
commands_to_init: Move into new function owl_cmd_add_defaults

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cmd.c

    r4c7c21f raad166a  
    55#include "owl.h"
    66
    7 extern const owl_cmd commands_to_init[];
    8 
    97/**************************************************************************/
    108/***************************** COMMAND DICT *******************************/
     
    1311int owl_cmddict_setup(owl_cmddict *cd) {
    1412  owl_cmddict_init(cd);
    15   if (0 != owl_cmddict_add_from_list(cd, commands_to_init)) return(-1);
    16   return(0);
     13  return owl_cmd_add_defaults(cd);
    1714}
    1815
  • commands.c

    r697221f raad166a  
    4141
    4242
    43 const owl_cmd commands_to_init[]
    44   = {
     43int owl_cmd_add_defaults(owl_cmddict *cd)
     44{
     45  owl_cmd commands_to_init[] = {
     46
    4547  OWLCMD_ARGS("zlog", owl_command_zlog, OWL_CTX_ANY,
    4648              "send a login or logout notification",
     
    10371039  { NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
    10381040
    1039 };
     1041  };
     1042
     1043  return owl_cmddict_add_from_list(cd, commands_to_init);
     1044}
    10401045
    10411046void owl_command_info(void)
Note: See TracChangeset for help on using the changeset viewer.