Lines Matching defs:scriptname
3405 Perl_find_script(pTHX_ const char *scriptname, bool dosearch,
3427 /* additional extensions to try in each dir if scriptname not found */
3441 * If dosearch is true and if scriptname does not contain path
3442 * delimiters, search the PATH for scriptname.
3445 * scriptname{SEARCH_EXTS} whenever scriptname is not found
3451 * + look for ./scriptname{,.foo,.bar}
3452 * + search the PATH for scriptname{,.foo,.bar}
3455 * + look *only* in the PATH for scriptname{,.foo,.bar} (note
3462 len = strlen(scriptname);
3463 if (!(len == 1 && *scriptname == '-') && scriptname[len-1] != ':') {
3467 const int hasdir = !dosearch || (strpbrk(scriptname,":[</") != NULL);
3473 const int hasdir = (strpbrk(scriptname,":[</") != NULL);
3485 if ((strlen(tmpbuf) + strlen(scriptname)
3488 my_strlcat(tmpbuf, scriptname, sizeof(tmpbuf));
3492 if (strEQ(scriptname, "-"))
3495 const char *cur = scriptname;
3497 if ((curext = strrchr(scriptname,'.'))) /* possible current ext */
3512 scriptname = cur;
3519 if (cur == scriptname) {
3520 len = strlen(scriptname);
3523 my_strlcpy(tmpbuf, scriptname, sizeof(tmpbuf));
3532 if (dosearch && !strchr(scriptname, '/')
3534 && !strchr(scriptname, '\\')
3557 if (len + 1 + strlen(scriptname) + MAX_EXT_LEN >= sizeof tmpbuf)
3568 (void)my_strlcpy(tmpbuf + len, scriptname, sizeof(tmpbuf) - len);
3607 (PerlLIO_stat(scriptname,&statbuf) < 0
3619 (xfailed ? xfailed : scriptname),
3623 scriptname = NULL;
3626 scriptname = xfound;
3628 return (scriptname ? savepv(scriptname) : NULL);