From 86139583cdd4c7f52a91191dc5162493869b1fd7 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Fri, 24 Dec 2010 12:46:17 +0100 Subject: [PATCH] genconf: typo and comments --- src/genconf/conf_htable.c | 10 +++++----- src/genconf/conf_parser.c | 6 ++++-- src/genconf/confnode.c | 4 ++-- src/genconf/confnode_choice.c | 2 +- src/genconf/todo.txt | 3 +++ 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/genconf/conf_htable.c b/src/genconf/conf_htable.c index 1a34022..420fab6 100644 --- a/src/genconf/conf_htable.c +++ b/src/genconf/conf_htable.c @@ -17,13 +17,13 @@ static struct confnode_list conf_htable[HASHTABLE_SIZE]; /* return the hash from name */ static inline uint32_t hash_name(const char *name) { - uint32_t h = 0; - const unsigned char *c; + uint32_t h = 0; + const unsigned char *c; - for (c = (const unsigned char *)name; *c; c++) - h += ((((uint32_t)*c) << 4) + (((uint32_t)*c) >> 4)) * 11; + for (c = (const unsigned char *)name; *c; c++) + h += ((((uint32_t)*c) << 4) + (((uint32_t)*c) >> 4)) * 11; - return h & HASHTABLE_MASK; + return h & HASHTABLE_MASK; } /* diff --git a/src/genconf/conf_parser.c b/src/genconf/conf_parser.c index ba1ca0a..f19bb7c 100644 --- a/src/genconf/conf_parser.c +++ b/src/genconf/conf_parser.c @@ -43,8 +43,10 @@ /* * Add a token in the line structure given as argument. - * 'linestart' parameter is the beginning of the line buffer. - * 'linecur' + * + * 'linestart': pointer to the line buffer. + * 'linecur': current pointer in the line string (same string than linestart). + * * Return a pointer to the first token copied from buf in a allocated * buffer which is correctly nil-terminated. Also fill *eatlen * argument the length of eaten bytes. The user should free the token diff --git a/src/genconf/confnode.c b/src/genconf/confnode.c index 4882c84..ed5bd91 100644 --- a/src/genconf/confnode.c +++ b/src/genconf/confnode.c @@ -338,7 +338,7 @@ int confnode_check_deps(const struct confnode *n, int verbose) if (n->flags & CONFNODE_F_NO_DEPS) return 1; - /* check that there is no diabled "if" or"menuconfig" above + /* check that there is no disabled "if" or "menuconfig" above * our node */ for (pn = n->parent; pn; pn = pn->parent) { if (pn->flags & CONFNODE_F_IS_ROOT) @@ -380,7 +380,7 @@ int confnode_check_deps(const struct confnode *n, int verbose) /* Get string value of a node, including dep check. Return -1 on * error. Return the boolean value of the node (0 or 1) on success: in - * this case, and if buf is no NULL, buf is filled with the strvalue. */ + * this case, and if buf is not NULL, buf is filled with the strvalue. */ int confnode_get_value(const struct confnode *n, char *buf, unsigned buflen) { int dep, ret, strvalue_len; diff --git a/src/genconf/confnode_choice.c b/src/genconf/confnode_choice.c index 5a34e7d..892e634 100644 --- a/src/genconf/confnode_choice.c +++ b/src/genconf/confnode_choice.c @@ -106,7 +106,7 @@ static int confnode_choice_close_dir(struct confnode *parent, if (tok == NULL) return -1; /* should not happen */ - /* syntax is: endmenu */ + /* syntax is: endchoice */ if (!strcmp(tok->str, "endchoice") && line->n_token == 1) { //printf("endchoice\n"); return 0; diff --git a/src/genconf/todo.txt b/src/genconf/todo.txt index f21ba39..302e116 100644 --- a/src/genconf/todo.txt +++ b/src/genconf/todo.txt @@ -21,6 +21,9 @@ - Le chemin du Kconfig de depart dans les parametres - Avoir des options pour specifier le comportement: où sauver le .config, couleurs ou non, tty ou non, fichier... +- commande "set machin default" +- confnode_strconfig.c : flag qui dit si une value user est mise ou non +- compiler ave tcc NET: relative to current directory NET*IPSEC*: relative to current directory -- 2.20.1