Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
0da2c700
Commit
0da2c700
authored
May 17, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utils: Move git__str[n]tolower
parent
128d3731
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
+17
-17
src/config.c
+0
-14
src/config.h
+0
-3
src/util.c
+14
-0
src/util.h
+3
-0
No files found.
src/config.c
View file @
0da2c700
...
...
@@ -37,20 +37,6 @@ typedef struct {
int
priority
;
}
backend_internal
;
void
git__strntolower
(
char
*
str
,
int
len
)
{
int
i
;
for
(
i
=
0
;
i
<
len
;
++
i
)
{
str
[
i
]
=
tolower
(
str
[
i
]);
}
}
void
git__strtolower
(
char
*
str
)
{
git__strntolower
(
str
,
strlen
(
str
));
}
int
git_config_open_bare
(
git_config
**
out
,
const
char
*
path
)
{
git_config_backend
*
backend
=
NULL
;
...
...
src/config.h
View file @
0da2c700
...
...
@@ -9,7 +9,4 @@ struct git_config {
git_vector
backends
;
};
void
git__strtolower
(
char
*
str
);
void
git__strntolower
(
char
*
str
,
int
len
);
#endif
src/util.c
View file @
0da2c700
...
...
@@ -104,6 +104,20 @@ int git__fmt(char *buf, size_t buf_sz, const char *fmt, ...)
return
r
;
}
void
git__strntolower
(
char
*
str
,
int
len
)
{
int
i
;
for
(
i
=
0
;
i
<
len
;
++
i
)
{
str
[
i
]
=
tolower
(
str
[
i
]);
}
}
void
git__strtolower
(
char
*
str
)
{
git__strntolower
(
str
,
strlen
(
str
));
}
int
git__prefixcmp
(
const
char
*
str
,
const
char
*
prefix
)
{
for
(;;)
{
...
...
src/util.h
View file @
0da2c700
...
...
@@ -142,6 +142,9 @@ GIT_INLINE(int) git__is_sizet(git_off_t p)
extern
char
*
git__strtok
(
char
*
output
,
char
*
src
,
char
*
delimit
);
extern
char
*
git__strtok_keep
(
char
*
output
,
char
*
src
,
char
*
delimit
);
extern
void
git__strntolower
(
char
*
str
,
int
len
);
extern
void
git__strtolower
(
char
*
str
);
#define STRLEN(str) (sizeof(str) - 1)
#define GIT_OID_LINE_LENGTH(header) (STRLEN(header) + 1 + GIT_OID_HEXSZ + 1)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment