Lines Matching refs:sp2
169 const char *sp1, *sp2; /* Search result */
196 sp2 = strrchr(filename, '>');
197 if (sp1 == NULL) sp1 = sp2;
198 if (sp2 != NULL && sp2 > sp1) sp1 = sp2;
204 /* Now, let's see if there's a type, and save the position in sp2 */
205 sp2 = strchr(sp1, '.');
207 version number and save the position in sp2 */
208 if (sp2 == NULL) sp2 = strchr(sp1, ';');
209 /* If there was still nothing to find, set sp2 to point at the end of
211 if (sp2 == NULL) sp2 = sp1 + strlen(sp1);
214 if (sp2 - sp1 > FILENAME_MAX
215 || (sp1 - filename) + strlen(sp2) > FILENAME_MAX)
228 strncpy(p->filename, sp1, sp2-sp1);
229 p->filename[sp2-sp1] = '\0';
233 strcat(p->imagename, sp2);