Changeset 3756803


Ignore:
Timestamp:
Jun 19, 2011, 1:08:11 AM (6 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Children:
81a5686
Parents:
df7301c
git-author:
Anders Kaseorg <andersk@mit.edu> (06/18/11 20:41:03)
git-committer:
Anders Kaseorg <andersk@mit.edu> (06/19/11 01:08:11)
Message:
variables_to_init: Move into new function owl_variable_add_defaults

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • variable.c

    r44dd092 r3756803  
    5151        NULL }
    5252
    53 static owl_variable variables_to_init[] = {
     53int owl_variable_add_defaults(owl_vardict *vd)
     54{
     55  owl_variable variables_to_init[] = {
    5456
    5557  OWLVAR_STRING( "personalbell" /* %OwlVarStub */, "off",
     
    439441    NULL, NULL, NULL, NULL, NULL, NULL }
    440442
    441 };
     443  };
     444
     445  return owl_variable_dict_add_from_list(vd, variables_to_init);
     446}
    442447
    443448/**************************************************************************/
     
    558563
    559564int owl_variable_dict_setup(owl_vardict *vd) {
     565  owl_dict_create(vd);
     566  return owl_variable_add_defaults(vd);
     567}
     568
     569int owl_variable_dict_add_from_list(owl_vardict *vd, owl_variable *variables_to_init)
     570{
    560571  owl_variable *var, *cur;
    561   owl_dict_create(vd);
    562572  for (var = variables_to_init; var->name != NULL; var++) {
    563573    cur = g_new(owl_variable, 1);
Note: See TracChangeset for help on using the changeset viewer.