From: Angus Leeming Date: Fri, 14 Jan 2005 15:53:30 +0000 (+0000) Subject: The Cygwin path fix. X-Git-Tag: 1.6.10~14659 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7b214dd05e55597e49230da58f5525639c088d52;p=features.git The Cygwin path fix. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9478 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 22a8e1f68f..d0f03768ee 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2005-01-02 Kayvan A. Sylvan + + * configure.m4: add \cygwin_path_fix_needed to lyrxc.defaults. + 2005-01-12 Jean-Marc Lasgouttes * reLyX/configure.ac: make sure the prefix is correctly quoted. diff --git a/lib/configure.m4 b/lib/configure.m4 index 20a2799aa0..0f34a7f385 100644 --- a/lib/configure.m4 +++ b/lib/configure.m4 @@ -174,6 +174,7 @@ if test ! -r "${srcdir}"/chkconfig.ltx ; then fi #### Adjust PATH for Win32 (Cygwin) +use_cygwin_path_fix='' case `uname -s` in CYGWIN*) tmpfname="/tmp/x$$.ltx"; @@ -188,8 +189,10 @@ case `uname -s` in echo "configure: cygwin detected; path correction" srcdir=`cygpath -w "${srcdir}" | tr '\\\\' /` echo "srcdir=${srcdir}" + use_cygwin_path_fix='true' else echo "configure: cygwin detected; path correction is not needed" + use_cygwin_path_fix='false' fi ;; esac @@ -659,6 +662,11 @@ $rc_entries \\font_encoding "$chk_fontenc" EOF +if [ "x$use_cygwin_path_fix" != "x" ] +then + echo "\\cygwin_path_fix_needed $use_cygwin_path_fix" >> $outfile +fi + ######## X FONTS # create a fonts.dir file to make X fonts available to LyX echo "checking for TeX fonts" diff --git a/src/ChangeLog b/src/ChangeLog index 6238955291..d4a60b771b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2005-01-13 Angus Leeming + + * lyxrc.C (read): use LyXRC::cygwin_path_fix to set the value of + os::cygwin_path_fix. + (write): output LyXRC::cygwin_path_fix as necessary. + +2005-01-02 Kayvan Sylvan + + * lyxrc.h: + * lyxrc.C (read): Added RC_CYGWIN_PATH_FIX, cygwin_path_fix. + 2005-01-12 Angus Leeming * lyx_main.C (init): set the PATH variable to include the diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 3e13694d47..645ec2c657 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,16 @@ +2005-01-13 Angus Leeming + + * Makefile.dialogs: add QPrefCygwinPathModule.ui. + + * ui/QPrefCygwinPathModule.ui: new file. Defines a pane containing + only a check box "Use Cygwin paths". + + * QPrefs.C (apply, update_contents): code to get/set the value + of the Cygwin check box. Compiled only under Cygwin. + + * QPrefsDialog.[Ch]: code to add teh Cygwin paths module to the + dialog. + 2005-01-10 Angus Leeming * lyx_gui.C: use support/package.h to provide the paths to the diff --git a/src/frontends/qt2/Makefile.dialogs b/src/frontends/qt2/Makefile.dialogs index d16c829f6b..6fc0c196cc 100644 --- a/src/frontends/qt2/Makefile.dialogs +++ b/src/frontends/qt2/Makefile.dialogs @@ -41,6 +41,7 @@ UIFILES = \ QPrefColorsModule.ui \ QPrefConvertersModule.ui \ QPrefCopiersModule.ui \ + QPrefCygwinPathModule.ui \ QPrefDateModule.ui \ QPrefDisplayModule.ui \ QPrefFileformatsModule.ui \ diff --git a/src/frontends/qt2/QPrefs.C b/src/frontends/qt2/QPrefs.C index 39a469eca0..52120b67ad 100644 --- a/src/frontends/qt2/QPrefs.C +++ b/src/frontends/qt2/QPrefs.C @@ -23,6 +23,9 @@ #include "ui/QPrefLatexModule.h" #include "ui/QPrefScreenFontsModule.h" #include "ui/QPrefColorsModule.h" +#if defined(__CYGWIN__) || defined(__CYGWIN32__) +#include "ui/QPrefCygwinPathModule.h" +#endif #include "ui/QPrefDisplayModule.h" #include "ui/QPrefPathsModule.h" #include "ui/QPrefSpellcheckerModule.h" @@ -185,6 +188,10 @@ void QPrefs::apply() rc.date_insert_format = fromqstr(datemod->DateED->text()); +#if defined(__CYGWIN__) || defined(__CYGWIN32__) + QPrefCygwinPathModule * cygwinmod(dialog_->cygwinpathModule); + rc.cygwin_path_fix = cygwinmod->pathCB->isChecked(); +#endif QPrefLatexModule * latexmod(dialog_->latexModule); @@ -505,6 +512,10 @@ void QPrefs::update_contents() datemod->DateED->setText(toqstr(rc.date_insert_format)); +#if defined(__CYGWIN__) || defined(__CYGWIN32__) + QPrefCygwinPathModule * cygwinmod(dialog_->cygwinpathModule); + cygwinmod->pathCB->setChecked(rc.cygwin_path_fix); +#endif QPrefLatexModule * latexmod(dialog_->latexModule); diff --git a/src/frontends/qt2/QPrefsDialog.C b/src/frontends/qt2/QPrefsDialog.C index 83722d708d..1a6496fa22 100644 --- a/src/frontends/qt2/QPrefsDialog.C +++ b/src/frontends/qt2/QPrefsDialog.C @@ -25,6 +25,9 @@ #include "ui/QPrefLatexModule.h" #include "ui/QPrefScreenFontsModule.h" #include "ui/QPrefColorsModule.h" +#if defined(__CYGWIN__) || defined(__CYGWIN32__) +#include "ui/QPrefCygwinPathModule.h" +#endif #include "ui/QPrefDisplayModule.h" #include "ui/QPrefPathsModule.h" #include "ui/QPrefSpellcheckerModule.h" @@ -74,6 +77,9 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) latexModule = new QPrefLatexModule(this); screenfontsModule = new QPrefScreenFontsModule(this); colorsModule = new QPrefColorsModule(this); +#if defined(__CYGWIN__) || defined(__CYGWIN32__) + cygwinpathModule = new QPrefCygwinPathModule(this); +#endif displayModule = new QPrefDisplayModule(this); pathsModule = new QPrefPathsModule(this); spellcheckerModule = new QPrefSpellcheckerModule(this); @@ -103,6 +109,9 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) prefsPS->addPanel(asciiModule, _("ASCII"), op); prefsPS->addPanel(dateModule, _("Date format"), op); prefsPS->addPanel(latexModule, _("LaTeX"), op); +#if defined(__CYGWIN__) || defined(__CYGWIN32__) + prefsPS->addPanel(cygwinpathModule, _("Paths"), op); +#endif prefsPS->addPanel(printerModule, _("Printer"), op); prefsPS->addPanel(identityModule, _("Identity")); @@ -222,6 +231,9 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) connect(asciiModule->asciiLinelengthSB, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor())); connect(asciiModule->asciiRoffED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor())); connect(dateModule->DateED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor())); +#if defined(__CYGWIN__) || defined(__CYGWIN32__) + connect(cygwinpathModule->pathCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor())); +#endif connect(latexModule->latexEncodingED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor())); connect(latexModule->latexChecktexED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor())); connect(latexModule->latexBibtexED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor())); diff --git a/src/frontends/qt2/QPrefsDialog.h b/src/frontends/qt2/QPrefsDialog.h index 1ea10d57a9..9e1a223d34 100644 --- a/src/frontends/qt2/QPrefsDialog.h +++ b/src/frontends/qt2/QPrefsDialog.h @@ -25,6 +25,7 @@ class QPrefKeyboardModule; class QPrefLatexModule; class QPrefScreenFontsModule; class QPrefColorsModule; +class QPrefCygwinPathModule; class QPrefDisplayModule; class QPrefPathsModule; class QPrefSpellcheckerModule; @@ -105,6 +106,9 @@ private: QPrefLatexModule * latexModule; QPrefScreenFontsModule * screenfontsModule; QPrefColorsModule * colorsModule; +#if defined(__CYGWIN__) || defined(__CYGWIN32__) + QPrefCygwinPathModule * cygwinpathModule; +#endif QPrefDisplayModule * displayModule; QPrefPathsModule * pathsModule; QPrefSpellcheckerModule * spellcheckerModule; diff --git a/src/frontends/qt2/ui/QPrefCygwinPathModule.ui b/src/frontends/qt2/ui/QPrefCygwinPathModule.ui new file mode 100644 index 0000000000..8e8139e5fa --- /dev/null +++ b/src/frontends/qt2/ui/QPrefCygwinPathModule.ui @@ -0,0 +1,78 @@ + +QPrefCygwinPathModule +config.h +qt_helpers.h + + QWidget + + name + QPrefCygwinPathModule + + + geometry + + 0 + 0 + 275 + 91 + + + + caption + Cygwin Paths + + + + name + Spacer1 + + + orientation + Vertical + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + QCheckBox + + name + pathCB + + + enabled + true + + + geometry + + 10 + 10 + 260 + 26 + + + + text + &Use Cygwin-style paths + + + toolTip + + + + whatsThis + Select if LyX should output Cygwin-style paths rather than Windows-style paths. Useful if you're using the Cygwin teTeX rather than a native Windows MikTeX. Note, however, that you'll need to write shell script wrappers for all your converters. + + + + diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 41f69ccc98..3ffbd9a7f0 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,11 @@ +2005-01-13 Angus Leeming + + * FormPreferences.C: code to get/set the value + of the Cygwin check box. Compiled only under Cygwin. + + * forms/form_preferences.fd: add a Cygwin paths check box to the + Outputs->Misc tab. + 2005-01-13 Angus Leeming * FormPreferences.C: use getString, a safe wrapper around fl_get_input. diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index fa8e8c751d..02ffb2bb5e 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -2072,6 +2072,10 @@ void FormPreferences::OutputsMisc::apply(LyXRC & rc) const rc.index_command = getString(dialog_->input_index); rc.view_dvi_paper_option = getString(dialog_->input_paperoption); rc.auto_reset_options = fl_get_button(dialog_->check_autoreset_classopt); + +#if defined(__CYGWIN__) || defined(__CYGWIN32__) + rc.cygwin_path_fix = fl_get_button(dialog_->check_cygwin_path); +#endif } @@ -2089,6 +2093,11 @@ void FormPreferences::OutputsMisc::build() fl_set_input_return(dialog_->input_index, FL_RETURN_CHANGED); fl_set_input_return(dialog_->input_paperoption, FL_RETURN_CHANGED); +#if defined(__CYGWIN__) || defined(__CYGWIN32__) +#else + setEnabled(dialog_->check_cygwin_path, false); +#endif + fl_addto_choice(dialog_->choice_default_papersize, _(" default | US letter | US legal " "| US executive | A3 | A4 | A5 | B5 ").c_str()); @@ -2103,6 +2112,9 @@ void FormPreferences::OutputsMisc::build() setPrehandler(dialog_->input_index); setPrehandler(dialog_->input_paperoption); setPrehandler(dialog_->check_autoreset_classopt); +#if defined(__CYGWIN__) || defined(__CYGWIN32__) + setPrehandler(dialog_->check_cygwin_path); +#endif } @@ -2127,6 +2139,14 @@ FormPreferences::OutputsMisc::feedback(FL_OBJECT const * const ob) const return LyXRC::getDescription(LyXRC::RC_VIEWDVI_PAPEROPTION); if (ob == dialog_->check_autoreset_classopt) return LyXRC::getDescription(LyXRC::RC_AUTORESET_OPTIONS); +#if defined(__CYGWIN__) || defined(__CYGWIN32__) + if (ob == dialog_->check_cygwin_path) + return _("Select if LyX should output Cygwin-style paths " + "rather than Windows-style paths. Useful if you're " + "using the Cygwin teTeX rather than a native Windows " + "MikTeX. Note, however, that you'll need to write " + "shell script wrappers for all your converters."); +#endif return string(); } @@ -2151,7 +2171,9 @@ void FormPreferences::OutputsMisc::update(LyXRC const & rc) rc.view_dvi_paper_option.c_str()); fl_set_button(dialog_->check_autoreset_classopt, rc.auto_reset_options); - +#if defined(__CYGWIN__) || defined(__CYGWIN32__) + fl_set_button(dialog_->check_cygwin_path, rc.cygwin_path_fix); +#endif } diff --git a/src/frontends/xforms/forms/form_preferences.fd b/src/frontends/xforms/forms/form_preferences.fd index 5bd7a3eb32..5c567b36b8 100644 --- a/src/frontends/xforms/forms/form_preferences.fd +++ b/src/frontends/xforms/forms/form_preferences.fd @@ -2880,13 +2880,13 @@ argument: =============== FORM =============== Name: form_preferences_outputs_misc Width: 455 -Height: 400 -Number of Objects: 12 +Height: 435 +Number of Objects: 13 -------------------- class: FL_BOX type: FLAT_BOX -box: 0 0 455 400 +box: 0 0 455 435 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -2904,7 +2904,7 @@ argument: -------------------- class: FL_FRAME type: ENGRAVED_FRAME -box: 10 10 435 165 +box: 10 15 435 190 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER @@ -2980,7 +2980,7 @@ argument: 0 -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME -box: 10 190 435 200 +box: 10 220 435 200 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT @@ -2998,7 +2998,7 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 145 205 285 30 +box: 145 235 285 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -3016,7 +3016,7 @@ argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 145 240 285 30 +box: 145 270 285 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -3034,7 +3034,7 @@ argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 145 275 285 30 +box: 145 305 285 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -3052,12 +3052,12 @@ argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 20 140 30 30 +box: 400 140 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_CENTER +alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE +size: FL_NORMAL_SIZE lcol: FL_BLACK label: Autoreset Class Options on change|#u shortcut: @@ -3070,7 +3070,7 @@ argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 145 310 285 30 +box: 145 340 285 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -3088,7 +3088,7 @@ argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 145 345 285 30 +box: 145 375 285 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -3103,5 +3103,23 @@ name: input_index callback: C_FormDialogView_InputCB argument: 0 +-------------------- +class: FL_CHECKBUTTON +type: PUSH_BUTTON +box: 400 170 30 30 +boxtype: FL_NO_BOX +colors: FL_COL1 FL_YELLOW +alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Use Cygwin Paths|#s +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: check_cygwin_path +callback: C_FormDialogView_InputCB +argument: 0 + ============================== create_the_forms diff --git a/src/lyxrc.C b/src/lyxrc.C index 18ab6b0052..9ffa6c8efa 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -33,9 +33,10 @@ #include "graphics/GraphicsTypes.h" +#include "support/convert.h" #include "support/filetools.h" #include "support/lstrings.h" -#include "support/convert.h" +#include "support/os.h" #include "support/userinfo.h" using lyx::support::ascii_lowercase; @@ -45,6 +46,8 @@ using lyx::support::GetEnv; using lyx::support::LibFileSearch; using lyx::support::token; +namespace os = lyx::support::os; + using std::cout; using std::endl; @@ -76,6 +79,7 @@ keyword_item lyxrcTags[] = { { "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR }, { "\\custom_export_command", LyXRC::RC_CUSTOM_EXPORT_COMMAND }, { "\\custom_export_format", LyXRC::RC_CUSTOM_EXPORT_FORMAT }, + { "\\cygwin_path_fix_needed", LyXRC::RC_CYGWIN_PATH_FIX }, { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT }, { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE }, { "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE }, @@ -264,8 +268,7 @@ void LyXRC::setDefaults() { language_command_local = "\\foreignlanguage{$$lang}{"; default_language = "english"; show_banner = true; - - // + cygwin_path_fix = false; date_insert_format = "%A, %e %B %Y"; cursor_follows_scrollbar = false; dialogs_iconify_with_main = false; @@ -388,6 +391,13 @@ int LyXRC::read(LyXLex & lexrc) } break; + case RC_CYGWIN_PATH_FIX: + if (lexrc.next()) { + cygwin_path_fix = lexrc.getBool(); + os::cygwin_path_fix(cygwin_path_fix); + } + break; + case RC_KBMAP_PRIMARY: if (lexrc.next()) { string const kmap(lexrc.getString()); @@ -1296,6 +1306,13 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const use_kbmap != system_lyxrc.use_kbmap) { os << "\\kbmap " << convert(use_kbmap) << '\n'; } + + case RC_CYGWIN_PATH_FIX: + if (ignore_system_lyxrc || + cygwin_path_fix != system_lyxrc.cygwin_path_fix) { + os << "\\cygwin_path_fix_needed " + << convert(cygwin_path_fix) << '\n'; + } case RC_KBMAP_PRIMARY: if (ignore_system_lyxrc || primary_kbmap != system_lyxrc.primary_kbmap) { diff --git a/src/lyxrc.h b/src/lyxrc.h index 187d61eb35..8eee3fe871 100644 --- a/src/lyxrc.h +++ b/src/lyxrc.h @@ -133,6 +133,7 @@ enum LyXRCTags { RC_USER_NAME, RC_USER_EMAIL, RC_INDEX_COMMAND, + RC_CYGWIN_PATH_FIX, RC_LAST }; @@ -374,6 +375,8 @@ public: std::string user_name; /// user email std::string user_email; + /// + bool cygwin_path_fix; }; diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 71b308818f..dfed66dc6b 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,14 @@ +2005-01-02 Kayvan Sylvan + + * os_win32.C (external_path): Check the new cygwin_path_fix_ bool + before translating external paths to Win32 paths. + +2005-01-13 Angus Leeming + + * os.h, os_os2.C, os_unix.C, os_win32.C (cygwin_path_fix): new + function flagging whether LyX should output native Win32 paths + or cygwin paths. Obviously operative only under Cygwin. + 2005-01-13 Angus Leeming * package.C.in: use "%n$s" rather than "%n%" for n=1,2,3... when @@ -39,7 +50,7 @@ * Makefile.am: remove path_defines.{C.in,h}. Add package.{C.in,h}. - * filetools.C[Ch] (GetEnvPath): remove. + * filetools.[Ch] (GetEnvPath): remove. (getEnvPath): replacement. Returns a vector of paths. * filetools.C: diff --git a/src/support/os.h b/src/support/os.h index ca4bd675ec..f9517dcc39 100644 --- a/src/support/os.h +++ b/src/support/os.h @@ -60,6 +60,12 @@ char const * popen_read_mode(); */ char path_separator(); +/** If @c use_cygwin_paths is true, LyX will output cygwin style paths + * rather than native Win32 ones. Obviously, this option is used only + * under Cygwin. + */ +void cygwin_path_fix(bool use_cygwin_paths); + } // namespace os } // namespace support } // namespace lyx diff --git a/src/support/os_os2.C b/src/support/os_os2.C index aba74d9168..e49b3317f6 100644 --- a/src/support/os_os2.C +++ b/src/support/os_os2.C @@ -208,6 +208,10 @@ char path_separator() return ';'; } + +void cygwin_path_fix(bool) +{} + } // namespace os } // namespace support } // namespace lyx diff --git a/src/support/os_unix.C b/src/support/os_unix.C index d2a3e07c36..2823577313 100644 --- a/src/support/os_unix.C +++ b/src/support/os_unix.C @@ -87,11 +87,16 @@ shell_type shell() return UNIX; } + char path_separator() { return ':'; } + +void cygwin_path_fix(bool) +{} + } // namespace os } // namespace support } // namespace lyx diff --git a/src/support/os_win32.C b/src/support/os_win32.C index 28b0ca104e..94f1b1f329 100644 --- a/src/support/os_win32.C +++ b/src/support/os_win32.C @@ -72,13 +72,22 @@ string::size_type common_path(string const & p1, string const & p2) } +#if defined(__CYGWIN__) || defined(__CYGWIN32__) +namespace { + +bool cygwin_path_fix_ = false; + +} // namespace anon +#endif + + string external_path(string const & p) { string dos_path; #if defined(__CYGWIN__) || defined(__CYGWIN32__) // Translate from cygwin path syntax to dos path syntax - if (is_absolute_path(p)) { + if (cygwin_path_fix_ && is_absolute_path(p)) { char dp[PATH_MAX]; cygwin_conv_to_full_win32_path(p.c_str(), dp); dos_path = !dp ? "" : dp; @@ -163,6 +172,7 @@ shell_type shell() #endif } + char path_separator() { #if defined (_WIN32) @@ -172,6 +182,17 @@ char path_separator() #endif } + +void cygwin_path_fix(bool use_cygwin_paths) +{ +#if defined (_WIN32) + // Silence warning. + (void)use_cygwin_paths; +#else // Cygwin + use_cygwin_paths_ = use_cygwin_paths; +#endif +} + } // namespace os } // namespace support } // namespace lyx