Skip to content

Commit

Permalink
Windows: Don't convert '\' to '/' (#369)
Browse files Browse the repository at this point in the history
UNIX line endings (#370)
Better error message (#372)
Increase tftopl memory (#373)
  • Loading branch information
edocevoli committed Sep 24, 2019
1 parent 9f30ac4 commit 2946c4a
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 27 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@

## 2.9.7200 - not yet released

### Breaking changes

#### Windows: text files with UNIX line endings

All TeX engines now write text output files with UNIX line endings.

### Downgraded programs

* luatex 1.10.0

### Fixed issues

* [353](https://github.com/MiKTeX/miktex/issues/353): luatex 1.10.1 has a bug affecting font usage
* [373](https://github.com/MiKTeX/miktex/issues/373): tftopl failed with large .tfm file
* [369](https://github.com/MiKTeX/miktex/issues/369): luatex doesn't handle commands in the name of the main file correctly
* [370](https://github.com/MiKTeX/miktex/issues/370): line endings

## 2.9.7140 - 2019-07-31

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* miktex/TeXAndFriends/WebAppInputLine.h: -*- C++ -*-
Copyright (C) 1996-2018 Christian Schenk
Copyright (C) 1996-2019 Christian Schenk
This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
Expand Down Expand Up @@ -178,7 +178,7 @@ class MIKTEXMFTYPEAPI(WebAppInputLine) :
MIKTEXMFTHISAPI(bool) OpenInputFile(C4P::FileRoot& f, const MiKTeX::Core::PathName& fileName);

public:
MIKTEXMFTHISAPI(bool) OpenOutputFile(C4P::FileRoot& f, const MiKTeX::Core::PathName& fileName, bool text, MiKTeX::Core::PathName& outPath);
MIKTEXMFTHISAPI(bool) OpenOutputFile(C4P::FileRoot& f, const MiKTeX::Core::PathName& fileName, bool isTextFile_deprecated, MiKTeX::Core::PathName& outPath);

public:
MIKTEXMFTHISAPI(bool) AllowFileName(const MiKTeX::Core::PathName& fileName, bool forInput);
Expand Down Expand Up @@ -245,12 +245,12 @@ inline bool miktexallownameoffile(C4P::C4P_boolean forInput)
return WebAppInputLine::GetWebAppInputLine()->AllowFileName(WebAppInputLine::GetWebAppInputLine()->GetNameOfFile(), forInput);
}

template<class FileType> inline bool miktexopenoutputfile(FileType& f, C4P::C4P_boolean text)
template<class FileType> inline bool miktexopenoutputfile(FileType& f, C4P::C4P_boolean isTextFile_deprecated)
{
// must open with read/write sharing flags
// cf. bug 2006511
MiKTeX::Core::PathName outPath;
bool done = WebAppInputLine::GetWebAppInputLine()->OpenOutputFile(*static_cast<C4P::FileRoot*>(&f), WebAppInputLine::GetWebAppInputLine()->GetNameOfFile(), text, outPath);
bool done = WebAppInputLine::GetWebAppInputLine()->OpenOutputFile(*static_cast<C4P::FileRoot*>(&f), WebAppInputLine::GetWebAppInputLine()->GetNameOfFile(), isTextFile_deprecated, outPath);
if (done)
{
#if defined(MIKTEX_OMEGA)
Expand Down
4 changes: 2 additions & 2 deletions Libraries/MiKTeX/TeXAndFriends/inputline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ bool WebAppInputLine::AllowFileName(const PathName& fileName, bool forInput)
return Utils::IsSafeFileName(fileName);
}

bool WebAppInputLine::OpenOutputFile(C4P::FileRoot& f, const PathName& fileName, bool text, PathName& outPath)
bool WebAppInputLine::OpenOutputFile(C4P::FileRoot& f, const PathName& fileName, bool isTextFile_deprecated, PathName& outPath)
{
const char* lpszPath = fileName.GetData();
#if defined(MIKTEX_WINDOWS)
Expand Down Expand Up @@ -353,7 +353,7 @@ bool WebAppInputLine::OpenOutputFile(C4P::FileRoot& f, const PathName& fileName,
path = pimpl->outputDirectory / lpszPath;
lpszPath = path.GetData();
}
file = session->TryOpenFile(lpszPath, FileMode::Create, FileAccess::Write, text);
file = session->TryOpenFile(lpszPath, FileMode::Create, FileAccess::Write, false);
if (file != nullptr)
{
outPath = lpszPath;
Expand Down
2 changes: 1 addition & 1 deletion Libraries/MiKTeX/TeXAndFriends/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
## Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.

set(MIKTEX_COMP_J2000_VERSION 7063)
set(MIKTEX_COMP_J2000_VERSION 7206)
set(MIKTEX_COMP_INTERFACE_VERSION 3)
2 changes: 1 addition & 1 deletion Programs/MiKTeX/Console/Qt/console-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */

#define MIKTEX_COMP_J2000_VERSION 7100
#define MIKTEX_COMP_J2000_VERSION 7206

#include <miktex/Version>
7 changes: 5 additions & 2 deletions Programs/MiKTeX/Console/Qt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,12 @@ int main(int argc, char* argv[])
application.setApplicationDisplayName(displayName);
#endif
unique_ptr<MiKTeX::Core::LockFile> lockFile;
MiKTeX::Core::PathName lockFileName;
try
{
lockFile = LockFile::Create(PathName().SetToHomeDirectory() / "miktex-console.lock");
lockFileName.SetToHomeDirectory();
lockFileName /= "miktex-console.lock";
lockFile = LockFile::Create(lockFileName);
if (!lockFile->TryLock(500ms))
{
QMessageBox::warning(nullptr, displayName, "MiKTeX Console is already running.");
Expand All @@ -229,7 +232,7 @@ int main(int argc, char* argv[])
#if defined(MIKTEX_WINDOWS)
OutputDebugStringW(StringUtil::UTF8ToWideChar(e.what()).c_str());
#endif
QMessageBox::critical(nullptr, displayName, "MiKTeX Console cannot be started.");
QMessageBox::critical(nullptr, displayName, QString("MiKTeX Console cannot be started.\n\nRemedy: remove %1").arg(QString::fromUtf8(lockFileName.GetData())));
return 1;
}
MainWindow::Pages startPage = MainWindow::Pages::Overview;
Expand Down
24 changes: 22 additions & 2 deletions Programs/TeXAndFriends/Knuth/texware/tftopl-miktex.ch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% tftopl-miktex.ch: WEB change file for TFtoPL
%%
%% Copyright (C) 1991-2016 Christian Schenk
%% Copyright (C) 1991-2019 Christian Schenk
%%
%% This file is free software; you can redistribute it and/or modify it
%% under the terms of the GNU General Public License as published by the
Expand Down Expand Up @@ -29,7 +29,27 @@
write_ln;@/
@z

%% ** 7 ******************************************************************
% _____________________________________________________________________________
%
% [1.4]
% _____________________________________________________________________________

@x
@!tfm_size=30000; {maximum length of |tfm| data, in bytes}
@!lig_size=5000; {maximum length of |lig_kern| program, in words}
@!hash_size=5003; {preferably a prime number, a bit larger than the number
of character pairs in lig/kern steps}
@y
@!tfm_size=100000; {maximum length of |tfm| data, in bytes}
@!lig_size=32510; {maximum length of |lig_kern| program, in words ($<2^{15}$)}
@!hash_size=32579; {preferably a prime number, a bit larger than the number
of character pairs in lig/kern steps}
@z

% _____________________________________________________________________________
%
% [2.7]
% _____________________________________________________________________________

@x
reset(tfm_file);
Expand Down
4 changes: 2 additions & 2 deletions Programs/TeXAndFriends/Knuth/texware/tftopl-version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* tftopl-version.h: version number -*- C++ -*-
Copyright (C) 1996-2016 Christian Schenk
Copyright (C) 1996-2019 Christian Schenk
This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
Expand All @@ -17,7 +17,7 @@
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */

#define MIKTEX_COMP_J2000_VERSION 6300
#define MIKTEX_COMP_J2000_VERSION 7206

#define MIKTEX_COMP_ORIG_VERSION_STR "3.3"

Expand Down
2 changes: 1 addition & 1 deletion Programs/TeXAndFriends/luatex/luatex-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */

#define MIKTEX_COMP_J2000_VERSION 7092
#define MIKTEX_COMP_J2000_VERSION 7206

#define MIKTEX_COMP_ORIG_VERSION_STR "1.10.0"

Expand Down
12 changes: 0 additions & 12 deletions Programs/TeXAndFriends/luatex/source/lua/luainit.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,18 +582,6 @@ static void parse_options(int ac, char **av)
} else if (argv[optind] && argv[optind][0] == '&') {
dump_name = xstrdup(argv[optind] + 1);
} else if (argv[optind] && argv[optind][0] != '\\') {
#if defined(MIKTEX_WINDOWS)
{
char* lpsz;
for (lpsz = argv[optind]; *lpsz != 0; ++lpsz)
{
if (*lpsz == '\\')
{
*lpsz = '/';
}
}
}
#endif
if (argv[optind][0] == '*') {
input_name = xstrdup(argv[optind] + 1);
} else {
Expand Down

0 comments on commit 2946c4a

Please sign in to comment.