accept unix directory separators on windows for input file
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11001 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9a94969fdd
commit
da0b517a7f
8 changed files with 32 additions and 22 deletions
|
|
@ -117,6 +117,23 @@ String *Swig_strip_c_comments(const String *s) {
|
|||
}
|
||||
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Swig_filename_correct()
|
||||
*
|
||||
* Corrects filenames on non-unix systems
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
void Swig_filename_correct(String *filename) {
|
||||
#if defined(_WIN32) || defined(MACSWIG)
|
||||
/* accept Unix path separator on non-Unix systems */
|
||||
Replaceall(filename, "/", SWIG_FILE_DELIMITER);
|
||||
#endif
|
||||
#if defined(__CYGWIN__)
|
||||
/* accept Windows path separator in addition to Unix path separator */
|
||||
Replaceall(filename, "\\", SWIG_FILE_DELIMITER);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Swig_filename_escape()
|
||||
*
|
||||
|
|
|
|||
|
|
@ -287,6 +287,7 @@ extern int ParmList_is_compactdefargs(ParmList *p);
|
|||
extern void Swig_banner(File *f);
|
||||
extern String *Swig_strip_c_comments(const String *s);
|
||||
extern String *Swig_filename_escape(String *filename);
|
||||
extern void Swig_filename_correct(String *filename);
|
||||
extern String *Swig_string_escape(String *s);
|
||||
extern String *Swig_string_mangle(const String *s);
|
||||
extern void Swig_scopename_split(String *s, String **prefix, String **last);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue