For some files:

indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs *.[ch]

(trivial)

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@65 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Uwe Hermann 2007-01-30 13:15:04 +00:00
commit 110c9f7e1c
8 changed files with 32 additions and 34 deletions

View file

@ -9,7 +9,7 @@ extern void *memmove(void *dest, const void *src, size_t n);
extern void *memset(void *s, int c, size_t n);
extern int memcmp(const void *s1, const void *s2, size_t n);
extern int sprintf(char * buf, const char *fmt, ...);
extern int sprintf(char *buf, const char *fmt, ...);
// yes, linux has fancy ones. We don't care. This stuff gets used
// hardly at all. And the pain of including those files is just too high.
@ -18,10 +18,10 @@ extern int sprintf(char * buf, const char *fmt, ...);
//extern inline int strlen(char *src) { int i = 0; while (*src++) i++; return i;}
static inline size_t strnlen(const char *src, size_t max)
{
static inline size_t strnlen(const char *src, size_t max)
{
size_t i = 0;
while((*src++) && (i < max)) {
while ((*src++) && (i < max)) {
i++;
}
return i;
@ -30,7 +30,7 @@ static inline size_t strnlen(const char *src, size_t max)
static inline size_t strlen(const char *src)
{
size_t i = 0;
while(*src++) {
while (*src++) {
i++;
}
return i;
@ -40,13 +40,13 @@ static inline char *strchr(const char *s, int c)
{
for (; *s; s++) {
if (*s == c)
return (char *) s;
}
return (char *)s;
}
return 0;
}
static inline char *strdup(const char *s)
{
{
size_t sz = strlen(s) + 1;
char *d = malloc(sz);
memcpy(d, s, sz);
@ -71,7 +71,7 @@ static inline char *strncpy(char *to, const char *from, int count)
}
static inline int strcmp(const char *s1, const char *s2)
{
{
int r;
while ((r = (*s1 - *s2)) == 0 && *s1) {
@ -79,13 +79,17 @@ static inline int strcmp(const char *s1, const char *s2)
s2++;
}
return r;
}
}
static inline int isspace(int c)
{
switch (c) {
case ' ': case '\f': case '\n':
case '\r': case '\t': case '\v':
case ' ':
case '\f':
case '\n':
case '\r':
case '\t':
case '\v':
return 1;
default:
return 0;
@ -100,8 +104,7 @@ static inline int isdigit(int c)
static inline int isxdigit(int c)
{
return ((c >= '0' && c <= '9') ||
(c >= 'a' && c <= 'f') ||
(c >= 'A' && c <= 'F'));
(c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'));
}
static inline int isupper(int c)
@ -116,15 +119,15 @@ static inline int islower(int c)
static inline int toupper(int c)
{
if (islower(c))
c -= 'a'-'A';
return c;
if (islower(c))
c -= 'a' - 'A';
return c;
}
static inline int tolower(int c)
{
if (isupper(c))
c -= 'A'-'a';
return c;
if (isupper(c))
c -= 'A' - 'a';
return c;
}
#endif /* STRING_H */
#endif /* STRING_H */