Revert "Add '/' as a portable path separator for #include"
This reverts commit b9050b452a7ec7ca27be8bc55e00594e279e3fa4.
This commit is contained in:
parent
b9050b452a
commit
8324d8aba6
@ -66,9 +66,6 @@
|
|||||||
#define DIRSEP_CHAR '/' /* directory separator character */
|
#define DIRSEP_CHAR '/' /* directory separator character */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* system-independent directory separator */
|
|
||||||
#define DIRSEP_CHAR_SI '/'
|
|
||||||
|
|
||||||
/* _MAX_PATH is sometimes called differently and it may be in limits.h or
|
/* _MAX_PATH is sometimes called differently and it may be in limits.h or
|
||||||
* stdlib.h instead of stdio.h.
|
* stdlib.h instead of stdio.h.
|
||||||
*/
|
*/
|
||||||
|
@ -183,8 +183,7 @@ SC_FUNC int plungefile(char *name,int try_currentpath,int try_includepaths)
|
|||||||
* there is a (relative) path for the current file
|
* there is a (relative) path for the current file
|
||||||
*/
|
*/
|
||||||
char *ptr;
|
char *ptr;
|
||||||
if ((ptr=strrchr(inpfname,DIRSEP_CHAR))!=0 |
|
if ((ptr=strrchr(inpfname,DIRSEP_CHAR))!=0) {
|
||||||
(ptr=strrchr(inpfname,DIRSEP_CHAR_SI))!=0) {
|
|
||||||
int len=(int)(ptr-inpfname)+1;
|
int len=(int)(ptr-inpfname)+1;
|
||||||
if (len+strlen(name)<_MAX_PATH) {
|
if (len+strlen(name)<_MAX_PATH) {
|
||||||
char path[_MAX_PATH];
|
char path[_MAX_PATH];
|
||||||
@ -269,8 +268,6 @@ static void doinclude(int silent)
|
|||||||
strcpy(symname,"_inc_");
|
strcpy(symname,"_inc_");
|
||||||
if ((ptr=strrchr(name,DIRSEP_CHAR))!=NULL)
|
if ((ptr=strrchr(name,DIRSEP_CHAR))!=NULL)
|
||||||
strlcat(symname,ptr+1,sizeof symname);
|
strlcat(symname,ptr+1,sizeof symname);
|
||||||
else if ((ptr=strrchr(name,DIRSEP_CHAR_SI))!=NULL)
|
|
||||||
strlcat(symname,ptr+1,sizeof symname);
|
|
||||||
else
|
else
|
||||||
strlcat(symname,name,sizeof symname);
|
strlcat(symname,name,sizeof symname);
|
||||||
if (find_symbol(&glbtab,symname,fcurrent,-1,NULL)==NULL) {
|
if (find_symbol(&glbtab,symname,fcurrent,-1,NULL)==NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user