aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2014-03-25 21:16:13 -0700
committerPaul Eggert2014-03-25 21:16:13 -0700
commitcefcfbcc1b7865dafd615c0fe42e62dbe2660ddd (patch)
tree9e0b51810e1fd2ce97f50a3af8540ecc0f47597c
parentb18d7820f32694a5f386f2a334b81c2fcd9edf0a (diff)
downloademacs-cefcfbcc1b7865dafd615c0fe42e62dbe2660ddd.tar.gz
emacs-cefcfbcc1b7865dafd615c0fe42e62dbe2660ddd.zip
Merge from gnulib.
This incorporates: 2014-03-26 strftime: wrap macros in "do {...} while(0)" * lib/strftime.c, doc/misc/texinfo.tex: Update from gnulib.
-rw-r--r--ChangeLog6
-rw-r--r--doc/misc/ChangeLog4
-rw-r--r--doc/misc/texinfo.tex28
-rw-r--r--lib/strftime.c48
4 files changed, 60 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index f8e98bdf317..04f5bed7ee2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12014-03-26 Paul Eggert <eggert@cs.ucla.edu>
2
3 Merge from gnulib, incorporating:
4 2014-03-26 strftime: wrap macros in "do {...} while(0)"
5 * lib/strftime.c: Update from gnulib.
6
12014-03-07 Paul Eggert <eggert@cs.ucla.edu> 72014-03-07 Paul Eggert <eggert@cs.ucla.edu>
2 8
3 Merge from gnulib, incorporating: 9 Merge from gnulib, incorporating:
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 9f01da8bc21..1cb16188abd 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,7 @@
12014-03-26 Paul Eggert <eggert@cs.ucla.edu>
2
3 * texinfo.tex: Update from gnulib.
4
12014-03-24 Michael Albinus <michael.albinus@gmx.de> 52014-03-24 Michael Albinus <michael.albinus@gmx.de>
2 6
3 * tramp.texi (Frequently Asked Questions): Add fish shell settings. 7 * tramp.texi (Frequently Asked Questions): Add fish shell settings.
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 3e521840ca2..0f2673c849e 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
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{2014-02-16.16} 6\def\texinfoversion{2014-03-17.07}
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,
@@ -3935,19 +3935,23 @@ end
3935} 3935}
3936 3936
3937% multitable-only commands. 3937% multitable-only commands.
3938% 3938%
3939% @headitem starts a heading row, which we typeset in bold. 3939% @headitem starts a heading row, which we typeset in bold. Assignments
3940% Assignments have to be global since we are inside the implicit group 3940% have to be global since we are inside the implicit group of an
3941% of an alignment entry. \everycr resets \everytab so we don't have to 3941% alignment entry. \everycr below resets \everytab so we don't have to
3942% undo it ourselves. 3942% undo it ourselves.
3943\def\headitemfont{\b}% for people to use in the template row; not changeable 3943\def\headitemfont{\b}% for people to use in the template row; not changeable
3944\def\headitem{% 3944\def\headitem{%
3945 \checkenv\multitable 3945 \checkenv\multitable
3946 \crcr 3946 \crcr
3947 \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
3947 \global\everytab={\bf}% can't use \headitemfont since the parsing differs 3948 \global\everytab={\bf}% can't use \headitemfont since the parsing differs
3948 \the\everytab % for the first item 3949 \the\everytab % for the first item
3949}% 3950}%
3950% 3951%
3952% default for tables with no headings.
3953\let\headitemcrhook=\relax
3954%
3951% A \tab used to include \hskip1sp. But then the space in a template 3955% A \tab used to include \hskip1sp. But then the space in a template
3952% line is not enough. That is bad. So let's go back to just `&' until 3956% line is not enough. That is bad. So let's go back to just `&' until
3953% we again encounter the problem the 1sp was intended to solve. 3957% we again encounter the problem the 1sp was intended to solve.
@@ -3978,15 +3982,15 @@ end
3978 % 3982 %
3979 \everycr = {% 3983 \everycr = {%
3980 \noalign{% 3984 \noalign{%
3981 \global\everytab={}% 3985 \global\everytab={}% Reset from possible headitem.
3982 \global\colcount=0 % Reset the column counter. 3986 \global\colcount=0 % Reset the column counter.
3983 % Check for saved footnotes, etc. 3987 %
3988 % Check for saved footnotes, etc.:
3984 \checkinserts 3989 \checkinserts
3985 % Keeps underfull box messages off when table breaks over pages. 3990 %
3986 %\filbreak 3991 % Perhaps a \nobreak, then reset:
3987 % Maybe so, but it also creates really weird page breaks when the 3992 \headitemcrhook
3988 % table breaks over pages. Wouldn't \vfil be better? Wait until the 3993 \global\let\headitemcrhook=\relax
3989 % problem manifests itself, so it can be fixed for real --karl.
3990 }% 3994 }%
3991 }% 3995 }%
3992 % 3996 %
diff --git a/lib/strftime.c b/lib/strftime.c
index c1ec41422bd..857cca568b8 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -681,24 +681,44 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
681 switch (format_char) 681 switch (format_char)
682 { 682 {
683#define DO_NUMBER(d, v) \ 683#define DO_NUMBER(d, v) \
684 digits = d; \ 684 do \
685 number_value = v; goto do_number 685 { \
686 digits = d; \
687 number_value = v; \
688 goto do_number; \
689 } \
690 while (0)
686#define DO_SIGNED_NUMBER(d, negative, v) \ 691#define DO_SIGNED_NUMBER(d, negative, v) \
687 digits = d; \ 692 do \
688 negative_number = negative; \ 693 { \
689 u_number_value = v; goto do_signed_number 694 digits = d; \
695 negative_number = negative; \
696 u_number_value = v; \
697 goto do_signed_number; \
698 } \
699 while (0)
690 700
691 /* The mask is not what you might think. 701 /* The mask is not what you might think.
692 When the ordinal i'th bit is set, insert a colon 702 When the ordinal i'th bit is set, insert a colon
693 before the i'th digit of the time zone representation. */ 703 before the i'th digit of the time zone representation. */
694#define DO_TZ_OFFSET(d, negative, mask, v) \ 704#define DO_TZ_OFFSET(d, negative, mask, v) \
695 digits = d; \ 705 do \
696 negative_number = negative; \ 706 { \
697 tz_colon_mask = mask; \ 707 digits = d; \
698 u_number_value = v; goto do_tz_offset 708 negative_number = negative; \
709 tz_colon_mask = mask; \
710 u_number_value = v; \
711 goto do_tz_offset; \
712 } \
713 while (0)
699#define DO_NUMBER_SPACEPAD(d, v) \ 714#define DO_NUMBER_SPACEPAD(d, v) \
700 digits = d; \ 715 do \
701 number_value = v; goto do_number_spacepad 716 { \
717 digits = d; \
718 number_value = v; \
719 goto do_number_spacepad; \
720 } \
721 while (0)
702 722
703 case L_('%'): 723 case L_('%'):
704 if (modifier != 0) 724 if (modifier != 0)
@@ -1265,9 +1285,9 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s,
1265 } 1285 }
1266 if (modifier == L_('O')) 1286 if (modifier == L_('O'))
1267 goto bad_format; 1287 goto bad_format;
1268 else 1288
1269 DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE, 1289 DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE,
1270 tp->tm_year + (unsigned int) TM_YEAR_BASE); 1290 tp->tm_year + (unsigned int) TM_YEAR_BASE);
1271 1291
1272 case L_('y'): 1292 case L_('y'):
1273 if (modifier == L_('E')) 1293 if (modifier == L_('E'))