mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-07 02:32:27 +02:00
commit bash-20180427 snapshot
This commit is contained in:
@@ -54,8 +54,11 @@ INTERNAL_GLOB_PATTERN_P (pattern)
|
||||
continue;
|
||||
|
||||
case L('\\'):
|
||||
if (*p++ == L('\0'))
|
||||
return 0;
|
||||
/* Don't let the pattern end in a backslash (GMATCH returns no match
|
||||
if the pattern ends in a backslash anyway), but otherwise return 1,
|
||||
since the matching engine uses backslash as an escape character
|
||||
and it can be removed. */
|
||||
return (*p != L('\0'));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
+12
-1
@@ -458,7 +458,18 @@ BRACKMATCH (p, test, flags)
|
||||
pc = IS_CCLASS (orig_test, (XCHAR *)ccname);
|
||||
}
|
||||
if (pc == -1)
|
||||
pc = 0;
|
||||
{
|
||||
/* CCNAME is not a valid character class in the current
|
||||
locale. In addition to noting no match (pc = 0), we have
|
||||
a choice about what to do with the invalid charclass.
|
||||
Posix leaves the behavior unspecified, but we're going
|
||||
to skip over the charclass and keep going instead of
|
||||
testing ORIG_TEST against each character in the class
|
||||
string. If we don't want to do that, take out the update
|
||||
of P. */
|
||||
pc = 0;
|
||||
p = close + 2;
|
||||
}
|
||||
else
|
||||
p = close + 2; /* move past the closing `]' */
|
||||
|
||||
|
||||
+8
-2
@@ -32,7 +32,13 @@
|
||||
#include <stdio.h>
|
||||
#include <stdc.h>
|
||||
|
||||
extern long get_clk_tck __P((void));
|
||||
#include <bashintl.h>
|
||||
|
||||
#ifndef locale_decpoint
|
||||
extern int locale_decpoint PARAMS((void));
|
||||
#endif
|
||||
|
||||
extern long get_clk_tck PARAMS((void));
|
||||
|
||||
void
|
||||
clock_t_to_secs (t, sp, sfp)
|
||||
@@ -76,6 +82,6 @@ print_clock_t (fp, t)
|
||||
minutes = timestamp / 60;
|
||||
seconds = timestamp % 60;
|
||||
|
||||
fprintf (fp, "%ldm%d.%03ds", minutes, seconds, seconds_fraction);
|
||||
fprintf (fp, "%ldm%d%c%03ds", minutes, seconds, locale_decpoint(), seconds_fraction);
|
||||
}
|
||||
#endif /* HAVE_TIMES */
|
||||
|
||||
+8
-1
@@ -25,6 +25,13 @@
|
||||
#include <sys/types.h>
|
||||
#include <posixtime.h>
|
||||
|
||||
#include <bashintl.h>
|
||||
#include <stdc.h>
|
||||
|
||||
#ifndef locale_decpoint
|
||||
extern int locale_decpoint PARAMS((void));
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
struct timeval *
|
||||
@@ -140,6 +147,6 @@ print_timeval (fp, tvp)
|
||||
minutes = timestamp / 60;
|
||||
seconds = timestamp % 60;
|
||||
|
||||
fprintf (fp, "%ldm%d.%03ds", minutes, seconds, seconds_fraction);
|
||||
fprintf (fp, "%ldm%d%c%03ds", minutes, seconds, locale_decpoint (), seconds_fraction);
|
||||
}
|
||||
#endif /* HAVE_TIMEVAL */
|
||||
|
||||
Reference in New Issue
Block a user