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
parent aecc25a2e1
commit 110c9f7e1c
8 changed files with 32 additions and 34 deletions

View file

@ -11,8 +11,8 @@ void set_boot_successful(void);
void boot_successful(void); void boot_successful(void);
#endif /* ASSEMBLY */ #endif /* ASSEMBLY */
#define RTC_BOOT_BYTE 48 #define RTC_BOOT_BYTE 48
#endif /* PART_FALLBACK_BOOT_H */ #endif /* PART_FALLBACK_BOOT_H */

View file

@ -36,4 +36,3 @@ struct mem_file {
void *start; void *start;
int len; int len;
}; };

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 void *memset(void *s, int c, size_t n);
extern int memcmp(const void *s1, const void *s2, 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 // 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. // 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;} //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; size_t i = 0;
while((*src++) && (i < max)) { while ((*src++) && (i < max)) {
i++; i++;
} }
return 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) static inline size_t strlen(const char *src)
{ {
size_t i = 0; size_t i = 0;
while(*src++) { while (*src++) {
i++; i++;
} }
return i; return i;
@ -40,13 +40,13 @@ static inline char *strchr(const char *s, int c)
{ {
for (; *s; s++) { for (; *s; s++) {
if (*s == c) if (*s == c)
return (char *) s; return (char *)s;
} }
return 0; return 0;
} }
static inline char *strdup(const char *s) static inline char *strdup(const char *s)
{ {
size_t sz = strlen(s) + 1; size_t sz = strlen(s) + 1;
char *d = malloc(sz); char *d = malloc(sz);
memcpy(d, s, 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) static inline int strcmp(const char *s1, const char *s2)
{ {
int r; int r;
while ((r = (*s1 - *s2)) == 0 && *s1) { while ((r = (*s1 - *s2)) == 0 && *s1) {
@ -79,13 +79,17 @@ static inline int strcmp(const char *s1, const char *s2)
s2++; s2++;
} }
return r; return r;
} }
static inline int isspace(int c) static inline int isspace(int c)
{ {
switch (c) { switch (c) {
case ' ': case '\f': case '\n': case ' ':
case '\r': case '\t': case '\v': case '\f':
case '\n':
case '\r':
case '\t':
case '\v':
return 1; return 1;
default: default:
return 0; return 0;
@ -100,8 +104,7 @@ static inline int isdigit(int c)
static inline int isxdigit(int c) static inline int isxdigit(int c)
{ {
return ((c >= '0' && c <= '9') || 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) static inline int isupper(int c)
@ -116,15 +119,15 @@ static inline int islower(int c)
static inline int toupper(int c) static inline int toupper(int c)
{ {
if (islower(c)) if (islower(c))
c -= 'a'-'A'; c -= 'a' - 'A';
return c; return c;
} }
static inline int tolower(int c) static inline int tolower(int c)
{ {
if (isupper(c)) if (isupper(c))
c -= 'A'-'a'; c -= 'A' - 'a';
return c; return c;
} }
#endif /* STRING_H */ #endif /* STRING_H */

View file

@ -12,4 +12,4 @@ void uart8250_tx_byte(unsigned base_port, unsigned char data);
void uart8250_init(unsigned base_port, unsigned divisor, unsigned lcs); void uart8250_init(unsigned base_port, unsigned divisor, unsigned lcs);
void init_uart8250(unsigned base_port, struct uart8250 *uart); void init_uart8250(unsigned base_port, struct uart8250 *uart);
#endif /* UART8250_H */ #endif /* UART8250_H */

View file

@ -3,4 +3,3 @@ extern struct chip_operations mainboard_emulation_qemu_i386_ops;
struct mainboard_emulation_qemu_i386_config { struct mainboard_emulation_qemu_i386_config {
int nothing; int nothing;
}; };

View file

@ -30,9 +30,7 @@ int main(void)
{ {
printk(BIOS_INFO, "RAM init code started\n"); printk(BIOS_INFO, "RAM init code started\n");
die ("Nothing to do."); die("Nothing to do.");
return 0; return 0;
} }

View file

@ -25,4 +25,3 @@
struct chip_operations mainboard_emulation_qemu_i386_ops = { struct chip_operations mainboard_emulation_qemu_i386_ops = {
.name = "QEMU Mainboard" .name = "QEMU Mainboard"
}; };

View file

@ -22,17 +22,17 @@
/* /*
*/ */
void udelay(int usecs) void udelay(int usecs)
{ {
int i; int i;
for(i = 0; i < usecs; i++) for (i = 0; i < usecs; i++)
outb(i&0xff, 0x80); outb(i & 0xff, 0x80);
} }
void setup_before_car(void) void setup_before_car(void)
{ {
outb(5, 0x80); outb(5, 0x80);
//uart_init(); //uart_init();
//console_init(); //console_init();
} }