60 if ((Dash = rindex(piPath,
'-')))
62 int vn = strtol(Dash+1, &endP, 10);
63 if (vn && !strcmp(endP,
".so"))
66 snprintf(buff,
sizeof(buff),
"%.*s%s",
int(Dash-piPath),piPath,endP);
67 if (isOurs(buff)) *piNoVN = strdup(buff);
73 if (piNoVN) *piNoVN = 0;
81 bool XrdOucVerName::isOurs(
const char *path)
83 const char *Slash = rindex(path,
'/');
85 Slash = (Slash ? Slash+1 : path);
87 while(StrictName[n] && strcmp(Slash, StrictName[n])) n++;
89 return (StrictName[n] != 0);
99 const char *Dot, *Slash, *fName;
104 if ((Slash = rindex(piPath,
'/')))
105 {pLen = Slash-piPath+1; Dot = rindex(Slash+1,
'.'); fName = Slash+1;}
106 else {pLen = 0; Dot = rindex(piPath,
'.'); fName = piPath;}
107 if (Dot) pLen += Dot-fName;
108 else {pLen += strlen(fName); Dot =
"";}
113 while(StrictName[n] && strcmp(fName, StrictName[n])) n++;
114 noFBK = (StrictName[n] != 0);
118 n = snprintf(buff, blen-1,
"%.*s-%s%s", pLen, piPath, piVers, Dot);
122 return (n < blen ? n : 0);
#define XrdVERSIONPLUGINSTRICT
static int Version(const char *piVers, const char *piPath, bool &noFBK, char *buff, int blen)
static int hasVersion(const char *piPath, char **piNoVN=0)