Skip to content

Commit

Permalink
Merge branch 'cygwin-3_5-branch'
Browse files Browse the repository at this point in the history
This is more like an experiment, to see what v3.5.5 will bring when it
lands. And hoping that some of the gifts might have the result of fixing
those hangs/deadlocks I frequently experience when trying to Ctrl+C
something in a `tmux` session.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Dec 7, 2024
2 parents 7fdbd22 + db55d54 commit 024ca8c
Show file tree
Hide file tree
Showing 60 changed files with 1,131 additions and 746 deletions.
22 changes: 13 additions & 9 deletions newlib/libc/posix/collate.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ struct __collate_st_chain_pri __collate_chain_pri_table[TABLE_SIZE];
void __collate_err(int ex, const char *f);

int
__collate_load_tables(encoding)
char *encoding;
__collate_load_tables(
char *encoding
)
{
char buf[PATH_MAX];
FILE *fp;
Expand Down Expand Up @@ -113,8 +114,9 @@ __collate_load_tables(encoding)
}

u_char *
__collate_substitute(s)
const u_char *s;
__collate_substitute(
const u_char *s
)
{
int dest_len, len, nlen;
int delta = strlen((const char *) s);
Expand Down Expand Up @@ -143,9 +145,12 @@ __collate_substitute(s)
}

void
__collate_lookup(t, len, prim, sec)
const u_char *t;
int *len, *prim, *sec;
__collate_lookup(
const u_char *t,
int *len,
int *prim,
int *sec
)
{
struct __collate_st_chain_pri *p2;

Expand All @@ -165,8 +170,7 @@ __collate_lookup(t, len, prim, sec)
}

u_char *
__collate_strdup(s)
u_char *s;
__collate_strdup(u_char *s)
{
u_char *t = (u_char *) strdup((const char *) s);

Expand Down
6 changes: 4 additions & 2 deletions newlib/libc/posix/collcmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
* "[a-z]"-type ranges with national characters.
*/

int __collate_range_cmp (c1, c2)
int c1, c2;
int __collate_range_cmp (
int c1,
int c2
)
{
static char s1[2], s2[2];
int ret;
Expand Down
82 changes: 44 additions & 38 deletions newlib/libc/posix/engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,13 @@ static char *pchar(int ch);
== size_t nmatch, regmatch_t pmatch[], int eflags);
*/
static int /* 0 success, REG_NOMATCH failure */
matcher(g, string, nmatch, pmatch, eflags)
struct re_guts *g;
char *string;
size_t nmatch;
regmatch_t pmatch[];
int eflags;
matcher(
struct re_guts *g,
char *string,
size_t nmatch,
regmatch_t pmatch[],
int eflags
)
{
char *endp;
int i;
Expand Down Expand Up @@ -346,12 +347,13 @@ int eflags;
== char *stop, sopno startst, sopno stopst);
*/
static char * /* == stop (success) always */
dissect(m, start, stop, startst, stopst)
struct match *m;
char *start;
char *stop;
sopno startst;
sopno stopst;
dissect(
struct match *m,
char *start,
char *stop,
sopno startst,
sopno stopst
)
{
int i;
sopno ss; /* start sop of current subRE */
Expand Down Expand Up @@ -539,13 +541,14 @@ sopno stopst;
== char *stop, sopno startst, sopno stopst, sopno lev);
*/
static char * /* == stop (success) or NULL (failure) */
backref(m, start, stop, startst, stopst, lev)
struct match *m;
char *start;
char *stop;
sopno startst;
sopno stopst;
sopno lev; /* PLUS nesting level */
backref(
struct match *m,
char *start,
char *stop,
sopno startst,
sopno stopst,
sopno lev /* PLUS nesting level */
)
{
int i;
sopno ss; /* start sop of current subRE */
Expand Down Expand Up @@ -744,12 +747,13 @@ sopno lev; /* PLUS nesting level */
== char *stop, sopno startst, sopno stopst);
*/
static char * /* where tentative match ended, or NULL */
fast(m, start, stop, startst, stopst)
struct match *m;
char *start;
char *stop;
sopno startst;
sopno stopst;
fast(
struct match *m,
char *start,
char *stop,
sopno startst,
sopno stopst
)
{
states st = m->st;
states fresh = m->fresh;
Expand Down Expand Up @@ -835,12 +839,13 @@ sopno stopst;
== char *stop, sopno startst, sopno stopst);
*/
static char * /* where it ended */
slow(m, start, stop, startst, stopst)
struct match *m;
char *start;
char *stop;
sopno startst;
sopno stopst;
slow(
struct match *m,
char *start,
char *stop,
sopno startst,
sopno stopst
)
{
states st = m->st;
states empty = m->empty;
Expand Down Expand Up @@ -931,13 +936,14 @@ sopno stopst;
== #define NNONCHAR (CODEMAX-CHAR_MAX)
*/
static states
step(g, start, stop, bef, ch, aft)
struct re_guts *g;
sopno start; /* start state within strip */
sopno stop; /* state after stop state within strip */
states bef; /* states reachable before */
int ch; /* character or NONCHAR code */
states aft; /* states already known reachable after */
step(
struct re_guts *g,
sopno start, /* start state within strip */
sopno stop, /* state after stop state within strip */
states bef, /* states reachable before */
int ch, /* character or NONCHAR code */
states aft /* states already known reachable after */
)
{
cset *cs;
sop s;
Expand Down
11 changes: 6 additions & 5 deletions newlib/libc/posix/fnmatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,12 @@ fnmatch(pattern, string, flags)
}

static int
rangematch(pattern, test, flags, newp)
const char *pattern;
char test;
int flags;
char **newp;
rangematch(
const char *pattern,
char test,
int flags,
char **newp
)
{
int negate, ok;
char c, c2;
Expand Down
Loading

0 comments on commit 024ca8c

Please sign in to comment.