diff options
| author | Andreas Politz <politza@hochschule-trier.de> | 2017-09-18 13:27:38 +0200 |
|---|---|---|
| committer | Andreas Politz <politza@hochschule-trier.de> | 2017-09-18 13:27:38 +0200 |
| commit | 310d88ee89fffd55ac0f1696967e69a8ff43d2bc (patch) | |
| tree | 3ced2dde5fd27f05ff774cdb1c6265ac7a036491 /server/synctex_parser_utils.h | |
| parent | 8b81804452fb953700470fbfe80db68279d86566 (diff) | |
Updated synctex parser from upstream
Diffstat (limited to 'server/synctex_parser_utils.h')
| -rw-r--r-- | server/synctex_parser_utils.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/server/synctex_parser_utils.h b/server/synctex_parser_utils.h index b41e66e..9c76ac5 100644 --- a/server/synctex_parser_utils.h +++ b/server/synctex_parser_utils.h @@ -1,11 +1,11 @@ -/* +/* Copyright (c) 2008, 2009, 2010, 2011 jerome DOT laurens AT u-bourgogne DOT fr This file is part of the SyncTeX package. Latest Revision: Tue Jun 14 08:23:30 UTC 2011 -Version: 1.16 +Version: 1.18 See synctex_parser_readme.txt for more details @@ -32,9 +32,9 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE -Except as contained in this notice, the name of the copyright holder -shall not be used in advertising or otherwise to promote the sale, -use or other dealings in this Software without prior written +Except as contained in this notice, the name of the copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in this Software without prior written authorization from the copyright holder. */ @@ -61,18 +61,26 @@ authorization from the copyright holder. extern "C" { #endif -# if _WIN32 +# if defined(_WIN32) || defined(__OS2__) +# define SYNCTEX_CASE_SENSITIVE_PATH 0 # define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c || '\\' == c) # else +# define SYNCTEX_CASE_SENSITIVE_PATH 1 # define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c) # endif - -# if _WIN32 + +# if defined(_WIN32) || defined(__OS2__) # define SYNCTEX_IS_DOT(c) ('.' == c) # else # define SYNCTEX_IS_DOT(c) ('.' == c) # endif - + +# if SYNCTEX_CASE_SENSITIVE_PATH +# define SYNCTEX_ARE_PATH_CHARACTERS_EQUAL(left,right) (left != right) +# else +# define SYNCTEX_ARE_PATH_CHARACTERS_EQUAL(left,right) (toupper(left) != toupper(right)) +# endif + /* This custom malloc functions initializes to 0 the newly allocated memory. * There is no bzero function on windows. */ void *_synctex_malloc(size_t size); @@ -100,6 +108,9 @@ synctex_bool_t _synctex_path_is_absolute(const char * name); /* Description forthcoming...*/ const char * _synctex_last_path_component(const char * name); +/* Description forthcoming...*/ +const char * _synctex_base_name(const char *path); + /* If the core of the last path component of src is not already enclosed with double quotes ('"') * and contains a space character (' '), then a new buffer is created, the src is copied and quotes are added. * In all other cases, no destination buffer is created and the src is not copied. @@ -132,8 +143,8 @@ int _synctex_get_name(const char * output, const char * build_directory, char ** /* returns the correct mode required by fopen and gzopen from the given io_mode */ const char * _synctex_get_io_mode_name(synctex_io_mode_t io_mode); -const char * synctex_ignore_leading_dot_slash(const char * name); - +synctex_bool_t synctex_ignore_leading_dot_slash_in_path(const char ** name); + #ifdef __cplusplus } #endif |
