예제 #1
0
static int
gopt_map_type(const char *val)
{
  /* check if map type exist */
  if (!mapc_type_exists(val)) {
    fprintf(stderr, "conf: no such map type \"%s\"\n", val);
    return 1;
  }
  gopt.map_type = xstrdup(val);
  return 0;
}
예제 #2
0
파일: conf.c 프로젝트: NextBSD/NextBSD
static int
ropt_map_type(const char *val, cf_map_t *cfm)
{
    /* check if map type exist */
    if (!mapc_type_exists(val)) {
        fprintf(stderr, "conf: no such map type \"%s\"\n", val);
        return 1;
    }
    cfm->cfm_type = strdup((char *)val);
    return 0;
}