repo.or.cz
/
ciopfs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Print a warning if the underlying filesystem doesnn't support xattrs
[ciopfs.git]
/
ascii.c
blob
42eb7ae1f79c186dc01bafb99ffbd4430f1689b3
1
#include <ctype.h>
2
3
static
inline
bool
str_contains_upper
(
const char
*
s
)
4
{
5
while
(*
s
) {
6
if
(
isupper
(*
s
++))
7
return true
;
8
}
9
return false
;
10
}
11
12
static
inline
char
*
str_fold
(
const char
*
src
)
13
{
14
char
*
t
, *
dest
=
malloc
(
strlen
(
src
) +
1
);
15
if
(!
dest
)
16
return
NULL
;
17
for
(
t
=
dest
; *
src
;
src
++,
t
++)
18
*
t
=
tolower
(*
src
);
19
*
t
=
'\0'
;
20
return
dest
;
21
}