Has anyone (Asger?) seen this? I really do not know what are the
whereabouts of fwrite vs fprintf, but we should really look at it...

JMarc



Hi,

I've found a work around for the problem described below.  In file
buffer.C, section Buffer:makeLaTeXFile, "fwrite" is used to write
out the TeX file.  On our system (see below) this silently fails,
producing no output.  As a work around, I replaced the "fwrite" with
"printf".  That seems to work fine.

Here are differences between the modified and original buffer.C from
lyx-1.0.4pre4.


1853,1854c1853
<               // fwrite(LFile.c_str(), sizeof(char), LFile.length(), file);
<               fprintf(file,"%s",LFile.c_str()); // 26-Aug-99 DFN kludge
---
>               fwrite(LFile.c_str(), sizeof(char), LFile.length(), file);
1921,1923c1920,1921
<               //fwrite(preamble.c_str(), sizeof(char),
<               //       preamble.length(), file);
<               fprintf(file,"%s",preamble.c_str()); // 26-Aug-99 DFN kludge
---
>               fwrite(preamble.c_str(), sizeof(char),
>                      preamble.length(), file);
1993,1995c1991,1992
<                 // fwrite(LFile.c_str(), sizeof(char),
<                 //       LFile.length(), file);
<                       fprintf(file,"%s",LFile.c_str()); // 26-Aug-99 DFN kludge
---
>                       fwrite(LFile.c_str(), sizeof(char),
>                              LFile.length(), file);
2020,2021c2017
<       // fwrite(LFile.c_str(), sizeof(char), LFile.length(), file);
<       fprintf(file,"%s",LFile.c_str()); // 26-Aug-99 DFN kludge
---
>       fwrite(LFile.c_str(), sizeof(char), LFile.length(), file);


On Mon, 23 Aug 1999, David F. Nitz wrote:

> Hi,
> 
> Thanks to those who responded to with suggestions regarding my
> problem getting Lyx to work on Solaris 2.6.1.  Unfortunately,
> none of the suggestions hit the mark.  Let me re-describe
> what appears to be the crux of the problem perhaps a bit
> more clearly.
> 
> Operating System: Solaris 2.6
> Compiler: gcc 2.7.2 (Ugh)
> 
> Lyx versions tried:  1.01 pre-built binary
>                    1.03 built from source
>                    1.04pre built from source
> 
> Problem:
> 
> Can't export LaTex file.  A ".tex" file is created, but size is always 0
> bytes.  No error or warning messages are generated.
> 
> Any suggestions?  Thanks.
> 
> ---------------------------------------
> David F. Nitz ([EMAIL PROTECTED])
> Physics Department, Michigan Tech
> Tel: (906)487-2274  Fax: (906) 487-2933
> 

---------------------------------------
David F. Nitz ([EMAIL PROTECTED])
Physics Department, Michigan Tech
Tel: (906)487-2274  Fax: (906) 487-2933





Reply via email to