blob: 5618ee57a5c60368b4bc7a187d04ba9225fb65e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#include "usuals.h"
#include "compat.h"
#ifndef HAVE_REALLOCF
void* reallocf(void* ptr, size_t size)
{
void* ret = realloc(ptr, size);
if(!ret && size)
free(ptr);
return ret;
}
#endif
#ifndef HAVE_STRLWR
char* strlwr(char* s)
{
char* t = s;
while(*t)
{
*t = tolower(*t);
t++;
}
return s;
}
#endif
#ifndef HAVE_STRUPR
char* strupr(char* s)
{
char* t = s;
while(*t)
{
*t = toupper(*t);
t++;
}
return s;
}
#endif
|