From 184f3a7f19c982d6cca293b2283c99891fce9d3c Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 29 May 2009 15:10:31 -0700 Subject: [PATCH] Run Nindent on com32/samples/resolv.c Automatically reformat com32/samples/resolv.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin --- com32/samples/resolv.c | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/com32/samples/resolv.c b/com32/samples/resolv.c index 02cc0a8..bd49d9f 100644 --- a/com32/samples/resolv.c +++ b/com32/samples/resolv.c @@ -24,43 +24,43 @@ uint32_t resolv(const char *name) { - com32sys_t reg; + com32sys_t reg; - strcpy((char *)__com32.cs_bounce, name); + strcpy((char *)__com32.cs_bounce, name); - memset(®, 0, sizeof reg); - reg.eax.w[0] = 0x0010; - reg.ebx.w[0] = OFFS(__com32.cs_bounce); - reg.es = SEG(__com32.cs_bounce); + memset(®, 0, sizeof reg); + reg.eax.w[0] = 0x0010; + reg.ebx.w[0] = OFFS(__com32.cs_bounce); + reg.es = SEG(__com32.cs_bounce); - __intcall(0x22, ®, ®); + __intcall(0x22, ®, ®); - if ( reg.eflags.l & EFLAGS_CF ) - return 0; - else - return reg.eax.l; + if (reg.eflags.l & EFLAGS_CF) + return 0; + else + return reg.eax.l; } int main(int argc, char *argv[]) { - uint32_t ip; + uint32_t ip; - openconsole(&dev_null_r, &dev_stdcon_w); + openconsole(&dev_null_r, &dev_stdcon_w); - if ( argc < 2 ) { - fputs("Usage: resolv hostname\n", stderr); - exit(1); - } + if (argc < 2) { + fputs("Usage: resolv hostname\n", stderr); + exit(1); + } - ip = resolv(argv[1]); + ip = resolv(argv[1]); - if ( ip ) { - printf("%s = %u.%u.%u.%u\n", argv[1], - (ip & 0xff), (ip >> 8) & 0xff, - (ip >> 16) & 0xff, (ip >> 24) & 0xff); - } else { - printf("%s not found\n", argv[1]); - } + if (ip) { + printf("%s = %u.%u.%u.%u\n", argv[1], + (ip & 0xff), (ip >> 8) & 0xff, + (ip >> 16) & 0xff, (ip >> 24) & 0xff); + } else { + printf("%s not found\n", argv[1]); + } - return 0; + return 0; } -- 2.7.4