Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions synctex_parser_utils.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/*
/*
Copyright (c) 2008-2024 jerome DOT laurens AT u-bourgogne DOT fr

This file is part of the __SyncTeX__ package.

Version: see synctex_version.h
Latest Revision: Thu Mar 21 14:12:58 UTC 2024

See `synctex_parser_readme.md` for more details

## License

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
Expand All @@ -18,10 +18,10 @@
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
Expand All @@ -30,7 +30,7 @@
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
Expand Down Expand Up @@ -165,8 +165,8 @@ void _synctex_strip_last_path_extension(char * string) {
char * last_component = NULL;
char * last_extension = NULL;
# if defined(SYNCTEX_WINDOWS)
last_component = PathFindFileName(string);
last_extension = PathFindExtension(string);
last_component = PathFindFileNameA(string);
last_extension = PathFindExtensionA(string);
if(last_extension == NULL)return;
if(last_component == NULL)last_component = string;
if(last_extension>last_component){/* filter out paths like "my/dir/.hidden" */
Expand Down Expand Up @@ -371,7 +371,7 @@ char * _synctex_merge_strings(const char * first,...) {
_synctex_error("! _synctex_merge_strings: Memory problem");
return NULL;
}
return NULL;
return NULL;
}

/* The purpose of _synctex_get_name is to find the name of the synctex file.
Expand Down Expand Up @@ -552,7 +552,7 @@ int _synctex_get_name(const char * output, const char * build_directory, char **
}

const char * _synctex_get_io_mode_name(synctex_io_mode_t io_mode) {
static const char * synctex_io_modes[4] = {"r","rb","a","ab"};
static const char * synctex_io_modes[4] = {"r","rb","a","ab"};
unsigned index = ((io_mode & synctex_io_gz_mask)?1:0) + ((io_mode & synctex_io_append_mask)?2:0);// bug pointed out by Jose Alliste
return synctex_io_modes[index];
}
Expand All @@ -564,7 +564,7 @@ static int _synctex_parse_int_C(char * ptr, char ** endptr) {
}
/**
* This was initially suggested by user202729.
*
*
*/
static int _synctex_parse_int_raw1(char * ptr, char ** endptr) {
int result = 0;
Expand Down
24 changes: 12 additions & 12 deletions synctex_parser_utils.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
/*
Copyright (c) 2008-2024 jerome DOT laurens AT u-bourgogne DOT fr

This file is part of the __SyncTeX__ package.

Version: see synctex_version.h
Latest Revision: Thu Mar 21 14:12:58 UTC 2024

See `synctex_parser_readme.md` for more details

## License

Permission is hereby granted, free of charge, to any person
Expand All @@ -31,9 +31,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.

*/
Expand Down Expand Up @@ -73,25 +73,25 @@ extern "C" {
# define SYNCTEX_CASE_SENSITIVE_PATH 1
# define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c)
# endif

# 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

# if defined(_MSC_VER)
# define SYNCTEX_ATTRIBUTE_FORMAT_PRINTF(STRING_INDEX, FIRST_TO_CHECK) ATTRIBUTE_FORMAT_PRINTF(STRING_INDEX, FIRST_TO_CHECK)
# define SYNCTEX_ATTRIBUTE_FORMAT_PRINTF(STRING_INDEX, FIRST_TO_CHECK)
# else
# define SYNCTEX_ATTRIBUTE_FORMAT_PRINTF(STRING_INDEX, FIRST_TO_CHECK) __attribute__((__format__ (__printf__, (STRING_INDEX), (FIRST_TO_CHECK))))
# 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);
Expand Down Expand Up @@ -165,7 +165,7 @@ int _synctex_get_name(const char * output, const char * build_directory, char **
const char * _synctex_get_io_mode_name(synctex_io_mode_t io_mode);

synctex_bool_t synctex_ignore_leading_dot_slash_in_path(const char ** name);

synctex_bool_t synctex_ignore_leading_dot_slash_in_path(const char ** name);
int synctex_parse_int(char * ptr, char ** endptr);

Expand Down
2 changes: 1 addition & 1 deletion synctex_parser_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.30
1.31
4 changes: 2 additions & 2 deletions synctex_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ I would appreciate to be listed as contributor and see "__SyncTeX__" highlighted

/* The version of the synctex parser library */
# define SYNCTEX_VERSION_MAJOR 1
# define SYNCTEX_VERSION_MINOR 30
# define SYNCTEX_VERSION_MINOR 31

/* Keep next value in synch with `synctex_parser_version.txt` contents. */
# define SYNCTEX_VERSION_STRING "1.30"
# define SYNCTEX_VERSION_STRING "1.31"

/* The version of the synctex CLI tool */
# define SYNCTEX_CLI_VERSION_MAJOR 1
Expand Down