summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:36 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:36 -0700
commita4d2af07cc00b64fc01207ad6741cb18e2eef4f2 (patch)
tree32bd3cf70756b5dc952a189eedaf6c71b308e7c3 /sample
parenteb2ebd88dda80d118bc056f2d73ee1d01b56fd40 (diff)
downloadsyslinux-a4d2af07cc00b64fc01207ad6741cb18e2eef4f2.tar.gz
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 <hpa@zytor.com>
Diffstat (limited to 'sample')
-rw-r--r--sample/conio.c37
1 files changed, 18 insertions, 19 deletions
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(&regs, 0, sizeof regs);
+ memset(&regs, 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, &regs, NULL);
+ regs.eax.b[1] = 0x02;
+ regs.edx.b[0] = ch;
+ __com32.cs_intcall(0x21, &regs, 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;
}