Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-17 Thread Angus Leeming
Bennett Helm wrote: > On Feb 17, 2005, at 5:52 AM, Angus Leeming wrote: > >> Anyway, Bennett, if you'd be good enough to test out >> ifstream ifs(from.c_str(), ios::in | ios::binary); >> then I'll apply that instead if you find that it works. > > "ifstream ifs(from.c_str(), ios::in | ios

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-17 Thread Bennett Helm
On Feb 17, 2005, at 5:52 AM, Angus Leeming wrote: Anyway, Bennett, if you'd be good enough to test out ifstream ifs(from.c_str(), ios::in | ios::binary); then I'll apply that instead if you find that it works. "ifstream ifs(from.c_str(), ios::in | ios::binary);" works. Bennett

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-17 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > > | We do in LyX 1.3.x which is what bennett is trying to get working. We > | don't support the (2.95 + 2.95 stdlib) combo in LyX 1.4.x. > > I think I saw some patches for 1.4.x as well... You haven't seen any formal patch

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-17 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | We do in LyX 1.3.x which is what bennett is trying to get working. We | don't support the (2.95 + 2.95 stdlib) combo in LyX 1.4.x. I think I saw some patches for 1.4.x as well... | So, I guess that defines the way forward. I'll commit my original work

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-17 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > >>> | { >>> | +#if defined (WIN32) >>> | ifstream ifs(from.c_str(), ios::binary); >>> | +#else >>> | +// A bug in the gcc 2.95 implementation of ifstream >>> | +// means that we can't use ios::binary here (even

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-17 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: >> | { >> | +#if defined (WIN32) >> | ifstream ifs(from.c_str(), ios::binary); >> | +#else >> | +// A bug in the gcc 2.95 implementation of ifstream >> | +// means that we can't use ios::binary here (even though >> | +// it should have no

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-17 Thread Angus Leeming
Lars Gullik Bjønnes wrote: >>> On Feb 16, 2005, at 1:38 PM, Angus Leeming wrote: >>> Just to be crystal clear: does it work if you change -ifstream ifs(from.c_str(), ios::binary); +ifstream ifs(from.c_str()); >>> >>> Yes. (As does LyX when I make that change in copy.C.) >>

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-17 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Bennett Helm wrote: > >> On Feb 16, 2005, at 1:38 PM, Angus Leeming wrote: >> >>> Just to be crystal clear: does it work if you change >>> -ifstream ifs(from.c_str(), ios::binary); >>> +ifstream ifs(from.c_str()); >> >> Yes. (As does LyX when I

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-17 Thread Angus Leeming
Bennett Helm wrote: > On Feb 16, 2005, at 1:38 PM, Angus Leeming wrote: > >> Just to be crystal clear: does it work if you change >> -ifstream ifs(from.c_str(), ios::binary); >> +ifstream ifs(from.c_str()); > > Yes. (As does LyX when I make that change in copy.C.) Then since Windows cau

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-16 Thread Bennett Helm
On Feb 16, 2005, at 1:38 PM, Angus Leeming wrote: Just to be crystal clear: does it work if you change -ifstream ifs(from.c_str(), ios::binary); +ifstream ifs(from.c_str()); Yes. (As does LyX when I make that change in copy.C.) Bennett

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-16 Thread Angus Leeming
Bennett Helm wrote: >> Try the attached version. Then >> >> $ g++ prog.cc >> $ ./a.out from.png to.png >> copy ok >> $ cmp from.png to.png >> $ >> >> should work. Otherwise cmp will say that the files differ. >> >> You are still using gcc 2.95.2, no? If tellp() messes up streams >> I wouldn't be su

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-16 Thread Bennett Helm
On Feb 16, 2005, at 12:29 PM, [EMAIL PROTECTED] wrote: Hi! Try the attached version. Then $ g++ prog.cc $ ./a.out from.png to.png copy ok $ cmp from.png to.png $ should work. Otherwise cmp will say that the files differ. You are still using gcc 2.95.2, no? If tellp() messes up streams I wouldn't be

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-16 Thread vox
Hi! Try the attached version. Then $ g++ prog.cc $ ./a.out from.png to.png copy ok $ cmp from.png to.png $ should work. Otherwise cmp will say that the files differ. You are still using gcc 2.95.2, no? If tellp() messes up streams I wouldn't be surprised that this program also doesn't work. (se

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-02-16 Thread Bennett Helm
I've dropped the ball on this, but it's something that should be fixed before releasing lyx-136. Just a reminder: when graphics files are copied to the tmp directory in MacOS X, the copy fails resulting in empty (0kB) files. Consequently, typesetting fails on any file with graphics. Angus wrot

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-01-06 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: > Angus> So, the 'culprit' is lyx::copy which is telling us that all > Angus> succeeded when, in fact, it didn't. > > Angus> Here's support/copy.C. Do we need to flush the ofstream? Lars, > Angus> what's the official take on this? Irrespective of the official > Angus> t

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-01-06 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Here's support/copy.C. Do we need to flush the ofstream? no | Lars, what's the official take on this? | Irrespective of the official take, does adding a 'flush()' help? on a buggy stdlib.. yes perhaps. | bool lyx::copy(string const & from, string c

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-01-06 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> So, the 'culprit' is lyx::copy which is telling us that all Angus> succeeded when, in fact, it didn't. Angus> Here's support/copy.C. Do we need to flush the ofstream? Lars, Angus> what's the official take on this? Irrespective of t

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-01-06 Thread Angus Leeming
Bennett Helm wrote: > On Jan 6, 2005, at 3:30 AM, Angus Leeming wrote: > >> Bennett Helm wrote: >>> I'm not sure when this happened, but recently LyX's attempts to copy >>> graphics files from their original directories to the tmp directory >>> results in files of 0K. This is with LyX 1.3.x (curr

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-01-06 Thread Bennett Helm
On Jan 6, 2005, at 3:30 AM, Angus Leeming wrote: Bennett Helm wrote: I'm not sure when this happened, but recently LyX's attempts to copy graphics files from their original directories to the tmp directory results in files of 0K. This is with LyX 1.3.x (current CVS) on Mac OS X. Could you try to ex

Re: LyX-13x: Copying Graphics Files to tmp dir

2005-01-06 Thread Angus Leeming
Bennett Helm wrote: > I'm not sure when this happened, but recently LyX's attempts to copy > graphics files from their original directories to the tmp directory > results in files of 0K. This is with LyX 1.3.x (current CVS) on Mac OS > X. Could you try to explain again. What you have written isn't