Lines Matching refs:sp1
143 const char *sp1, *sp2; /* Search result */
168 position of the byte after in sp1 */
169 sp1 = strrchr(filename, ']');
171 if (sp1 == NULL) sp1 = sp2;
172 if (sp2 != NULL && sp2 > sp1) sp1 = sp2;
173 if (sp1 == NULL) sp1 = strrchr(filename, ':');
174 if (sp1 == NULL)
175 sp1 = filename;
177 sp1++; /* The byte after the found character */
179 sp2 = strchr(sp1, '.');
182 if (sp2 == NULL) sp2 = strchr(sp1, ';');
185 if (sp2 == NULL) sp2 = sp1 + strlen(sp1);
188 if (sp2 - sp1 > FILENAME_MAX
189 || (sp1 - filename) + strlen(sp2) > FILENAME_MAX)
202 strncpy(p->filename, sp1, sp2-sp1);
203 p->filename[sp2-sp1] = '\0';
205 strncpy(p->imagename, filename, sp1-filename);
206 p->imagename[sp1-filename] = '\0';