Changeset 7869e48 for variable.c


Ignore:
Timestamp:
Jan 12, 2013, 1:43:13 PM (12 years ago)
Author:
Jason Gross <jgross@mit.edu>
Children:
e3a0d71, 4485285
Parents:
4626016
git-author:
Jason Gross <jgross@mit.edu> (01/12/13 13:13:18)
git-committer:
Jason Gross <jgross@mit.edu> (01/12/13 13:43:13)
Message:
Remove trailing whitespace

This commit was made with the command sequence

    for i in $(git ls-files | tr '\n' ' ');
    do
      echo $i; sed -i s'/\s\+$//g' "$(readlink -f $i)";
    done
File:
1 edited

Legend:

Unmodified
Added
Removed
  • variable.c

    rd126a19 r7869e48  
    9393
    9494  OWLVAR_BOOL( "logging" /* %OwlVarStub */, 0,
    95                "turn personal logging on or off", 
     95               "turn personal logging on or off",
    9696               "If this is set to on, personal messages are\n"
    9797               "logged in the directory specified\n"
     
    103103               "If this is set to on, class messages are\n"
    104104               "logged in the directory specified\n"
    105                "by the 'classlogpath' variable.\n" 
     105               "by the 'classlogpath' variable.\n"
    106106               "The filename in that directory is derived from\n"
    107107               "the name of the class to which the message was sent.\n" ),
     
    172172
    173173  OWLVAR_PATH( "logpath" /* %OwlVarStub */, "~/zlog/people",
    174                "path for logging personal zephyrs", 
     174               "path for logging personal zephyrs",
    175175               "Specifies a directory which must exist.\n"
    176176               "Files will be created in the directory for each sender.\n"),
     
    185185               "This file will be logged to if 'debug' is set to 'on'.\n"
    186186               "BarnOwl will append a dot and the current process's pid to the filename."),
    187  
     187
    188188  OWLVAR_PATH( "zsigproc" /* %OwlVarStub:zsigproc */, NULL,
    189189               "name of a program to run that will generate zsigs",
     
    230230               "turn zaway on or off", "" ),
    231231
    232   OWLVAR_STRING( "zaway_msg" /* %OwlVarStub */, 
     232  OWLVAR_STRING( "zaway_msg" /* %OwlVarStub */,
    233233                 OWL_DEFAULT_ZAWAYMSG,
    234234                 "zaway msg for responding to zephyrs when away", "" ),
    235235
    236   OWLVAR_STRING( "zaway_msg_default" /* %OwlVarStub */, 
     236  OWLVAR_STRING( "zaway_msg_default" /* %OwlVarStub */,
    237237                 OWL_DEFAULT_ZAWAYMSG,
    238238                 "default zaway message", "" ),
     
    243243                    NULL, owl_variable_aaway_set, NULL),
    244244
    245   OWLVAR_STRING( "aaway_msg" /* %OwlVarStub */, 
     245  OWLVAR_STRING( "aaway_msg" /* %OwlVarStub */,
    246246                 OWL_DEFAULT_AAWAYMSG,
    247247                 "AIM away msg for responding when away", "" ),
    248248
    249   OWLVAR_STRING( "aaway_msg_default" /* %OwlVarStub */, 
     249  OWLVAR_STRING( "aaway_msg_default" /* %OwlVarStub */,
    250250                 OWL_DEFAULT_AAWAYMSG,
    251251                 "default AIM away message", "" ),
    252252
    253253  OWLVAR_STRING( "view_home" /* %OwlVarStub */, "all",
    254                  "home view to switch to after 'X' and 'V'", 
     254                 "home view to switch to after 'X' and 'V'",
    255255                 "SEE ALSO: view, filter\n" ),
    256256
     
    300300              "notifications of buddies as soon as you login, set it to 0 instead."),
    301301
    302              
    303   OWLVAR_INT_FULL( "typewinsize" /* %OwlVarStub:typwin_lines */, 
     302
     303  OWLVAR_INT_FULL( "typewinsize" /* %OwlVarStub:typwin_lines */,
    304304                   OWL_TYPWIN_SIZE,
    305                   "number of lines in the typing window", 
     305                  "number of lines in the typing window",
    306306                   "This specifies the height of the window at the\n"
    307307                   "bottom of the screen where commands are entered\n"
     
    529529}
    530530
    531 /* note that changing the value of this will clobber 
     531/* note that changing the value of this will clobber
    532532 * any user setting of this */
    533533int owl_variable_disable_ctrl_d_set(owl_variable *v, const void *newval)
     
    541541      owl_function_command_norv("bindkey editmulti C-d command edit:done");
    542542    }
    543   } 
    544   return owl_variable_int_set_default(v, newval); 
     543  }
     544  return owl_variable_int_set_default(v, newval);
    545545}
    546546
     
    593593      break;
    594594    case OWL_VARIABLE_STRING:
    595       if (!cur->validate_fn) 
     595      if (!cur->validate_fn)
    596596        cur->validate_fn = owl_variable_string_validate_default;
    597       if (!cur->set_fn) 
     597      if (!cur->set_fn)
    598598        cur->set_fn = owl_variable_string_set_default;
    599       if (!cur->set_fromstring_fn) 
     599      if (!cur->set_fromstring_fn)
    600600        cur->set_fromstring_fn = owl_variable_string_set_fromstring_default;
    601       if (!cur->get_fn) 
     601      if (!cur->get_fn)
    602602        cur->get_fn = owl_variable_get_default;
    603       if (!cur->get_tostring_fn) 
    604         cur->get_tostring_fn = owl_variable_string_get_tostring_default;     
     603      if (!cur->get_tostring_fn)
     604        cur->get_tostring_fn = owl_variable_string_get_tostring_default;
    605605      if (!cur->delete_fn)
    606606        cur->delete_fn = owl_variable_delete_default;
     
    609609      break;
    610610    case OWL_VARIABLE_BOOL:
    611       if (!cur->validate_fn) 
     611      if (!cur->validate_fn)
    612612        cur->validate_fn = owl_variable_bool_validate_default;
    613       if (!cur->set_fn) 
     613      if (!cur->set_fn)
    614614        cur->set_fn = owl_variable_bool_set_default;
    615       if (!cur->set_fromstring_fn) 
     615      if (!cur->set_fromstring_fn)
    616616        cur->set_fromstring_fn = owl_variable_bool_set_fromstring_default;
    617       if (!cur->get_fn) 
     617      if (!cur->get_fn)
    618618        cur->get_fn = owl_variable_get_default;
    619       if (!cur->get_tostring_fn) 
    620         cur->get_tostring_fn = owl_variable_bool_get_tostring_default;     
     619      if (!cur->get_tostring_fn)
     620        cur->get_tostring_fn = owl_variable_bool_get_tostring_default;
    621621      if (!cur->delete_fn)
    622622        cur->delete_fn = owl_variable_delete_default;
     
    625625      break;
    626626    case OWL_VARIABLE_INT:
    627       if (!cur->validate_fn) 
     627      if (!cur->validate_fn)
    628628        cur->validate_fn = owl_variable_int_validate_default;
    629       if (!cur->set_fn) 
     629      if (!cur->set_fn)
    630630        cur->set_fn = owl_variable_int_set_default;
    631       if (!cur->set_fromstring_fn) 
     631      if (!cur->set_fromstring_fn)
    632632        cur->set_fromstring_fn = owl_variable_int_set_fromstring_default;
    633       if (!cur->get_fn) 
     633      if (!cur->get_fn)
    634634        cur->get_fn = owl_variable_get_default;
    635       if (!cur->get_tostring_fn) 
    636         cur->get_tostring_fn = owl_variable_int_get_tostring_default;     
     635      if (!cur->get_tostring_fn)
     636        cur->get_tostring_fn = owl_variable_int_get_tostring_default;
    637637      if (!cur->delete_fn)
    638638        cur->delete_fn = owl_variable_delete_default;
     
    793793  if (!v->set_fromstring_fn) {
    794794    if (msg) owl_function_error("Variable %s is read-only", owl_variable_get_name(v));
    795     return -1;   
     795    return -1;
    796796  }
    797797  if (0 != v->set_fromstring_fn(v, value)) {
     
    807807      owl_function_makemsg("%s = <null>", owl_variable_get_name(v));
    808808    g_free(tostring);
    809   }   
     809  }
    810810  return 0;
    811811}
    812  
     812
    813813int owl_variable_set_string(owl_variable *v, const char *newval)
    814814{
     
    816816  return v->set_fn(v, newval);
    817817}
    818  
     818
    819819int owl_variable_set_int(owl_variable *v, int newval)
    820820{
     
    822822  return v->set_fn(v, &newval);
    823823}
    824  
     824
    825825int owl_variable_set_bool_on(owl_variable *v)
    826826{
     
    10351035  } else {
    10361036    return g_strdup_printf("%d", *(const int*)val);
    1037   } 
     1037  }
    10381038}
    10391039
    10401040/* default functions for enums (a variant of integers) */
    10411041
    1042 int owl_variable_enum_validate(const owl_variable *v, const void *newval) { 
     1042int owl_variable_enum_validate(const owl_variable *v, const void *newval) {
    10431043  char **enums;
    10441044  int nenums, val;
Note: See TracChangeset for help on using the changeset viewer.