Lines Matching defs:sp

340 #define IS_DOTDOT(sp, p) (ISDOTDOT(p) && ((p) == (sp) || *((p) - 1) == '/'))
341 #define IS_DOT(sp, p) (ISDOT(p) && ((p) == (sp) || *((p) - 1) == '/'))
878 Char *sp;
929 sp = p; /* save slash address */
932 if (p != ++sp)
933 for (p1 = sp, p2 = p; (*p1++ = *p2++) != '\0';)
935 p = sp; /* save start of component */
946 if (&cp[1] == sp && sp[0] == '.' && sp[1] == '.' && sp[2] == '\0')
949 if (*sp == '\0') { /* if component is null */
950 if (--sp == cp) /* if path is one char (i.e. /) */
953 *sp = '\0';
955 else if (sp[0] == '.' && sp[1] == 0) {
957 for (p1 = sp, p2 = p + 1; (*p1++ = *p2++) != '\0';)
959 p = --sp;
961 else if (--sp != cp)
962 *sp = '\0';
964 sp[1] = '\0';
966 else if (sp[0] == '.' && sp[1] == '.' && sp[2] == 0) {
973 *--sp = 0; /* form the pathname for readlink */
975 if (sp != cp && /* symlinks != SYM_IGNORE && */
985 *(p = sp) = '/';
989 * "/..". First, back sp up to the character past "yyy/".
991 while (*--sp != '/')
993 sp++;
994 *sp = 0;
998 p1 = newcp = xmalloc(((sp - cp) + Strlen(mlink) +
1012 p = sp - cp - 1 + newcp;
1029 *sp = '/';
1030 if (sp != cp)
1031 while (*--sp != '/')
1034 for (p1 = sp + 1, p2 = p + 1; (*p1++ = *p2++) != '\0';)
1036 p = sp;
1038 else if (cp == sp)
1039 *++sp = '\0';
1041 *sp = '\0';
1046 if (sp != cp && symlinks == SYM_CHASE &&
1058 * point sp to p (rather than backing up).
1060 sp = p;
1065 * remainder. First, back sp up to the character past
1068 while (*--sp != '/')
1070 sp++;
1071 *sp = 0;
1075 p1 = newcp = xmalloc(((sp - cp) + Strlen(mlink) +
1089 p = sp - cp - 1 + newcp;
1149 if ((sp = Strrchr(p2, '/')) != NULL)
1150 *sp = '\0';