Lines Matching refs:head
1008 char *head, *tail, *pos, *cpos, *attr, *rest;
1040 head = string;
1043 while (head[0] != '\0') {
1044 if (head[0] == '$') {
1046 if (head[1] == '\0')
1048 if (head[1] == '$') {
1049 strlcpy(temp, head+2, sizeof(temp));
1050 strlcpy(head+1, temp, maxsize);
1051 head++;
1054 head[0] = '\0';
1056 if (strncasecmp(&head[1], subst->name, strlen(subst->name)) == 0) {
1058 tail = head + strlen(subst->name)+1;
1063 } else if (head[0] == '%') {
1065 if (head[1] == '\0')
1067 if (head[1] == '%') {
1068 strlcpy(temp, head+2, sizeof(temp));
1069 strlcpy(head+1, temp, maxsize);
1070 head++;
1073 head[0] = '\0';
1074 tail = head+1;
1085 head++;
1211 head[len] = '\0';
1212 dbg("truncate to %i chars, subtitution string becomes '%s'", len, head);
1217 head = tail = string;
1218 while (*head != '\0') {
1219 if (*head == '\\') {
1220 head++;
1221 if (*head == '\0')
1223 switch (*head) {
1231 default: *tail++ = *head; break;
1233 head++;
1236 if (*head)
1237 *tail++ = *head++;