Lines Matching refs:map

216 	static MAP *map = NULL;  local
222 if (map == NULL)
228 map = &s->s_map;
230 DYNOPENMAP(map);
245 return (*map->map_class->map_lookup)(map, name, argv, pstat);
247 return (*map->map_class->map_lookup)(map, name, NULL, pstat);
267 register MAP *map; local
303 map = &s->s_map;
304 memset(map, '\0', sizeof(*map));
305 map->map_mname = s->s_name;
317 map->map_mflags = MF_INCLNULL;
362 map->map_class = &s->s_mapclass;
363 map->map_mflags |= MF_ALIAS;
364 if (map->map_class->map_parse(map, spec))
366 map->map_mflags |= MF_VALID;
367 AliasFileMap->map_stack[NAliasFileMaps++] = map;
391 aliaswait(map, ext, isopen) in aliaswait() argument
392 MAP *map; in aliaswait()
403 map->map_class->map_cname, map->map_file);
404 if (bitset(MF_ALIASWAIT, map->map_mflags))
406 map->map_mflags |= MF_ALIASWAIT;
416 map->map_class->map_lookup(map, "@", NULL, &st) == NULL)
437 map->map_mflags |= MF_CLOSING;
438 map->map_class->map_close(map);
439 map->map_mflags &= ~(MF_OPEN|MF_WRITABLE|MF_CLOSING);
444 isopen = map->map_class->map_open(map, O_RDONLY);
449 if (!bitset(MCF_REBUILDABLE, map->map_class->map_cflags))
453 map->map_mflags &= ~MF_ALIASWAIT;
456 if (stat(map->map_file, &stb) < 0)
460 map->map_mflags &= ~MF_ALIASWAIT;
465 map->map_file, ext == NULL ? "" : ext) >= sizeof(buf))
470 map->map_file, ext == NULL ? "" : ext);
472 map->map_file, ext == NULL ? "" : ext);
482 map->map_mflags &= ~MF_ALIASWAIT;
501 rebuildaliases(map, automatic) in rebuildaliases() argument
502 register MAP *map; in rebuildaliases()
514 if (!bitset(MCF_REBUILDABLE, map->map_class->map_cflags))
525 if ((af = safefopen(map->map_file, O_RDWR, 0, sff)) == NULL)
530 (af = safefopen(map->map_file, O_RDONLY, 0, sff)) == NULL)
536 map->map_file, sm_errstring(saveerr));
537 if (!automatic && !bitset(MF_OPTIONAL, map->map_mflags))
539 map->map_file, sm_errstring(saveerr));
548 map->map_file, sm_errstring(errno));
553 !lockfile(sm_io_getinfo(af, SM_IO_WHAT_FD, NULL), map->map_file,
558 map->map_file);
563 map->map_file, NULL, LOCK_EX);
576 if (map->map_class->map_open(map, O_RDWR))
582 map->map_file, automatic ? "auto" : "",
585 map->map_mflags |= MF_OPEN|MF_WRITABLE;
586 map->map_pid = CurrentPid;
587 readaliases(map, af, !automatic, true);
594 map->map_file, sm_errstring(errno));
597 map->map_file);
604 if (bitset(MF_OPEN, map->map_mflags))
606 map->map_mflags |= MF_CLOSING;
607 map->map_class->map_close(map);
608 map->map_mflags &= ~(MF_OPEN|MF_WRITABLE|MF_CLOSING);
641 readaliases(map, af, announcestats, logstats) in readaliases() argument
642 register MAP *map; in readaliases()
658 FileName = map->map_file;
837 map->map_class->map_store(map, al.q_user, rhs);
864 map->map_file, naliases, longest, bytes);
868 map->map_file, naliases, longest, bytes);