Changeset bd3f232 for readconfig.c


Ignore:
Timestamp:
Jun 10, 2003, 3:14:59 PM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
f14a7ee
Parents:
6e05655
Message:
Styles implemented
It's still a little buggy ... if a format_msg(); is used in perl admin
  messages (or maybe just the first admin message) are not formatted.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • readconfig.c

    rd559df9 rbd3f232  
    131131}
    132132
    133 char *owl_config_getmsg(owl_message *m, int mode) {
    134   /* if mode==1 we are doing message formatting.  The returned
    135    * formatted message needs to be freed by the caller.
    136    *
    137    * if mode==0 we are just doing the message-has-been-received
    138    * thing.
    139   */
    140 
     133char *owl_config_getmsg(owl_message *m, char *funcname) {
    141134  int i, j, len;
    142135  char *ptr, *ptr2;
     136  char runstr[LINE];
    143137
    144138  if (!owl_global_have_config(&g)) return("");
     
    236230
    237231  /* run the procedure corresponding to the mode */
    238   if (mode==1) {
    239     return(owl_config_execute("owl::format_msg();"));
    240   } else {
    241     ptr=owl_config_execute("owl::receive_msg();");
    242     if (ptr) owl_free(ptr);
    243     return(NULL);
    244   }
    245 }
    246 
     232  sprintf(runstr, "%s();", funcname);
     233  return(owl_config_execute(runstr));
     234}
     235
Note: See TracChangeset for help on using the changeset viewer.