Lines Matching refs:map
214 static MAP *map = NULL; local
220 if (map == NULL)
226 map = &s->s_map;
228 DYNOPENMAP(map);
243 return (*map->map_class->map_lookup)(map, name, argv, pstat);
245 return (*map->map_class->map_lookup)(map, name, NULL, pstat);
265 register MAP *map; local
301 map = &s->s_map;
302 memset(map, '\0', sizeof(*map));
303 map->map_mname = s->s_name;
315 map->map_mflags = MF_INCLNULL;
360 map->map_class = &s->s_mapclass;
361 map->map_mflags |= MF_ALIAS;
362 if (map->map_class->map_parse(map, spec))
364 map->map_mflags |= MF_VALID;
365 AliasFileMap->map_stack[NAliasFileMaps++] = map;
389 aliaswait(map, ext, isopen) in aliaswait() argument
390 MAP *map; in aliaswait()
401 map->map_class->map_cname, map->map_file);
402 if (bitset(MF_ALIASWAIT, map->map_mflags))
404 map->map_mflags |= MF_ALIASWAIT;
414 map->map_class->map_lookup(map, "@", NULL, &st) == NULL)
435 map->map_mflags |= MF_CLOSING;
436 map->map_class->map_close(map);
437 map->map_mflags &= ~(MF_OPEN|MF_WRITABLE|MF_CLOSING);
442 isopen = map->map_class->map_open(map, O_RDONLY);
447 if (!bitset(MCF_REBUILDABLE, map->map_class->map_cflags))
451 map->map_mflags &= ~MF_ALIASWAIT;
454 if (stat(map->map_file, &stb) < 0)
458 map->map_mflags &= ~MF_ALIASWAIT;
463 map->map_file, ext == NULL ? "" : ext) >= sizeof(buf))
468 map->map_file, ext == NULL ? "" : ext);
470 map->map_file, ext == NULL ? "" : ext);
480 map->map_mflags &= ~MF_ALIASWAIT;
499 rebuildaliases(map, automatic) in rebuildaliases() argument
500 register MAP *map; in rebuildaliases()
512 if (!bitset(MCF_REBUILDABLE, map->map_class->map_cflags))
523 if ((af = safefopen(map->map_file, O_RDWR, 0, sff)) == NULL)
528 (af = safefopen(map->map_file, O_RDONLY, 0, sff)) == NULL)
534 map->map_file, sm_errstring(saveerr));
535 if (!automatic && !bitset(MF_OPTIONAL, map->map_mflags))
537 map->map_file, sm_errstring(saveerr));
546 map->map_file, sm_errstring(errno));
551 !lockfile(sm_io_getinfo(af, SM_IO_WHAT_FD, NULL), map->map_file,
556 map->map_file);
561 map->map_file, NULL, LOCK_EX);
574 if (map->map_class->map_open(map, O_RDWR))
580 map->map_file, automatic ? "auto" : "",
583 map->map_mflags |= MF_OPEN|MF_WRITABLE;
584 map->map_pid = CurrentPid;
585 readaliases(map, af, !automatic, true);
592 map->map_file, sm_errstring(errno));
595 map->map_file);
602 if (bitset(MF_OPEN, map->map_mflags))
604 map->map_mflags |= MF_CLOSING;
605 map->map_class->map_close(map);
606 map->map_mflags &= ~(MF_OPEN|MF_WRITABLE|MF_CLOSING);
639 readaliases(map, af, announcestats, logstats) in readaliases() argument
640 register MAP *map; in readaliases()
656 FileName = map->map_file;
834 map->map_class->map_store(map, al.q_user, rhs);
848 map->map_file, naliases, longest, bytes);
852 map->map_file, naliases, longest, bytes);