aboutsummaryrefslogtreecommitdiffstats
path: root/com32/samples
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:31 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:31 -0700
commitb99529de159ce3c60994b548252f4b2f0a3fcabc (patch)
tree5c4d467132b33e02c90708f0807c461016df4f0a /com32/samples
parent06be30ea6e0050bdc2eaa0b75903a398fdbe8552 (diff)
downloadsyslinux-b99529de159ce3c60994b548252f4b2f0a3fcabc.tar.gz
syslinux-b99529de159ce3c60994b548252f4b2f0a3fcabc.tar.xz
syslinux-b99529de159ce3c60994b548252f4b2f0a3fcabc.zip
Run Nindent on com32/samples/keytest.c
Automatically reformat com32/samples/keytest.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 'com32/samples')
-rw-r--r--com32/samples/keytest.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/com32/samples/keytest.c b/com32/samples/keytest.c
index 69786442..b4f8f5b0 100644
--- a/com32/samples/keytest.c
+++ b/com32/samples/keytest.c
@@ -27,55 +27,55 @@
static void cooked_keys(void)
{
- int key;
+ int key;
- printf("[cooked]");
+ printf("[cooked]");
- for(;;) {
- key = get_key(stdin, 0);
+ for (;;) {
+ key = get_key(stdin, 0);
- if ( key == 0x03 ) {
- printf("[done]\n");
- exit(0);
- } else if ( key == '?' )
- return;
+ if (key == 0x03) {
+ printf("[done]\n");
+ exit(0);
+ } else if (key == '?')
+ return;
- if ( key >= 0x20 && key < 0x100 ) {
- putchar(key);
- } else {
- printf("[%04x]", key);
+ if (key >= 0x20 && key < 0x100) {
+ putchar(key);
+ } else {
+ printf("[%04x]", key);
+ }
}
- }
}
static void raw_keys(void)
{
- int key;
+ int key;
- printf("[raw]");
+ printf("[raw]");
- for(;;) {
- key = getc(stdin);
+ for (;;) {
+ key = getc(stdin);
- if ( key == 0x03 ) {
- printf("[done]\n");
- exit(0);
- } else if ( key == '!' )
- return;
+ if (key == 0x03) {
+ printf("[done]\n");
+ exit(0);
+ } else if (key == '!')
+ return;
- printf("<%02x>", key);
- }
+ printf("<%02x>", key);
+ }
}
int main(void)
{
- console_ansi_raw();
+ console_ansi_raw();
- printf("CLK_TCK = %d\n", (int)CLK_TCK);
- printf("Press keys, end with Ctrl-C...\n");
+ printf("CLK_TCK = %d\n", (int)CLK_TCK);
+ printf("Press keys, end with Ctrl-C...\n");
- for (;;) {
- cooked_keys();
- raw_keys();
- }
+ for (;;) {
+ cooked_keys();
+ raw_keys();
+ }
}