Skip to content

Commit

Permalink
typofix: in-code comments
Browse files Browse the repository at this point in the history
Signed-off-by: Ondřej Bílka <neleai@seznam.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
neleai authored and gitster committed Jul 22, 2013
1 parent 17b83d7 commit 749f763
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion compat/nedmalloc/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Chew for reporting this.

v1.04alpha_svn915 7th October 2006:
* Fixed failure to unlock thread cache list if allocating a new list failed.
Thanks to Dmitry Chichkov for reporting this. Futher thanks to Aleksey Sanin.
Thanks to Dmitry Chichkov for reporting this. Further thanks to Aleksey Sanin.
* Fixed realloc(0, <size>) segfaulting. Thanks to Dmitry Chichkov for
reporting this.
* Made config defines #ifndef so they can be overridden by the build system.
Expand Down
4 changes: 2 additions & 2 deletions compat/nedmalloc/malloc.c.h
Original file line number Diff line number Diff line change
Expand Up @@ -3602,8 +3602,8 @@ static void internal_malloc_stats(mstate m) {
and choose its bk node as its replacement.
2. If x was the last node of its size, but not a leaf node, it must
be replaced with a leaf node (not merely one with an open left or
right), to make sure that lefts and rights of descendents
correspond properly to bit masks. We use the rightmost descendent
right), to make sure that lefts and rights of descendants
correspond properly to bit masks. We use the rightmost descendant
of x. We could use any other leaf, but this is easy to locate and
tends to counteract removal of leftmosts elsewhere, and so keeps
paths shorter than minimally guaranteed. This doesn't loop much
Expand Down
16 changes: 8 additions & 8 deletions compat/regex/regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2617,7 +2617,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
Build the range expression which starts from START_ELEM, and ends
at END_ELEM. The result are written to MBCSET and SBCSET.
RANGE_ALLOC is the allocated size of mbcset->range_starts, and
mbcset->range_ends, is a pointer argument sinse we may
mbcset->range_ends, is a pointer argument since we may
update it. */

static reg_errcode_t
Expand Down Expand Up @@ -2788,7 +2788,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
const int32_t *symb_table;
const unsigned char *extra;

/* Local function for parse_bracket_exp used in _LIBC environement.
/* Local function for parse_bracket_exp used in _LIBC environment.
Seek the collating symbol entry correspondings to NAME.
Return the index of the symbol in the SYMB_TABLE. */

Expand Down Expand Up @@ -2892,11 +2892,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
return UINT_MAX;
}

/* Local function for parse_bracket_exp used in _LIBC environement.
/* Local function for parse_bracket_exp used in _LIBC environment.
Build the range expression which starts from START_ELEM, and ends
at END_ELEM. The result are written to MBCSET and SBCSET.
RANGE_ALLOC is the allocated size of mbcset->range_starts, and
mbcset->range_ends, is a pointer argument sinse we may
mbcset->range_ends, is a pointer argument since we may
update it. */

auto inline reg_errcode_t
Expand Down Expand Up @@ -2976,11 +2976,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
return REG_NOERROR;
}

/* Local function for parse_bracket_exp used in _LIBC environement.
/* Local function for parse_bracket_exp used in _LIBC environment.
Build the collating element which is represented by NAME.
The result are written to MBCSET and SBCSET.
COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
pointer argument sinse we may update it. */
pointer argument since we may update it. */

auto inline reg_errcode_t
__attribute ((always_inline))
Expand Down Expand Up @@ -3419,7 +3419,7 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
Build the equivalence class which is represented by NAME.
The result are written to MBCSET and SBCSET.
EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes,
is a pointer argument sinse we may update it. */
is a pointer argument since we may update it. */

static reg_errcode_t
#ifdef RE_ENABLE_I18N
Expand Down Expand Up @@ -3515,7 +3515,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
Build the character class which is represented by NAME.
The result are written to MBCSET and SBCSET.
CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes,
is a pointer argument sinse we may update it. */
is a pointer argument since we may update it. */

