Lines Matching defs:look

865 lookup(register Lookup_t* look, const char* name, unsigned int flags)
877 look->flags = 0;
878 look->call = -1;
879 look->standard = (flags & ASTCONF_AST) ? CONF_AST : -1;
880 look->section = -1;
889 if (look->standard >= 0)
891 look->standard = p->standard;
895 if (look->call >= 0)
897 look->call = p->call;
901 look->conf = #
913 if (look->section < 0 && !c && v)
915 look->section = name[0] - '0';
921 if (look->section < 0)
922 look->section = 1;
924 look->name = name;
926 error(-6, "astconf normal name=%s standard=%d section=%d call=%d flags=%04x elements=%d", look->name, look->standard, look->section, look->call, flags, conf_elements);
941 if ((look->standard < 0 || look->standard == mid->standard) &&
942 (look->section < 0 || look->section == mid->section) &&
943 (look->call < 0 || look->call == mid->call))
945 } while (mid-- > lo && streq(mid->name, look->name));
948 while (++mid < hi && streq(mid->name, look->name))
950 if ((look->standard < 0 || look->standard == mid->standard) &&
951 (look->section < 0 || look->section == mid->section) &&
952 (look->call < 0 || look->call == mid->call))
964 if (look->call < 0 && look->standard >= 0 && (look->section <= 1 || (mid->flags & CONF_MINMAX)))
965 look->flags |= CONF_MINMAX;
966 look->conf = mid;
968 error(-6, "astconf lookup name=%s standard=%d:%d section=%d:%d call=%d:%d", look->name, look->standard, mid->standard, look->section, mid->section, look->call, mid->call);
1002 print(Sfio_t* sp, register Lookup_t* look, const char* name, const char* path, int listflags, Error_f conferror)
1004 register Conf_t* p = look->conf;
1005 register unsigned int flags = look->flags;
1025 , name, look->name, p->name, p->standard, p->section, prefix[p->call + CONF_call].name, p->op
1047 if ((p->flags & CONF_PREFIX_ONLY) && look->standard < 0)
1085 if (look->standard >= 0 && (name[0] != '_' && ((p->flags & CONF_UNDERSCORE) || look->section <= 1) || name[0] == '_' && (p->flags & CONF_NOUNDERSCORE)) || look->standard < 0 && name[0] == '_')
1178 if (look->standard == CONF_AST)
1427 Lookup_t look;
1467 if (lookup(&look, name, flags))
1477 return print(NiL, &look, name, path, flags, conferror);
1540 if ((look.standard < 0 || look.standard == CONF_AST) && look.call <= 0 && look.section <= 1 && (s = feature(0, look.name, path, value, flags, conferror)))
1586 Lookup_t look;
1605 look.flags = 0;
1623 for (look.conf = (Conf_t*)conf; look.conf < (Conf_t*)&conf[conf_elements]; look.conf++)
1629 if (regexec(&re, prefix[look.conf->call + CONF_call].name, 0, NiL, 0))
1634 if (regexec(&re, look.conf->name, 0, NiL, 0))
1639 if (regexec(&re, prefix[look.conf->standard].name, 0, NiL, 0))
1643 look.standard = look.conf->standard;
1644 look.section = look.conf->section;
1645 print(sp, &look, NiL, path, flags, errorf);
1656 if (!lookup(&look, f, flags))
1660 if (look.standard < 0)
1661 look.standard = 0;
1662 if (look.section < 1)
1663 look.section = 1;
1664 sfprintf(sp, "%*s %*s %d %2s %4d %5s %s\n", sizeof(conf[0].name), f, sizeof(prefix[look.standard].name), prefix[look.standard].name, look.section, call, 0, "N", s);