Lines Matching defs:sp2
105 const char *sp1, *sp2; /* Search result */
135 sp2 = strrchr(filename, '>');
137 sp1 = sp2;
138 if (sp2 != NULL && sp2 > sp1)
139 sp1 = sp2;
146 /* Now, let's see if there's a type, and save the position in sp2 */
147 sp2 = strchr(sp1, '.');
152 if (sp2 != NULL && sp2[1] == ';')
156 * number and save the position in sp2
158 if (sp2 == NULL) {
159 sp2 = strchr(sp1, ';');
163 * If there was still nothing to find, set sp2 to point at the end of the
166 if (sp2 == NULL)
167 sp2 = sp1 + strlen(sp1);
170 if (sp2 - sp1 > FILENAME_MAX
171 || (sp1 - filename) + strlen(sp2) > FILENAME_MAX) {
182 strncpy(p->filename, sp1, sp2 - sp1);
183 p->filename[sp2 - sp1] = '\0';
189 if (*sp2 == '.')
190 sp2++;
192 strcat(p->imagename, sp2);