Changeset 00f9a7d


Ignore:
Timestamp:
Jan 8, 2007, 6:50:12 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
f265f94
Parents:
15bd5ef
git-author:
Nelson Elhage <nelhage@mit.edu> (01/08/07 18:50:09)
git-committer:
Nelson Elhage <nelhage@mit.edu> (01/08/07 18:50:12)
Message:
Bring back the -c option, and no longer choke if .owlconf doesn't
return true.
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r312675c r00f9a7d  
    108108      }
    109109      configfile=argv[1];
    110       abort(); /*We dirty hackers have broken -c for now--hartmans*/
    111110      argv+=2;
    112111      argc-=2;
     
    305304  owl_function_debugmsg("startup: processing config file");
    306305  owl_context_set_readconfig(owl_global_get_context(&g));
    307   perlerr=owl_perlconfig_readconfig();
     306  perlerr=owl_perlconfig_readconfig(configfile);
    308307  if (perlerr) {
    309308    endwin();
  • perlconfig.c

    r25729b2 r00f9a7d  
    220220
    221221
    222 char *owl_perlconfig_readconfig(void)
     222char *owl_perlconfig_readconfig(char * file)
    223223{
    224224  int ret;
     
    267267  perl_get_sv("owl::host", TRUE);
    268268  perl_get_av("owl::fields", TRUE);
    269  
     269
     270  if(file) {
     271    SV * cfg = get_sv("owl::configfile", TRUE);
     272    sv_setpv(cfg, file);
     273  }
     274
    270275  perl_eval_pv(owl_perlwrap_codebuff, FALSE);
    271276
  • perlwrap.pm

    r25729b2 r00f9a7d  
    1818
    1919
    20 our $configfile = $::ENV{'HOME'}."/.owlconf";
     20our $configfile;
     21
     22$configfile ||= $::ENV{'HOME'}."/.owlconf";
    2123
    2224# populate global variable space for legacy owlconf files
     
    455457# load the config  file
    456458if (-r $owl::configfile) {
    457 do $owl::configfile or die $@;
     459    undef $!;
     460    undef $@;
     461    do $owl::configfile;
     462    die $@ if $@;
     463    die $! if $!;
    458464}
    459465
Note: See TracChangeset for help on using the changeset viewer.