summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorOlaf Weber <olaf@infovore.xs4all.nl>2007-01-20 11:02:18 +0000
committerOlaf Weber <olaf@infovore.xs4all.nl>2007-01-20 11:02:18 +0000
commit84d9c74e5ba4d126227e134af908acd8b821ac20 (patch)
tree328eb8c711cf609c2c007281b97cbe4f679b4a2d /Build/source
parent42b0ba58161cb261ecf866b20444cb0f5eee3b9c (diff)
Use strchr()/strrchr() instead of index()/rindex().
git-svn-id: svn://tug.org/texlive/trunk@3622 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/detex/detex.l8
1 files changed, 4 insertions, 4 deletions
diff --git a/Build/source/texk/detex/detex.l b/Build/source/texk/detex/detex.l
index d4cb084fc20..16bc1121586 100644
--- a/Build/source/texk/detex/detex.l
+++ b/Build/source/texk/detex/detex.l
@@ -293,7 +293,7 @@ char *rgsbArgs[];
#ifdef KPATHSEA
kpse_set_program_name (rgsbArgs[0], NULL);
#endif
- if ((sbProgName = rindex(rgsbArgs[0], '/')) != NULL)
+ if ((sbProgName = strrchr(rgsbArgs[0], '/')) != NULL)
sbProgName++;
else
sbProgName = rgsbArgs[0];
@@ -532,7 +532,7 @@ char *sbFile;
if (csbIncList == 0) /* no list */
return(1);
(void)strcpy(sbBase, sbFile);
- if ((pch = rindex(sbBase, '.')) != NULL)
+ if ((pch = strrchr(sbBase, '.')) != NULL)
*pch = '\0';
i = 0;
while ((i < csbIncList) && rgsbIncList[i])
@@ -602,7 +602,7 @@ int csbMax;
while (sbList && *sbList && csbList < csbMax) {
rgsbList[csbList++] = sbList;
- if (sbList = index(sbList, chSep))
+ if (sbList = strchr(sbList, chSep))
*sbList++ = '\0';
}
return(sbList && *sbList ? ERROR : csbList);
@@ -648,7 +648,7 @@ char *sbFile;
#endif
/* If sbFile ends in .tex then it must be there */
- if ((pch = rindex(sbFullPath, '.')) != NULL
+ if ((pch = strrchr(sbFullPath, '.')) != NULL
&& (strcmp(pch, ".tex") == 0))
if ((fp = fopen(sbFullPath, "r")) != NULL)
return(fp);