/* 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;
}
/*
/*
* 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
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)
/* 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;
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;
- 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