Lines Matching defs:to

480  * from="-" maps to from=""
481 * to="-" maps to to=""
485 mapset(Table_t* tab, const char* from, int fromsize, register const char* to, int tosize)
502 if (!tosize && (!to || !to[0] || to[0] == '-' && !to[1]) || tosize == 1 && to[0] == '-')
504 to = state.null;
507 message((-2, "mount: %-*s %-*s", from == state.null ? 1 : fromsize ? fromsize : strlen(from), from == state.null ? "-" : from, to == state.null ? 1 : tosize ? tosize : strlen(to), to == state.null ? "-" : to));
508 if ((!tosize || tosize >= 2) && to[0] == '/' && to[1] == '#')
510 to += 2;
513 return special(to, tosize, from, fromsize);
517 if (!*to)
524 if (tosize || !to[0])
528 * so we have to believe from and to here
531 return search(tab, from, fromsize, to, tosize) ? 0 : -1;
551 old = search(tab, from, fromsize, NiL, *to ? 0 : T_DELETE);
552 if (!*to)
564 old->val = (char*)to;
566 old->val = strcpy(newof(0, char, strlen(to), 1), to);
569 search(tab, from, fromsize, to, tosize|T_ALLOCATE);
577 if (x && !(to = pathreal(to, P_PATHONLY|P_ABSOLUTE|P_NOSLASH, NiL)))
579 if ((n = T_VALSIZE(old)) == (tosize ? tosize : strlen(to)) && strneq(old->val, to, n))
595 if (!pathreal(to, P_PATHONLY|P_ABSOLUTE|P_NOSLASH, NiL))
597 to = (const char*)state.path.name;
599 if (tab == &state.vsafe || !streq(buf, to))
600 search(tab, buf, fromsize, to, T_ALLOCATE);
615 register char* to;
643 for (to = bp; *bp && *bp != ' ' && *bp != '\n'; bp++);
645 tosize = bp - to;
649 if (mapset(&state.vpath, from, fromsize, to, tosize))
652 message((-1, "TABLE %-*s -> %-*s FAILED", fromsize, from, tosize, to));
654 message((-1, "TABLE %s -> %s FAILED", from, to));
663 if (mapset(&state.vpath, from, fromsize, to, tosize) || state.table.version != TABLE_VERSION)