Skip to content

Commit

Permalink
compat/regex: fix spelling and grammar in comments
Browse files Browse the repository at this point in the history
Some of these were found using Lucas De Marchi's codespell tool.
Others noticed by Eric Sunshine.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Stefano Lattarini authored and Junio C Hamano committed Apr 12, 2013
1 parent 7323513 commit ce9171c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions compat/regex/regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2095,7 +2095,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)

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

static int
fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
Expand Down
2 changes: 1 addition & 1 deletion compat/regex/regex.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "config.h"
#endif

/* Make sure noone compiles this code with a C++ compiler. */
/* Make sure no one compiles this code with a C++ compiler. */
#ifdef __cplusplus
# error "This is C code, use a C compiler"
#endif
Expand Down
6 changes: 3 additions & 3 deletions compat/regex/regex_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)

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

static int
internal_function
Expand Down Expand Up @@ -1341,7 +1341,7 @@ re_node_set_insert (re_node_set *set, int elem)

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

static int
internal_function
Expand Down Expand Up @@ -1416,7 +1416,7 @@ re_node_set_remove_at (re_node_set *set, int idx)


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

static int
internal_function
Expand Down

0 comments on commit ce9171c

Please sign in to comment.