diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-05-18 20:33:10 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-05-18 20:33:10 +0000 |
commit | cc8a80bf848d6cb7d1f78ce8d534df4aa4df32e3 (patch) | |
tree | d020f9d8825a9bb3900206e457b187d1dec44f70 | |
parent | ed960f50c88620fc54a81fb2035173ea2a48b8f0 (diff) | |
download | libmicrohttpd-cc8a80bf848d6cb7d1f78ce8d534df4aa4df32e3.tar.gz libmicrohttpd-cc8a80bf848d6cb7d1f78ce8d534df4aa4df32e3.zip |
-fix build issues on MinGW (#2885)
-rw-r--r-- | INSTALL | 8 | ||||
-rw-r--r-- | config.sub | 11 | ||||
-rw-r--r-- | doc/texinfo.tex | 441 | ||||
-rw-r--r-- | src/examples/Makefile.am | 2 | ||||
-rw-r--r-- | src/examples/demo.c | 5 | ||||
-rw-r--r-- | src/examples/spdy_event_loop.c | 16 | ||||
-rw-r--r-- | src/examples/spdy_fileserver.c | 2 | ||||
-rw-r--r-- | src/examples/spdy_response_with_callback.c | 6 | ||||
-rw-r--r-- | src/microspdy/applicationlayer.c | 2 | ||||
-rw-r--r-- | src/microspdy/compression.c | 2 | ||||
-rw-r--r-- | src/microspdy/session.c | 2 | ||||
-rw-r--r-- | src/microspdy/structures.c | 18 | ||||
-rw-r--r-- | src/microspdy/structures.h | 2 | ||||
-rw-r--r-- | src/spdy2http/Makefile.am | 2 | ||||
-rw-r--r-- | src/testspdy/Makefile.am | 2 | ||||
-rw-r--r-- | src/testspdy/test_daemon_start_stop.c | 4 | ||||
-rw-r--r-- | src/testspdy/test_daemon_start_stop_many.c | 4 | ||||
-rw-r--r-- | src/testspdy/test_misc.c | 4 | ||||
-rw-r--r-- | src/testspdy/test_new_connection.c | 4 | ||||
-rw-r--r-- | src/testspdy/test_request_response.c | 4 | ||||
-rw-r--r-- | src/testspdy/test_request_response_with_callback.c | 10 | ||||
-rw-r--r-- | src/testspdy/test_requests_with_assets.c | 4 | ||||
-rw-r--r-- | src/testspdy/test_session_timeout.c | 4 |
23 files changed, 209 insertions, 350 deletions
@@ -1,7 +1,7 @@ | |||
1 | Installation Instructions | 1 | Installation Instructions |
2 | ************************* | 2 | ************************* |
3 | 3 | ||
4 | Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, | 4 | Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, |
5 | Inc. | 5 | Inc. |
6 | 6 | ||
7 | Copying and distribution of this file, with or without modification, | 7 | Copying and distribution of this file, with or without modification, |
@@ -309,10 +309,9 @@ causes the specified `gcc' to be used as the C compiler (unless it is | |||
309 | overridden in the site shell script). | 309 | overridden in the site shell script). |
310 | 310 | ||
311 | Unfortunately, this technique does not work for `CONFIG_SHELL' due to | 311 | Unfortunately, this technique does not work for `CONFIG_SHELL' due to |
312 | an Autoconf limitation. Until the limitation is lifted, you can use | 312 | an Autoconf bug. Until the bug is fixed you can use this workaround: |
313 | this workaround: | ||
314 | 313 | ||
315 | CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash | 314 | CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash |
316 | 315 | ||
317 | `configure' Invocation | 316 | `configure' Invocation |
318 | ====================== | 317 | ====================== |
@@ -368,3 +367,4 @@ operates. | |||
368 | 367 | ||
369 | `configure' also accepts some other, not widely useful, options. Run | 368 | `configure' also accepts some other, not widely useful, options. Run |
370 | `configure --help' for more details. | 369 | `configure --help' for more details. |
370 | |||
@@ -4,7 +4,7 @@ | |||
4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | 4 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, |
5 | # 2011, 2012 Free Software Foundation, Inc. | 5 | # 2011, 2012 Free Software Foundation, Inc. |
6 | 6 | ||
7 | timestamp='2012-04-18' | 7 | timestamp='2012-02-10' |
8 | 8 | ||
9 | # This file is (in principle) common to ALL GNU software. | 9 | # This file is (in principle) common to ALL GNU software. |
10 | # The presence of a machine in this file suggests that SOME GNU software | 10 | # The presence of a machine in this file suggests that SOME GNU software |
@@ -225,12 +225,6 @@ case $os in | |||
225 | -isc*) | 225 | -isc*) |
226 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | 226 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
227 | ;; | 227 | ;; |
228 | -lynx*178) | ||
229 | os=-lynxos178 | ||
230 | ;; | ||
231 | -lynx*5) | ||
232 | os=-lynxos5 | ||
233 | ;; | ||
234 | -lynx*) | 228 | -lynx*) |
235 | os=-lynxos | 229 | os=-lynxos |
236 | ;; | 230 | ;; |
@@ -1543,9 +1537,6 @@ case $basic_machine in | |||
1543 | c4x-* | tic4x-*) | 1537 | c4x-* | tic4x-*) |
1544 | os=-coff | 1538 | os=-coff |
1545 | ;; | 1539 | ;; |
1546 | hexagon-*) | ||
1547 | os=-elf | ||
1548 | ;; | ||
1549 | tic54x-*) | 1540 | tic54x-*) |
1550 | os=-coff | 1541 | os=-coff |
1551 | ;; | 1542 | ;; |
diff --git a/doc/texinfo.tex b/doc/texinfo.tex index 9a2439c8..2abda0f3 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex | |||
@@ -3,11 +3,11 @@ | |||
3 | % Load plain if necessary, i.e., if running under initex. | 3 | % Load plain if necessary, i.e., if running under initex. |
4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi | 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
5 | % | 5 | % |
6 | \def\texinfoversion{2012-09-05.06} | 6 | \def\texinfoversion{2012-01-03.09} |
7 | % | 7 | % |
8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, | 8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
10 | % 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. | 10 | % 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
11 | % | 11 | % |
12 | % This texinfo.tex file is free software: you can redistribute it and/or | 12 | % This texinfo.tex file is free software: you can redistribute it and/or |
13 | % modify it under the terms of the GNU General Public License as | 13 | % modify it under the terms of the GNU General Public License as |
@@ -28,9 +28,9 @@ | |||
28 | % | 28 | % |
29 | % Please try the latest version of texinfo.tex before submitting bug | 29 | % Please try the latest version of texinfo.tex before submitting bug |
30 | % reports; you can get the latest version from: | 30 | % reports; you can get the latest version from: |
31 | % http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or | 31 | % http://www.gnu.org/software/texinfo/ (the Texinfo home page), or |
32 | % http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or | 32 | % ftp://tug.org/tex/texinfo.tex |
33 | % http://www.gnu.org/software/texinfo/ (the Texinfo home page) | 33 | % (and all CTAN mirrors, see http://www.ctan.org). |
34 | % The texinfo.tex in any given distribution could well be out | 34 | % The texinfo.tex in any given distribution could well be out |
35 | % of date, so if that's what you're using, please check. | 35 | % of date, so if that's what you're using, please check. |
36 | % | 36 | % |
@@ -594,7 +594,7 @@ | |||
594 | \def\:{\spacefactor=1000 } | 594 | \def\:{\spacefactor=1000 } |
595 | 595 | ||
596 | % @* forces a line break. | 596 | % @* forces a line break. |
597 | \def\*{\unskip\hfil\break\hbox{}\ignorespaces} | 597 | \def\*{\hfil\break\hbox{}\ignorespaces} |
598 | 598 | ||
599 | % @/ allows a line break. | 599 | % @/ allows a line break. |
600 | \let\/=\allowbreak | 600 | \let\/=\allowbreak |
@@ -887,7 +887,7 @@ where each line of input produces a line of output.} | |||
887 | \def\popthisfilestack{\errthisfilestackempty} | 887 | \def\popthisfilestack{\errthisfilestackempty} |
888 | \def\errthisfilestackempty{\errmessage{Internal error: | 888 | \def\errthisfilestackempty{\errmessage{Internal error: |
889 | the stack of filenames is empty.}} | 889 | the stack of filenames is empty.}} |
890 | % | 890 | |
891 | \def\thisfile{} | 891 | \def\thisfile{} |
892 | 892 | ||
893 | % @center line | 893 | % @center line |
@@ -895,46 +895,36 @@ where each line of input produces a line of output.} | |||
895 | % | 895 | % |
896 | \parseargdef\center{% | 896 | \parseargdef\center{% |
897 | \ifhmode | 897 | \ifhmode |
898 | \let\centersub\centerH | 898 | \let\next\centerH |
899 | \else | 899 | \else |
900 | \let\centersub\centerV | 900 | \let\next\centerV |
901 | \fi | 901 | \fi |
902 | \centersub{\hfil \ignorespaces#1\unskip \hfil}% | 902 | \next{\hfil \ignorespaces#1\unskip \hfil}% |
903 | \let\centersub\relax % don't let the definition persist, just in case | ||
904 | } | 903 | } |
905 | \def\centerH#1{{% | 904 | \def\centerH#1{% |
906 | \hfil\break | 905 | {% |
907 | \advance\hsize by -\leftskip | 906 | \hfil\break |
908 | \advance\hsize by -\rightskip | 907 | \advance\hsize by -\leftskip |
909 | \line{#1}% | 908 | \advance\hsize by -\rightskip |
910 | \break | 909 | \line{#1}% |
911 | }} | 910 | \break |
912 | % | 911 | }% |
913 | \newcount\centerpenalty | ||
914 | \def\centerV#1{% | ||
915 | % The idea here is the same as in \startdefun, \cartouche, etc.: if | ||
916 | % @center is the first thing after a section heading, we need to wipe | ||
917 | % out the negative parskip inserted by \sectionheading, but still | ||
918 | % prevent a page break here. | ||
919 | \centerpenalty = \lastpenalty | ||
920 | \ifnum\centerpenalty>10000 \vskip\parskip \fi | ||
921 | \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi | ||
922 | \line{\kern\leftskip #1\kern\rightskip}% | ||
923 | } | 912 | } |
913 | \def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} | ||
924 | 914 | ||
925 | % @sp n outputs n lines of vertical space | 915 | % @sp n outputs n lines of vertical space |
926 | % | 916 | |
927 | \parseargdef\sp{\vskip #1\baselineskip} | 917 | \parseargdef\sp{\vskip #1\baselineskip} |
928 | 918 | ||
929 | % @comment ...line which is ignored... | 919 | % @comment ...line which is ignored... |
930 | % @c is the same as @comment | 920 | % @c is the same as @comment |
931 | % @ignore ... @end ignore is another way to write a comment | 921 | % @ignore ... @end ignore is another way to write a comment |
932 | % | 922 | |
933 | \def\comment{\begingroup \catcode`\^^M=\other% | 923 | \def\comment{\begingroup \catcode`\^^M=\other% |
934 | \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% | 924 | \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% |
935 | \commentxxx} | 925 | \commentxxx} |
936 | {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} | 926 | {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} |
937 | % | 927 | |
938 | \let\c=\comment | 928 | \let\c=\comment |
939 | 929 | ||
940 | % @paragraphindent NCHARS | 930 | % @paragraphindent NCHARS |
@@ -1117,7 +1107,7 @@ where each line of input produces a line of output.} | |||
1117 | % #1 is a control sequence in which to do the replacements, | 1107 | % #1 is a control sequence in which to do the replacements, |
1118 | % which we \xdef. | 1108 | % which we \xdef. |
1119 | \def\txiescapepdf#1{% | 1109 | \def\txiescapepdf#1{% |
1120 | \ifx\pdfescapestring\thisisundefined | 1110 | \ifx\pdfescapestring\relax |
1121 | % No primitive available; should we give a warning or log? | 1111 | % No primitive available; should we give a warning or log? |
1122 | % Many times it won't matter. | 1112 | % Many times it won't matter. |
1123 | \else | 1113 | \else |
@@ -1183,8 +1173,8 @@ output) for that.)} | |||
1183 | % | 1173 | % |
1184 | % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). | 1174 | % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). |
1185 | \def\dopdfimage#1#2#3{% | 1175 | \def\dopdfimage#1#2#3{% |
1186 | \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% | 1176 | \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% |
1187 | \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% | 1177 | \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% |
1188 | % | 1178 | % |
1189 | % pdftex (and the PDF format) support .pdf, .png, .jpg (among | 1179 | % pdftex (and the PDF format) support .pdf, .png, .jpg (among |
1190 | % others). Let's try in that order, PDF first since if | 1180 | % others). Let's try in that order, PDF first since if |
@@ -1222,8 +1212,8 @@ output) for that.)} | |||
1222 | \else | 1212 | \else |
1223 | \immediate\pdfximage | 1213 | \immediate\pdfximage |
1224 | \fi | 1214 | \fi |
1225 | \ifdim \wd0 >0pt width \pdfimagewidth \fi | 1215 | \ifdim \wd0 >0pt width \imagewidth \fi |
1226 | \ifdim \wd2 >0pt height \pdfimageheight \fi | 1216 | \ifdim \wd2 >0pt height \imageheight \fi |
1227 | \ifnum\pdftexversion<13 | 1217 | \ifnum\pdftexversion<13 |
1228 | #1.\pdfimgext | 1218 | #1.\pdfimgext |
1229 | \else | 1219 | \else |
@@ -1367,17 +1357,12 @@ output) for that.)} | |||
1367 | \def\skipspaces#1{\def\PP{#1}\def\D{|}% | 1357 | \def\skipspaces#1{\def\PP{#1}\def\D{|}% |
1368 | \ifx\PP\D\let\nextsp\relax | 1358 | \ifx\PP\D\let\nextsp\relax |
1369 | \else\let\nextsp\skipspaces | 1359 | \else\let\nextsp\skipspaces |
1370 | \addtokens{\filename}{\PP}% | 1360 | \ifx\p\space\else\addtokens{\filename}{\PP}% |
1371 | \advance\filenamelength by 1 | 1361 | \advance\filenamelength by 1 |
1362 | \fi | ||
1372 | \fi | 1363 | \fi |
1373 | \nextsp} | 1364 | \nextsp} |
1374 | \def\getfilename#1{% | 1365 | \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} |
1375 | \filenamelength=0 | ||
1376 | % If we don't expand the argument now, \skipspaces will get | ||
1377 | % snagged on things like "@value{foo}". | ||
1378 | \edef\temp{#1}% | ||
1379 | \expandafter\skipspaces\temp|\relax | ||
1380 | } | ||
1381 | \ifnum\pdftexversion < 14 | 1366 | \ifnum\pdftexversion < 14 |
1382 | \let \startlink \pdfannotlink | 1367 | \let \startlink \pdfannotlink |
1383 | \else | 1368 | \else |
@@ -1474,6 +1459,9 @@ output) for that.)} | |||
1474 | \def\ttsl{\setfontstyle{ttsl}} | 1459 | \def\ttsl{\setfontstyle{ttsl}} |
1475 | 1460 | ||
1476 | 1461 | ||
1462 | % Default leading. | ||
1463 | \newdimen\textleading \textleading = 13.2pt | ||
1464 | |||
1477 | % Set the baselineskip to #1, and the lineskip and strut size | 1465 | % Set the baselineskip to #1, and the lineskip and strut size |
1478 | % correspondingly. There is no deep meaning behind these magic numbers | 1466 | % correspondingly. There is no deep meaning behind these magic numbers |
1479 | % used as factors; they just match (closely enough) what Knuth defined. | 1467 | % used as factors; they just match (closely enough) what Knuth defined. |
@@ -1485,7 +1473,6 @@ output) for that.)} | |||
1485 | % can get a sort of poor man's double spacing by redefining this. | 1473 | % can get a sort of poor man's double spacing by redefining this. |
1486 | \def\baselinefactor{1} | 1474 | \def\baselinefactor{1} |
1487 | % | 1475 | % |
1488 | \newdimen\textleading | ||
1489 | \def\setleading#1{% | 1476 | \def\setleading#1{% |
1490 | \dimen0 = #1\relax | 1477 | \dimen0 = #1\relax |
1491 | \normalbaselineskip = \baselinefactor\dimen0 | 1478 | \normalbaselineskip = \baselinefactor\dimen0 |
@@ -1758,24 +1745,18 @@ end | |||
1758 | \fi\fi | 1745 | \fi\fi |
1759 | 1746 | ||
1760 | 1747 | ||
1761 | % Set the font macro #1 to the font named \fontprefix#2. | 1748 | % Set the font macro #1 to the font named #2, adding on the |
1749 | % specified font prefix (normally `cm'). | ||
1762 | % #3 is the font's design size, #4 is a scale factor, #5 is the CMap | 1750 | % #3 is the font's design size, #4 is a scale factor, #5 is the CMap |
1763 | % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). | 1751 | % encoding (currently only OT1, OT1IT and OT1TT are allowed, pass |
1764 | % Example: | 1752 | % empty to omit). |
1765 | % #1 = \textrm | ||
1766 | % #2 = \rmshape | ||
1767 | % #3 = 10 | ||
1768 | % #4 = \mainmagstep | ||
1769 | % #5 = OT1 | ||
1770 | % | ||
1771 | \def\setfont#1#2#3#4#5{% | 1753 | \def\setfont#1#2#3#4#5{% |
1772 | \font#1=\fontprefix#2#3 scaled #4 | 1754 | \font#1=\fontprefix#2#3 scaled #4 |
1773 | \csname cmap#5\endcsname#1% | 1755 | \csname cmap#5\endcsname#1% |
1774 | } | 1756 | } |
1775 | % This is what gets called when #5 of \setfont is empty. | 1757 | % This is what gets called when #5 of \setfont is empty. |
1776 | \let\cmap\gobble | 1758 | \let\cmap\gobble |
1777 | % | 1759 | % emacs-page end of cmaps |
1778 | % (end of cmaps) | ||
1779 | 1760 | ||
1780 | % Use cm as the default font prefix. | 1761 | % Use cm as the default font prefix. |
1781 | % To specify the font prefix, you must define \fontprefix | 1762 | % To specify the font prefix, you must define \fontprefix |
@@ -1785,7 +1766,7 @@ end | |||
1785 | \fi | 1766 | \fi |
1786 | % Support font families that don't use the same naming scheme as CM. | 1767 | % Support font families that don't use the same naming scheme as CM. |
1787 | \def\rmshape{r} | 1768 | \def\rmshape{r} |
1788 | \def\rmbshape{bx} % where the normal face is bold | 1769 | \def\rmbshape{bx} %where the normal face is bold |
1789 | \def\bfshape{b} | 1770 | \def\bfshape{b} |
1790 | \def\bxshape{bx} | 1771 | \def\bxshape{bx} |
1791 | \def\ttshape{tt} | 1772 | \def\ttshape{tt} |
@@ -1800,7 +1781,8 @@ end | |||
1800 | \def\scshape{csc} | 1781 | \def\scshape{csc} |
1801 | \def\scbshape{csc} | 1782 | \def\scbshape{csc} |
1802 | 1783 | ||
1803 | % Definitions for a main text size of 11pt. (The default in Texinfo.) | 1784 | % Definitions for a main text size of 11pt. This is the default in |
1785 | % Texinfo. | ||
1804 | % | 1786 | % |
1805 | \def\definetextfontsizexi{% | 1787 | \def\definetextfontsizexi{% |
1806 | % Text fonts (11.2pt, magstep1). | 1788 | % Text fonts (11.2pt, magstep1). |
@@ -1925,7 +1907,7 @@ end | |||
1925 | \textleading = 13.2pt % line spacing for 11pt CM | 1907 | \textleading = 13.2pt % line spacing for 11pt CM |
1926 | \textfonts % reset the current fonts | 1908 | \textfonts % reset the current fonts |
1927 | \rm | 1909 | \rm |
1928 | } % end of 11pt text font size definitions, \definetextfontsizexi | 1910 | } % end of 11pt text font size definitions |
1929 | 1911 | ||
1930 | 1912 | ||
1931 | % Definitions to make the main text be 10pt Computer Modern, with | 1913 | % Definitions to make the main text be 10pt Computer Modern, with |
@@ -2057,7 +2039,7 @@ end | |||
2057 | \textleading = 12pt % line spacing for 10pt CM | 2039 | \textleading = 12pt % line spacing for 10pt CM |
2058 | \textfonts % reset the current fonts | 2040 | \textfonts % reset the current fonts |
2059 | \rm | 2041 | \rm |
2060 | } % end of 10pt text font size definitions, \definetextfontsizex | 2042 | } % end of 10pt text font size definitions |
2061 | 2043 | ||
2062 | 2044 | ||
2063 | % We provide the user-level command | 2045 | % We provide the user-level command |
@@ -2448,12 +2430,34 @@ end | |||
2448 | % @samp. | 2430 | % @samp. |
2449 | \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} | 2431 | \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} |
2450 | 2432 | ||
2451 | % @indicateurl is \samp, that is, with quotes. | 2433 | % definition of @key that produces a lozenge. Doesn't adjust to text size. |
2452 | \let\indicateurl=\samp | 2434 | %\setfont\keyrm\rmshape{8}{1000}{OT1} |
2435 | %\font\keysy=cmsy9 | ||
2436 | %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% | ||
2437 | % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% | ||
2438 | % \vbox{\hrule\kern-0.4pt | ||
2439 | % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% | ||
2440 | % \kern-0.4pt\hrule}% | ||
2441 | % \kern-.06em\raise0.4pt\hbox{\angleright}}}} | ||
2453 | 2442 | ||
2454 | % @code (and similar) prints in typewriter, but with spaces the same | 2443 | % definition of @key with no lozenge. If the current font is already |
2455 | % size as normal in the surrounding text, without hyphenation, etc. | 2444 | % monospace, don't change it; that way, we respect @kbdinputstyle. But |
2456 | % This is a subroutine for that. | 2445 | % if it isn't monospace, then use \tt. |
2446 | % | ||
2447 | \def\key#1{{\setupmarkupstyle{key}% | ||
2448 | \nohyphenation | ||
2449 | \ifmonospace\else\tt\fi | ||
2450 | #1}\null} | ||
2451 | |||
2452 | % ctrl is no longer a Texinfo command. | ||
2453 | \def\ctrl #1{{\tt \rawbackslash \hat}#1} | ||
2454 | |||
2455 | % @file, @option are the same as @samp. | ||
2456 | \let\file=\samp | ||
2457 | \let\option=\samp | ||
2458 | |||
2459 | % @code is a modification of @t, | ||
2460 | % which makes spaces the same size as normal in the surrounding text. | ||
2457 | \def\tclose#1{% | 2461 | \def\tclose#1{% |
2458 | {% | 2462 | {% |
2459 | % Change normal interword space to be same as for the current font. | 2463 | % Change normal interword space to be same as for the current font. |
@@ -2478,7 +2482,7 @@ end | |||
2478 | % We *must* turn on hyphenation at `-' and `_' in @code. | 2482 | % We *must* turn on hyphenation at `-' and `_' in @code. |
2479 | % Otherwise, it is too hard to avoid overfull hboxes | 2483 | % Otherwise, it is too hard to avoid overfull hboxes |
2480 | % in the Emacs manual, the Library manual, etc. | 2484 | % in the Emacs manual, the Library manual, etc. |
2481 | % | 2485 | |
2482 | % Unfortunately, TeX uses one parameter (\hyphenchar) to control | 2486 | % Unfortunately, TeX uses one parameter (\hyphenchar) to control |
2483 | % both hyphenation at - and hyphenation within words. | 2487 | % both hyphenation at - and hyphenation within words. |
2484 | % We must therefore turn them both off (\tclose does that) | 2488 | % We must therefore turn them both off (\tclose does that) |
@@ -2542,13 +2546,6 @@ end | |||
2542 | \fi\fi | 2546 | \fi\fi |
2543 | } | 2547 | } |
2544 | 2548 | ||
2545 | % For @command, @env, @file, @option quotes seem unnecessary, | ||
2546 | % so use \code rather than \samp. | ||
2547 | \let\command=\code | ||
2548 | \let\env=\code | ||
2549 | \let\file=\code | ||
2550 | \let\option=\code | ||
2551 | |||
2552 | % @uref (abbreviation for `urlref') takes an optional (comma-separated) | 2549 | % @uref (abbreviation for `urlref') takes an optional (comma-separated) |
2553 | % second argument specifying the text to display and an optional third | 2550 | % second argument specifying the text to display and an optional third |
2554 | % arg as text to display instead of (rather than in addition to) the url | 2551 | % arg as text to display instead of (rather than in addition to) the url |
@@ -2728,24 +2725,10 @@ end | |||
2728 | \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi | 2725 | \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi |
2729 | \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} | 2726 | \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} |
2730 | 2727 | ||
2731 | % definition of @key that produces a lozenge. Doesn't adjust to text size. | 2728 | % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. |
2732 | %\setfont\keyrm\rmshape{8}{1000}{OT1} | 2729 | \let\indicateurl=\code |
2733 | %\font\keysy=cmsy9 | 2730 | \let\env=\code |
2734 | %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% | 2731 | \let\command=\code |
2735 | % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% | ||
2736 | % \vbox{\hrule\kern-0.4pt | ||
2737 | % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% | ||
2738 | % \kern-0.4pt\hrule}% | ||
2739 | % \kern-.06em\raise0.4pt\hbox{\angleright}}}} | ||
2740 | |||
2741 | % definition of @key with no lozenge. If the current font is already | ||
2742 | % monospace, don't change it; that way, we respect @kbdinputstyle. But | ||
2743 | % if it isn't monospace, then use \tt. | ||
2744 | % | ||
2745 | \def\key#1{{\setupmarkupstyle{key}% | ||
2746 | \nohyphenation | ||
2747 | \ifmonospace\else\tt\fi | ||
2748 | #1}\null} | ||
2749 | 2732 | ||
2750 | % @clicksequence{File @click{} Open ...} | 2733 | % @clicksequence{File @click{} Open ...} |
2751 | \def\clicksequence#1{\begingroup #1\endgroup} | 2734 | \def\clicksequence#1{\begingroup #1\endgroup} |
@@ -2853,17 +2836,14 @@ end | |||
2853 | } | 2836 | } |
2854 | } | 2837 | } |
2855 | 2838 | ||
2856 | % ctrl is no longer a Texinfo command, but leave this definition for fun. | ||
2857 | \def\ctrl #1{{\tt \rawbackslash \hat}#1} | ||
2858 | |||
2859 | % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. | 2839 | % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. |
2860 | % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, | 2840 | % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, |
2861 | % except specified as a normal braced arg, so no newlines to worry about. | 2841 | % except specified as a normal braced arg, so no newlines to worry about. |
2862 | % | 2842 | % |
2863 | \def\outfmtnametex{tex} | 2843 | \def\outfmtnametex{tex} |
2864 | % | 2844 | % |
2865 | \long\def\inlinefmt#1{\doinlinefmt #1,\finish} | 2845 | \def\inlinefmt#1{\doinlinefmt #1,\finish} |
2866 | \long\def\doinlinefmt#1,#2,\finish{% | 2846 | \def\doinlinefmt#1,#2,\finish{% |
2867 | \def\inlinefmtname{#1}% | 2847 | \def\inlinefmtname{#1}% |
2868 | \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi | 2848 | \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi |
2869 | } | 2849 | } |
@@ -2875,8 +2855,8 @@ end | |||
2875 | % well use a command to get a left brace too. We could re-use the | 2855 | % well use a command to get a left brace too. We could re-use the |
2876 | % delimiter character idea from \verb, but it seems like overkill. | 2856 | % delimiter character idea from \verb, but it seems like overkill. |
2877 | % | 2857 | % |
2878 | \long\def\inlineraw{\tex \doinlineraw} | 2858 | \def\inlineraw{\tex \doinlineraw} |
2879 | \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} | 2859 | \def\doinlineraw#1{\doinlinerawtwo #1,\finish} |
2880 | \def\doinlinerawtwo#1,#2,\finish{% | 2860 | \def\doinlinerawtwo#1,#2,\finish{% |
2881 | \def\inlinerawname{#1}% | 2861 | \def\inlinerawname{#1}% |
2882 | \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi | 2862 | \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi |
@@ -3146,17 +3126,12 @@ end | |||
3146 | % hopefully nobody will notice/care. | 3126 | % hopefully nobody will notice/care. |
3147 | \edef\ecsize{\csname\curfontsize ecsize\endcsname}% | 3127 | \edef\ecsize{\csname\curfontsize ecsize\endcsname}% |
3148 | \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% | 3128 | \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% |
3149 | \ifmonospace | 3129 | \ifx\curfontstyle\bfstylename |
3150 | % typewriter: | 3130 | % bold: |
3151 | \font\thisecfont = ectt\ecsize \space at \nominalsize | 3131 | \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize |
3152 | \else | 3132 | \else |
3153 | \ifx\curfontstyle\bfstylename | 3133 | % regular: |
3154 | % bold: | 3134 | \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize |
3155 | \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize | ||
3156 | \else | ||
3157 | % regular: | ||
3158 | \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize | ||
3159 | \fi | ||
3160 | \fi | 3135 | \fi |
3161 | \thisecfont | 3136 | \thisecfont |
3162 | } | 3137 | } |
@@ -3269,20 +3244,6 @@ end | |||
3269 | \finishedtitlepagetrue | 3244 | \finishedtitlepagetrue |
3270 | } | 3245 | } |
3271 | 3246 | ||
3272 | % Settings used for typesetting titles: no hyphenation, no indentation, | ||
3273 | % don't worry much about spacing, ragged right. This should be used | ||
3274 | % inside a \vbox, and fonts need to be set appropriately first. Because | ||
3275 | % it is always used for titles, nothing else, we call \rmisbold. \par | ||
3276 | % should be specified before the end of the \vbox, since a vbox is a group. | ||
3277 | % | ||
3278 | \def\raggedtitlesettings{% | ||
3279 | \rmisbold | ||
3280 | \hyphenpenalty=10000 | ||
3281 | \parindent=0pt | ||
3282 | \tolerance=5000 | ||
3283 | \ptexraggedright | ||
3284 | } | ||
3285 | |||
3286 | % Macros to be used within @titlepage: | 3247 | % Macros to be used within @titlepage: |
3287 | 3248 | ||
3288 | \let\subtitlerm=\tenrm | 3249 | \let\subtitlerm=\tenrm |
@@ -3290,7 +3251,7 @@ end | |||
3290 | 3251 | ||
3291 | \parseargdef\title{% | 3252 | \parseargdef\title{% |
3292 | \checkenv\titlepage | 3253 | \checkenv\titlepage |
3293 | \vbox{\titlefonts \raggedtitlesettings #1\par}% | 3254 | \leftline{\titlefonts\rmisbold #1} |
3294 | % print a rule at the page bottom also. | 3255 | % print a rule at the page bottom also. |
3295 | \finishedtitlepagefalse | 3256 | \finishedtitlepagefalse |
3296 | \vskip4pt \hrule height 4pt width \hsize \vskip4pt | 3257 | \vskip4pt \hrule height 4pt width \hsize \vskip4pt |
@@ -4227,7 +4188,7 @@ end | |||
4227 | } | 4188 | } |
4228 | \def\ifsetfail{\doignore{ifset}} | 4189 | \def\ifsetfail{\doignore{ifset}} |
4229 | 4190 | ||
4230 | % @ifclear VAR ... @end executes the `...' iff VAR has never been | 4191 | % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been |
4231 | % defined with @set, or has been undefined with @clear. | 4192 | % defined with @set, or has been undefined with @clear. |
4232 | % | 4193 | % |
4233 | % The `\else' inside the `\doifset' parameter is a trick to reuse the | 4194 | % The `\else' inside the `\doifset' parameter is a trick to reuse the |
@@ -4238,35 +4199,6 @@ end | |||
4238 | \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} | 4199 | \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} |
4239 | \def\ifclearfail{\doignore{ifclear}} | 4200 | \def\ifclearfail{\doignore{ifclear}} |
4240 | 4201 | ||
4241 | % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written | ||
4242 | % without the @) is in fact defined. We can only feasibly check at the | ||
4243 | % TeX level, so something like `mathcode' is going to considered | ||
4244 | % defined even though it is not a Texinfo command. | ||
4245 | % | ||
4246 | \makecond{ifcommanddefined} | ||
4247 | \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} | ||
4248 | % | ||
4249 | \def\doifcmddefined#1#2{{% | ||
4250 | \makevalueexpandable | ||
4251 | \let\next=\empty | ||
4252 | \expandafter\ifx\csname #2\endcsname\relax | ||
4253 | #1% If not defined, \let\next as above. | ||
4254 | \fi | ||
4255 | \expandafter | ||
4256 | }\next | ||
4257 | } | ||
4258 | \def\ifcmddefinedfail{\doignore{ifcommanddefined}} | ||
4259 | |||
4260 | % @ifcommandnotdefined CMD ... handlded similar to @ifclear above. | ||
4261 | \makecond{ifcommandnotdefined} | ||
4262 | \def\ifcommandnotdefined{% | ||
4263 | \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} | ||
4264 | \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} | ||
4265 | |||
4266 | % Set the `txicommandconditionals' variable, so documents have a way to | ||
4267 | % test if the @ifcommand...defined conditionals are available. | ||
4268 | \set txicommandconditionals | ||
4269 | |||
4270 | % @dircategory CATEGORY -- specify a category of the dir file | 4202 | % @dircategory CATEGORY -- specify a category of the dir file |
4271 | % which this file should belong to. Ignore this in TeX. | 4203 | % which this file should belong to. Ignore this in TeX. |
4272 | \let\dircategory=\comment | 4204 | \let\dircategory=\comment |
@@ -4503,7 +4435,6 @@ end | |||
4503 | \definedummyword\guillemetright | 4435 | \definedummyword\guillemetright |
4504 | \definedummyword\guilsinglleft | 4436 | \definedummyword\guilsinglleft |
4505 | \definedummyword\guilsinglright | 4437 | \definedummyword\guilsinglright |
4506 | \definedummyword\lbracechar | ||
4507 | \definedummyword\leq | 4438 | \definedummyword\leq |
4508 | \definedummyword\minus | 4439 | \definedummyword\minus |
4509 | \definedummyword\ogonek | 4440 | \definedummyword\ogonek |
@@ -4516,7 +4447,6 @@ end | |||
4516 | \definedummyword\quoteleft | 4447 | \definedummyword\quoteleft |
4517 | \definedummyword\quoteright | 4448 | \definedummyword\quoteright |
4518 | \definedummyword\quotesinglbase | 4449 | \definedummyword\quotesinglbase |
4519 | \definedummyword\rbracechar | ||
4520 | \definedummyword\result | 4450 | \definedummyword\result |
4521 | \definedummyword\textdegree | 4451 | \definedummyword\textdegree |
4522 | % | 4452 | % |
@@ -4568,7 +4498,6 @@ end | |||
4568 | \definedummyword\t | 4498 | \definedummyword\t |
4569 | % | 4499 | % |
4570 | % Commands that take arguments. | 4500 | % Commands that take arguments. |
4571 | \definedummyword\abbr | ||
4572 | \definedummyword\acronym | 4501 | \definedummyword\acronym |
4573 | \definedummyword\anchor | 4502 | \definedummyword\anchor |
4574 | \definedummyword\cite | 4503 | \definedummyword\cite |
@@ -4580,9 +4509,7 @@ end | |||
4580 | \definedummyword\emph | 4509 | \definedummyword\emph |
4581 | \definedummyword\env | 4510 | \definedummyword\env |
4582 | \definedummyword\file | 4511 | \definedummyword\file |
4583 | \definedummyword\image | ||
4584 | \definedummyword\indicateurl | 4512 | \definedummyword\indicateurl |
4585 | \definedummyword\inforef | ||
4586 | \definedummyword\kbd | 4513 | \definedummyword\kbd |
4587 | \definedummyword\key | 4514 | \definedummyword\key |
4588 | \definedummyword\math | 4515 | \definedummyword\math |
@@ -4629,10 +4556,7 @@ end | |||
4629 | % content at all. So for index sorting, we map @{ and @} to strings | 4556 | % content at all. So for index sorting, we map @{ and @} to strings |
4630 | % starting with |, since that ASCII character is between ASCII { and }. | 4557 | % starting with |, since that ASCII character is between ASCII { and }. |
4631 | \def\{{|a}% | 4558 | \def\{{|a}% |
4632 | \def\lbracechar{|a}% | ||
4633 | % | ||
4634 | \def\}{|b}% | 4559 | \def\}{|b}% |
4635 | \def\rbracechar{|b}% | ||
4636 | % | 4560 | % |
4637 | % Non-English letters. | 4561 | % Non-English letters. |
4638 | \def\AA{AA}% | 4562 | \def\AA{AA}% |
@@ -4808,9 +4732,10 @@ end | |||
4808 | % | 4732 | % |
4809 | % ..., ready, GO: | 4733 | % ..., ready, GO: |
4810 | % | 4734 | % |
4811 | \def\safewhatsit#1{\ifhmode | 4735 | \def\safewhatsit#1{% |
4736 | \ifhmode | ||
4812 | #1% | 4737 | #1% |
4813 | \else | 4738 | \else |
4814 | % \lastskip and \lastpenalty cannot both be nonzero simultaneously. | 4739 | % \lastskip and \lastpenalty cannot both be nonzero simultaneously. |
4815 | \whatsitskip = \lastskip | 4740 | \whatsitskip = \lastskip |
4816 | \edef\lastskipmacro{\the\lastskip}% | 4741 | \edef\lastskipmacro{\the\lastskip}% |
@@ -4834,6 +4759,7 @@ end | |||
4834 | % to re-insert the same penalty (values >10000 are used for various | 4759 | % to re-insert the same penalty (values >10000 are used for various |
4835 | % signals); since we just inserted a non-discardable item, any | 4760 | % signals); since we just inserted a non-discardable item, any |
4836 | % following glue (such as a \parskip) would be a breakpoint. For example: | 4761 | % following glue (such as a \parskip) would be a breakpoint. For example: |
4762 | % | ||
4837 | % @deffn deffn-whatever | 4763 | % @deffn deffn-whatever |
4838 | % @vindex index-whatever | 4764 | % @vindex index-whatever |
4839 | % Description. | 4765 | % Description. |
@@ -4846,7 +4772,8 @@ end | |||
4846 | % (the whatsit from the \write), so we must insert a \nobreak. | 4772 | % (the whatsit from the \write), so we must insert a \nobreak. |
4847 | \nobreak\vskip\whatsitskip | 4773 | \nobreak\vskip\whatsitskip |
4848 | \fi | 4774 | \fi |
4849 | \fi} | 4775 | \fi |
4776 | } | ||
4850 | 4777 | ||
4851 | % The index entry written in the file actually looks like | 4778 | % The index entry written in the file actually looks like |
4852 | % \entry {sortstring}{page}{topic} | 4779 | % \entry {sortstring}{page}{topic} |
@@ -5593,6 +5520,14 @@ end | |||
5593 | 5520 | ||
5594 | % Define @majorheading, @heading and @subheading | 5521 | % Define @majorheading, @heading and @subheading |
5595 | 5522 | ||
5523 | % NOTE on use of \vbox for chapter headings, section headings, and such: | ||
5524 | % 1) We use \vbox rather than the earlier \line to permit | ||
5525 | % overlong headings to fold. | ||
5526 | % 2) \hyphenpenalty is set to 10000 because hyphenation in a | ||
5527 | % heading is obnoxious; this forbids it. | ||
5528 | % 3) Likewise, headings look best if no \parindent is used, and | ||
5529 | % if justification is not attempted. Hence \raggedright. | ||
5530 | |||
5596 | \def\majorheading{% | 5531 | \def\majorheading{% |
5597 | {\advance\chapheadingskip by 10pt \chapbreak }% | 5532 | {\advance\chapheadingskip by 10pt \chapbreak }% |
5598 | \parsearg\chapheadingzzz | 5533 | \parsearg\chapheadingzzz |
@@ -5600,8 +5535,10 @@ end | |||
5600 | 5535 | ||
5601 | \def\chapheading{\chapbreak \parsearg\chapheadingzzz} | 5536 | \def\chapheading{\chapbreak \parsearg\chapheadingzzz} |
5602 | \def\chapheadingzzz#1{% | 5537 | \def\chapheadingzzz#1{% |
5603 | \vbox{\chapfonts \raggedtitlesettings #1\par}% | 5538 | {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 |
5604 | \nobreak\bigskip \nobreak | 5539 | \parindent=0pt\ptexraggedright |
5540 | \rmisbold #1\hfill}}% | ||
5541 | \bigskip \par\penalty 200\relax | ||
5605 | \suppressfirstparagraphindent | 5542 | \suppressfirstparagraphindent |
5606 | } | 5543 | } |
5607 | 5544 | ||
@@ -5760,7 +5697,8 @@ end | |||
5760 | % | 5697 | % |
5761 | % Typeset the actual heading. | 5698 | % Typeset the actual heading. |
5762 | \nobreak % Avoid page breaks at the interline glue. | 5699 | \nobreak % Avoid page breaks at the interline glue. |
5763 | \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe | 5700 | \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright |
5701 | \hangindent=\wd0 \centerparametersmaybe | ||
5764 | \unhbox0 #1\par}% | 5702 | \unhbox0 #1\par}% |
5765 | }% | 5703 | }% |
5766 | \nobreak\bigskip % no page break after a chapter title | 5704 | \nobreak\bigskip % no page break after a chapter title |
@@ -5782,18 +5720,18 @@ end | |||
5782 | \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} | 5720 | \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} |
5783 | % | 5721 | % |
5784 | \def\unnchfopen #1{% | 5722 | \def\unnchfopen #1{% |
5785 | \chapoddpage | 5723 | \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 |
5786 | \vbox{\chapfonts \raggedtitlesettings #1\par}% | 5724 | \parindent=0pt\ptexraggedright |
5787 | \nobreak\bigskip\nobreak | 5725 | \rmisbold #1\hfill}}\bigskip \par\nobreak |
5788 | } | 5726 | } |
5789 | \def\chfopen #1#2{\chapoddpage {\chapfonts | 5727 | \def\chfopen #1#2{\chapoddpage {\chapfonts |
5790 | \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% | 5728 | \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% |
5791 | \par\penalty 5000 % | 5729 | \par\penalty 5000 % |
5792 | } | 5730 | } |
5793 | \def\centerchfopen #1{% | 5731 | \def\centerchfopen #1{% |
5794 | \chapoddpage | 5732 | \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 |
5795 | \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% | 5733 | \parindent=0pt |
5796 | \nobreak\bigskip \nobreak | 5734 | \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak |
5797 | } | 5735 | } |
5798 | \def\CHAPFopen{% | 5736 | \def\CHAPFopen{% |
5799 | \global\let\chapmacro=\chfopen | 5737 | \global\let\chapmacro=\chfopen |
@@ -5938,15 +5876,14 @@ end | |||
5938 | % | 5876 | % |
5939 | % We'll almost certainly start a paragraph next, so don't let that | 5877 | % We'll almost certainly start a paragraph next, so don't let that |
5940 | % glue accumulate. (Not a breakpoint because it's preceded by a | 5878 | % glue accumulate. (Not a breakpoint because it's preceded by a |
5941 | % discardable item.) However, when a paragraph is not started next | 5879 | % discardable item.) |
5942 | % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out | ||
5943 | % or the negative glue will cause weirdly wrong output, typically | ||
5944 | % obscuring the section heading with something else. | ||
5945 | \vskip-\parskip | 5880 | \vskip-\parskip |
5946 | % | 5881 | % |
5947 | % This is so the last item on the main vertical list is a known | 5882 | % This is purely so the last item on the list is a known \penalty > |
5948 | % \penalty > 10000, so \startdefun, etc., can recognize the situation | 5883 | % 10000. This is so \startdefun can avoid allowing breakpoints after |
5949 | % and do the needful. | 5884 | % section headings. Otherwise, it would insert a valid breakpoint between: |
5885 | % @section sec-whatever | ||
5886 | % @deffn def-whatever | ||
5950 | \penalty 10001 | 5887 | \penalty 10001 |
5951 | } | 5888 | } |
5952 | 5889 | ||
@@ -6366,7 +6303,7 @@ end | |||
6366 | % If this cartouche directly follows a sectioning command, we need the | 6303 | % If this cartouche directly follows a sectioning command, we need the |
6367 | % \parskip glue (backspaced over by default) or the cartouche can | 6304 | % \parskip glue (backspaced over by default) or the cartouche can |
6368 | % collide with the section heading. | 6305 | % collide with the section heading. |
6369 | \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi | 6306 | \ifnum\lastpenalty>10000 \vskip\parskip \fi |
6370 | % | 6307 | % |
6371 | \vbox\bgroup | 6308 | \vbox\bgroup |
6372 | \baselineskip=0pt\parskip=0pt\lineskip=0pt | 6309 | \baselineskip=0pt\parskip=0pt\lineskip=0pt |
@@ -7856,7 +7793,7 @@ end | |||
7856 | \fi\fi | 7793 | \fi\fi |
7857 | } | 7794 | } |
7858 | 7795 | ||
7859 | % | 7796 | |
7860 | % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is | 7797 | % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is |
7861 | % the node name, #2 the name of the Info cross-reference, #3 the printed | 7798 | % the node name, #2 the name of the Info cross-reference, #3 the printed |
7862 | % node name, #4 the name of the Info file, #5 the name of the printed | 7799 | % node name, #4 the name of the Info file, #5 the name of the printed |
@@ -7865,41 +7802,26 @@ end | |||
7865 | \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} | 7802 | \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} |
7866 | \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} | 7803 | \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} |
7867 | \def\ref#1{\xrefX[#1,,,,,,,]} | 7804 | \def\ref#1{\xrefX[#1,,,,,,,]} |
7868 | % | ||
7869 | \newbox\toprefbox | ||
7870 | \newbox\printedrefnamebox | ||
7871 | \newbox\infofilenamebox | ||
7872 | \newbox\printedmanualbox | ||
7873 | % | ||
7874 | \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup | 7805 | \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup |
7875 | \unsepspaces | 7806 | \unsepspaces |
7876 | % | ||
7877 | % Get args without leading/trailing spaces. | ||
7878 | \def\printedrefname{\ignorespaces #3}% | ||
7879 | \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% | ||
7880 | % | ||
7881 | \def\infofilename{\ignorespaces #4}% | ||
7882 | \setbox\infofilenamebox = \hbox{\infofilename\unskip}% | ||
7883 | % | ||
7884 | \def\printedmanual{\ignorespaces #5}% | 7807 | \def\printedmanual{\ignorespaces #5}% |
7885 | \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% | 7808 | \def\printedrefname{\ignorespaces #3}% |
7886 | % | 7809 | \setbox1=\hbox{\printedmanual\unskip}% |
7887 | % If the printed reference name (arg #3) was not explicitly given in | 7810 | \setbox0=\hbox{\printedrefname\unskip}% |
7888 | % the @xref, figure out what we want to use. | 7811 | \ifdim \wd0 = 0pt |
7889 | \ifdim \wd\printedrefnamebox = 0pt | ||
7890 | % No printed node name was explicitly given. | 7812 | % No printed node name was explicitly given. |
7891 | \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax | 7813 | \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax |
7892 | % Not auto section-title: use node name inside the square brackets. | 7814 | % Use the node name inside the square brackets. |
7893 | \def\printedrefname{\ignorespaces #1}% | 7815 | \def\printedrefname{\ignorespaces #1}% |
7894 | \else | 7816 | \else |
7895 | % Auto section-title: use chapter/section title inside | 7817 | % Use the actual chapter/section title appear inside |
7896 | % the square brackets if we have it. | 7818 | % the square brackets. Use the real section title if we have it. |
7897 | \ifdim \wd\printedmanualbox > 0pt | 7819 | \ifdim \wd1 > 0pt |
7898 | % It is in another manual, so we don't have it; use node name. | 7820 | % It is in another manual, so we don't have it. |
7899 | \def\printedrefname{\ignorespaces #1}% | 7821 | \def\printedrefname{\ignorespaces #1}% |
7900 | \else | 7822 | \else |
7901 | \ifhavexrefs | 7823 | \ifhavexrefs |
7902 | % We (should) know the real title if we have the xref values. | 7824 | % We know the real title if we have the xref values. |
7903 | \def\printedrefname{\refx{#1-title}{}}% | 7825 | \def\printedrefname{\refx{#1-title}{}}% |
7904 | \else | 7826 | \else |
7905 | % Otherwise just copy the Info node name. | 7827 | % Otherwise just copy the Info node name. |
@@ -7913,20 +7835,12 @@ end | |||
7913 | \ifpdf | 7835 | \ifpdf |
7914 | {\indexnofonts | 7836 | {\indexnofonts |
7915 | \turnoffactive | 7837 | \turnoffactive |
7916 | \makevalueexpandable | ||
7917 | % This expands tokens, so do it after making catcode changes, so _ | 7838 | % This expands tokens, so do it after making catcode changes, so _ |
7918 | % etc. don't get their TeX definitions. This ignores all spaces in | 7839 | % etc. don't get their TeX definitions. |
7919 | % #4, including (wrongly) those in the middle of the filename. | ||
7920 | \getfilename{#4}% | 7840 | \getfilename{#4}% |
7921 | % | 7841 | % |
7922 | % This (wrongly) does not take account of leading or trailing | ||
7923 | % spaces in #1, which should be ignored. | ||
7924 | \edef\pdfxrefdest{#1}% | 7842 | \edef\pdfxrefdest{#1}% |
7925 | \ifx\pdfxrefdest\empty | 7843 | \txiescapepdf\pdfxrefdest |
7926 | \def\pdfxrefdest{Top}% no empty targets | ||
7927 | \else | ||
7928 | \txiescapepdf\pdfxrefdest % escape PDF special chars | ||
7929 | \fi | ||
7930 | % | 7844 | % |
7931 | \leavevmode | 7845 | \leavevmode |
7932 | \startlink attr{/Border [0 0 0]}% | 7846 | \startlink attr{/Border [0 0 0]}% |
@@ -7953,42 +7867,29 @@ end | |||
7953 | \iffloat\Xthisreftitle | 7867 | \iffloat\Xthisreftitle |
7954 | % If the user specified the print name (third arg) to the ref, | 7868 | % If the user specified the print name (third arg) to the ref, |
7955 | % print it instead of our usual "Figure 1.2". | 7869 | % print it instead of our usual "Figure 1.2". |
7956 | \ifdim\wd\printedrefnamebox = 0pt | 7870 | \ifdim\wd0 = 0pt |
7957 | \refx{#1-snt}{}% | 7871 | \refx{#1-snt}{}% |
7958 | \else | 7872 | \else |
7959 | \printedrefname | 7873 | \printedrefname |
7960 | \fi | 7874 | \fi |
7961 | % | 7875 | % |
7962 | % If the user also gave the printed manual name (fifth arg), append | 7876 | % if the user also gave the printed manual name (fifth arg), append |
7963 | % "in MANUALNAME". | 7877 | % "in MANUALNAME". |
7964 | \ifdim \wd\printedmanualbox > 0pt | 7878 | \ifdim \wd1 > 0pt |
7965 | \space \putwordin{} \cite{\printedmanual}% | 7879 | \space \putwordin{} \cite{\printedmanual}% |
7966 | \fi | 7880 | \fi |
7967 | \else | 7881 | \else |
7968 | % node/anchor (non-float) references. | 7882 | % node/anchor (non-float) references. |
7969 | % | ||
7970 | % If we use \unhbox to print the node names, TeX does not insert | ||
7971 | % empty discretionaries after hyphens, which means that it will not | ||
7972 | % find a line break at a hyphen in a node names. Since some manuals | ||
7973 | % are best written with fairly long node names, containing hyphens, | ||
7974 | % this is a loss. Therefore, we give the text of the node name | ||
7975 | % again, so it is as if TeX is seeing it for the first time. | ||
7976 | % | ||
7977 | \ifdim \wd\printedmanualbox > 0pt | ||
7978 | % Cross-manual reference with a printed manual name. | ||
7979 | % | ||
7980 | \crossmanualxref{\cite{\printedmanual\unskip}}% | ||
7981 | % | ||
7982 | \else\ifdim \wd\infofilenamebox > 0pt | ||
7983 | % Cross-manual reference with only an info filename (arg 4), no | ||
7984 | % printed manual name (arg 5). This is essentially the same as | ||
7985 | % the case above; we output the filename, since we have nothing else. | ||
7986 | % | ||
7987 | \crossmanualxref{\code{\infofilename\unskip}}% | ||
7988 | % | 7883 | % |
7884 | % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not | ||
7885 | % insert empty discretionaries after hyphens, which means that it will | ||
7886 | % not find a line break at a hyphen in a node names. Since some manuals | ||
7887 | % are best written with fairly long node names, containing hyphens, this | ||
7888 | % is a loss. Therefore, we give the text of the node name again, so it | ||
7889 | % is as if TeX is seeing it for the first time. | ||
7890 | \ifdim \wd1 > 0pt | ||
7891 | \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% | ||
7989 | \else | 7892 | \else |
7990 | % Reference within this manual. | ||
7991 | % | ||
7992 | % _ (for example) has to be the character _ for the purposes of the | 7893 | % _ (for example) has to be the character _ for the purposes of the |
7993 | % control sequence corresponding to the node, but it has to expand | 7894 | % control sequence corresponding to the node, but it has to expand |
7994 | % into the usual \leavevmode...\vrule stuff for purposes of | 7895 | % into the usual \leavevmode...\vrule stuff for purposes of |
@@ -8000,7 +7901,7 @@ end | |||
8000 | \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% | 7901 | \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% |
8001 | \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi | 7902 | \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi |
8002 | }% | 7903 | }% |
8003 | % output the `[mynode]' via the macro below so it can be overridden. | 7904 | % output the `[mynode]' via a macro so it can be overridden. |
8004 | \xrefprintnodename\printedrefname | 7905 | \xrefprintnodename\printedrefname |
8005 | % | 7906 | % |
8006 | % But we always want a comma and a space: | 7907 | % But we always want a comma and a space: |
@@ -8008,37 +7909,11 @@ end | |||
8008 | % | 7909 | % |
8009 | % output the `page 3'. | 7910 | % output the `page 3'. |
8010 | \turnoffactive \putwordpage\tie\refx{#1-pg}{}% | 7911 | \turnoffactive \putwordpage\tie\refx{#1-pg}{}% |
8011 | \fi\fi | 7912 | \fi |
8012 | \fi | 7913 | \fi |
8013 | \endlink | 7914 | \endlink |
8014 | \endgroup} | 7915 | \endgroup} |
8015 | 7916 | ||
8016 | % Output a cross-manual xref to #1. Used just above (twice). | ||
8017 | % | ||
8018 | % Only include the text "Section ``foo'' in" if the foo is neither | ||
8019 | % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply | ||
8020 | % "see The Foo Manual", the idea being to refer to the whole manual. | ||
8021 | % | ||
8022 | % But, this being TeX, we can't easily compare our node name against the | ||
8023 | % string "Top" while ignoring the possible spaces before and after in | ||
8024 | % the input. By adding the arbitrary 7sp below, we make it much less | ||
8025 | % likely that a real node name would have the same width as "Top" (e.g., | ||
8026 | % in a monospaced font). Hopefully it will never happen in practice. | ||
8027 | % | ||
8028 | % For the same basic reason, we retypeset the "Top" at every | ||
8029 | % reference, since the current font is indeterminate. | ||
8030 | % | ||
8031 | \def\crossmanualxref#1{% | ||
8032 | \setbox\toprefbox = \hbox{Top\kern7sp}% | ||
8033 | \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% | ||
8034 | \ifdim \wd2 > 7sp % nonempty? | ||
8035 | \ifdim \wd2 = \wd\toprefbox \else % same as Top? | ||
8036 | \putwordSection{} ``\printedrefname'' \putwordin{}\space | ||
8037 | \fi | ||
8038 | \fi | ||
8039 | #1% | ||
8040 | } | ||
8041 | |||
8042 | % This macro is called from \xrefX for the `[nodename]' part of xref | 7917 | % This macro is called from \xrefX for the `[nodename]' part of xref |
8043 | % output. It's a separate macro only so it can be changed more easily, | 7918 | % output. It's a separate macro only so it can be changed more easily, |
8044 | % since square brackets don't work well in some documents. Particularly | 7919 | % since square brackets don't work well in some documents. Particularly |
@@ -8406,7 +8281,7 @@ end | |||
8406 | it from ftp://tug.org/tex/epsf.tex.} | 8281 | it from ftp://tug.org/tex/epsf.tex.} |
8407 | % | 8282 | % |
8408 | \def\image#1{% | 8283 | \def\image#1{% |
8409 | \ifx\epsfbox\thisisundefined | 8284 | \ifx\epsfbox\thisiundefined |
8410 | \ifwarnednoepsf \else | 8285 | \ifwarnednoepsf \else |
8411 | \errhelp = \noepsfhelp | 8286 | \errhelp = \noepsfhelp |
8412 | \errmessage{epsf.tex not found, images will be ignored}% | 8287 | \errmessage{epsf.tex not found, images will be ignored}% |
@@ -8430,13 +8305,6 @@ end | |||
8430 | % If the image is by itself, center it. | 8305 | % If the image is by itself, center it. |
8431 | \ifvmode | 8306 | \ifvmode |
8432 | \imagevmodetrue | 8307 | \imagevmodetrue |
8433 | \else \ifx\centersub\centerV | ||
8434 | % for @center @image, we need a vbox so we can have our vertical space | ||
8435 | \imagevmodetrue | ||
8436 | \vbox\bgroup % vbox has better behavior than vtop herev | ||
8437 | \fi\fi | ||
8438 | % | ||
8439 | \ifimagevmode | ||
8440 | \nobreak\medskip | 8308 | \nobreak\medskip |
8441 | % Usually we'll have text after the image which will insert | 8309 | % Usually we'll have text after the image which will insert |
8442 | % \parskip glue, so insert it here too to equalize the space | 8310 | % \parskip glue, so insert it here too to equalize the space |
@@ -8446,13 +8314,9 @@ end | |||
8446 | \fi | 8314 | \fi |
8447 | % | 8315 | % |
8448 | % Leave vertical mode so that indentation from an enclosing | 8316 | % Leave vertical mode so that indentation from an enclosing |
8449 | % environment such as @quotation is respected. | 8317 | % environment such as @quotation is respected. On the other hand, if |
8450 | % However, if we're at the top level, we don't want the | 8318 | % it's at the top level, we don't want the normal paragraph indentation. |
8451 | % normal paragraph indentation. | 8319 | \noindent |
8452 | % On the other hand, if we are in the case of @center @image, we don't | ||
8453 | % want to start a paragraph, which will create a hsize-width box and | ||
8454 | % eradicate the centering. | ||
8455 | \ifx\centersub\centerV\else \noindent \fi | ||
8456 | % | 8320 | % |
8457 | % Output the image. | 8321 | % Output the image. |
8458 | \ifpdf | 8322 | \ifpdf |
@@ -8464,10 +8328,7 @@ end | |||
8464 | \epsfbox{#1.eps}% | 8328 | \epsfbox{#1.eps}% |
8465 | \fi | 8329 | \fi |
8466 | % | 8330 | % |
8467 | \ifimagevmode | 8331 | \ifimagevmode \medskip \fi % space after the standalone image |
8468 | \medskip % space after a standalone image | ||
8469 | \fi | ||
8470 | \ifx\centersub\centerV \egroup \fi | ||
8471 | \endgroup} | 8332 | \endgroup} |
8472 | 8333 | ||
8473 | 8334 | ||
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am index c3a12511..4a02d2dc 100644 --- a/src/examples/Makefile.am +++ b/src/examples/Makefile.am | |||
@@ -9,7 +9,7 @@ AM_CPPFLAGS = \ | |||
9 | -I$(top_srcdir)/src/include \ | 9 | -I$(top_srcdir)/src/include \ |
10 | @LIBGCRYPT_CFLAGS@ | 10 | @LIBGCRYPT_CFLAGS@ |
11 | 11 | ||
12 | AM_CFLAGS = -DDATADIR=\"$(top_srcdir)/src/datadir/\" | 12 | AM_CFLAGS = -DDATA_DIR=\"$(top_srcdir)/src/datadir/\" |
13 | 13 | ||
14 | if USE_COVERAGE | 14 | if USE_COVERAGE |
15 | AM_CFLAGS += --coverage | 15 | AM_CFLAGS += --coverage |
diff --git a/src/examples/demo.c b/src/examples/demo.c index 8b0fa881..3f953a8f 100644 --- a/src/examples/demo.c +++ b/src/examples/demo.c | |||
@@ -796,6 +796,7 @@ catcher (int sig) | |||
796 | /** | 796 | /** |
797 | * setup handlers to ignore SIGPIPE. | 797 | * setup handlers to ignore SIGPIPE. |
798 | */ | 798 | */ |
799 | #ifndef MINGW | ||
799 | static void | 800 | static void |
800 | ignore_sigpipe () | 801 | ignore_sigpipe () |
801 | { | 802 | { |
@@ -813,7 +814,7 @@ ignore_sigpipe () | |||
813 | fprintf (stderr, | 814 | fprintf (stderr, |
814 | "Failed to install SIGPIPE handler: %s\n", strerror (errno)); | 815 | "Failed to install SIGPIPE handler: %s\n", strerror (errno)); |
815 | } | 816 | } |
816 | 817 | #endif | |
817 | 818 | ||
818 | /** | 819 | /** |
819 | * Entry point to demo. Note: this HTTP server will make all | 820 | * Entry point to demo. Note: this HTTP server will make all |
@@ -838,7 +839,9 @@ main (int argc, char *const *argv) | |||
838 | "%s PORT\n", argv[0]); | 839 | "%s PORT\n", argv[0]); |
839 | return 1; | 840 | return 1; |
840 | } | 841 | } |
842 | #ifndef MINGW | ||
841 | ignore_sigpipe (); | 843 | ignore_sigpipe (); |
844 | #endif | ||
842 | magic = magic_open (MAGIC_MIME_TYPE); | 845 | magic = magic_open (MAGIC_MIME_TYPE); |
843 | (void) magic_load (magic, NULL); | 846 | (void) magic_load (magic, NULL); |
844 | 847 | ||
diff --git a/src/examples/spdy_event_loop.c b/src/examples/spdy_event_loop.c index 6caea07a..e5bac293 100644 --- a/src/examples/spdy_event_loop.c +++ b/src/examples/spdy_event_loop.c | |||
@@ -35,7 +35,9 @@ | |||
35 | #include "microspdy.h" | 35 | #include "microspdy.h" |
36 | #include <sys/time.h> | 36 | #include <sys/time.h> |
37 | #include <time.h> | 37 | #include <time.h> |
38 | #ifndef MINGW | ||
38 | #include <arpa/inet.h> | 39 | #include <arpa/inet.h> |
40 | #endif | ||
39 | //#include "../framinglayer/structures.h" | 41 | //#include "../framinglayer/structures.h" |
40 | //#include "../applicationlayer/alstructures.h" | 42 | //#include "../applicationlayer/alstructures.h" |
41 | 43 | ||
@@ -259,8 +261,10 @@ main (int argc, char *const *argv) | |||
259 | { | 261 | { |
260 | if(argc != 2) return 1; | 262 | if(argc != 2) return 1; |
261 | 263 | ||
262 | if (signal(SIGPIPE, sig_handler) == SIG_ERR) | 264 | #ifndef MINGW |
263 | printf("\ncan't catch SIGPIPE\n"); | 265 | if (signal(SIGPIPE, sig_handler) == SIG_ERR) |
266 | printf("\ncan't catch SIGPIPE\n"); | ||
267 | #endif | ||
264 | 268 | ||
265 | SPDY_init(); | 269 | SPDY_init(); |
266 | 270 | ||
@@ -272,8 +276,8 @@ main (int argc, char *const *argv) | |||
272 | addr4.sin_port = htons(atoi(argv[1])); | 276 | addr4.sin_port = htons(atoi(argv[1])); |
273 | 277 | ||
274 | struct SPDY_Daemon *daemon = SPDY_start_daemon(atoi(argv[1]), | 278 | struct SPDY_Daemon *daemon = SPDY_start_daemon(atoi(argv[1]), |
275 | DATADIR "cert-and-key.pem", | 279 | DATA_DIR "cert-and-key.pem", |
276 | DATADIR "cert-and-key.pem", | 280 | DATA_DIR "cert-and-key.pem", |
277 | &new_session_callback,&session_closed_handler,&standard_request_handler,NULL,NULL, | 281 | &new_session_callback,&session_closed_handler,&standard_request_handler,NULL,NULL, |
278 | SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 10, | 282 | SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 10, |
279 | //SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr4, | 283 | //SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr4, |
@@ -290,8 +294,8 @@ main (int argc, char *const *argv) | |||
290 | addr6.sin6_port = htons(atoi(argv[1]) + 1); | 294 | addr6.sin6_port = htons(atoi(argv[1]) + 1); |
291 | 295 | ||
292 | struct SPDY_Daemon *daemon2 = SPDY_start_daemon(atoi(argv[1]) + 1, | 296 | struct SPDY_Daemon *daemon2 = SPDY_start_daemon(atoi(argv[1]) + 1, |
293 | DATADIR "cert-and-key.pem", | 297 | DATA_DIR "cert-and-key.pem", |
294 | DATADIR "cert-and-key.pem", | 298 | DATA_DIR "cert-and-key.pem", |
295 | &new_session_callback,NULL,&standard_request_handler,NULL,&main, | 299 | &new_session_callback,NULL,&standard_request_handler,NULL,&main, |
296 | //SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 0, | 300 | //SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 0, |
297 | //SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr6, | 301 | //SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr6, |
diff --git a/src/examples/spdy_fileserver.c b/src/examples/spdy_fileserver.c index a59b6e9e..eea0930e 100644 --- a/src/examples/spdy_fileserver.c +++ b/src/examples/spdy_fileserver.c | |||
@@ -40,7 +40,7 @@ char* basedir; | |||
40 | 40 | ||
41 | 41 | ||
42 | #define GET_MIME_TYPE(fname, mime) do {\ | 42 | #define GET_MIME_TYPE(fname, mime) do {\ |
43 | uint __len = strlen(fname);\ | 43 | unsigned int __len = strlen(fname);\ |
44 | if (__len < 4 || '.' != (fname)[__len - 4]) break;\ | 44 | if (__len < 4 || '.' != (fname)[__len - 4]) break;\ |
45 | const char * __ext = &(fname)[__len - 3];\ | 45 | const char * __ext = &(fname)[__len - 3];\ |
46 | if(0 == strcmp(__ext, "jpg")) (mime) = strdup("image/jpeg");\ | 46 | if(0 == strcmp(__ext, "jpg")) (mime) = strdup("image/jpeg");\ |
diff --git a/src/examples/spdy_response_with_callback.c b/src/examples/spdy_response_with_callback.c index f8a17442..14517ad1 100644 --- a/src/examples/spdy_response_with_callback.c +++ b/src/examples/spdy_response_with_callback.c | |||
@@ -92,7 +92,7 @@ standard_request_handler(void *cls, | |||
92 | printf("received request for '%s %s %s'\n", method, path, version); | 92 | printf("received request for '%s %s %s'\n", method, path, version); |
93 | if(strcmp(path,"/spdy-draft.txt")==0) | 93 | if(strcmp(path,"/spdy-draft.txt")==0) |
94 | { | 94 | { |
95 | FILE *fd = fopen(DATADIR "spdy-draft.txt","r"); | 95 | FILE *fd = fopen(DATA_DIR "spdy-draft.txt","r"); |
96 | 96 | ||
97 | if(NULL == (resp_headers = SPDY_name_value_create())) | 97 | if(NULL == (resp_headers = SPDY_name_value_create())) |
98 | { | 98 | { |
@@ -161,8 +161,8 @@ main (int argc, char *const *argv) | |||
161 | SPDY_init(); | 161 | SPDY_init(); |
162 | 162 | ||
163 | daemon = SPDY_start_daemon(atoi(argv[1]), | 163 | daemon = SPDY_start_daemon(atoi(argv[1]), |
164 | DATADIR "cert-and-key.pem", | 164 | DATA_DIR "cert-and-key.pem", |
165 | DATADIR "cert-and-key.pem", | 165 | DATA_DIR "cert-and-key.pem", |
166 | NULL, | 166 | NULL, |
167 | NULL, | 167 | NULL, |
168 | &standard_request_handler, | 168 | &standard_request_handler, |
diff --git a/src/microspdy/applicationlayer.c b/src/microspdy/applicationlayer.c index cbe484bc..4335fd69 100644 --- a/src/microspdy/applicationlayer.c +++ b/src/microspdy/applicationlayer.c | |||
@@ -44,7 +44,7 @@ spdy_handler_new_stream (void *cls, | |||
44 | struct SPDYF_Stream * stream) | 44 | struct SPDYF_Stream * stream) |
45 | { | 45 | { |
46 | (void)cls; | 46 | (void)cls; |
47 | uint i; | 47 | unsigned int i; |
48 | char *method = NULL; | 48 | char *method = NULL; |
49 | char *path = NULL; | 49 | char *path = NULL; |
50 | char *version = NULL; | 50 | char *version = NULL; |
diff --git a/src/microspdy/compression.c b/src/microspdy/compression.c index 5b212d30..19237450 100644 --- a/src/microspdy/compression.c +++ b/src/microspdy/compression.c | |||
@@ -256,7 +256,7 @@ SPDYF_zlib_deflate(z_stream *strm, | |||
256 | { | 256 | { |
257 | int ret; | 257 | int ret; |
258 | int flush; | 258 | int flush; |
259 | uint have; | 259 | unsigned int have; |
260 | Bytef out[SPDYF_ZLIB_CHUNK]; | 260 | Bytef out[SPDYF_ZLIB_CHUNK]; |
261 | 261 | ||
262 | *dest = NULL; | 262 | *dest = NULL; |
diff --git a/src/microspdy/session.c b/src/microspdy/session.c index 002aeb15..670b4cde 100644 --- a/src/microspdy/session.c +++ b/src/microspdy/session.c | |||
@@ -44,7 +44,7 @@ static void | |||
44 | spdyf_handler_read_syn_stream (struct SPDY_Session *session) | 44 | spdyf_handler_read_syn_stream (struct SPDY_Session *session) |
45 | { | 45 | { |
46 | size_t name_value_strm_size = 0; | 46 | size_t name_value_strm_size = 0; |
47 | uint compressed_data_size; | 47 | unsigned int compressed_data_size; |
48 | int ret; | 48 | int ret; |
49 | void *name_value_strm = NULL; | 49 | void *name_value_strm = NULL; |
50 | struct SPDYF_Control_Frame *frame; | 50 | struct SPDYF_Control_Frame *frame; |
diff --git a/src/microspdy/structures.c b/src/microspdy/structures.c index b3760be3..6b7fc681 100644 --- a/src/microspdy/structures.c +++ b/src/microspdy/structures.c | |||
@@ -48,8 +48,8 @@ SPDY_name_value_add (struct SPDY_NameValue *container, | |||
48 | const char *name, | 48 | const char *name, |
49 | const char *value) | 49 | const char *value) |
50 | { | 50 | { |
51 | uint i; | 51 | unsigned int i; |
52 | uint len; | 52 | unsigned int len; |
53 | struct SPDY_NameValue *pair; | 53 | struct SPDY_NameValue *pair; |
54 | struct SPDY_NameValue *temp; | 54 | struct SPDY_NameValue *temp; |
55 | char **temp_value; | 55 | char **temp_value; |
@@ -202,7 +202,7 @@ SPDY_name_value_lookup (struct SPDY_NameValue *container, | |||
202 | void | 202 | void |
203 | SPDY_name_value_destroy (struct SPDY_NameValue *container) | 203 | SPDY_name_value_destroy (struct SPDY_NameValue *container) |
204 | { | 204 | { |
205 | uint i; | 205 | unsigned int i; |
206 | struct SPDY_NameValue *temp = container; | 206 | struct SPDY_NameValue *temp = container; |
207 | 207 | ||
208 | while(NULL != temp) | 208 | while(NULL != temp) |
@@ -286,7 +286,7 @@ SPDYF_response_queue_create(bool is_data, | |||
286 | struct SPDYF_Response_Queue *response_to_queue; | 286 | struct SPDYF_Response_Queue *response_to_queue; |
287 | struct SPDYF_Control_Frame *control_frame; | 287 | struct SPDYF_Control_Frame *control_frame; |
288 | struct SPDYF_Data_Frame *data_frame; | 288 | struct SPDYF_Data_Frame *data_frame; |
289 | uint i; | 289 | unsigned int i; |
290 | bool is_last; | 290 | bool is_last; |
291 | 291 | ||
292 | SPDYF_ASSERT(!is_data | 292 | SPDYF_ASSERT(!is_data |
@@ -444,9 +444,9 @@ SPDYF_name_value_to_stream(struct SPDY_NameValue * container[], | |||
444 | int32_t value_size; | 444 | int32_t value_size; |
445 | int32_t name_size; | 445 | int32_t name_size; |
446 | int32_t temp; | 446 | int32_t temp; |
447 | uint i; | 447 | unsigned int i; |
448 | uint offset; | 448 | unsigned int offset; |
449 | uint value_offset; | 449 | unsigned int value_offset; |
450 | struct SPDY_NameValue * iterator; | 450 | struct SPDY_NameValue * iterator; |
451 | int j; | 451 | int j; |
452 | 452 | ||
@@ -533,8 +533,8 @@ SPDYF_name_value_from_stream(void *stream, | |||
533 | int32_t value_size; | 533 | int32_t value_size; |
534 | int32_t name_size; | 534 | int32_t name_size; |
535 | int i; | 535 | int i; |
536 | uint offset = 0; | 536 | unsigned int offset = 0; |
537 | uint value_end_offset; | 537 | unsigned int value_end_offset; |
538 | char *name; | 538 | char *name; |
539 | char *value; | 539 | char *value; |
540 | 540 | ||
diff --git a/src/microspdy/structures.h b/src/microspdy/structures.h index 5fb91889..603449f1 100644 --- a/src/microspdy/structures.h +++ b/src/microspdy/structures.h | |||
@@ -487,7 +487,7 @@ struct SPDY_NameValue | |||
487 | /** | 487 | /** |
488 | * Number of values, this is >= 0. | 488 | * Number of values, this is >= 0. |
489 | */ | 489 | */ |
490 | uint num_values; | 490 | unsigned int num_values; |
491 | }; | 491 | }; |
492 | 492 | ||
493 | 493 | ||
diff --git a/src/spdy2http/Makefile.am b/src/spdy2http/Makefile.am index a8f2536f..475bcbfe 100644 --- a/src/spdy2http/Makefile.am +++ b/src/spdy2http/Makefile.am | |||
@@ -1,6 +1,6 @@ | |||
1 | SUBDIRS = . | 1 | SUBDIRS = . |
2 | 2 | ||
3 | AM_CFLAGS = -DDATADIR=\"$(top_srcdir)/src/datadir/\" | 3 | AM_CFLAGS = -DDATA_DIR=\"$(top_srcdir)/src/datadir/\" |
4 | 4 | ||
5 | if USE_COVERAGE | 5 | if USE_COVERAGE |
6 | AM_CFLAGS += -fprofile-arcs -ftest-coverage | 6 | AM_CFLAGS += -fprofile-arcs -ftest-coverage |
diff --git a/src/testspdy/Makefile.am b/src/testspdy/Makefile.am index 3a124f5e..42076e43 100644 --- a/src/testspdy/Makefile.am +++ b/src/testspdy/Makefile.am | |||
@@ -1,6 +1,6 @@ | |||
1 | SUBDIRS = . | 1 | SUBDIRS = . |
2 | 2 | ||
3 | AM_CFLAGS = -DDATADIR=\"$(top_srcdir)/src/datadir/\" | 3 | AM_CFLAGS = -DDATA_DIR=\"$(top_srcdir)/src/datadir/\" |
4 | 4 | ||
5 | if USE_COVERAGE | 5 | if USE_COVERAGE |
6 | AM_CFLAGS += -fprofile-arcs -ftest-coverage | 6 | AM_CFLAGS += -fprofile-arcs -ftest-coverage |
diff --git a/src/testspdy/test_daemon_start_stop.c b/src/testspdy/test_daemon_start_stop.c index af2e4b29..175e6365 100644 --- a/src/testspdy/test_daemon_start_stop.c +++ b/src/testspdy/test_daemon_start_stop.c | |||
@@ -32,8 +32,8 @@ main() | |||
32 | SPDY_init(); | 32 | SPDY_init(); |
33 | 33 | ||
34 | struct SPDY_Daemon *daemon = SPDY_start_daemon(get_port(16123), | 34 | struct SPDY_Daemon *daemon = SPDY_start_daemon(get_port(16123), |
35 | DATADIR "cert-and-key.pem", | 35 | DATA_DIR "cert-and-key.pem", |
36 | DATADIR "cert-and-key.pem", | 36 | DATA_DIR "cert-and-key.pem", |
37 | NULL,NULL,NULL,NULL,NULL,SPDY_DAEMON_OPTION_END); | 37 | NULL,NULL,NULL,NULL,NULL,SPDY_DAEMON_OPTION_END); |
38 | 38 | ||
39 | if(NULL==daemon){ | 39 | if(NULL==daemon){ |
diff --git a/src/testspdy/test_daemon_start_stop_many.c b/src/testspdy/test_daemon_start_stop_many.c index bb20c41f..276f784c 100644 --- a/src/testspdy/test_daemon_start_stop_many.c +++ b/src/testspdy/test_daemon_start_stop_many.c | |||
@@ -43,8 +43,8 @@ main() | |||
43 | for(j=0;j<num_daemons;++j) | 43 | for(j=0;j<num_daemons;++j) |
44 | { | 44 | { |
45 | daemon[j] = SPDY_start_daemon(port + j, | 45 | daemon[j] = SPDY_start_daemon(port + j, |
46 | DATADIR "cert-and-key.pem", | 46 | DATA_DIR "cert-and-key.pem", |
47 | DATADIR "cert-and-key.pem", | 47 | DATA_DIR "cert-and-key.pem", |
48 | NULL,NULL,NULL,NULL,NULL,SPDY_DAEMON_OPTION_END); | 48 | NULL,NULL,NULL,NULL,NULL,SPDY_DAEMON_OPTION_END); |
49 | 49 | ||
50 | if(NULL==daemon[j]){ | 50 | if(NULL==daemon[j]){ |
diff --git a/src/testspdy/test_misc.c b/src/testspdy/test_misc.c index dd65c309..e6ca99ac 100644 --- a/src/testspdy/test_misc.c +++ b/src/testspdy/test_misc.c | |||
@@ -196,8 +196,8 @@ parentproc() | |||
196 | SPDY_init(); | 196 | SPDY_init(); |
197 | 197 | ||
198 | daemon = SPDY_start_daemon(port, | 198 | daemon = SPDY_start_daemon(port, |
199 | DATADIR "cert-and-key.pem", | 199 | DATA_DIR "cert-and-key.pem", |
200 | DATADIR "cert-and-key.pem", | 200 | DATA_DIR "cert-and-key.pem", |
201 | NULL, | 201 | NULL, |
202 | NULL, | 202 | NULL, |
203 | &standard_request_handler, | 203 | &standard_request_handler, |
diff --git a/src/testspdy/test_new_connection.c b/src/testspdy/test_new_connection.c index f4f22e2d..8d13004f 100644 --- a/src/testspdy/test_new_connection.c +++ b/src/testspdy/test_new_connection.c | |||
@@ -889,8 +889,8 @@ parentproc(int child) | |||
889 | SPDY_init(); | 889 | SPDY_init(); |
890 | 890 | ||
891 | daemon = SPDY_start_daemon(port, | 891 | daemon = SPDY_start_daemon(port, |
892 | DATADIR "cert-and-key.pem", | 892 | DATA_DIR "cert-and-key.pem", |
893 | DATADIR "cert-and-key.pem", | 893 | DATA_DIR "cert-and-key.pem", |
894 | &new_session_callback,NULL,NULL,NULL,CLS,SPDY_DAEMON_OPTION_END); | 894 | &new_session_callback,NULL,NULL,NULL,CLS,SPDY_DAEMON_OPTION_END); |
895 | 895 | ||
896 | if(NULL==daemon){ | 896 | if(NULL==daemon){ |
diff --git a/src/testspdy/test_request_response.c b/src/testspdy/test_request_response.c index 28c64627..4591849e 100644 --- a/src/testspdy/test_request_response.c +++ b/src/testspdy/test_request_response.c | |||
@@ -900,8 +900,8 @@ parentproc( int port) | |||
900 | SPDY_init(); | 900 | SPDY_init(); |
901 | 901 | ||
902 | daemon = SPDY_start_daemon(port, | 902 | daemon = SPDY_start_daemon(port, |
903 | DATADIR "cert-and-key.pem", | 903 | DATA_DIR "cert-and-key.pem", |
904 | DATADIR "cert-and-key.pem", | 904 | DATA_DIR "cert-and-key.pem", |
905 | NULL,&session_closed_handler,&standard_request_handler,NULL,CLS,SPDY_DAEMON_OPTION_END); | 905 | NULL,&session_closed_handler,&standard_request_handler,NULL,CLS,SPDY_DAEMON_OPTION_END); |
906 | 906 | ||
907 | if(NULL==daemon){ | 907 | if(NULL==daemon){ |
diff --git a/src/testspdy/test_request_response_with_callback.c b/src/testspdy/test_request_response_with_callback.c index 81a69581..c22917c5 100644 --- a/src/testspdy/test_request_response_with_callback.c +++ b/src/testspdy/test_request_response_with_callback.c | |||
@@ -114,7 +114,7 @@ standard_request_handler(void *cls, | |||
114 | 114 | ||
115 | printf("received request for '%s %s %s'\n", method, path, version); | 115 | printf("received request for '%s %s %s'\n", method, path, version); |
116 | 116 | ||
117 | FILE *fd = fopen(DATADIR "spdy-draft.txt","r"); | 117 | FILE *fd = fopen(DATA_DIR "spdy-draft.txt","r"); |
118 | 118 | ||
119 | if(NULL == (resp_headers = SPDY_name_value_create())) | 119 | if(NULL == (resp_headers = SPDY_name_value_create())) |
120 | { | 120 | { |
@@ -161,8 +161,8 @@ parentproc() | |||
161 | SPDY_init(); | 161 | SPDY_init(); |
162 | 162 | ||
163 | daemon = SPDY_start_daemon(port, | 163 | daemon = SPDY_start_daemon(port, |
164 | DATADIR "cert-and-key.pem", | 164 | DATA_DIR "cert-and-key.pem", |
165 | DATADIR "cert-and-key.pem", | 165 | DATA_DIR "cert-and-key.pem", |
166 | NULL, | 166 | NULL, |
167 | NULL, | 167 | NULL, |
168 | &standard_request_handler, | 168 | &standard_request_handler, |
@@ -257,7 +257,7 @@ childproc() | |||
257 | uint64_t usecs; | 257 | uint64_t usecs; |
258 | 258 | ||
259 | asprintf(&cmd1, "spdycat https://127.0.0.1:%i/ | md5sum",port); | 259 | asprintf(&cmd1, "spdycat https://127.0.0.1:%i/ | md5sum",port); |
260 | asprintf(&cmd2, "md5sum " DATADIR "spdy-draft.txt"); | 260 | asprintf(&cmd2, "md5sum " DATA_DIR "spdy-draft.txt"); |
261 | 261 | ||
262 | gettimeofday(&tv1, NULL); | 262 | gettimeofday(&tv1, NULL); |
263 | md5(cmd1,md5_sum1); | 263 | md5(cmd1,md5_sum1); |
@@ -268,7 +268,7 @@ childproc() | |||
268 | printf("original file md5: %s\n", md5_sum2); | 268 | printf("original file md5: %s\n", md5_sum2); |
269 | ret = strcmp(md5_sum1, md5_sum2); | 269 | ret = strcmp(md5_sum1, md5_sum2); |
270 | 270 | ||
271 | if(0 == ret && 0 == stat(DATADIR "spdy-draft.txt", &st)) | 271 | if(0 == ret && 0 == stat(DATA_DIR "spdy-draft.txt", &st)) |
272 | { | 272 | { |
273 | usecs = (uint64_t)1000000 * (uint64_t)(tv2.tv_sec - tv1.tv_sec) + tv2.tv_usec - tv1.tv_usec; | 273 | usecs = (uint64_t)1000000 * (uint64_t)(tv2.tv_sec - tv1.tv_sec) + tv2.tv_usec - tv1.tv_usec; |
274 | printf("%i bytes read in %i usecs\n", st.st_size, usecs); | 274 | printf("%i bytes read in %i usecs\n", st.st_size, usecs); |
diff --git a/src/testspdy/test_requests_with_assets.c b/src/testspdy/test_requests_with_assets.c index c4eb3d49..26d309e8 100644 --- a/src/testspdy/test_requests_with_assets.c +++ b/src/testspdy/test_requests_with_assets.c | |||
@@ -213,8 +213,8 @@ parentproc() | |||
213 | SPDY_init(); | 213 | SPDY_init(); |
214 | 214 | ||
215 | daemon = SPDY_start_daemon(port, | 215 | daemon = SPDY_start_daemon(port, |
216 | DATADIR "cert-and-key.pem", | 216 | DATA_DIR "cert-and-key.pem", |
217 | DATADIR "cert-and-key.pem", | 217 | DATA_DIR "cert-and-key.pem", |
218 | NULL, | 218 | NULL, |
219 | NULL, | 219 | NULL, |
220 | &standard_request_handler, | 220 | &standard_request_handler, |
diff --git a/src/testspdy/test_session_timeout.c b/src/testspdy/test_session_timeout.c index d9b28719..c5d29dc9 100644 --- a/src/testspdy/test_session_timeout.c +++ b/src/testspdy/test_session_timeout.c | |||
@@ -105,8 +105,8 @@ parentproc() | |||
105 | SPDY_init(); | 105 | SPDY_init(); |
106 | 106 | ||
107 | daemon = SPDY_start_daemon(port, | 107 | daemon = SPDY_start_daemon(port, |
108 | DATADIR "cert-and-key.pem", | 108 | DATA_DIR "cert-and-key.pem", |
109 | DATADIR "cert-and-key.pem", | 109 | DATA_DIR "cert-and-key.pem", |
110 | &new_session_cb, | 110 | &new_session_cb, |
111 | &closed_session_cb, | 111 | &closed_session_cb, |
112 | NULL, | 112 | NULL, |