typofix: in-code comments
Signed-off-by: Ondřej Bílka <neleai@seznam.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
17b83d71d5
commit
749f763dbb
@ -97,7 +97,7 @@ Chew for reporting this.
|
|||||||
|
|
||||||
v1.04alpha_svn915 7th October 2006:
|
v1.04alpha_svn915 7th October 2006:
|
||||||
* Fixed failure to unlock thread cache list if allocating a new list failed.
|
* 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
|
* Fixed realloc(0, <size>) segfaulting. Thanks to Dmitry Chichkov for
|
||||||
reporting this.
|
reporting this.
|
||||||
* Made config defines #ifndef so they can be overridden by the build system.
|
* Made config defines #ifndef so they can be overridden by the build system.
|
||||||
|
@ -3602,8 +3602,8 @@ static void internal_malloc_stats(mstate m) {
|
|||||||
and choose its bk node as its replacement.
|
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
|
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
|
be replaced with a leaf node (not merely one with an open left or
|
||||||
right), to make sure that lefts and rights of descendents
|
right), to make sure that lefts and rights of descendants
|
||||||
correspond properly to bit masks. We use the rightmost descendent
|
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
|
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
|
tends to counteract removal of leftmosts elsewhere, and so keeps
|
||||||
paths shorter than minimally guaranteed. This doesn't loop much
|
paths shorter than minimally guaranteed. This doesn't loop much
|
||||||
|
@ -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
|
Build the range expression which starts from START_ELEM, and ends
|
||||||
at END_ELEM. The result are written to MBCSET and SBCSET.
|
at END_ELEM. The result are written to MBCSET and SBCSET.
|
||||||
RANGE_ALLOC is the allocated size of mbcset->range_starts, and
|
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. */
|
update it. */
|
||||||
|
|
||||||
static reg_errcode_t
|
static reg_errcode_t
|
||||||
@ -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 int32_t *symb_table;
|
||||||
const unsigned char *extra;
|
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.
|
Seek the collating symbol entry correspondings to NAME.
|
||||||
Return the index of the symbol in the SYMB_TABLE. */
|
Return the index of the symbol in the SYMB_TABLE. */
|
||||||
|
|
||||||
@ -2892,11 +2892,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
|
|||||||
return UINT_MAX;
|
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
|
Build the range expression which starts from START_ELEM, and ends
|
||||||
at END_ELEM. The result are written to MBCSET and SBCSET.
|
at END_ELEM. The result are written to MBCSET and SBCSET.
|
||||||
RANGE_ALLOC is the allocated size of mbcset->range_starts, and
|
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. */
|
update it. */
|
||||||
|
|
||||||
auto inline reg_errcode_t
|
auto inline reg_errcode_t
|
||||||
@ -2976,11 +2976,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
|
|||||||
return REG_NOERROR;
|
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.
|
Build the collating element which is represented by NAME.
|
||||||
The result are written to MBCSET and SBCSET.
|
The result are written to MBCSET and SBCSET.
|
||||||
COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
|
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
|
auto inline reg_errcode_t
|
||||||
__attribute ((always_inline))
|
__attribute ((always_inline))
|
||||||
@ -3419,7 +3419,7 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
|
|||||||
Build the equivalence class which is represented by NAME.
|
Build the equivalence class which is represented by NAME.
|
||||||
The result are written to MBCSET and SBCSET.
|
The result are written to MBCSET and SBCSET.
|
||||||
EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes,
|
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
|
static reg_errcode_t
|
||||||
#ifdef RE_ENABLE_I18N
|
#ifdef RE_ENABLE_I18N
|
||||||
@ -3515,7 +3515,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
|
|||||||
Build the character class which is represented by NAME.
|
Build the character class which is represented by NAME.
|
||||||
The result are written to MBCSET and SBCSET.
|
The result are written to MBCSET and SBCSET.
|
||||||
CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes,
|
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
|
static reg_errcode_t
|
||||||
#ifdef RE_ENABLE_I18N
|
#ifdef RE_ENABLE_I18N
|
||||||
|
@ -455,7 +455,7 @@ re_search_stub (struct re_pattern_buffer *bufp,
|
|||||||
|
|
||||||
rval = 0;
|
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)
|
if (result != REG_NOERROR)
|
||||||
rval = -1;
|
rval = -1;
|
||||||
else if (regs != NULL)
|
else if (regs != NULL)
|
||||||
@ -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.
|
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
|
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.
|
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. */
|
index of the buffer. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -2239,7 +2239,7 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
|
|||||||
dfa->nexts[node_idx]))
|
dfa->nexts[node_idx]))
|
||||||
/* The node can't accept the `multi byte', or the
|
/* The node can't accept the `multi byte', or the
|
||||||
destination was already thrown away, then the node
|
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;
|
naccepted = 0;
|
||||||
/* Otherwise, it is sure that the node could accept
|
/* Otherwise, it is sure that the node could accept
|
||||||
`naccepted' bytes input. */
|
`naccepted' bytes input. */
|
||||||
|
@ -835,7 +835,7 @@ int renormalize_buffer(const char *path, const char *src, size_t len, struct str
|
|||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
*
|
*
|
||||||
* Streaming converison support
|
* Streaming conversion support
|
||||||
*
|
*
|
||||||
*****************************************************************/
|
*****************************************************************/
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ static inline int would_convert_to_git(const char *path, const char *src,
|
|||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
*
|
*
|
||||||
* Streaming converison support
|
* Streaming conversion support
|
||||||
*
|
*
|
||||||
*****************************************************************/
|
*****************************************************************/
|
||||||
|
|
||||||
|
2
diff.c
2
diff.c
@ -4466,7 +4466,7 @@ void diff_flush(struct diff_options *options)
|
|||||||
DIFF_OPT_TST(options, DIFF_FROM_CONTENTS)) {
|
DIFF_OPT_TST(options, DIFF_FROM_CONTENTS)) {
|
||||||
/*
|
/*
|
||||||
* run diff_flush_patch for the exit status. setting
|
* 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.
|
* aren't supposed to produce any output anyway.
|
||||||
*/
|
*/
|
||||||
if (options->close_file)
|
if (options->close_file)
|
||||||
|
10
kwset.c
10
kwset.c
@ -65,7 +65,7 @@ struct trie
|
|||||||
struct trie *fail; /* Aho-Corasick failure function. */
|
struct trie *fail; /* Aho-Corasick failure function. */
|
||||||
int depth; /* Depth of this node from the root. */
|
int depth; /* Depth of this node from the root. */
|
||||||
int shift; /* Shift function for search failures. */
|
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. */
|
/* Structure returned opaquely to the caller, containing everything. */
|
||||||
@ -308,7 +308,7 @@ treefails (register struct tree const *tree, struct trie const *fail,
|
|||||||
treefails(tree->rlink, fail, recourse);
|
treefails(tree->rlink, fail, recourse);
|
||||||
|
|
||||||
/* Find, in the chain of fails going back to the root, the first
|
/* 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)
|
while (fail)
|
||||||
{
|
{
|
||||||
link = fail->links;
|
link = fail->links;
|
||||||
@ -426,13 +426,13 @@ kwsprep (kwset_t kws)
|
|||||||
computing the delta table, failure function, and shift function. */
|
computing the delta table, failure function, and shift function. */
|
||||||
for (curr = last = kwset->trie; curr; curr = curr->next)
|
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);
|
enqueue(curr->links, &last);
|
||||||
|
|
||||||
curr->shift = kwset->mind;
|
curr->shift = kwset->mind;
|
||||||
curr->maxshift = 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);
|
treedelta(curr->links, curr->depth, delta);
|
||||||
|
|
||||||
/* Compute the failure function for the descendants of this node. */
|
/* Compute the failure function for the descendants of this node. */
|
||||||
@ -450,7 +450,7 @@ kwsprep (kwset_t kws)
|
|||||||
fail->shift = curr->depth - fail->depth;
|
fail->shift = curr->depth - fail->depth;
|
||||||
|
|
||||||
/* If the current node is accepting then the shift at the
|
/* 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. */
|
difference of their depths. */
|
||||||
if (curr->accepting && fail->maxshift > curr->depth - fail->depth)
|
if (curr->accepting && fail->maxshift > curr->depth - fail->depth)
|
||||||
fail->maxshift = curr->depth - fail->depth;
|
fail->maxshift = curr->depth - fail->depth;
|
||||||
|
@ -52,7 +52,7 @@ static void update_candidates(struct disambiguate_state *ds, const unsigned char
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ds->candidate_ok) {
|
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);
|
hashcpy(ds->candidate, current);
|
||||||
ds->candidate_checked = 0;
|
ds->candidate_checked = 0;
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user