From a4d2af07cc00b64fc01207ad6741cb18e2eef4f2 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 29 May 2009 15:10:36 -0700 Subject: Run Nindent on sample/conio.c Automatically reformat sample/conio.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin --- sample/conio.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'sample') diff --git a/sample/conio.c b/sample/conio.c index 6698deed..e9660b98 100644 --- a/sample/conio.c +++ b/sample/conio.c @@ -23,38 +23,37 @@ static inline void memset(void *buf, int ch, unsigned int len) { - asm volatile("cld; rep; stosb" - : "+D" (buf), "+c" (len) : "a" (ch) : "memory"); + asm volatile ("cld; rep; stosb":"+D" (buf), "+c"(len):"a"(ch):"memory"); } int putchar(int ch) { - com32sys_t regs; + com32sys_t regs; - memset(®s, 0, sizeof regs); + memset(®s, 0, sizeof regs); - if ( ch == '\n' ) { - /* \n -> \r\n */ - putchar('\r'); - } + if (ch == '\n') { + /* \n -> \r\n */ + putchar('\r'); + } - regs.eax.b[1] = 0x02; - regs.edx.b[0] = ch; - __com32.cs_intcall(0x21, ®s, NULL); + regs.eax.b[1] = 0x02; + regs.edx.b[0] = ch; + __com32.cs_intcall(0x21, ®s, NULL); - return ch; + return ch; } /* Note: doesn't put '\n' like the stdc version does */ int puts(const char *s) { - int count = 0; + int count = 0; - while ( *s ) { - putchar(*s); - count++; - s++; - } + while (*s) { + putchar(*s); + count++; + s++; + } - return count; + return count; } -- cgit v1.2.1