--------------------- PatchSet 1573 Date: 2001/02/15 06:46:22 Author: rbcollins Branch: generic_modules Tag: (none) Log: ran indent Members: src/cache_cf.c:1.18.4.2->1.18.4.3 Index: squid/src/cache_cf.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/cache_cf.c,v retrieving revision 1.18.4.2 retrieving revision 1.18.4.3 diff -u -r1.18.4.2 -r1.18.4.3 --- squid/src/cache_cf.c 14 Feb 2001 13:40:58 -0000 1.18.4.2 +++ squid/src/cache_cf.c 15 Feb 2001 06:46:22 -0000 1.18.4.3 @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.c,v 1.18.4.2 2001/02/14 13:40:58 rbcollins Exp $ + * $Id: cache_cf.c,v 1.18.4.3 2001/02/15 06:46:22 rbcollins Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -999,41 +999,42 @@ CBDATA_TYPE(modNode); /* Operation of modNode cbdata: - config allocates the record, and free frees it. - any configuration that depends on the record - locks it and - any matching free configuration - unlocks it -*/ + * config allocates the record, and free frees it. + * any configuration that depends on the record + * locks it and + * any matching free configuration + * unlocks it + */ const char * mod_type_str(const mod_t type) { switch (type) { case MOD_INTERNAL: - return "internal"; - break; + return "internal"; + break; case MOD_EXTERNAL: - return "external"; - break; + return "external"; + break; default: - return "unknown"; - break; + return "unknown"; + break; } } /* TODO: write a cbdataFree handler for modNode's. */ static void -parse_mod_install(modConfig * cfg) { - char *type_str=NULL, *name_str=NULL; - mod_t type=MOD_NONE; - modNode *node= NULL; +parse_mod_install(modConfig * cfg) +{ + char *type_str = NULL, *name_str = NULL; + mod_t type = MOD_NONE; + modNode *node = NULL; dlink_node *linknode; int rv; - linknode=cfg->modules.head; + linknode = cfg->modules.head; if (!linknode) /* first run */ CBDATA_INIT_TYPE(modNode); @@ -1045,65 +1046,67 @@ self_destruct(); /* find the module if it's currently configured */ - while (linknode && strcasecmp((*(modNode *)(linknode->data)).namestr, name_str)) { - linknode=linknode->next; + while (linknode && strcasecmp((*(modNode *) (linknode->data)).namestr, name_str)) { + linknode = linknode->next; } if (linknode == NULL) { /* ignore the type if it is already configured. */ - if (strcasecmp(type_str,"internal")==0) { + if (strcasecmp(type_str, "internal") == 0) { /* internal module */ - type=MOD_INTERNAL; - } else if (strcasecmp(type_str,"external")==0) { + type = MOD_INTERNAL; + } else if (strcasecmp(type_str, "external") == 0) { /* external module */ - debug(3,0)("external modules not supported yet\n"); - } - if (type==MOD_NONE) + debug(3, 0) ("external modules not supported yet\n"); + } + if (type == MOD_NONE) self_destruct(); - node=CBDATA_ALLOC(modNode, NULL); + node = CBDATA_ALLOC(modNode, NULL); assert(node); - node->type=type; - node->namestr=xstrdup(name_str); - if (type==MOD_INTERNAL) + node->type = type; + node->namestr = xstrdup(name_str); + if (type == MOD_INTERNAL) rv = mod_internal_install(node->namestr, node); #if 0 - else if (type==MOD_EXTERNAL) - rv = mod_external_install(node->namestr, node); + else if (type == MOD_EXTERNAL) + rv = mod_external_install(node->namestr, node); #endif - else - rv=0; + else + rv = 0; if (rv) - dlinkAddTail(node,&node->node,&cfg->modules); + dlinkAddTail(node, &node->node, &cfg->modules); else { safe_free(node->namestr); cbdataFree(node); } } else { - node=linknode->data; + node = linknode->data; } /* call the modules configuration routine, if any */ } static void -free_mod_install(modConfig * cfg) { - dlink_node *node,*tmpnode; +free_mod_install(modConfig * cfg) +{ + dlink_node *node, *tmpnode; modNode *module; - node=cfg->modules.head; + node = cfg->modules.head; while (node) { - tmpnode=node; - module=node->data; - node=node->next; + tmpnode = node; + module = node->data; + node = node->next; if (module->uninstall(module->namestr)) { - dlinkDelete(tmpnode,&cfg->modules); + dlinkDelete(tmpnode, &cfg->modules); cbdataFree(module); } } } static void -dump_mod_install(StoreEntry * entry, const char *name, modConfig cfg){ +dump_mod_install(StoreEntry * entry, const char *name, modConfig cfg) +{ } void