static reg_errcode_t
#ifdef RE_ENABLE_I18N
Expand Down
6 changes: 3 additions & 3 deletions compat/regex/regexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ re_search_stub (struct re_pattern_buffer *bufp,

rval = 0;

/* I hope we needn't fill ther regs with -1's when no match was found. */
/* I hope we needn't fill their regs with -1's when no match was found. */
if (result != REG_NOERROR)
rval = -1;
else if (regs != NULL)
Expand Down Expand Up @@ -1071,7 +1071,7 @@ acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
FL_LONGEST_MATCH means we want the POSIX longest matching.
If P_MATCH_FIRST is not NULL, and the match fails, it is set to the
next place where we may want to try matching.
Note that the matcher assume that the maching starts from the current
Note that the matcher assume that the matching starts from the current
index of the buffer. */

static int
Expand Down Expand Up @@ -2239,7 +2239,7 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
dfa->nexts[node_idx]))
/* The node can't accept the `multi byte', or the
destination was already thrown away, then the node
could't accept the current input `multi byte'. */
couldn't accept the current input `multi byte'. */
naccepted = 0;
/* Otherwise, it is sure that the node could accept
`naccepted' bytes input. */
Expand Down
2 changes: 1 addition & 1 deletion convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ int renormalize_buffer(const char *path, const char *src, size_t len, struct str

/*****************************************************************
*
* Streaming converison support
* Streaming conversion support
*
*****************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static inline int would_convert_to_git(const char *path, const char *src,

/*****************************************************************
*
* Streaming converison support
* Streaming conversion support
*
*****************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -4466,7 +4466,7 @@ void diff_flush(struct diff_options *options)
DIFF_OPT_TST(options, DIFF_FROM_CONTENTS)) {
/*
* run diff_flush_patch for the exit status. setting
* options->file to /dev/null should be safe, becaue we
* options->file to /dev/null should be safe, because we
* aren't supposed to produce any output anyway.
*/
if (options->close_file)
Expand Down
10 changes: 5 additions & 5 deletions kwset.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct trie
struct trie *fail; /* Aho-Corasick failure function. */
int depth; /* Depth of this node from the root. */
int shift; /* Shift function for search failures. */
int maxshift; /* Max shift of self and descendents. */
int maxshift; /* Max shift of self and descendants. */
};

/* Structure returned opaquely to the caller, containing everything. */
Expand Down Expand Up @@ -308,7 +308,7 @@ treefails (register struct tree const *tree, struct trie const *fail,
treefails(tree->rlink, fail, recourse);

/* Find, in the chain of fails going back to the root, the first
node that has a descendent on the current label. */
node that has a descendant on the current label. */
while (fail)
{
link = fail->links;
Expand Down Expand Up @@ -426,13 +426,13 @@ kwsprep (kwset_t kws)
computing the delta table, failure function, and shift function. */
for (curr = last = kwset->trie; curr; curr = curr->next)
{
/* Enqueue the immediate descendents in the level order queue. */
/* Enqueue the immediate descendants in the level order queue. */
enqueue(curr->links, &last);

curr->shift = kwset->mind;
curr->maxshift = kwset->mind;

/* Update the delta table for the descendents of this node. */
/* Update the delta table for the descendants of this node. */
treedelta(curr->links, curr->depth, delta);

/* Compute the failure function for the descendants of this node. */
Expand All @@ -450,7 +450,7 @@ kwsprep (kwset_t kws)
fail->shift = curr->depth - fail->depth;

/* If the current node is accepting then the shift at the
fail and its descendents should be no larger than the
fail and its descendants should be no larger than the
difference of their depths. */
if (curr->accepting && fail->maxshift > curr->depth - fail->depth)
fail->maxshift = curr->depth - fail->depth;
Expand Down
2 changes: 1 addition & 1 deletion sha1_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static void update_candidates(struct disambiguate_state *ds, const unsigned char
}

if (!ds->candidate_ok) {
/* discard the candidate; we know it does not satisify fn */
/* discard the candidate; we know it does not satisfy fn */
hashcpy(ds->candidate, current);
ds->candidate_checked = 0;
return;
Expand Down

0 comments on commit 749f763

Please sign in to comment.