diff options
author | H. Peter Anvin <hpa@zytor.com> | 2006-05-03 17:32:15 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2006-05-03 17:32:15 -0700 |
commit | 28eecd8965aedbd75727fb0797a2e7033d5c54ee (patch) | |
tree | 1cac9ffc5f7fe7fd82d59b4accd7b8cf85762f74 /com32/lib | |
parent | f8c463722022008c8412a69f90576d2bf38818ed (diff) | |
download | syslinux-28eecd8965aedbd75727fb0797a2e7033d5c54ee.tar.gz |
Across-the-board stealth whitespace cleanup
Diffstat (limited to 'com32/lib')
83 files changed, 180 insertions, 215 deletions
diff --git a/com32/lib/MCONFIG b/com32/lib/MCONFIG index e740ed5e..7c4e2dfe 100644 --- a/com32/lib/MCONFIG +++ b/com32/lib/MCONFIG @@ -63,4 +63,3 @@ LDFLAGS = -m elf32_i386 .c.ls: $(CC) $(CFLAGS) $(SOFLAGS) -S -o $@ $< - diff --git a/com32/lib/Makefile b/com32/lib/Makefile index 5f9fb8fd..0f65852c 100644 --- a/com32/lib/Makefile +++ b/com32/lib/Makefile @@ -76,4 +76,3 @@ install: all cp -r ../include $(INSTALLROOT)$(COM32DIR) -include .*.d */.*.d - diff --git a/com32/lib/abort.c b/com32/lib/abort.c index aacfbbf4..1c634643 100644 --- a/com32/lib/abort.c +++ b/com32/lib/abort.c @@ -9,4 +9,3 @@ void abort(void) { _exit(255); } - diff --git a/com32/lib/asprintf.c b/com32/lib/asprintf.c index 6002b576..6b1b4ff5 100644 --- a/com32/lib/asprintf.c +++ b/com32/lib/asprintf.c @@ -22,7 +22,7 @@ int asprintf(char **bufp, const char *format, ...) *bufp = p = malloc(bytes); if ( !p ) return -1; - + rv = vsnprintf(p, bytes, format, ap); va_end(ap); diff --git a/com32/lib/atexit.h b/com32/lib/atexit.h index 792141de..b3aabaf7 100644 --- a/com32/lib/atexit.h +++ b/com32/lib/atexit.h @@ -14,4 +14,3 @@ struct atexit { }; #endif /* ATEXIT_H */ - diff --git a/com32/lib/calloc.c b/com32/lib/calloc.c index 228a1b70..ebab49bf 100644 --- a/com32/lib/calloc.c +++ b/com32/lib/calloc.c @@ -18,4 +18,3 @@ void *calloc(size_t nmemb, size_t size) return ptr; } - diff --git a/com32/lib/ctypes.c b/com32/lib/ctypes.c index acfa05ab..cfe4821c 100644 --- a/com32/lib/ctypes.c +++ b/com32/lib/ctypes.c @@ -43,7 +43,7 @@ const unsigned char __ctypes[257] = { __ctype_cntrl, /* control character */ __ctype_cntrl, /* control character */ __ctype_cntrl, /* control character */ - + __ctype_print|__ctype_space, /* space */ __ctype_print|__ctype_punct, /* punctuation */ __ctype_print|__ctype_punct, /* punctuation */ diff --git a/com32/lib/exit.c b/com32/lib/exit.c index dcbbf373..a727fabc 100644 --- a/com32/lib/exit.c +++ b/com32/lib/exit.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/fgetc.c b/com32/lib/fgetc.c index 83eee16f..5aa6f76d 100644 --- a/com32/lib/fgetc.c +++ b/com32/lib/fgetc.c @@ -17,4 +17,3 @@ int fgetc(FILE *f) return (_fread(&ch, 1, f) == 1) ? (int)ch : EOF; } - diff --git a/com32/lib/fgets.c b/com32/lib/fgets.c index 593bea36..474de49c 100644 --- a/com32/lib/fgets.c +++ b/com32/lib/fgets.c @@ -26,9 +26,6 @@ char *fgets(char *s, int n, FILE *f) } if ( n ) *p = '\0'; - + return s; } - - - diff --git a/com32/lib/getopt.c b/com32/lib/getopt.c index 5a992dcd..49b007a6 100644 --- a/com32/lib/getopt.c +++ b/com32/lib/getopt.c @@ -23,7 +23,7 @@ int getopt(int argc, char * const *argv, const char *optstring) (void)argc; /* First, eliminate all non-option cases */ - + if ( !carg || carg[0] != '-' || !carg[1] ) { return -1; } @@ -70,5 +70,3 @@ int getopt(int argc, char * const *argv, const char *optstring) return '?'; } } - - diff --git a/com32/lib/libgcc/__ashldi3.S b/com32/lib/libgcc/__ashldi3.S index 80ed4be3..f2cc11cb 100644 --- a/com32/lib/libgcc/__ashldi3.S +++ b/com32/lib/libgcc/__ashldi3.S @@ -15,11 +15,11 @@ __ashldi3: #endif cmpb $32,%cl jae 1f - + shldl %cl,%eax,%edx shl %cl,%eax ret - + 1: xorl %edx,%edx shl %cl,%eax diff --git a/com32/lib/libgcc/__ashrdi3.S b/com32/lib/libgcc/__ashrdi3.S index ba43f902..3f9c5207 100644 --- a/com32/lib/libgcc/__ashrdi3.S +++ b/com32/lib/libgcc/__ashrdi3.S @@ -15,11 +15,11 @@ __ashrdi3: #endif cmpb $32,%cl jae 1f - + shrdl %cl,%edx,%eax sarl %cl,%edx ret - + 1: sarl %cl,%edx movl %edx,%eax diff --git a/com32/lib/libgcc/__divdi3.c b/com32/lib/libgcc/__divdi3.c index be13caed..3641396f 100644 --- a/com32/lib/libgcc/__divdi3.c +++ b/com32/lib/libgcc/__divdi3.c @@ -20,7 +20,7 @@ int64_t __divdi3(int64_t num, int64_t den) den = -den; minus ^= 1; } - + v = __udivmoddi4(num, den, NULL); if ( minus ) v = -v; diff --git a/com32/lib/libgcc/__lshrdi3.S b/com32/lib/libgcc/__lshrdi3.S index 6e521ace..eee3aacb 100644 --- a/com32/lib/libgcc/__lshrdi3.S +++ b/com32/lib/libgcc/__lshrdi3.S @@ -15,11 +15,11 @@ __lshrdi3: #endif cmpb $32,%cl jae 1f - + shrdl %cl,%edx,%eax shrl %cl,%edx ret - + 1: shrl %cl,%edx xorl %eax,%eax diff --git a/com32/lib/libgcc/__moddi3.c b/com32/lib/libgcc/__moddi3.c index 3e613654..af94c232 100644 --- a/com32/lib/libgcc/__moddi3.c +++ b/com32/lib/libgcc/__moddi3.c @@ -20,7 +20,7 @@ int64_t __moddi3(int64_t num, int64_t den) den = -den; minus ^= 1; } - + (void) __udivmoddi4(num, den, &v); if ( minus ) v = -v; diff --git a/com32/lib/libgcc/__muldi3.S b/com32/lib/libgcc/__muldi3.S index c164588b..648a88ad 100644 --- a/com32/lib/libgcc/__muldi3.S +++ b/com32/lib/libgcc/__muldi3.S @@ -28,7 +28,7 @@ __muldi3: pop %esi imull %esi,%ecx addl %ecx,%edx -#endif +#endif pop %esi ret .size __muldi3,.-__muldi3 diff --git a/com32/lib/libgcc/__negdi2.S b/com32/lib/libgcc/__negdi2.S index 6c95cb23..37b0d2d4 100644 --- a/com32/lib/libgcc/__negdi2.S +++ b/com32/lib/libgcc/__negdi2.S @@ -3,7 +3,7 @@ * * 64-bit negation */ - + .text .align 4 .globl __negdi2 diff --git a/com32/lib/libgcc/__udivmoddi4.c b/com32/lib/libgcc/__udivmoddi4.c index 1c456543..ad576809 100644 --- a/com32/lib/libgcc/__udivmoddi4.c +++ b/com32/lib/libgcc/__udivmoddi4.c @@ -4,7 +4,7 @@ uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t *rem_p) { uint64_t quot = 0, qbit = 1; - + if ( den == 0 ) { __divide_error(); return 0; /* If trap returns... */ diff --git a/com32/lib/libpng/CHANGES b/com32/lib/libpng/CHANGES index 90c816e3..46f43dc9 100644 --- a/com32/lib/libpng/CHANGES +++ b/com32/lib/libpng/CHANGES @@ -1179,7 +1179,7 @@ version 1.2.4beta3 [June 28, 2002] Plugged memory leak of row_buf in pngtest.c when there is a png_error(). Detect buffer overflow in pngpread.c when IDAT is corrupted with extra data. Added "test-installed" target to makefile.32sunu, makefile.64sunu, - makefile.beos, makefile.darwin, makefile.dec, makefile.macosx, + makefile.beos, makefile.darwin, makefile.dec, makefile.macosx, makefile.solaris, makefile.hpux, makefile.hpgcc, and makefile.so9. version 1.2.4rc1 and 1.0.14rc1 [July 2, 2002] Added "test-installed" target to makefile.cygwin and makefile.sco. @@ -1386,7 +1386,7 @@ version 1.2.8beta5 [November 20, 2004] Use png_ptr->flags instead of png_ptr->transformations to pass PNG_STRIP_ALPHA info to png_do_strip_filler(), to preserve ABI compatibility. - Revised handling of SPECIALBUILD, PRIVATEBUILD, + Revised handling of SPECIALBUILD, PRIVATEBUILD, PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING. version 1.2.8rc1 [November 24, 2004] Moved handling of BUILD macros from pngconf.h to png.h diff --git a/com32/lib/libpng/KNOWNBUG b/com32/lib/libpng/KNOWNBUG index 620296f6..48147bba 100644 --- a/com32/lib/libpng/KNOWNBUG +++ b/com32/lib/libpng/KNOWNBUG @@ -8,4 +8,3 @@ Known bugs in libpng version 1.2.8 STATUS: Under investigation. The change to pnggccrd.c in libpng-1.2.1 fixed a problem under FreeBSD but not the problem with NetBSD, which still fails as of libpng-1.2.2rc1. - diff --git a/com32/lib/libpng/example.c b/com32/lib/libpng/example.c index ba0ecc5b..8a902959 100644 --- a/com32/lib/libpng/example.c +++ b/com32/lib/libpng/example.c @@ -490,10 +490,10 @@ row_callback(png_structp png_ptr, png_bytep new_row, * In this function you will receive a pointer to new row data from * libpng called new_row that is to replace a corresponding row (of * the same data format) in a buffer allocated by your application. - * + * * The new row data pointer new_row may be NULL, indicating there is * no new data to be replaced (in cases of interlace loading). - * + * * If new_row is not NULL then you need to call * png_progressive_combine_row() to replace the corresponding row as * shown below: diff --git a/com32/lib/libpng/libpng.3 b/com32/lib/libpng/libpng.3 index 1feceee3..151e603c 100644 --- a/com32/lib/libpng/libpng.3 +++ b/com32/lib/libpng/libpng.3 @@ -4019,4 +4019,3 @@ glennrp at users.sourceforge.net December 3, 2004 .\" end of man page - diff --git a/com32/lib/libpng/png.5 b/com32/lib/libpng/png.5 index db7c8341..990de518 100644 --- a/com32/lib/libpng/png.5 +++ b/com32/lib/libpng/png.5 @@ -71,4 +71,3 @@ The PNG-1.0 specification is copyright (c) 1996 Massachusetts Institute of Technology. See the specification for conditions of use and distribution. .LP .\" end of man page - diff --git a/com32/lib/libpng/pngerror.c b/com32/lib/libpng/pngerror.c index 6fa40123..9d4ec532 100644 --- a/com32/lib/libpng/pngerror.c +++ b/com32/lib/libpng/pngerror.c @@ -56,7 +56,7 @@ png_error(png_structp png_ptr, png_const_charp error_message) { if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) { - msg[0]='0'; + msg[0]='0'; msg[1]='\0'; error_message=msg; } diff --git a/com32/lib/libpng/pnggccrd.c b/com32/lib/libpng/pnggccrd.c index 248e1b3b..ee518f11 100644 --- a/com32/lib/libpng/pnggccrd.c +++ b/com32/lib/libpng/pnggccrd.c @@ -5102,7 +5102,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep case 1: sprintf(filnm, "sub-%s", #if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) #if !defined(PNG_1_0_X) - (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" : + (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" : #endif #endif "x86"); @@ -5397,7 +5397,7 @@ png_mmx_support(void) // , "memory" // if write to a variable gcc thought was in a reg // , "cc" // "condition codes" (flag bits) ); -#else +#else _mmx_supported = 0; #endif /* PNG_MMX_CODE_SUPPORTED */ diff --git a/com32/lib/libpng/pngpread.c b/com32/lib/libpng/pngpread.c index 8c35faae..7ef6fa4e 100644 --- a/com32/lib/libpng/pngpread.c +++ b/com32/lib/libpng/pngpread.c @@ -614,7 +614,7 @@ png_push_save_buffer(png_structp png_ptr) png_size_t new_max; png_bytep old_buffer; - if (png_ptr->save_buffer_size > PNG_SIZE_MAX - + if (png_ptr->save_buffer_size > PNG_SIZE_MAX - (png_ptr->current_buffer_size + 256)) { png_error(png_ptr, "Potential overflow of save_buffer"); diff --git a/com32/lib/libpng/pngread.c b/com32/lib/libpng/pngread.c index 5924333d..b92a1385 100644 --- a/com32/lib/libpng/pngread.c +++ b/com32/lib/libpng/pngread.c @@ -75,7 +75,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, png_free(png_ptr, png_ptr->zbuf); png_ptr->zbuf=NULL; #ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)png_ptr, + png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn, (png_voidp)mem_ptr); #else png_destroy_struct((png_voidp)png_ptr); @@ -188,7 +188,7 @@ png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver, { /* We only come here via pre-1.0.12-compiled applications */ #if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - if(png_sizeof(png_struct) > png_struct_size || + if(png_sizeof(png_struct) > png_struct_size || png_sizeof(png_info) > png_info_size) { char msg[80]; @@ -736,7 +736,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1); - + #if defined(PNG_MNG_FEATURES_SUPPORTED) if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) diff --git a/com32/lib/libpng/pngrtran.c b/com32/lib/libpng/pngrtran.c index e1d6e3ce..da9ef6e8 100644 --- a/com32/lib/libpng/pngrtran.c +++ b/com32/lib/libpng/pngrtran.c @@ -788,7 +788,7 @@ png_init_read_transformations(png_structp png_ptr) { if (color_type == PNG_COLOR_TYPE_PALETTE) { - /* could skip if no transparency and + /* could skip if no transparency and */ png_color back, back_1; png_colorp palette = png_ptr->palette; diff --git a/com32/lib/libpng/pngset.c b/com32/lib/libpng/pngset.c index 5922cad0..13ecb281 100644 --- a/com32/lib/libpng/pngset.c +++ b/com32/lib/libpng/pngset.c @@ -309,7 +309,7 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr, if(!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && (filter_type == PNG_INTRAPIXEL_DIFFERENCING) && ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) && - (color_type == PNG_COLOR_TYPE_RGB || + (color_type == PNG_COLOR_TYPE_RGB || color_type == PNG_COLOR_TYPE_RGB_ALPHA))) png_error(png_ptr, "Unknown filter method in IHDR"); if(png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) diff --git a/com32/lib/libpng/pngtest.c b/com32/lib/libpng/pngtest.c index f2085e1e..163f9f7a 100644 --- a/com32/lib/libpng/pngtest.c +++ b/com32/lib/libpng/pngtest.c @@ -1435,7 +1435,7 @@ main(int argc, char *argv[]) current_allocation); while (pinfo != NULL) { - fprintf(STDERR, " %lu bytes at %x\n", pinfo->size, + fprintf(STDERR, " %lu bytes at %x\n", pinfo->size, (unsigned int) pinfo->pointer); pinfo = pinfo->next; } diff --git a/com32/lib/lrand48.c b/com32/lib/lrand48.c index 4d05de2e..f26d0996 100644 --- a/com32/lib/lrand48.c +++ b/com32/lib/lrand48.c @@ -17,7 +17,7 @@ long jrand48(unsigned short xsubi[3]) ((uint64_t)xsubi[2] << 32); x = (0x5deece66dULL * x) + 0xb; - + xsubi[0] = (unsigned short)x; xsubi[1] = (unsigned short)(x >> 16); xsubi[2] = (unsigned short)(x >> 32); @@ -39,4 +39,3 @@ long lrand48(void) { return (long)((uint32_t)(mrand48() >> 1)); } - diff --git a/com32/lib/malloc.c b/com32/lib/malloc.c index e7a1cdc9..2f8362b4 100644 --- a/com32/lib/malloc.c +++ b/com32/lib/malloc.c @@ -41,14 +41,14 @@ static void __constructor init_memory_arena(void) if ( __stack_size == 0 || __stack_size > total_space >> 1 ) __stack_size = total_space >> 1; /* Half for the stack, half for the heap... */ - + if ( total_space < __stack_size + 4*sizeof(struct arena_header) ) __stack_size = total_space - 4*sizeof(struct arena_header); fp = (struct free_arena_header *)start; fp->a.type = ARENA_TYPE_FREE; fp->a.size = total_space - __stack_size; - + /* Insert into chains */ fp->a.next = fp->a.prev = &__malloc_head; fp->next_free = fp->prev_free = &__malloc_head; @@ -62,7 +62,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size) struct free_arena_header *nfp, *na; fsize = fp->a.size; - + /* We need the 2* to account for the larger requirements of a free block */ if ( fsize >= size+2*sizeof(struct arena_header) ) { /* Bigger block than required -- split block */ @@ -79,7 +79,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size) nfp->a.next = na; na->a.prev = nfp; fp->a.next = nfp; - + /* Replace current block on free chain */ nfp->next_free = fp->next_free; nfp->prev_free = fp->prev_free; @@ -93,7 +93,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size) fp->next_free->prev_free = fp->prev_free; fp->prev_free->next_free = fp->next_free; } - + return (void *)(&fp->a + 1); } diff --git a/com32/lib/memswap.c b/com32/lib/memswap.c index 10440e34..97fa5197 100644 --- a/com32/lib/memswap.c +++ b/com32/lib/memswap.c @@ -17,7 +17,7 @@ void memswap(void *m1, void *m2, size_t n) tmp = *p; *p = *q; *q = tmp; - + p++; q++; } } diff --git a/com32/lib/onexit.c b/com32/lib/onexit.c index 70a9c01f..c9847927 100644 --- a/com32/lib/onexit.c +++ b/com32/lib/onexit.c @@ -12,11 +12,11 @@ static struct atexit *__atexit_list; static __noreturn on_exit_exit(int rv) { struct atexit *ap; - + for ( ap = __atexit_list ; ap ; ap = ap->next ) { ap->fctn(rv, ap->arg); /* This assumes extra args are harmless */ } - + _exit(rv); } diff --git a/com32/lib/pci/cfgtype.c b/com32/lib/pci/cfgtype.c index 0f8c623f..97215d42 100644 --- a/com32/lib/pci/cfgtype.c +++ b/com32/lib/pci/cfgtype.c @@ -39,14 +39,14 @@ static int type2_ok(void) outb(0, 0xcf8); oldcfa = inb(0xcfa); outb(0, 0xcfa); - + cf8 = inb(0xcf8); cfa = inb(0xcfa); - + outb(oldcf8, 0xcf8); outb(oldcfa, 0xcfa); sti(); - + return cf8 == 0 && cfa == 0; } @@ -87,4 +87,3 @@ int pci_set_config_type(enum pci_config_type type) return (__pci_cfg_type = type); } - diff --git a/com32/lib/pci/readbios.c b/com32/lib/pci/readbios.c index 92b4eeec..34f593c0 100644 --- a/com32/lib/pci/readbios.c +++ b/com32/lib/pci/readbios.c @@ -10,7 +10,6 @@ uint32_t __pci_read_bios(uint32_t call, pciaddr_t a) rs.ebx.w[0] = a >> 8; /* bus:device:function */ rs.edi.b[0] = a; /* address:reg */ __intcall(0x1a, &rs, &rs); - + return (rs.eflags.l & EFLAGS_CF) ? ~(uint32_t)0 : rs.ecx.l; } - diff --git a/com32/lib/pci/readx.c b/com32/lib/pci/readx.c index cbd7496f..3f19cad2 100644 --- a/com32/lib/pci/readx.c +++ b/com32/lib/pci/readx.c @@ -10,7 +10,7 @@ TYPE BWL(pci_read) (pciaddr_t a) case PCI_CFG_AUTO: pci_set_config_type(PCI_CFG_AUTO); break; /* Try again */ - + case PCI_CFG_TYPE1: { uint32_t oldcf8; @@ -22,14 +22,14 @@ TYPE BWL(pci_read) (pciaddr_t a) sti(); } return r; - + case PCI_CFG_TYPE2: { uint8_t oldcf8, oldcfa; - + if ( a & (0x10 << 11) ) return (TYPE)~0; /* Device 16-31 not supported */ - + cli(); oldcf8 = inb(0xcf8); oldcfa = inb(0xcfa); @@ -44,7 +44,7 @@ TYPE BWL(pci_read) (pciaddr_t a) case PCI_CFG_BIOS: return (TYPE) __pci_read_bios(BIOSCALL, a); - + default: return (TYPE)~0; } diff --git a/com32/lib/pci/writex.c b/com32/lib/pci/writex.c index 14eb0377..d5a53c0f 100644 --- a/com32/lib/pci/writex.c +++ b/com32/lib/pci/writex.c @@ -23,10 +23,10 @@ void BWL(pci_write) (TYPE v, pciaddr_t a) case PCI_CFG_TYPE2: { uint8_t oldcf8, oldcfa; - + if ( a & (0x10 << 11) ) return; /* Devices 16-31 not supported */ - + cli(); oldcf8 = inb(0xcf8); oldcfa = inb(0xcfa); diff --git a/com32/lib/qsort.c b/com32/lib/qsort.c index 185f4dac..312872db 100644 --- a/com32/lib/qsort.c +++ b/com32/lib/qsort.c @@ -29,7 +29,7 @@ void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, co do { gap = newgap(gap); swapped = 0; - + for ( i = 0, p1 = base ; i < nmemb-gap ; i++, p1 += size ) { j = i+gap; if ( compar(p1, p2 = (char *)base+j*size) > 0 ) { @@ -39,4 +39,3 @@ void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, co } } while ( gap > 1 || swapped ); } - diff --git a/com32/lib/realloc.c b/com32/lib/realloc.c index 577c2001..cfbdc762 100644 --- a/com32/lib/realloc.c +++ b/com32/lib/realloc.c @@ -36,7 +36,7 @@ void *realloc(void *ptr, size_t size) /* Make me a new block. This is kind of bogus; we should be checking the adjacent blocks to see if we can do an in-place adjustment... fix that later. */ - + oldsize = ah->a.size - sizeof(struct arena_header); newptr = malloc(size); @@ -46,4 +46,3 @@ void *realloc(void *ptr, size_t size) return newptr; } } - diff --git a/com32/lib/seed48.c b/com32/lib/seed48.c index f8353c87..c1d17304 100644 --- a/com32/lib/seed48.c +++ b/com32/lib/seed48.c @@ -13,7 +13,6 @@ unsigned short *seed48(const unsigned short xsubi[3]) static unsigned short oldseed[3]; memcpy(oldseed, __rand48_seed, sizeof __rand48_seed); memcpy(__rand48_seed, xsubi, sizeof __rand48_seed); - + return oldseed; } - diff --git a/com32/lib/setjmp.S b/com32/lib/setjmp.S index 5c5fbeae..53b2dee8 100644 --- a/com32/lib/setjmp.S +++ b/com32/lib/setjmp.S @@ -20,7 +20,7 @@ .globl _setjmp .type _setjmp, @function _setjmp: # gcc 4.0.1 wants this as an alias? - + .globl setjmp .type setjmp, @function setjmp: @@ -28,7 +28,7 @@ setjmp: movl %eax,%edx #else movl 4(%esp),%edx -#endif +#endif popl %ecx # Return address, and adjust the stack xorl %eax,%eax # Return value movl %ebx,(%edx) diff --git a/com32/lib/strerror.c b/com32/lib/strerror.c index 62705553..5d3fc9a3 100644 --- a/com32/lib/strerror.c +++ b/com32/lib/strerror.c @@ -21,4 +21,3 @@ char *strerror(int errnum) return (char *)memcpy(message+6, p, (numbuf+sizeof numbuf)-p); } - diff --git a/com32/lib/strlcat.c b/com32/lib/strlcat.c index 6111445f..f9db7156 100644 --- a/com32/lib/strlcat.c +++ b/com32/lib/strlcat.c @@ -27,5 +27,3 @@ size_t strlcat(char *dst, const char *src, size_t size) *q = '\0'; return bytes; } - - diff --git a/com32/lib/strlcpy.c b/com32/lib/strlcpy.c index eb384c98..ba4272b7 100644 --- a/com32/lib/strlcpy.c +++ b/com32/lib/strlcpy.c @@ -22,5 +22,3 @@ size_t strlcpy(char *dst, const char *src, size_t size) *q = '\0'; return bytes; } - - diff --git a/com32/lib/strlen.c b/com32/lib/strlen.c index 4d773f9a..847c16eb 100644 --- a/com32/lib/strlen.c +++ b/com32/lib/strlen.c @@ -11,4 +11,3 @@ size_t strlen(const char *s) ss++; return ss-s; } - diff --git a/com32/lib/strrchr.c b/com32/lib/strrchr.c index 3b424640..b9f20041 100644 --- a/com32/lib/strrchr.c +++ b/com32/lib/strrchr.c @@ -7,7 +7,7 @@ char *strrchr(const char *s, int c) { const char *found = NULL; - + while ( *s ) { if ( *s == (char) c ) found = s; diff --git a/com32/lib/strspn.c b/com32/lib/strspn.c index 856a9641..d569e029 100644 --- a/com32/lib/strspn.c +++ b/com32/lib/strspn.c @@ -61,7 +61,6 @@ char * strpbrk(const char *s, const char *accept) { const char *ss = s+strxspn(s, accept, 1); - + return *ss ? (char *)ss : NULL; } - diff --git a/com32/lib/strtok.c b/com32/lib/strtok.c index 6e84f1df..e89a9c56 100644 --- a/com32/lib/strtok.c +++ b/com32/lib/strtok.c @@ -13,4 +13,3 @@ char *strtok(char *s, const char *delim) return strsep(&holder, delim); } - diff --git a/com32/lib/sys/ansicon_write.c b/com32/lib/sys/ansicon_write.c index b22421ef..0858a167 100644 --- a/com32/lib/sys/ansicon_write.c +++ b/com32/lib/sys/ansicon_write.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -134,7 +134,7 @@ static void __constructor ansicon_init(void) static void ansicon_erase(int x0, int y0, int x1, int y1) { static com32sys_t ireg; - + ireg.eax.w[0] = 0x0600; /* Clear window */ ireg.ebx.b[1] = st.attr; /* Fill with current attribute */ ireg.ecx.b[0] = x0; @@ -214,7 +214,7 @@ static void ansicon_putchar(int ch) break; } break; - + case st_esc: switch ( ch ) { case '%': @@ -241,7 +241,7 @@ static void ansicon_putchar(int ch) break; } break; - + case st_csi: { int p0 = st.parms[0] ? st.parms[0] : 1; @@ -353,7 +353,7 @@ static void ansicon_putchar(int ch) case 2: ansicon_erase(0, xy.y, cols-1, xy.y); break; - + default: /* Ignore */ break; @@ -443,7 +443,7 @@ static void ansicon_putchar(int ch) break; } } - + /* Turn into an attribute code */ { int bg = st.bg; @@ -508,8 +508,8 @@ static void ansicon_putchar(int ch) ireg.edx.b[1] = xy.y; ireg.edx.b[0] = xy.x; __intcall(0x10, &ireg, NULL); -} - +} + ssize_t __ansicon_write(struct file_info *fp, const void *buf, size_t count) { diff --git a/com32/lib/sys/ansiserial_write.c b/com32/lib/sys/ansiserial_write.c index 95f1c747..0191bc25 100644 --- a/com32/lib/sys/ansiserial_write.c +++ b/com32/lib/sys/ansiserial_write.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/argv.c b/com32/lib/sys/argv.c index b4a57284..5238c9af 100644 --- a/com32/lib/sys/argv.c +++ b/com32/lib/sys/argv.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -79,7 +79,7 @@ int __parse_argv(char ***argv, const char *str) arg = ALIGN_UP(q,char *); *argv = arg; *arg++ = argv0; /* argv[0] */ - + q--; /* Point q to final null */ if ( mem < q ) *arg++ = mem; /* argv[1] */ @@ -95,4 +95,3 @@ int __parse_argv(char ***argv, const char *str) return argc; } - diff --git a/com32/lib/sys/close.c b/com32/lib/sys/close.c index 765641f5..e34c29a3 100644 --- a/com32/lib/sys/close.c +++ b/com32/lib/sys/close.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -50,13 +50,13 @@ int close(int fd) if ( rv ) return rv; } - + if ( fp->oop->close ) { rv = fp->oop->close(fp); if ( rv ) return rv; } - + memset(fp, 0, sizeof *fp); /* File structure unused */ return 0; } diff --git a/com32/lib/sys/entry.S b/com32/lib/sys/entry.S index 38e4c882..e12c65a7 100644 --- a/com32/lib/sys/entry.S +++ b/com32/lib/sys/entry.S @@ -1,6 +1,6 @@ #ident "$Id$" # ----------------------------------------------------------------------- -# +# # Copyright 2003-2004 H. Peter Anvin - All Rights Reserved # # Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ # sell copies of the Software, and to permit persons to whom # the Software is furnished to do so, subject to the following # conditions: -# +# # The above copyright notice and this permission notice shall # be included in all copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -28,7 +28,7 @@ # COM32 start up code - must be linked first in the binary - + .section ".init","ax" .globl _start .type _start, @function @@ -82,7 +82,7 @@ _start: call *(__exit_handler) hlt .size _start, .-_start - + .bss .globl __entry_esp __entry_esp: .space 4 diff --git a/com32/lib/sys/err_read.c b/com32/lib/sys/err_read.c index c980889f..3b71959f 100644 --- a/com32/lib/sys/err_read.c +++ b/com32/lib/sys/err_read.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/err_write.c b/com32/lib/sys/err_write.c index b0191c8f..216db292 100644 --- a/com32/lib/sys/err_write.c +++ b/com32/lib/sys/err_write.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/exit.S b/com32/lib/sys/exit.S index 22c9da78..412384ef 100644 --- a/com32/lib/sys/exit.S +++ b/com32/lib/sys/exit.S @@ -9,7 +9,7 @@ _exit: #ifdef REGPARM pushl %eax #endif - + # Run any destructors movl $__dtors_start, %esi 2: @@ -18,7 +18,7 @@ _exit: call *(%esi) addl $4,%esi jmp 2b - + 1: #ifdef REGPARM popl %eax diff --git a/com32/lib/sys/file.h b/com32/lib/sys/file.h index 0096e8af..ea527617 100644 --- a/com32/lib/sys/file.h +++ b/com32/lib/sys/file.h @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2003-2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/fileclose.c b/com32/lib/sys/fileclose.c index c35cad8c..64ab7c3f 100644 --- a/com32/lib/sys/fileclose.c +++ b/com32/lib/sys/fileclose.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/fileread.c b/com32/lib/sys/fileread.c index b9cc0d0a..5007c8ad 100644 --- a/com32/lib/sys/fileread.c +++ b/com32/lib/sys/fileread.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -57,7 +57,7 @@ ssize_t __file_read(struct file_info *fp, void *buf, size_t count) ireg.esi.w[0] = fp->i.filedes; ireg.ecx.w[0] = MAXBLOCK >> fp->i.blocklg2; - + __intcall(0x22, &ireg, &oreg); if ( oreg.eflags.l & EFLAGS_CF ) { diff --git a/com32/lib/sys/fstat.c b/com32/lib/sys/fstat.c index eba47b42..c6a33d8b 100644 --- a/com32/lib/sys/fstat.c +++ b/com32/lib/sys/fstat.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2005 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -39,12 +39,12 @@ int fstat(int fd, struct stat *buf) { struct file_info *fp = &__file_info[fd]; - + if ( fd >= NFILES || !fp->iop ) { errno = EBADF; return -1; } - + if ( fp->iop->flags & __DEV_FILE ) { buf->st_mode = S_IFREG | 0444; buf->st_size = fp->i.length; @@ -55,5 +55,3 @@ int fstat(int fd, struct stat *buf) return 0; } - - diff --git a/com32/lib/sys/ftell.c b/com32/lib/sys/ftell.c index 3db2814f..3f109163 100644 --- a/com32/lib/sys/ftell.c +++ b/com32/lib/sys/ftell.c @@ -11,8 +11,6 @@ long ftell(FILE *stream) { int fd = fileno(stream); struct file_info *fp = &__file_info[fd]; - + return fp->i.offset; } - - diff --git a/com32/lib/sys/idle.c b/com32/lib/sys/idle.c index 85e857fc..71060295 100644 --- a/com32/lib/sys/idle.c +++ b/com32/lib/sys/idle.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2005 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -47,7 +47,7 @@ void syslinux_idle(void) /* This call isn't supported on SYSLINUX < 3.08, but all it does is return an error, so we don't care. */ - + if ( do_idle ) { __intcall(0x22, &sys_idle, &idle_result); diff --git a/com32/lib/sys/isatty.c b/com32/lib/sys/isatty.c index 39146c7a..cb8eaffa 100644 --- a/com32/lib/sys/isatty.c +++ b/com32/lib/sys/isatty.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/line_input.c b/com32/lib/sys/line_input.c index a125ec8e..25d68712 100644 --- a/com32/lib/sys/line_input.c +++ b/com32/lib/sys/line_input.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -56,12 +56,12 @@ ssize_t __line_input(struct file_info *fp, char *buf, size_t bufsize, switch ( ch ) { case '\n': /* Ignore incoming linefeed */ break; - + case '\r': *buf = '\n'; Write(fp, "\n", 1); return n+1; - + case '\b': if ( n > 0 ) { n--; buf--; @@ -75,7 +75,7 @@ ssize_t __line_input(struct file_info *fp, char *buf, size_t bufsize, Write(fp, "\b \b", 3); } break; - + default: if ( n < bufsize-1 ) { *buf = ch; @@ -87,4 +87,3 @@ ssize_t __line_input(struct file_info *fp, char *buf, size_t bufsize, } } } - diff --git a/com32/lib/sys/null_read.c b/com32/lib/sys/null_read.c index 8121faee..bac0da12 100644 --- a/com32/lib/sys/null_read.c +++ b/com32/lib/sys/null_read.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/null_write.c b/com32/lib/sys/null_write.c index bebf34b5..aa9ab30a 100644 --- a/com32/lib/sys/null_write.c +++ b/com32/lib/sys/null_write.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/open.c b/com32/lib/sys/open.c index 433a8ec4..86a61b64 100644 --- a/com32/lib/sys/open.c +++ b/com32/lib/sys/open.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2003-2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -60,7 +60,7 @@ int open(const char *pathname, int flags, ...) if ( fd < 0 ) return -1; - + fp = &__file_info[fd]; strlcpy(__com32.cs_bounce, pathname, __com32.cs_bounce_size); @@ -70,7 +70,7 @@ int open(const char *pathname, int flags, ...) regs.es = SEG(__com32.cs_bounce); __com32.cs_intcall(0x22, ®s, ®s); - + if ( (regs.eflags.l & EFLAGS_CF) || regs.esi.w[0] == 0 ) { errno = ENOENT; return -1; @@ -87,4 +87,4 @@ int open(const char *pathname, int flags, ...) fp->i.nbytes = 0; return fd; -} +} diff --git a/com32/lib/sys/openconsole.c b/com32/lib/sys/openconsole.c index fbc277b0..c1c77556 100644 --- a/com32/lib/sys/openconsole.c +++ b/com32/lib/sys/openconsole.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/opendev.c b/com32/lib/sys/opendev.c index 4384d1e9..68621ac7 100644 --- a/com32/lib/sys/opendev.c +++ b/com32/lib/sys/opendev.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2003-2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/rawcon_read.c b/com32/lib/sys/rawcon_read.c index fb720ef8..52a83319 100644 --- a/com32/lib/sys/rawcon_read.c +++ b/com32/lib/sys/rawcon_read.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -50,7 +50,7 @@ ssize_t __rawcon_read(struct file_info *fp, void *buf, size_t count) (void)fp; - memset(&ireg, 0, sizeof ireg); + memset(&ireg, 0, sizeof ireg); start = times(NULL); diff --git a/com32/lib/sys/rawcon_write.c b/com32/lib/sys/rawcon_write.c index 329a116d..09f82dc3 100644 --- a/com32/lib/sys/rawcon_write.c +++ b/com32/lib/sys/rawcon_write.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -46,7 +46,7 @@ static ssize_t __rawcon_write(struct file_info *fp, const void *buf, size_t coun (void)fp; - memset(&ireg, 0, sizeof ireg); + memset(&ireg, 0, sizeof ireg); ireg.eax.b[1] = 0x02; while ( count-- ) { diff --git a/com32/lib/sys/read.c b/com32/lib/sys/read.c index 4f96aad7..0f361d89 100644 --- a/com32/lib/sys/read.c +++ b/com32/lib/sys/read.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -42,7 +42,7 @@ ssize_t read(int fd, void *buf, size_t count) { struct file_info *fp = &__file_info[fd]; - + if ( fd >= NFILES || !fp->iop ) { errno = EBADF; return -1; diff --git a/com32/lib/sys/serial_write.c b/com32/lib/sys/serial_write.c index 44f3137f..5081db9d 100644 --- a/com32/lib/sys/serial_write.c +++ b/com32/lib/sys/serial_write.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -46,7 +46,7 @@ ssize_t __serial_write(struct file_info *fp, const void *buf, size_t count) (void)fp; - memset(&ireg, 0, sizeof ireg); + memset(&ireg, 0, sizeof ireg); ireg.eax.b[1] = 0x04; while ( count-- ) { diff --git a/com32/lib/sys/stdcon_read.c b/com32/lib/sys/stdcon_read.c index 1f172cc9..4d56b03f 100644 --- a/com32/lib/sys/stdcon_read.c +++ b/com32/lib/sys/stdcon_read.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/stdcon_write.c b/com32/lib/sys/stdcon_write.c index d5f91851..876f8988 100644 --- a/com32/lib/sys/stdcon_write.c +++ b/com32/lib/sys/stdcon_write.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -46,7 +46,7 @@ static ssize_t __stdcon_write(struct file_info *fp, const void *buf, size_t coun (void)fp; - memset(&ireg, 0, sizeof ireg); + memset(&ireg, 0, sizeof ireg); ireg.eax.b[1] = 0x02; while ( count-- ) { diff --git a/com32/lib/sys/times.c b/com32/lib/sys/times.c index b67a2a7c..58c59cf3 100644 --- a/com32/lib/sys/times.c +++ b/com32/lib/sys/times.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/sys/write.c b/com32/lib/sys/write.c index 2e27d6ff..e34ad884 100644 --- a/com32/lib/sys/write.c +++ b/com32/lib/sys/write.c @@ -1,6 +1,6 @@ #ident "$Id$" /* ----------------------------------------------------------------------- * - * + * * Copyright 2004 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -11,10 +11,10 @@ * sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall * be included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/com32/lib/vasprintf.c b/com32/lib/vasprintf.c index 657bfdc3..910e7d95 100644 --- a/com32/lib/vasprintf.c +++ b/com32/lib/vasprintf.c @@ -20,6 +20,6 @@ int vasprintf(char **bufp, const char *format, va_list ap) *bufp = p = malloc(bytes); if ( !p ) return -1; - + return vsnprintf(p, bytes, format, ap); } diff --git a/com32/lib/vsnprintf.c b/com32/lib/vsnprintf.c index 5cb93319..8279d7a8 100644 --- a/com32/lib/vsnprintf.c +++ b/com32/lib/vsnprintf.c @@ -369,10 +369,10 @@ int vsnprintf(char *buffer, size_t n, const char *format, va_list ap) { char sch; int i; - + if ( prec != -1 && slen > prec ) slen = prec; - + if ( width > slen && !(flags & FL_MINUS) ) { char pad = (flags & FL_ZERO) ? '0' : ' '; while ( width > slen ) { @@ -414,7 +414,7 @@ int vsnprintf(char *buffer, size_t n, const char *format, va_list ap) } } break; - + default: /* Anything else, including % */ EMIT(ch); break; diff --git a/com32/lib/vsscanf.c b/com32/lib/vsscanf.c index 12a82b27..1882765d 100644 --- a/com32/lib/vsscanf.c +++ b/com32/lib/vsscanf.c @@ -210,7 +210,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap) case 'u': /* Unsigned decimal integer */ base = 10; sign = 0; goto scan_int; - + case 'x': /* Hexadecimal integer */ case 'X': base = 16; sign = 0; @@ -259,7 +259,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap) } } break; - + case 'c': /* Character */ width = (flags & FL_WIDTH) ? width : 1; /* Default width == 1 */ sarg = va_arg(ap, char *); @@ -289,7 +289,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap) } } break; - + case '[': /* Character range */ sarg = va_arg(ap, char *); state = st_match_init; @@ -310,7 +310,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap) } } break; - + case st_match_init: /* Initial state for %[ match */ if ( ch == '^' && !(flags & FL_INV) ) { matchinv = 1; @@ -319,7 +319,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap) state = st_match; } break; - + case st_match: /* Main state for %[ match */ if ( ch == ']' ) { goto match_run; @@ -330,7 +330,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap) set_bit(matchmap, (unsigned char)ch); } break; - + case st_match_range: /* %[ match after - */ if ( ch == ']' ) { set_bit(matchmap, (unsigned char)'-'); /* - was last character */ diff --git a/com32/lib/zlib/trees.h b/com32/lib/zlib/trees.h index 72facf90..aadfa16d 100644 --- a/com32/lib/zlib/trees.h +++ b/com32/lib/zlib/trees.h @@ -125,4 +125,3 @@ local const int base_dist[D_CODES] = { 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 }; - |