mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
write output to infile.lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10354 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8ce79c6fd3
commit
db92c134c2
@ -1,6 +1,7 @@
|
||||
2005-07-25 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* tex2lyx.C (main): allow specification of output file name
|
||||
* tex2lyx.C (main): write to infile.lyx if no output file is given
|
||||
|
||||
2005-07-18 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
|
@ -52,6 +52,7 @@ using std::string;
|
||||
using std::vector;
|
||||
using std::map;
|
||||
|
||||
using lyx::support::ChangeExtension;
|
||||
using lyx::support::isStrUnsignedInt;
|
||||
using lyx::support::ltrim;
|
||||
using lyx::support::MakeAbsPath;
|
||||
@ -495,8 +496,12 @@ int main(int argc, char * argv[])
|
||||
// file name (the latter is optional).
|
||||
string const infilename = MakeAbsPath(argv[1]);
|
||||
string outfilename;
|
||||
if (argc > 2)
|
||||
outfilename = MakeAbsPath(argv[2]);
|
||||
if (argc > 2) {
|
||||
outfilename = argv[2];
|
||||
if (outfilename != "-")
|
||||
outfilename = MakeAbsPath(argv[2]);
|
||||
} else
|
||||
outfilename = ChangeExtension(infilename, ".lyx");
|
||||
|
||||
string const system_syntaxfile = lyx::support::LibFileSearch("", "syntax.default");
|
||||
if (system_syntaxfile.empty()) {
|
||||
@ -510,7 +515,7 @@ int main(int argc, char * argv[])
|
||||
masterFilePath = OnlyPath(infilename);
|
||||
parentFilePath = masterFilePath;
|
||||
|
||||
if (outfilename.empty() || outfilename == "-") {
|
||||
if (outfilename == "-") {
|
||||
if (tex2lyx(infilename, cout))
|
||||
return EXIT_SUCCESS;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user