Commit ef744bbd authored by Atsuhito Kohda's avatar Atsuhito Kohda

Imported Upstream version 0.5~svn952

parent bfafb429
......@@ -36,7 +36,8 @@ FIND_PATH(POPPLER_XPDF_INCLUDE_DIR NAMES poppler-config.h
/usr/include
HINTS
${POPPLER_PKG_INCLUDE_DIRS} # Generated by pkg-config
PATH_SUFFIXES poppler
PATH_SUFFIXES
poppler
)
IF( NOT(POPPLER_XPDF_INCLUDE_DIR) )
......@@ -83,7 +84,10 @@ FIND_PATH(POPPLER_QT4_INCLUDE_DIR NAMES poppler-qt4.h poppler-link.h
/usr/include
HINTS
${POPPLER_QT4_PKG_INCLUDE_DIRS} # Generated by pkg-config
PATH_SUFFIXES poppler qt4
PATH_SUFFIXES
poppler
qt4
poppler/qt4
)
IF ( NOT(POPPLER_QT4_INCLUDE_DIR) )
MESSAGE(STATUS "Could not find Poppler-Qt4 headers." )
......
......@@ -18,20 +18,20 @@ IF ( ${CMAKE_INSTALL_PREFIX} MATCHES .*/_CPack_Packages/.* )
# ---------------------------------
IF ( NOT EXISTS ${PROJECT_SOURCE_DIR}/poppler-data-0.4.4.tar.gz )
MESSAGE(STATUS "Downloading Poppler data files")
FILE(DOWNLOAD "http://poppler.freedesktop.org/poppler-data-0.4.4.tar.gz"
${PROJECT_SOURCE_DIR}/poppler-data-0.4.4.tar.gz
EXPECTED_MD5 f3a1afa9218386b50ffd262c00b35b31
FILE(DOWNLOAD "http://poppler.freedesktop.org/poppler-data-0.4.5.tar.gz"
${PROJECT_SOURCE_DIR}/poppler-data-0.4.5.tar.gz
EXPECTED_MD5 448dd7c5077570e340340706cef931aa
SHOW_PROGRESS
)
ENDIF ()
IF ( NOT EXISTS ${PROJECT_SOURCE_DIR}/poppler-data-0.4.4 )
EXECUTE_PROCESS(COMMAND tar xzf ${PROJECT_SOURCE_DIR}/poppler-data-0.4.4.tar.gz
IF ( NOT EXISTS ${PROJECT_SOURCE_DIR}/poppler-data-0.4.5 )
EXECUTE_PROCESS(COMMAND tar xzf ${PROJECT_SOURCE_DIR}/poppler-data-0.4.5.tar.gz
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
ENDIF ()
FILE(INSTALL ${PROJECT_SOURCE_DIR}/poppler-data-0.4.4/
FILE(INSTALL ${PROJECT_SOURCE_DIR}/poppler-data-0.4.5/
DESTINATION ${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}.app/Contents/poppler-data
PATTERN CMakeLists.txt EXCLUDE
PATTERN Makefile EXCLUDE
......
......@@ -5,7 +5,7 @@
#
# To install Poppler using this formula:
#
# brew install --with-qt4 --enable-xpdf-headers path/to/this/poppler.rb
# brew install path/to/this/poppler.rb
#
# Changes compared to Homebrew's standard Poppler formula:
#
......@@ -21,17 +21,18 @@ TEXWORKS_PATCH_DIR = TEXWORKS_SOURCE_DIR + 'lib-patches'
require 'formula'
class PopplerData < Formula
url 'http://poppler.freedesktop.org/poppler-data-0.4.4.tar.gz'
md5 'f3a1afa9218386b50ffd262c00b35b31'
url 'http://poppler.freedesktop.org/poppler-data-0.4.5.tar.gz'
md5 '448dd7c5077570e340340706cef931aa'
end
class Poppler < Formula
url 'http://poppler.freedesktop.org/poppler-0.16.7.tar.gz'
homepage 'http://poppler.freedesktop.org/'
md5 '3afa28e3c8c4f06b0fbca3c91e06394e'
url 'http://poppler.freedesktop.org/poppler-0.18.1.tar.gz'
homepage 'http://poppler.freedesktop.org'
md5 'd30e883a27423c936ef338ce1d967e2d'
version '0.18.1-texworks'
depends_on 'pkg-config' => :build
depends_on "qt" if ARGV.include? "--with-qt4"
depends_on 'qt'
def patches
{
......@@ -43,14 +44,8 @@ class Poppler < Formula
}
end
def options
[
["--with-qt4", "Include Qt4 support (which compiles all of Qt4!)"],
["--enable-xpdf-headers", "Also install XPDF headers."]
]
end
def install
ENV.x11
cmake_args = std_cmake_parameters.split
# Save time by not building tests
......@@ -61,10 +56,13 @@ class Poppler < Formula
'-DBUILD_QT4_TESTS=OFF'
]
cmake_args << "-DWITH_Qt4=OFF" unless ARGV.include? "--with-qt4"
cmake_args << "-DENABLE_XPDF_HEADERS=ON" if ARGV.include? "--enable-xpdf-headers"
# Components required by TeXworks.
cmake_args.concat [
'-DWITH_Qt4=YES',
'-DENABLE_XPDF_HEADERS=YES'
]
# TeXworks-specific additions to minimize library dependencies
# Minimize library dependencies for TeXworks
cmake_args.concat [
'-DENABLE_ABIWORD=OFF',
'-DENABLE_CPP=OFF',
......
<!DOCTYPE plist PUBLIC
"-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>tex</string>
<string>ltx</string>
<string>sty</string>
<string>cls</string>
<string>dtx</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>TeXworks-doc.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/plain</string>
</array>
<key>CFBundleTypeName</key>
<string>TeX Document</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pdf</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>TeXworks-doc.icns</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/pdf</string>
</array>
<key>LSItemContentTypes</key>
<array>
<string>com.adobe.pdf</string>
</array>
<key>CFBundleTypeName</key>
<string>PDF Document</string>
</dict>
</array>
<key>CFBundleIconFile</key>
<string>TeXworks.icns</string>
<key>CFBundleGetInfoString</key>
<string>TeXworks version 0.5 (r.939)&#xA;(C) 2007-2011 Jonathan Kew, Stefan L&#xF6;ffler&#xA;Released under GPL (v2.0 or later)</string>
<key>CFBundleExecutable</key>
<string>TeXworks</string>
<key>CFBundleIdentifier</key>
<string>org.tug.texworks</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>0.5 (r.939)</string>
<key>CFBundleVersion</key>
<string>0.5 (r.939)</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f144ddf..54c9ceb 100644
index 5614238..dbcf436 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -377,7 +377,7 @@ add_library(poppler STATIC ${poppler_SRCS})
@@ -351,7 +351,7 @@ add_library(poppler STATIC ${poppler_SRCS})
else(MSVC)
add_library(poppler SHARED ${poppler_SRCS})
endif(MSVC)
-set_target_properties(poppler PROPERTIES VERSION 13.0.0 SOVERSION 13)
-set_target_properties(poppler PROPERTIES VERSION 19.0.0 SOVERSION 19)
+set_target_properties(poppler PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)
target_link_libraries(poppler ${poppler_LIBS})
target_link_libraries(poppler LINK_INTERFACE_LIBRARIES "")
install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
diff --git a/qt4/src/CMakeLists.txt b/qt4/src/CMakeLists.txt
index 479e6ad..7d06a9d 100644
index 8ce8ff4..7d06a9d 100644
--- a/qt4/src/CMakeLists.txt
+++ b/qt4/src/CMakeLists.txt
@@ -29,7 +29,7 @@ set(poppler_qt4_SRCS
)
qt4_automoc(${poppler_qt4_SRCS})
add_library(poppler-qt4 SHARED ${poppler_qt4_SRCS})
-set_target_properties(poppler-qt4 PROPERTIES VERSION 3.4.0 SOVERSION 3)
-set_target_properties(poppler-qt4 PROPERTIES VERSION 3.7.0 SOVERSION 3)
+set_target_properties(poppler-qt4 PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)
target_link_libraries(poppler-qt4 poppler ${QT4_QTCORE_LIBRARY} ${QT4_QTGUI_LIBRARY} ${QT4_QTXML_LIBRARY})
if(MSVC)
......
......@@ -1099,6 +1099,7 @@ QScrollArea* PDFWidget::getScrollArea()
#pragma mark === PDFDocument ===
// TODO: This is seemingly unused---verify && remove
QList<PDFDocument*> PDFDocument::docList;
PDFDocument::PDFDocument(const QString &fileName, TeXDocument *texDoc)
......@@ -1382,6 +1383,10 @@ void PDFDocument::saveRecentFileInfo()
void PDFDocument::loadFile(const QString &fileName)
{
setCurrentFile(fileName);
QSETTINGS_OBJECT(settings);
QFileInfo info(fileName);
settings.setValue("openDialogDir", info.canonicalPath());
reload();
if (watcher) {
const QStringList files = watcher->files();
......
......@@ -133,8 +133,9 @@ void PrefsDialog::movePathDown()
void PrefsDialog::addPath()
{
QString dir = QFileDialog::getExistingDirectory(this, tr("Choose Directory"),
"/usr", 0 /*QFileDialog::DontUseNativeDialog*/
/*QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks*/);
"/usr", /*0*/ /*QFileDialog::DontUseNativeDialog*/
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
// remove the trailing / (if any)
dir = QDir::fromNativeSeparators(dir);
#ifdef Q_WS_WIN
if (dir.length() > 2)
......@@ -317,6 +318,7 @@ void PrefsDialog::restoreDefaults()
smartQuotes->setCurrentIndex(kDefault_QuotesMode);
encoding->setCurrentIndex(encoding->findText("UTF-8"));
highlightCurrentLine->setChecked(kDefault_HighlightCurrentLine);
autocompleteEnabled->setChecked(kDefault_AutocompleteEnabled);
break;
case 2:
......@@ -525,6 +527,7 @@ QDialog::DialogCode PrefsDialog::doPrefsDialog(QWidget *parent)
dlg.fontSize->setValue(font.pointSize());
dlg.encoding->setCurrentIndex(nameList.indexOf(TWApp::instance()->getDefaultCodec()->name()));
dlg.highlightCurrentLine->setChecked(settings.value("highlightCurrentLine", kDefault_HighlightCurrentLine).toBool());
dlg.autocompleteEnabled->setChecked(settings.value("autocompleteEnabled", kDefault_AutocompleteEnabled).toBool());
QString defDict = settings.value("language", "None").toString();
int i = dlg.language->findData(defDict);
......@@ -672,7 +675,11 @@ QDialog::DialogCode PrefsDialog::doPrefsDialog(QWidget *parent)
bool highlightLine = dlg.highlightCurrentLine->isChecked();
settings.setValue("highlightCurrentLine", highlightLine);
CompletingEdit::setHighlightCurrentLine(highlightLine);
bool autocompleteEnabled = dlg.autocompleteEnabled->isChecked();
settings.setValue("autocompleteEnabled", autocompleteEnabled);
CompletingEdit::setAutocompleteEnabled(autocompleteEnabled);
// Since the tab width can't be set by any other means, forcibly update
// all windows now
foreach (QWidget* widget, TWApp::instance()->allWidgets()) {
......
......@@ -41,6 +41,7 @@ const bool kDefault_WrapLines = true;
const int kDefault_TabWidth = 32;
const int kDefault_HideConsole = 1;
const bool kDefault_HighlightCurrentLine = true;
const bool kDefault_AutocompleteEnabled = true;
class QListWidgetItem;
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>541</width>
<height>511</height>
<width>676</width>
<height>534</height>
</rect>
</property>
<property name="windowTitle">
......@@ -496,6 +496,16 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="autocompleteEnabled">
<property name="text">
<string>Enable autocompletion</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
#define SVN_REVISION 939
#define SVN_REVISION_STR "939"
#define SVN_REVISION 952
#define SVN_REVISION_STR "952"
......@@ -475,7 +475,7 @@ void TWApp::writeToMailingList()
{
// The strings here are deliberately NOT localizable!
QString address("texworks@tug.org");
QString body("Instructions:\n-) Please write your message in English (it's in your own best interest; otherwise, many people will not be able to understand it and therefore will not answer).\n\n-) Please type something meaningful in the subject line.\n\n-) If you are having a problem, please describe it step-by-step in detail.\n\n-) After reading, please delete these instructions (up to the \"configuration info\" below which we may need to find the source of problems).\n\n\n\n----- configuration info -----\n");
QString body("Thank you for taking the time to write an email to the TeXworks mailing list. Please read the instructions below carefully as following them will greatly facilitate the communication.\n\nInstructions:\n-) Please write your message in English (it's in your own best interest; otherwise, many people will not be able to understand it and therefore will not answer).\n\n-) Please type something meaningful in the subject line.\n\n-) If you are having a problem, please describe it step-by-step in detail.\n\n-) After reading, please delete these instructions (up to the \"configuration info\" below which we may need to find the source of problems).\n\n\n\n----- configuration info -----\n");
body += "TeXworks version : " TEXWORKS_VERSION "r" SVN_REVISION_STR " (" TW_BUILD_ID_STR ")\n";
#ifdef Q_WS_MAC
......@@ -529,7 +529,11 @@ void TWApp::writeToMailingList()
body += " (runtime)\n";
body += "------------------------------\n";
openUrl(QUrl(QString("mailto:%1?&body=%3").arg(address).arg(body)));
#ifdef Q_WS_WIN
body.replace('\n', "\r\n");
#endif
openUrl(QUrl(QString("mailto:%1?subject=&body=%2").arg(address).arg(body)));
}
void TWApp::launchAction()
......
......@@ -50,7 +50,13 @@ public:
ScriptHook, ///< hook, i.e. a script that is called automatically when the execution reaches a certain point
ScriptStandalone ///< standalone script, i.e. one that can be invoked by the user
};
Q_PROPERTY(QString fileName READ getFilename);
Q_PROPERTY(QString title READ getTitle);
Q_PROPERTY(QString description READ getDescription);
Q_PROPERTY(QString author READ getAuthor);
Q_PROPERTY(QString version READ getVersion);
/** \brief Destructor
*
* Does nothing
......
......@@ -567,7 +567,7 @@ TWScriptable::runScript(QObject* script, TWScript::ScriptType scriptType)
bool success = sm->runScript(script, this, result, scriptType);
if (success) {
if (!result.isNull()) {
if (!result.isNull() and !result.toString().isEmpty()) {
if (scriptType == TWScript::ScriptHook)
statusBar()->showMessage(tr("Script \"%1\": %2").arg(s->getTitle()).arg(result.toString()), kStatusMessageDuration);
else
......
......@@ -453,11 +453,12 @@ void TWUtils::setDefaultFilters()
{
*filters << QObject::tr("TeX documents (*.tex)");
*filters << QObject::tr("LaTeX documents (*.ltx)");
*filters << QObject::tr("Log files (*.log)");
*filters << QObject::tr("BibTeX databases (*.bib)");
*filters << QObject::tr("Style files (*.sty)");
*filters << QObject::tr("Class files (*.cls)");
*filters << QObject::tr("Documented macros (*.dtx)");
*filters << QObject::tr("Auxiliary files (*.aux *.toc *.lot *.lof *.nav *.out *.snm *.ind *.idx *.bbl *.log)");
*filters << QObject::tr("Auxiliary files (*.aux *.toc *.lot *.lof *.nav *.out *.snm *.ind *.idx *.bbl)");
*filters << QObject::tr("Text files (*.txt)");
*filters << QObject::tr("PDF documents (*.pdf)");
*filters << QObject::tr("All files") + " (*)"; // this must not be "*.*", which causes an extension ".*" to be added on some systems
......
......@@ -568,8 +568,6 @@ void TeXDocument::open()
QStringList files = QFileDialog::getOpenFileNames(this, QString(tr("Open File")), lastOpenDir, TWUtils::filterList()->join(";;"), NULL, options);
foreach (QString fileName, files) {
if (!fileName.isEmpty()) {
QFileInfo info(fileName);
settings.setValue("openDialogDir", info.canonicalPath());
TWApp::instance()->openFile(fileName); // not TeXDocument::open() - give the app a chance to open as PDF
}
}
......@@ -1025,6 +1023,12 @@ void TeXDocument::loadFile(const QString &fileName, bool asTemplate, bool inBack
if (!inBackground) {
openPdfIfAvailable(false);
}
// set openDialogDir after openPdfIfAvailable as we want the .tex file's
// path to end up in that variable (which might be touched/changed when
// loading the pdf
QSETTINGS_OBJECT(settings);
QFileInfo info(fileName);
settings.setValue("openDialogDir", info.canonicalPath());
statusBar()->showMessage(tr("File \"%1\" loaded").arg(TWUtils::strippedName(curFile)),
kStatusMessageDuration);
......
This diff is collapsed.
......@@ -5,7 +5,7 @@ This file is part of the SyncTeX package.
Latest Revision: Tue Jun 14 08:23:30 UTC 2011
Version: 1.16
Version: 1.17
See synctex_parser_readme.txt for more details
......@@ -236,6 +236,7 @@ synctex_node_t synctex_node_sheet(synctex_node_t node);
synctex_node_t synctex_node_child(synctex_node_t node);
synctex_node_t synctex_node_sibling(synctex_node_t node);
synctex_node_t synctex_node_next(synctex_node_t node);
synctex_node_t synctex_sheet(synctex_scanner_t scanner,int page);
synctex_node_t synctex_sheet_content(synctex_scanner_t scanner,int page);
/* These are the types of the synctex nodes */
......@@ -264,6 +265,11 @@ const char * synctex_node_isa(synctex_node_t node);
void synctex_node_log(synctex_node_t node);
void synctex_node_display(synctex_node_t node);
/* Given a node, access to the location in the synctex file where it is defined.
*/
typedef unsigned int synctex_charindex_t;
synctex_charindex_t synctex_node_charindex(synctex_node_t node);
/* Given a node, access to its tag, line and column.
* The line and column numbers are 1 based.
* The latter is not yet fully supported in TeX, the default implementation returns 0 which means the whole line.
......@@ -274,6 +280,14 @@ int synctex_node_tag(synctex_node_t node);
int synctex_node_line(synctex_node_t node);
int synctex_node_column(synctex_node_t node);
/* In order to enhance forward synchronization,
* non void horizontal boxes have supplemental cached information.
* The mean line is the average of the line numbers of the included nodes.
* The child count is the number of chidren.
*/
int synctex_node_mean_line(synctex_node_t node);
int synctex_node_child_count(synctex_node_t node);
/* This is the page where the node appears.
* This is a 1 based index as given by TeX.
*/
......
......@@ -5,7 +5,7 @@ This file is part of the SyncTeX package.
Latest Revision: Tue Jun 14 08:23:30 UTC 2011
Version: 1.16
Version: 1.17
See synctex_parser_readme.txt for more details
......@@ -141,36 +141,57 @@ void _synctex_strip_last_path_extension(char * string) {
}
}
const char * synctex_ignore_leading_dot_slash(const char * name)
synctex_bool_t synctex_ignore_leading_dot_slash_in_path(const char ** name_ref)
{
while(SYNCTEX_IS_DOT(*name) && SYNCTEX_IS_PATH_SEPARATOR(name[1])) {
name += 2;
while (SYNCTEX_IS_PATH_SEPARATOR(*name)) {
++name;
}
if (SYNCTEX_IS_DOT((*name_ref)[0]) && SYNCTEX_IS_PATH_SEPARATOR((*name_ref)[1])) {
do {
(*name_ref) += 2;
while (SYNCTEX_IS_PATH_SEPARATOR((*name_ref)[1])) {
++(*name_ref);
}
} while(SYNCTEX_IS_DOT((*name_ref)[0]) && SYNCTEX_IS_PATH_SEPARATOR((*name_ref)[1]));
return synctex_YES;
}
return name;
return synctex_NO;
}
/* The base name is necessary to deal with the 2011 file naming convention...
* path is a '\0' terminated string
* The return value is the trailing part of the argument,
* just following the first occurrence of the regexp pattern "[^|/|\].[\|/]+".*/
const char * _synctex_base_name(const char *path) {
const char * ptr = path;
do {
if (synctex_ignore_leading_dot_slash_in_path(&ptr)) {
return ptr;
}
do {
if (!*(++ptr)) {
return path;
}
} while (!SYNCTEX_IS_PATH_SEPARATOR(*ptr));
} while (*(++ptr));
return path;
}
/* Compare two file names, windows is sometimes case insensitive... */
synctex_bool_t _synctex_is_equivalent_file_name(const char *lhs, const char *rhs) {
/* Remove the leading regex '(\./+)*' in both rhs and lhs */
lhs = synctex_ignore_leading_dot_slash(lhs);
rhs = synctex_ignore_leading_dot_slash(rhs);
# if SYNCTEX_WINDOWS
/* On Windows, filename should be compared case insensitive.
* The characters '/' and '\' are both valid path separators.
* There will be a very serious problem concerning UTF8 because
* not all the characters must be toupper...
* I would like to have URL's instead of filenames. */
synctex_ignore_leading_dot_slash_in_path(&lhs);
synctex_ignore_leading_dot_slash_in_path(&rhs);
next_character:
if(SYNCTEX_IS_PATH_SEPARATOR(*lhs)) {/* lhs points to a path separator */
if(!SYNCTEX_IS_PATH_SEPARATOR(*rhs)) {/* but not rhs */
if (SYNCTEX_IS_PATH_SEPARATOR(*lhs)) {/* lhs points to a path separator */
if (!SYNCTEX_IS_PATH_SEPARATOR(*rhs)) {/* but not rhs */
return synctex_NO;
}
} else if(SYNCTEX_IS_PATH_SEPARATOR(*rhs)) {/* rhs points to a path separator but not lhs */
++lhs;
++rhs;
synctex_ignore_leading_dot_slash_in_path(&lhs);
synctex_ignore_leading_dot_slash_in_path(&rhs);
goto next_character;
} else if (SYNCTEX_IS_PATH_SEPARATOR(*rhs)) {/* rhs points to a path separator but not lhs */
return synctex_NO;
} else if(toupper(*lhs) != toupper(*rhs)){/* uppercase do not match */
} else if (SYNCTEX_ARE_PATH_CHARACTERS_EQUAL(*lhs,*rhs)){/* uppercase do not match */
return synctex_NO;
} else if (!*lhs) {/* lhs is at the end of the string */
return *rhs ? synctex_NO : synctex_YES;
......@@ -180,9 +201,6 @@ next_character:
++lhs;
++rhs;
goto next_character;
# else
return 0 == strcmp(lhs,rhs)?synctex_YES:synctex_NO;
# endif
}
synctex_bool_t _synctex_path_is_absolute(const char * name) {
......
......@@ -5,7 +5,7 @@ This file is part of the SyncTeX package.
Latest Revision: Tue Jun 14 08:23:30 UTC 2011
Version: 1.16
Version: 1.17
See synctex_parser_readme.txt for more details
......@@ -61,9 +61,14 @@ authorization from the copyright holder.
extern "C" {
#endif
#define FALSE 0
#define TRUE !FALSE
# if _WIN32
# define SYNCTEX_CASE_SENSITIVE_PATH FALSE
# define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c || '\\' == c)
# else
# define SYNCTEX_CASE_SENSITIVE_PATH TRUE
# define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c)
# endif
......@@ -73,6 +78,12 @@ extern "C" {
# 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 +111,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,7 +146,7 @@ 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
}
......
1.16
\ No newline at end of file
1.17
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment