123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- #ifndef SYNCTEX_PARSER_UTILS_H
- #define SYNCTEX_PARSER_UTILS_H
- #include "synctex_version.h"
- typedef int synctex_bool_t;
- # define synctex_YES (0==0)
- # define synctex_NO (0==1)
- # define synctex_ADD_QUOTES -1
- # define synctex_COMPRESS -1
- # define synctex_DONT_ADD_QUOTES 0
- # define synctex_DONT_COMPRESS 0
- #ifndef __SYNCTEX_PARSER_UTILS__
- # define __SYNCTEX_PARSER_UTILS__
- #include <stdlib.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- # 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 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
-
- void *_synctex_malloc(size_t size);
- void _synctex_free(void * ptr);
- int _synctex_error(const char * reason,...);
- int _synctex_debug(const char * reason,...);
- void _synctex_strip_last_path_extension(char * string);
- synctex_bool_t _synctex_is_equivalent_file_name(const char *lhs, const char *rhs);
- synctex_bool_t _synctex_path_is_absolute(const char * name);
- const char * _synctex_last_path_component(const char * name);
- const char * _synctex_base_name(const char *path);
- int _synctex_copy_with_quoting_last_path_component(const char * src, char ** dest_ref, size_t size);
- extern const char * synctex_suffix;
- extern const char * synctex_suffix_gz;
- typedef unsigned int synctex_io_mode_t;
- typedef enum {
- synctex_io_append_mask = 1,
- synctex_io_gz_mask = synctex_io_append_mask<<1
- } synctex_io_mode_masks_t;
- typedef enum {
- synctex_compress_mode_none = 0,
- synctex_compress_mode_gz = 1
- } synctex_compress_mode_t;
- int _synctex_get_name(const char * output, const char * build_directory, char ** synctex_name_ref, synctex_io_mode_t * io_mode_ref);
- 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);
-
- #ifdef __cplusplus
- }
- #endif
- #endif
- #endif
|