Fix multi-line strings, to make this build when using gcc3.

This commit is contained in:
kristerw 2004-07-10 18:52:27 +00:00
parent bcc09e41f3
commit 6d60eb0957
2 changed files with 216 additions and 1 deletions

View file

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.2 2002/07/15 16:51:31 mycroft Exp $
$NetBSD: distinfo,v 1.3 2004/07/10 18:52:27 kristerw Exp $
SHA1 (gnumeric-0.75.tar.gz) = 5c5d8ea33283452c61a989b493a34b9b584b150d
Size (gnumeric-0.75.tar.gz) = 8722118 bytes
SHA1 (patch-aa) = 554ba6f4c4469ca83f1324f8bfc9a7c56f6031fd
SHA1 (patch-ab) = 7fd701d3528d8fd20fb532b1c59bb8f217100609

View file

@ -0,0 +1,214 @@
$NetBSD: patch-ab,v 1.1 2004/07/10 18:52:27 kristerw Exp $
--- plugins/html/latex.c.orig 2004-07-10 20:40:00.000000000 +0200
+++ plugins/html/latex.c 2004-07-10 20:46:24.000000000 +0200
@@ -234,95 +234,95 @@
static void
latex2e_write_file_header(FILE *fp)
{
- fputs("
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %%
-%% This is the header of a LaTeX2e file exported from Gnumeric. %%
-%% %%
-%% This file can be compiled as it stands or included in another %%
-%% LaTeX document. The table is based on the longtable package so %%
-%% the longtable options (headers, footers...) can be set in the %%
-%% preamble section below (see PRAMBLE). %%
-%% %%
-%% To include the file in another, the following two lines must be %%
-%% in the including file: %%
-%% \\def\\inputGnumericTable{} %%
-%% at the begining of the file and: %%
-%% \\input{name-of-this-file.tex} %%
-%% where the table is to be placed. Note also that the including %%
-%% file must use the following packages for the table to be %%
-%% rendered correctly: %%
-%% \\usepackage[latin1]{inputenc} %%
-%% \\usepackage{color} %%
-%% \\usepackage{longtable} %%
-%% optionally (for landscape tables embedded in another document): %%
-%% \\usepackage{lscape} %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-
-%% This section checks if we are begin input into another file or %%
-%% the file will be compiled alone. First use a macro taken from %%
-%% the TeXbook ex 7.7 (suggestion of Han-Wen Nienhuys). %%
-\\def\\ifundefined#1{\\expandafter\\ifx\\csname#1\\endcsname\\relax}
-
-
-%% Check for the \\def token for inputed files. If it is not %%
-%% defined, the file will be processed as a standalone and the %%
-%% preamble will be used. %%
-\\ifundefined{inputGnumericTable}
-
-%% We must be able to close or not the document at the end. %%
- \\def\\gnumericTableEnd{\\end{document}}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %%
-%% This is the PREAMBLE. Change these values to get the right %%
-%% paper size and other niceties. Uncomment the landscape option %%
-%% to the documentclass defintion for standalone documents. %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
- \\documentclass[12pt%
- %,landscape%
- ]{report}
- \\usepackage[latin1]{inputenc}
- \\usepackage{color}
- \\usepackage{longtable}
-
- \\begin{document}
-
-%% End of the preamble for the standalone. The next section is for %%
-%% documents which are included into other LaTeX2e files. %%
-\\else
-
-%% We are not a stand alone document. For a regular table, we will %%
-%% have no preamble and only define the closing to mean nothing. %%
- \\def\\gnumericTableEnd{}
-
-%% If we want landscape mode in an embedded document, comment out %%
-%% the line above and uncomment the two below. The table will %%
-%% begin on a new page and run in landscape mode. %%
-% \\def\\gnumericTableEnd{\\end{landscape}}
-% \\begin{landscape}
-
-
-%% End of the else clause for this file being \\input. %%
-\\fi
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %%
-%% The rest is the gnumeric table, except for the closing %%
-%% statement. Changes below will alter the table\'s appearance. %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% The \\setlongtables command keeps column widths the same across %%
-%% pages. Simply comment out next line for varying column widths. %%
-\\setlongtables
-
+ fputs("\n\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\
+%% %%\n\
+%% This is the header of a LaTeX2e file exported from Gnumeric. %%\n\
+%% %%\n\
+%% This file can be compiled as it stands or included in another %%\n\
+%% LaTeX document. The table is based on the longtable package so %%\n\
+%% the longtable options (headers, footers...) can be set in the %%\n\
+%% preamble section below (see PRAMBLE). %%\n\
+%% %%\n\
+%% To include the file in another, the following two lines must be %%\n\
+%% in the including file: %%\n\
+%% \\def\\inputGnumericTable{} %%\n\
+%% at the begining of the file and: %%\n\
+%% \\input{name-of-this-file.tex} %%\n\
+%% where the table is to be placed. Note also that the including %%\n\
+%% file must use the following packages for the table to be %%\n\
+%% rendered correctly: %%\n\
+%% \\usepackage[latin1]{inputenc} %%\n\
+%% \\usepackage{color} %%\n\
+%% \\usepackage{longtable} %%\n\
+%% optionally (for landscape tables embedded in another document): %%\n\
+%% \\usepackage{lscape} %%\n\
+%% %%\n\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\
+\n\
+\n\
+\n\
+%% This section checks if we are begin input into another file or %%\n\
+%% the file will be compiled alone. First use a macro taken from %%\n\
+%% the TeXbook ex 7.7 (suggestion of Han-Wen Nienhuys). %%\n\
+\\def\\ifundefined#1{\\expandafter\\ifx\\csname#1\\endcsname\\relax}\n\
+\n\
+\n\
+%% Check for the \\def token for inputed files. If it is not %%\n\
+%% defined, the file will be processed as a standalone and the %%\n\
+%% preamble will be used. %%\n\
+\\ifundefined{inputGnumericTable}\n\
+\n\
+%% We must be able to close or not the document at the end. %%\n\
+ \\def\\gnumericTableEnd{\\end{document}}\n\
+\n\
+\n\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\
+%% %%\n\
+%% This is the PREAMBLE. Change these values to get the right %%\n\
+%% paper size and other niceties. Uncomment the landscape option %%\n\
+%% to the documentclass defintion for standalone documents. %%\n\
+%% %%\n\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\
+\n\
+ \\documentclass[12pt%\n\
+ %,landscape%\n\
+ ]{report}\n\
+ \\usepackage[latin1]{inputenc}\n\
+ \\usepackage{color}\n\
+ \\usepackage{longtable}\n\
+\n\
+ \\begin{document}\n\
+\n\
+%% End of the preamble for the standalone. The next section is for %%\n\
+%% documents which are included into other LaTeX2e files. %%\n\
+\\else\n\
+\n\
+%% We are not a stand alone document. For a regular table, we will %%\n\
+%% have no preamble and only define the closing to mean nothing. %%\n\
+ \\def\\gnumericTableEnd{}\n\
+\n\
+%% If we want landscape mode in an embedded document, comment out %%\n\
+%% the line above and uncomment the two below. The table will %%\n\
+%% begin on a new page and run in landscape mode. %%\n\
+% \\def\\gnumericTableEnd{\\end{landscape}}\n\
+% \\begin{landscape}\n\
+\n\
+\n\
+%% End of the else clause for this file being \\input. %%\n\
+\\fi\n\
+\n\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\
+%% %%\n\
+%% The rest is the gnumeric table, except for the closing %%\n\
+%% statement. Changes below will alter the table\'s appearance. %%\n\
+%% %%\n\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\
+\n\
+%% The \\setlongtables command keeps column widths the same across %%\n\
+%% pages. Simply comment out next line for varying column widths. %%\n\
+\\setlongtables\n\
+\n\
",fp);
}
@@ -341,15 +341,15 @@
int col;
- fputs ("
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% The longtable options. (Caption, headers... see Goosens, p.124) %%
-%\t\\caption{The Table Caption.} \\\\ %
- \\hline % Across the top of the table.
-%% The rest of these options are table rows which are placed on %%
-%% the first, last or every page. Use \\multicolumn if you want. %%
-
-%% Header for the first page. %%
+ fputs ("\n\
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\
+%% The longtable options. (Caption, headers... see Goosens, p.124) %%\n\
+%\t\\caption{The Table Caption.} \\\\ %\n\
+ \\hline % Across the top of the table.\n\
+%% The rest of these options are table rows which are placed on %%\n\
+%% the first, last or every page. Use \\multicolumn if you want. %%\n\
+\n\
+%% Header for the first page. %%\n\
",fp);
fprintf (fp, "%%\t\\multicolumn{%d}{|c|}{The First Header} \\\\ \\hline \n", num_cols);