Skip to content

Commit

Permalink
[BZ #1373]
Browse files Browse the repository at this point in the history
2005-10-13  Ulrich Drepper  <[email protected]>
	[BZ #1373]
	* argp/argp.h: Remove __NTH for __argp_usage inline function.
  • Loading branch information
Ulrich Drepper committed Oct 14, 2005
1 parent db26cb7 commit 513bbb2
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 22 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2005-10-13 Ulrich Drepper <[email protected]>

[BZ #1373]
* argp/argp.h: Remove __NTH for __argp_usage inline function.

2005-08-26 Paul Eggert <[email protected]>

[BZ #1248]
Expand Down
4 changes: 2 additions & 2 deletions argp/argp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Hierarchial argument parsing, layered over getopt.
Copyright (C) 1995-1999,2003,2004 Free Software Foundation, Inc.
Copyright (C) 1995-1999,2003,2004,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <[email protected]>.
Expand Down Expand Up @@ -561,7 +561,7 @@ extern void *__argp_input (__const struct argp *__restrict __argp,
# endif

ARGP_EI void
__NTH (__argp_usage (__const struct argp_state *__state))
__argp_usage (__const struct argp_state *__state)
{
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
}
Expand Down
44 changes: 25 additions & 19 deletions posix/regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3487,39 +3487,45 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
#endif /* RE_ENABLE_I18N */

#define BUILD_CHARCLASS_LOOP(ctype_func) \
for (i = 0; i < SBC_MAX; ++i) \
do { \
if (BE (trans != NULL, 0)) \
{ \
if (ctype_func (i)) \
{ \
int ch = trans ? trans[i] : i; \
bitset_set (sbcset, ch); \
} \
}
for (i = 0; i < SBC_MAX; ++i) \
if (ctype_func (i)) \
bitset_set (sbcset, trans[i]); \
} \
else \
{ \
for (i = 0; i < SBC_MAX; ++i) \
if (ctype_func (i)) \
bitset_set (sbcset, i); \
} \
} while (0)

if (strcmp (name, "alnum") == 0)
BUILD_CHARCLASS_LOOP (isalnum)
BUILD_CHARCLASS_LOOP (isalnum);
else if (strcmp (name, "cntrl") == 0)
BUILD_CHARCLASS_LOOP (iscntrl)
BUILD_CHARCLASS_LOOP (iscntrl);
else if (strcmp (name, "lower") == 0)
BUILD_CHARCLASS_LOOP (islower)
BUILD_CHARCLASS_LOOP (islower);
else if (strcmp (name, "space") == 0)
BUILD_CHARCLASS_LOOP (isspace)
BUILD_CHARCLASS_LOOP (isspace);
else if (strcmp (name, "alpha") == 0)
BUILD_CHARCLASS_LOOP (isalpha)
BUILD_CHARCLASS_LOOP (isalpha);
else if (strcmp (name, "digit") == 0)
BUILD_CHARCLASS_LOOP (isdigit)
BUILD_CHARCLASS_LOOP (isdigit);
else if (strcmp (name, "print") == 0)
BUILD_CHARCLASS_LOOP (isprint)
BUILD_CHARCLASS_LOOP (isprint);
else if (strcmp (name, "upper") == 0)
BUILD_CHARCLASS_LOOP (isupper)
BUILD_CHARCLASS_LOOP (isupper);
else if (strcmp (name, "blank") == 0)
BUILD_CHARCLASS_LOOP (isblank)
BUILD_CHARCLASS_LOOP (isblank);
else if (strcmp (name, "graph") == 0)
BUILD_CHARCLASS_LOOP (isgraph)
BUILD_CHARCLASS_LOOP (isgraph);
else if (strcmp (name, "punct") == 0)
BUILD_CHARCLASS_LOOP (ispunct)
BUILD_CHARCLASS_LOOP (ispunct);
else if (strcmp (name, "xdigit") == 0)
BUILD_CHARCLASS_LOOP (isxdigit)
BUILD_CHARCLASS_LOOP (isxdigit);
else
return REG_ECTYPE;

Expand Down
2 changes: 1 addition & 1 deletion posix/regexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2867,7 +2867,7 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node,
sizeof (re_dfastate_t *) * (path->alloc - old_alloc));
}

str_idx = path->next_idx == 0 ? top_str : path->next_idx;
str_idx = path->next_idx ?: top_str;

/* Temporary modify MCTX. */
backup_state_log = mctx->state_log;
Expand Down

0 comments on commit 513bbb2

Please sign in to comment.