Skip to content

Commit ce9171c

Browse files
slattarinigitster
authored andcommitted
compat/regex: fix spelling and grammar in comments
Some of these were found using Lucas De Marchi's codespell tool. Others noticed by Eric Sunshine. Helped-by: Eric Sunshine <[email protected]> Signed-off-by: Stefano Lattarini <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Acked-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7323513 commit ce9171c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

compat/regex/regcomp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
20952095

20962096
/* Entry point of the parser.
20972097
Parse the regular expression REGEXP and return the structure tree.
2098-
If an error is occured, ERR is set by error code, and return NULL.
2098+
If an error has occurred, ERR is set by error code, and return NULL.
20992099
This function build the following tree, from regular expression <reg_exp>:
21002100
CAT
21012101
/ \
@@ -3715,7 +3715,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
37153715
/* This is intended for the expressions like "a{1,3}".
37163716
Fetch a number from `input', and return the number.
37173717
Return -1, if the number field is empty like "{,1}".
3718-
Return -2, If an error is occured. */
3718+
Return -2, if an error has occurred. */
37193719

37203720
static int
37213721
fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)

compat/regex/regex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "config.h"
2323
#endif
2424

25-
/* Make sure noone compiles this code with a C++ compiler. */
25+
/* Make sure no one compiles this code with a C++ compiler. */
2626
#ifdef __cplusplus
2727
# error "This is C code, use a C compiler"
2828
#endif

compat/regex/regex_internal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
12841284

12851285
/* Insert the new element ELEM to the re_node_set* SET.
12861286
SET should not already have ELEM.
1287-
return -1 if an error is occured, return 1 otherwise. */
1287+
return -1 if an error has occurred, return 1 otherwise. */
12881288

12891289
static int
12901290
internal_function
@@ -1341,7 +1341,7 @@ re_node_set_insert (re_node_set *set, int elem)
13411341

13421342
/* Insert the new element ELEM to the re_node_set* SET.
13431343
SET should not already have any element greater than or equal to ELEM.
1344-
Return -1 if an error is occured, return 1 otherwise. */
1344+
Return -1 if an error has occurred, return 1 otherwise. */
13451345

13461346
static int
13471347
internal_function
@@ -1416,7 +1416,7 @@ re_node_set_remove_at (re_node_set *set, int idx)
14161416

14171417

14181418
/* Add the token TOKEN to dfa->nodes, and return the index of the token.
1419-
Or return -1, if an error will be occured. */
1419+
Or return -1, if an error has occurred. */
14201420

14211421
static int
14221422
internal_function

0 commit comments

Comments
 (0)