summaryrefslogtreecommitdiff
path: root/com32
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
commit184f3a7f19c982d6cca293b2283c99891fce9d3c (patch)
tree77eb86d61fc2d6f5e82e557613979b456aab1cd5 /com32
parent79f6f76db59a5fad65d4b9294fcf17b914f3a34d (diff)
downloadsyslinux-184f3a7f19c982d6cca293b2283c99891fce9d3c.tar.gz
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 <hpa@zytor.com>
Diffstat (limited to 'com32')
-rw-r--r--com32/samples/resolv.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/com32/samples/resolv.c b/com32/samples/resolv.c
index 02cc0a83..bd49d9f9 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(&reg, 0, sizeof reg);
- reg.eax.w[0] = 0x0010;
- reg.ebx.w[0] = OFFS(__com32.cs_bounce);
- reg.es = SEG(__com32.cs_bounce);
+ memset(&reg, 0, sizeof reg);
+ reg.eax.w[0] = 0x0010;
+ reg.ebx.w[0] = OFFS(__com32.cs_bounce);
+ reg.es = SEG(__com32.cs_bounce);
- __intcall(0x22, &reg, &reg);
+ __intcall(0x22, &reg, &reg);
- 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;
}