diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-03-14 22:07:09 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-03-14 22:07:09 -0700 |
commit | 64d7ea7b604c2ca9ab8f7236374b3a1c05005e55 (patch) | |
tree | aefb113b164ae28daefaf0405ca5e96fb421781f /com32 | |
parent | a80b07e7fb8feec668a435101659e3ed94015a23 (diff) | |
download | syslinux-elf-64d7ea7b604c2ca9ab8f7236374b3a1c05005e55.tar.gz syslinux-elf-64d7ea7b604c2ca9ab8f7236374b3a1c05005e55.tar.xz syslinux-elf-64d7ea7b604c2ca9ab8f7236374b3a1c05005e55.zip |
Stealth whitespace cleanup (automated)
Diffstat (limited to 'com32')
56 files changed, 308 insertions, 320 deletions
diff --git a/com32/include/assert.h b/com32/include/assert.h index b0eef03b..b303bb98 100644 --- a/com32/include/assert.h +++ b/com32/include/assert.h @@ -5,4 +5,3 @@ #define assert(X) ((void)0) #endif /* _ASSERT_H */ - diff --git a/com32/include/bitsize/stdint.h b/com32/include/bitsize/stdint.h index 40b46496..bdfe1328 100644 --- a/com32/include/bitsize/stdint.h +++ b/com32/include/bitsize/stdint.h @@ -5,12 +5,12 @@ #ifndef _BITSIZE_STDINT_H #define _BITSIZE_STDINT_H -typedef signed char int8_t; +typedef signed char int8_t; typedef short int int16_t; typedef int int32_t; typedef long long int int64_t; -typedef unsigned char uint8_t; +typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; typedef unsigned long long int uint64_t; diff --git a/com32/include/colortbl.h b/com32/include/colortbl.h index ac3f340d..05add6d4 100644 --- a/com32/include/colortbl.h +++ b/com32/include/colortbl.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2006 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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/include/dmi/dmi.h b/com32/include/dmi/dmi.h index 5e72b82c..ceed3b4d 100644 --- a/com32/include/dmi/dmi.h +++ b/com32/include/dmi/dmi.h @@ -13,7 +13,7 @@ #ifndef DMI_H #define DMI_H -#define u32 unsigned int +#define u32 unsigned int #define u16 unsigned short #define u8 unsigned char #define PAGE_SIZE 4096 diff --git a/com32/include/dmi/dmi_base_board.h b/com32/include/dmi/dmi_base_board.h index 8de8adc0..d6634c01 100644 --- a/com32/include/dmi/dmi_base_board.h +++ b/com32/include/dmi/dmi_base_board.h @@ -14,11 +14,11 @@ #define DMI_BASE_BOARD_H #include "stdbool.h" -#define BASE_BOARD_MANUFACTURER_SIZE 32 -#define BASE_BOARD_PRODUCT_NAME_SIZE 32 -#define BASE_BOARD_VERSION_SIZE 16 -#define BASE_BOARD_SERIAL_SIZE 32 -#define BASE_BOARD_ASSET_TAG_SIZE 32 +#define BASE_BOARD_MANUFACTURER_SIZE 32 +#define BASE_BOARD_PRODUCT_NAME_SIZE 32 +#define BASE_BOARD_VERSION_SIZE 16 +#define BASE_BOARD_SERIAL_SIZE 32 +#define BASE_BOARD_ASSET_TAG_SIZE 32 #define BASE_BOARD_LOCATION_SIZE 32 #define BASE_BOARD_FEATURES_SIZE 32 #define BASE_BOARD_TYPE_SIZE 32 diff --git a/com32/include/dmi/dmi_bios.h b/com32/include/dmi/dmi_bios.h index 735647ff..d9be233b 100644 --- a/com32/include/dmi/dmi_bios.h +++ b/com32/include/dmi/dmi_bios.h @@ -14,10 +14,10 @@ #define DMI_BIOS_H #include "stdbool.h" -#define BIOS_VENDOR_SIZE 32 -#define BIOS_VERSION_SIZE 32 -#define BIOS_RELEASE_SIZE 16 -#define BIOS_RUNTIME_SIZE_UNIT_SIZE 16 +#define BIOS_VENDOR_SIZE 32 +#define BIOS_VERSION_SIZE 32 +#define BIOS_RELEASE_SIZE 16 +#define BIOS_RUNTIME_SIZE_UNIT_SIZE 16 #define BIOS_ROM_UNIT_SIZE 16 #define BIOS_BIOS_REVISION_SIZE 16 #define BIOS_FIRMWARE_REVISION_SIZE 16 @@ -98,7 +98,7 @@ static const char *bios_charac_x1_strings[]={ "I2O boot is supported", "LS-120 boot is supported", "ATAPI Zip drive boot is supported", - "IEEE 1394 boot is supported", + "IEEE 1394 boot is supported", "Smart battery is supported" /* 7 */ }; @@ -119,7 +119,7 @@ static const char *bios_charac_x2_strings[]={ "BIOS boot specification is supported", /* 0 */ "Function key-initiated network boot is supported", "Targeted content distribution is supported" /* 2 */ -}; +}; /* this struct have BIOS_CHAR_X2_NB_ELEMENTS */ /* each bool is associated to the relevant message above */ @@ -130,9 +130,9 @@ bool target_content_distribution; } __attribute__((__packed__)) s_characteristics_x2; typedef struct { -char vendor[BIOS_VENDOR_SIZE]; -char version[BIOS_VERSION_SIZE]; -char release_date[BIOS_RELEASE_SIZE]; +char vendor[BIOS_VENDOR_SIZE]; +char version[BIOS_VERSION_SIZE]; +char release_date[BIOS_RELEASE_SIZE]; u16 address; u16 runtime_size; char runtime_size_unit[BIOS_RUNTIME_SIZE_UNIT_SIZE]; diff --git a/com32/include/dmi/dmi_chassis.h b/com32/include/dmi/dmi_chassis.h index 933b80b9..1456ede9 100644 --- a/com32/include/dmi/dmi_chassis.h +++ b/com32/include/dmi/dmi_chassis.h @@ -13,32 +13,32 @@ #ifndef DMI_CHASSIS_H #define DMI_CHASSIS_H -#define CHASSIS_MANUFACTURER_SIZE 32 -#define CHASSIS_TYPE_SIZE 16 -#define CHASSIS_LOCK_SIZE 16 -#define CHASSIS_VERSION_SIZE 16 -#define CHASSIS_SERIAL_SIZE 32 -#define CHASSIS_ASSET_TAG_SIZE 32 -#define CHASSIS_BOOT_UP_STATE_SIZE 32 -#define CHASSIS_POWER_SUPPLY_STATE_SIZE 32 -#define CHASSIS_THERMAL_STATE_SIZE 32 -#define CHASSIS_SECURITY_STATUS_SIZE 32 -#define CHASSIS_OEM_INFORMATION_SIZE 32 +#define CHASSIS_MANUFACTURER_SIZE 32 +#define CHASSIS_TYPE_SIZE 16 +#define CHASSIS_LOCK_SIZE 16 +#define CHASSIS_VERSION_SIZE 16 +#define CHASSIS_SERIAL_SIZE 32 +#define CHASSIS_ASSET_TAG_SIZE 32 +#define CHASSIS_BOOT_UP_STATE_SIZE 32 +#define CHASSIS_POWER_SUPPLY_STATE_SIZE 32 +#define CHASSIS_THERMAL_STATE_SIZE 32 +#define CHASSIS_SECURITY_STATUS_SIZE 32 +#define CHASSIS_OEM_INFORMATION_SIZE 32 typedef struct { -char manufacturer[CHASSIS_MANUFACTURER_SIZE]; -char type[CHASSIS_TYPE_SIZE]; -char lock[CHASSIS_LOCK_SIZE]; -char version[CHASSIS_VERSION_SIZE]; -char serial[CHASSIS_SERIAL_SIZE]; -char asset_tag[CHASSIS_ASSET_TAG_SIZE]; -char boot_up_state[CHASSIS_BOOT_UP_STATE_SIZE]; -char power_supply_state[CHASSIS_POWER_SUPPLY_STATE_SIZE]; -char thermal_state[CHASSIS_THERMAL_STATE_SIZE]; -char security_status[CHASSIS_SECURITY_STATUS_SIZE]; -char oem_information[CHASSIS_OEM_INFORMATION_SIZE]; -u16 height; -u16 nb_power_cords; +char manufacturer[CHASSIS_MANUFACTURER_SIZE]; +char type[CHASSIS_TYPE_SIZE]; +char lock[CHASSIS_LOCK_SIZE]; +char version[CHASSIS_VERSION_SIZE]; +char serial[CHASSIS_SERIAL_SIZE]; +char asset_tag[CHASSIS_ASSET_TAG_SIZE]; +char boot_up_state[CHASSIS_BOOT_UP_STATE_SIZE]; +char power_supply_state[CHASSIS_POWER_SUPPLY_STATE_SIZE]; +char thermal_state[CHASSIS_THERMAL_STATE_SIZE]; +char security_status[CHASSIS_SECURITY_STATUS_SIZE]; +char oem_information[CHASSIS_OEM_INFORMATION_SIZE]; +u16 height; +u16 nb_power_cords; } s_chassis; static const char *dmi_chassis_type(u8 code) diff --git a/com32/include/dmi/dmi_processor.h b/com32/include/dmi/dmi_processor.h index 34177202..26ac97ac 100644 --- a/com32/include/dmi/dmi_processor.h +++ b/com32/include/dmi/dmi_processor.h @@ -14,21 +14,21 @@ #define DMI_PROCESSOR_H #include "stdbool.h" -#define PROCESSOR_SOCKET_DESIGNATION_SIZE 32 -#define PROCESSOR_TYPE_SIZE 32 +#define PROCESSOR_SOCKET_DESIGNATION_SIZE 32 +#define PROCESSOR_TYPE_SIZE 32 #define PROCESSOR_FAMILY_SIZE 32 #define PROCESSOR_MANUFACTURER_SIZE 64 -#define PROCESSOR_VERSION_SIZE 32 -#define PROCESSOR_VOLTAGE_SIZE 16 -#define PROCESSOR_STATUS_SIZE 16 +#define PROCESSOR_VERSION_SIZE 32 +#define PROCESSOR_VOLTAGE_SIZE 16 +#define PROCESSOR_STATUS_SIZE 16 #define PROCESSOR_UPGRADE_SIZE 16 #define PROCESSOR_CACHE_SIZE 16 -#define PROCESSOR_SERIAL_SIZE 32 -#define PROCESSOR_ASSET_TAG_SIZE 32 +#define PROCESSOR_SERIAL_SIZE 32 +#define PROCESSOR_ASSET_TAG_SIZE 32 #define PROCESSOR_PART_NUMBER_SIZE 32 #define PROCESSOR_ID_SIZE 32 -#define PROCESSOR_FLAGS_ELEMENTS 32 +#define PROCESSOR_FLAGS_ELEMENTS 32 /* Intel AP-485 revision 28, table 5 */ static const char *cpu_flags_strings[32]={ "FPU (Floating-point unit on-chip)", /* 0 */ @@ -111,12 +111,12 @@ u8 minor_stepping; } __attribute__((__packed__)) s_signature; typedef struct { -char socket_designation[PROCESSOR_SOCKET_DESIGNATION_SIZE]; -char type[PROCESSOR_TYPE_SIZE]; -char family[PROCESSOR_FAMILY_SIZE]; -char manufacturer[PROCESSOR_MANUFACTURER_SIZE]; -char version[PROCESSOR_VERSION_SIZE]; -float voltage; +char socket_designation[PROCESSOR_SOCKET_DESIGNATION_SIZE]; +char type[PROCESSOR_TYPE_SIZE]; +char family[PROCESSOR_FAMILY_SIZE]; +char manufacturer[PROCESSOR_MANUFACTURER_SIZE]; +char version[PROCESSOR_VERSION_SIZE]; +float voltage; u16 external_clock; u16 max_speed; u16 current_speed; @@ -125,10 +125,10 @@ char upgrade[PROCESSOR_UPGRADE_SIZE]; char cache1[PROCESSOR_CACHE_SIZE]; char cache2[PROCESSOR_CACHE_SIZE]; char cache3[PROCESSOR_CACHE_SIZE]; -char serial[PROCESSOR_SERIAL_SIZE]; -char asset_tag[PROCESSOR_ASSET_TAG_SIZE]; -char part_number[PROCESSOR_PART_NUMBER_SIZE]; -char id[PROCESSOR_ID_SIZE]; +char serial[PROCESSOR_SERIAL_SIZE]; +char asset_tag[PROCESSOR_ASSET_TAG_SIZE]; +char part_number[PROCESSOR_PART_NUMBER_SIZE]; +char id[PROCESSOR_ID_SIZE]; s_cpu_flags cpu_flags; s_signature signature; } s_processor; @@ -414,7 +414,7 @@ static const char *dmi_processor_family(u8 code) }; if(family[code]!=NULL) { - return family[code]; + return family[code]; } return out_of_spec; } diff --git a/com32/include/dmi/dmi_system.h b/com32/include/dmi/dmi_system.h index 02f2382c..27293649 100644 --- a/com32/include/dmi/dmi_system.h +++ b/com32/include/dmi/dmi_system.h @@ -13,24 +13,24 @@ #ifndef DMI_SYSTEM_H #define DMI_SYSTEM_H -#define SYSTEM_MANUFACTURER_SIZE 32 -#define SYSTEM_PRODUCT_NAME_SIZE 32 -#define SYSTEM_VERSION_SIZE 16 -#define SYSTEM_SERIAL_SIZE 32 -#define SYSTEM_UUID_SIZE 40 +#define SYSTEM_MANUFACTURER_SIZE 32 +#define SYSTEM_PRODUCT_NAME_SIZE 32 +#define SYSTEM_VERSION_SIZE 16 +#define SYSTEM_SERIAL_SIZE 32 +#define SYSTEM_UUID_SIZE 40 #define SYSTEM_WAKEUP_TYPE_SIZE 32 -#define SYSTEM_SKU_NUMBER_SIZE 32 +#define SYSTEM_SKU_NUMBER_SIZE 32 #define SYSTEM_FAMILY_SIZE 32 typedef struct { -char manufacturer[SYSTEM_MANUFACTURER_SIZE]; -char product_name[SYSTEM_PRODUCT_NAME_SIZE]; -char version[SYSTEM_VERSION_SIZE]; -char serial[SYSTEM_SERIAL_SIZE]; -char uuid[SYSTEM_UUID_SIZE]; -char wakeup_type[SYSTEM_WAKEUP_TYPE_SIZE]; -char sku_number[SYSTEM_SKU_NUMBER_SIZE]; -char family[SYSTEM_FAMILY_SIZE]; +char manufacturer[SYSTEM_MANUFACTURER_SIZE]; +char product_name[SYSTEM_PRODUCT_NAME_SIZE]; +char version[SYSTEM_VERSION_SIZE]; +char serial[SYSTEM_SERIAL_SIZE]; +char uuid[SYSTEM_UUID_SIZE]; +char wakeup_type[SYSTEM_WAKEUP_TYPE_SIZE]; +char sku_number[SYSTEM_SKU_NUMBER_SIZE]; +char family[SYSTEM_FAMILY_SIZE]; } s_system; #endif diff --git a/com32/include/sys/elfcommon.h b/com32/include/sys/elfcommon.h index 0d81db56..cc8f9235 100644 --- a/com32/include/sys/elfcommon.h +++ b/com32/include/sys/elfcommon.h @@ -8,45 +8,45 @@ #include <stdint.h> /* Segment types */ -#define PT_NULL 0 -#define PT_LOAD 1 -#define PT_DYNAMIC 2 -#define PT_INTERP 3 -#define PT_NOTE 4 -#define PT_SHLIB 5 -#define PT_PHDR 6 -#define PT_LOOS 0x60000000 -#define PT_HIOS 0x6fffffff -#define PT_LOPROC 0x70000000 -#define PT_HIPROC 0x7fffffff +#define PT_NULL 0 +#define PT_LOAD 1 +#define PT_DYNAMIC 2 +#define PT_INTERP 3 +#define PT_NOTE 4 +#define PT_SHLIB 5 +#define PT_PHDR 6 +#define PT_LOOS 0x60000000 +#define PT_HIOS 0x6fffffff +#define PT_LOPROC 0x70000000 +#define PT_HIPROC 0x7fffffff #define PT_GNU_EH_FRAME 0x6474e550 /* Extension, eh? */ /* ELF file types */ -#define ET_NONE 0 -#define ET_REL 1 -#define ET_EXEC 2 -#define ET_DYN 3 -#define ET_CORE 4 -#define ET_LOPROC 0xff00 -#define ET_HIPROC 0xffff +#define ET_NONE 0 +#define ET_REL 1 +#define ET_EXEC 2 +#define ET_DYN 3 +#define ET_CORE 4 +#define ET_LOPROC 0xff00 +#define ET_HIPROC 0xffff /* ELF machine types */ -#define EM_NONE 0 -#define EM_M32 1 -#define EM_SPARC 2 -#define EM_386 3 -#define EM_68K 4 -#define EM_88K 5 -#define EM_486 6 /* Not used in Linux at least */ -#define EM_860 7 +#define EM_NONE 0 +#define EM_M32 1 +#define EM_SPARC 2 +#define EM_386 3 +#define EM_68K 4 +#define EM_88K 5 +#define EM_486 6 /* Not used in Linux at least */ +#define EM_860 7 #define EM_MIPS 8 /* R3k, bigendian(?) */ -#define EM_MIPS_RS4_BE 10 /* R4k BE */ -#define EM_PARISC 15 -#define EM_SPARC32PLUS 18 -#define EM_PPC 20 -#define EM_PPC64 21 +#define EM_MIPS_RS4_BE 10 /* R4k BE */ +#define EM_PARISC 15 +#define EM_SPARC32PLUS 18 +#define EM_PPC 20 +#define EM_PPC64 21 #define EM_S390 22 -#define EM_SH 42 +#define EM_SH 42 #define EM_SPARCV9 43 /* v9 = SPARC64 */ #define EM_H8_300H 47 #define EM_H8S 48 @@ -103,10 +103,10 @@ #define AT_GID 13 /* real gid */ #define AT_EGID 14 /* effective gid */ #define AT_PLATFORM 15 /* string identifying CPU for optimizations */ -#define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */ -#define AT_CLKTCK 17 /* frequency at which times() increments */ +#define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */ +#define AT_CLKTCK 17 /* frequency at which times() increments */ /* 18..22 = ? */ -#define AT_SECURE 23 /* secure mode boolean */ +#define AT_SECURE 23 /* secure mode boolean */ /* Program header permission flags */ #define PF_X 0x1 diff --git a/com32/include/sys/pci.h b/com32/include/sys/pci.h index 4862cda9..e471faa6 100644 --- a/com32/include/sys/pci.h +++ b/com32/include/sys/pci.h @@ -6,7 +6,7 @@ #define MAX_VENDOR_NAME_SIZE 255 #define MAX_PRODUCT_NAME_SIZE 255 -#define MAX_PCI_DEVICES 32 +#define MAX_PCI_DEVICES 32 #define MAX_PCI_BUSES 255 typedef uint32_t pciaddr_t; diff --git a/com32/include/sys/times.h b/com32/include/sys/times.h index 8d03af0a..dd60a3c5 100644 --- a/com32/include/sys/times.h +++ b/com32/include/sys/times.h @@ -11,7 +11,7 @@ struct tms { /* Empty */ }; -#define HZ 18 /* Piddly resolution... */ +#define HZ 18 /* Piddly resolution... */ #define CLK_TCK HZ typedef uint16_t clock_t; diff --git a/com32/include/syslinux/bootpm.h b/com32/include/syslinux/bootpm.h index 6064ea96..cfe28103 100644 --- a/com32/include/syslinux/bootpm.h +++ b/com32/include/syslinux/bootpm.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2007 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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,4 +50,3 @@ struct syslinux_pm_regs { }; #endif /* _SYSLINUX_BOOTPM_H */ - diff --git a/com32/include/syslinux/bootrm.h b/com32/include/syslinux/bootrm.h index d7df9fae..2a3b618b 100644 --- a/com32/include/syslinux/bootrm.h +++ b/com32/include/syslinux/bootrm.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2007 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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 @@ -63,4 +63,3 @@ struct syslinux_rm_regs { #endif /* _SYSLINUX_BOOTRM_H */ - diff --git a/com32/include/tinyjpeg.h b/com32/include/tinyjpeg.h index d320f9bb..e88d09ad 100644 --- a/com32/include/tinyjpeg.h +++ b/com32/include/tinyjpeg.h @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -70,6 +70,3 @@ int tinyjpeg_set_flags(struct jdec_private *priv, int flags); #endif #endif - - - diff --git a/com32/lib/Makefile b/com32/lib/Makefile index 158e2dc6..9b6e4d2b 100644 --- a/com32/lib/Makefile +++ b/com32/lib/Makefile @@ -15,13 +15,13 @@ LIBOBJS = \ strntoimax.o strntoumax.o strrchr.o strsep.o strspn.o strstr.o \ strtoimax.o strtok.o strtol.o strtoll.o strtoul.o strtoull.o \ strtoumax.o vfprintf.o vprintf.o vsnprintf.o vsprintf.o \ - asprintf.o vasprintf.o strlcpy.o strlcat.o \ + asprintf.o vasprintf.o strlcpy.o strlcat.o \ vsscanf.o \ \ libgcc/__ashldi3.o libgcc/__udivdi3.o \ libgcc/__negdi2.o libgcc/__ashrdi3.o libgcc/__lshrdi3.o \ libgcc/__muldi3.o libgcc/__udivmoddi4.o libgcc/__umoddi3.o \ - libgcc/__divdi3.o libgcc/__moddi3.o \ + libgcc/__divdi3.o libgcc/__moddi3.o \ \ sys/intcall.o sys/farcall.o \ sys/entry.o sys/exit.o sys/argv.o sys/times.o sys/idle.o \ @@ -40,16 +40,16 @@ LIBOBJS = \ \ sys/ansicon_write.o sys/ansiserial_write.o \ \ - sys/vesacon_write.o sys/vesaserial_write.o \ + sys/vesacon_write.o sys/vesaserial_write.o \ sys/vesa/initvesa.o sys/vesa/drawtxt.o sys/vesa/background.o \ sys/vesa/alphatbl.o \ \ - pci/cfgtype.o \ - pci/readb.o pci/readw.o pci/readl.o pci/readbios.o \ - pci/writeb.o pci/writew.o pci/writel.o pci/writebios.o \ + pci/cfgtype.o \ + pci/readb.o pci/readw.o pci/readl.o pci/readbios.o \ + pci/writeb.o pci/writew.o pci/writel.o pci/writebios.o \ \ - zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/gzio.o \ - zlib/uncompr.o zlib/deflate.o zlib/trees.o zlib/zutil.o \ + zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/gzio.o \ + zlib/uncompr.o zlib/deflate.o zlib/trees.o zlib/zutil.o \ zlib/inflate.o zlib/infback.o zlib/inftrees.o zlib/inffast.o \ \ libpng/png.o libpng/pngset.o libpng/pngget.o libpng/pngrutil.o \ @@ -85,7 +85,7 @@ libcom32.a : $(LIBOBJS) tidy: rm -f sys/vesa/alphatbl.c find . -name \*.o -print | xargs -r rm -f - find . -name .\*.d -print | xargs -r rm -f + find . -name .\*.d -print | xargs -r rm -f clean: tidy rm -f *.a diff --git a/com32/lib/jpeg/bgr24.c b/com32/lib/jpeg/bgr24.c index 3f2f4f90..ffdcbdf9 100644 --- a/com32/lib/jpeg/bgr24.c +++ b/com32/lib/jpeg/bgr24.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51,7 +51,7 @@ * R = Y + 1.40200 * Cr * G = Y - 0.34414 * Cb - 0.71414 * Cr * B = Y + 1.77200 * Cb - * + * ******************************************************************************/ static unsigned char clamp(int i) { @@ -61,7 +61,7 @@ static unsigned char clamp(int i) return 255; else return i; -} +} /** * YCrCb -> BGR24 (1x1) diff --git a/com32/lib/jpeg/bgra32.c b/com32/lib/jpeg/bgra32.c index fe6b813a..7e2c72bc 100644 --- a/com32/lib/jpeg/bgra32.c +++ b/com32/lib/jpeg/bgra32.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51,7 +51,7 @@ * R = Y + 1.40200 * Cr * G = Y - 0.34414 * Cb - 0.71414 * Cr * B = Y + 1.77200 * Cb - * + * ******************************************************************************/ static unsigned char clamp(int i) { @@ -61,7 +61,7 @@ static unsigned char clamp(int i) return 255; else return i; -} +} /** * YCrCb -> BGRA32 (1x1) diff --git a/com32/lib/jpeg/decode1.c b/com32/lib/jpeg/decode1.c index 9d76a05a..554f7f11 100644 --- a/com32/lib/jpeg/decode1.c +++ b/com32/lib/jpeg/decode1.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -47,7 +47,7 @@ static void decode_MCU_1x1_1plane(struct jdec_private *priv) // Y tinyjpeg_process_Huffman_data_unit(priv, cY); IDCT(&priv->component_infos[cY], priv->Y, 8); - + // Cb tinyjpeg_process_Huffman_data_unit(priv, cCb); IDCT(&priv->component_infos[cCb], priv->Cb, 8); diff --git a/com32/lib/jpeg/decode3.c b/com32/lib/jpeg/decode3.c index 9e49eee0..2f79ec97 100644 --- a/com32/lib/jpeg/decode3.c +++ b/com32/lib/jpeg/decode3.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -40,14 +40,14 @@ #include "tinyjpeg-internal.h" /* - * Decode all the 3 components for 1x1 + * Decode all the 3 components for 1x1 */ static void decode_MCU_1x1_3planes(struct jdec_private *priv) { // Y tinyjpeg_process_Huffman_data_unit(priv, cY); IDCT(&priv->component_infos[cY], priv->Y, 8); - + // Cb tinyjpeg_process_Huffman_data_unit(priv, cCb); IDCT(&priv->component_infos[cCb], priv->Cb, 8); diff --git a/com32/lib/jpeg/grey.c b/com32/lib/jpeg/grey.c index bb55b7e2..0034ce2b 100644 --- a/com32/lib/jpeg/grey.c +++ b/com32/lib/jpeg/grey.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE diff --git a/com32/lib/jpeg/jidctflt.c b/com32/lib/jpeg/jidctflt.c index 1327b823..e5e66edc 100644 --- a/com32/lib/jpeg/jidctflt.c +++ b/com32/lib/jpeg/jidctflt.c @@ -5,7 +5,7 @@ * This file is part of the Independent JPEG Group's software. * * The authors make NO WARRANTY or representation, either express or implied, - * with respect to this software, its quality, accuracy, merchantability, or + * with respect to this software, its quality, accuracy, merchantability, or * fitness for a particular purpose. This software is provided "AS IS", and you, * its user, assume the entire risk as to its quality and accuracy. * @@ -25,16 +25,16 @@ * (3) Permission for use of this software is granted only if the user accepts * full responsibility for any undesirable consequences; the authors accept * NO LIABILITY for damages of any kind. - * + * * These conditions apply to any software derived from or based on the IJG code, * not just to the unmodified library. If you use our work, you ought to * acknowledge us. - * + * * Permission is NOT granted for the use of any IJG author's name or company name * in advertising or publicity relating to this software or products derived from * it. This software may be referred to only as "the Independent JPEG Group's * software". - * + * * We specifically permit and encourage the use of this software as the basis of * commercial products, provided that all warranty or liability claims are * assumed by the product vendor. @@ -80,7 +80,7 @@ #define DEQUANTIZE(coef,quantval) (((FAST_FLOAT) (coef)) * (quantval)) -#if defined(__GNUC__) && defined(__i686__) || defined(__x86_64__) +#if defined(__GNUC__) && defined(__i686__) || defined(__x86_64__) static inline unsigned char descale_and_clamp(int x, int shift) { @@ -89,9 +89,9 @@ static inline unsigned char descale_and_clamp(int x, int shift) "\tsar %2,%1\n" "\tsub $-128,%1\n" "\tcmovl %5,%1\n" /* Use the sub to compare to 0 */ - "\tcmpl %4,%1\n" + "\tcmpl %4,%1\n" "\tcmovg %4,%1\n" - : "=r"(x) + : "=r"(x) : "0"(x), "i"(shift), "i"(1UL<<(shift-1)), "r" (0xff), "r" (0) ); return x; @@ -110,7 +110,7 @@ static inline unsigned char descale_and_clamp(int x, int shift) return 255; else if (x<0) return 0; - else + else return x; } #endif @@ -146,14 +146,14 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) * With typical images and quantization tables, half or more of the * column DCT calculations can be simplified this way. */ - + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && inptr[DCTSIZE*7] == 0) { /* AC terms all zero */ FAST_FLOAT dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - + wsptr[DCTSIZE*0] = dcval; wsptr[DCTSIZE*1] = dcval; wsptr[DCTSIZE*2] = dcval; @@ -162,13 +162,13 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) wsptr[DCTSIZE*5] = dcval; wsptr[DCTSIZE*6] = dcval; wsptr[DCTSIZE*7] = dcval; - + inptr++; /* advance pointers to next column */ quantptr++; wsptr++; continue; } - + /* Even part */ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); @@ -186,7 +186,7 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) tmp3 = tmp10 - tmp13; tmp1 = tmp11 + tmp12; tmp2 = tmp11 - tmp12; - + /* Odd part */ tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); @@ -223,7 +223,7 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) quantptr++; wsptr++; } - + /* Pass 2: process rows from work array, store into output array. */ /* Note that we must descale the results by a factor of 8 == 2**3. */ @@ -235,7 +235,7 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) * the simplification applies less often (typically 5% to 10% of the time). * And testing floats for zero is relatively expensive, so we don't bother. */ - + /* Even part */ tmp10 = wsptr[0] + wsptr[4]; @@ -278,9 +278,8 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) outptr[4] = descale_and_clamp(tmp3 + tmp4, 3); outptr[3] = descale_and_clamp(tmp3 - tmp4, 3); - + wsptr += DCTSIZE; /* advance pointer to next row */ outptr += stride; } } - diff --git a/com32/lib/jpeg/rgb24.c b/com32/lib/jpeg/rgb24.c index d3ee07a8..e37cc77d 100644 --- a/com32/lib/jpeg/rgb24.c +++ b/com32/lib/jpeg/rgb24.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51,7 +51,7 @@ * R = Y + 1.40200 * Cr * G = Y - 0.34414 * Cb - 0.71414 * Cr * B = Y + 1.77200 * Cb - * + * ******************************************************************************/ static unsigned char clamp(int i) { @@ -61,7 +61,7 @@ static unsigned char clamp(int i) return 255; else return i; -} +} /** * YCrCb -> RGB24 (1x1) diff --git a/com32/lib/jpeg/rgba32.c b/com32/lib/jpeg/rgba32.c index 2ad91125..5fcbe992 100644 --- a/com32/lib/jpeg/rgba32.c +++ b/com32/lib/jpeg/rgba32.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51,7 +51,7 @@ * R = Y + 1.40200 * Cr * G = Y - 0.34414 * Cb - 0.71414 * Cr * B = Y + 1.77200 * Cb - * + * ******************************************************************************/ static unsigned char clamp(int i) { @@ -61,7 +61,7 @@ static unsigned char clamp(int i) return 255; else return i; -} +} /** * YCrCb -> RGBA32 (1x1) diff --git a/com32/lib/jpeg/tinyjpeg-internal.h b/com32/lib/jpeg/tinyjpeg-internal.h index a4145817..78cb0421 100644 --- a/com32/lib/jpeg/tinyjpeg-internal.h +++ b/com32/lib/jpeg/tinyjpeg-internal.h @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51,13 +51,13 @@ struct huffman_table short int lookup[HUFFMAN_HASH_SIZE]; /* code size: give the number of bits of a symbol is encoded */ unsigned char code_size[HUFFMAN_HASH_SIZE]; - /* some place to store value that is not encoded in the lookup table + /* some place to store value that is not encoded in the lookup table * FIXME: Calculate if 256 value is enough to store all values */ uint16_t slowtable[16-HUFFMAN_HASH_NBITS][256]; }; -struct component +struct component { unsigned int Hfactor; unsigned int Vfactor; @@ -175,13 +175,12 @@ static void print_next_16bytes(int offset, const unsigned char *stream) { trace("%4.4x: %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n", offset, - stream[0], stream[1], stream[2], stream[3], + stream[0], stream[1], stream[2], stream[3], stream[4], stream[5], stream[6], stream[7], - stream[8], stream[9], stream[10], stream[11], + stream[8], stream[9], stream[10], stream[11], stream[12], stream[13], stream[14], stream[15]); } #endif #endif - diff --git a/com32/lib/jpeg/tinyjpeg.c b/com32/lib/jpeg/tinyjpeg.c index a93a5125..f8e881f0 100644 --- a/com32/lib/jpeg/tinyjpeg.c +++ b/com32/lib/jpeg/tinyjpeg.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -42,7 +42,7 @@ /* Global variable to return the last error found while deconding */ static char error_string[256]; -static const unsigned char zigzag[64] = +static const unsigned char zigzag[64] = { 0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, @@ -57,26 +57,26 @@ static const unsigned char zigzag[64] = /* Set up the standard Huffman tables (cf. JPEG standard section K.3) */ /* IMPORTANT: these are only valid for 8-bit data precision! */ static const unsigned char bits_dc_luminance[17] = -{ - 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 +{ + 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; static const unsigned char val_dc_luminance[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; - + static const unsigned char bits_dc_chrominance[17] = { - 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 + 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; -static const unsigned char val_dc_chrominance[] = +static const unsigned char val_dc_chrominance[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; - + static const unsigned char bits_ac_luminance[17] = { - 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d + 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d }; static const unsigned char val_ac_luminance[] = { @@ -104,8 +104,8 @@ static const unsigned char val_ac_luminance[] = }; static const unsigned char bits_ac_chrominance[17] = -{ - 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 +{ + 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 }; static const unsigned char val_ac_chrominance[] = @@ -145,7 +145,7 @@ static const unsigned char val_ac_chrominance[] = * bits. * look_nbits: read nbits from the stream without marking as read. * skip_nbits: read nbits from the stream but do not return the result. - * + * * stream: current pointer in the jpeg data (read bytes per bytes) * nbits_in_reservoir: number of bits filled into the reservoir * reservoir: register that contains bits information. Only nbits_in_reservoir @@ -216,7 +216,7 @@ static int get_next_huffman_code(struct jdec_private *priv, struct huffman_table look_nbits(priv->reservoir, priv->nbits_in_reservoir, priv->stream, HUFFMAN_HASH_NBITS, hcode); value = huffman_table->lookup[hcode]; if (value>=0) - { + { int code_size = huffman_table->code_size[value]; skip_nbits(priv->reservoir, priv->nbits_in_reservoir, priv->stream, code_size); return value; @@ -303,7 +303,7 @@ void tinyjpeg_process_Huffman_data_unit(struct jdec_private *priv, int component /* * Takes two array of bits, and build the huffman table for size, and code - * + * * lookup will return the symbol if the code is less or equal than HUFFMAN_HASH_NBITS. * code_size will be used to known how many bits this symbol is encoded. * slowtable will be used when the first lookup didn't give the result. @@ -316,7 +316,7 @@ static void build_huffman_table(const unsigned char *bits, const unsigned char * int next_free_entry; /* - * Build a temp array + * Build a temp array * huffsize[X] => numbers of bits to write vals[X] */ hz = huffsize; @@ -365,7 +365,7 @@ static void build_huffman_table(const unsigned char *bits, const unsigned char * { /* * Good: val can be put in the lookup table, so fill all value of this - * column with value val + * column with value val */ int repeat = 1UL<<(HUFFMAN_HASH_NBITS - code_size); code <<= HUFFMAN_HASH_NBITS - code_size; @@ -391,7 +391,7 @@ static void build_huffman_table(const unsigned char *bits, const unsigned char * static void build_default_huffman_tables(struct jdec_private *priv) { - if ( (priv->flags & TINYJPEG_FLAGS_MJPEG_TABLE) + if ( (priv->flags & TINYJPEG_FLAGS_MJPEG_TABLE) && priv->default_huffman_table_initialized) return; @@ -418,7 +418,7 @@ static void build_default_huffman_tables(struct jdec_private *priv) * R = Y + 1.40200 * Cr * G = Y - 0.34414 * Cb - 0.71414 * Cr * B = Y + 1.77200 * Cb - * + * ******************************************************************************/ static void print_SOF(const unsigned char *stream) @@ -440,7 +440,7 @@ static void print_SOF(const unsigned char *stream) nr_components = stream[7]; trace("> SOF marker\n"); - trace("Size:%dx%d nr_components:%d (%s) precision:%d\n", + trace("Size:%dx%d nr_components:%d (%s) precision:%d\n", width, height, nr_components, nr_components_to_string[nr_components], precision); @@ -696,7 +696,7 @@ static int parse_JFIF(struct jdec_private *priv, const unsigned char *stream) if ( (priv->component_infos[cY].Vfactor < priv->component_infos[cCb].Vfactor) || (priv->component_infos[cY].Vfactor < priv->component_infos[cCr].Vfactor)) error("Vertical sampling factor for Y should be greater than vertical sampling factor for Cb or Cr\n"); - if ( (priv->component_infos[cCb].Hfactor!=1) + if ( (priv->component_infos[cCb].Hfactor!=1) || (priv->component_infos[cCr].Hfactor!=1) || (priv->component_infos[cCb].Vfactor!=1) || (priv->component_infos[cCr].Vfactor!=1)) @@ -728,7 +728,7 @@ bogus_jpeg_format: struct jdec_private *tinyjpeg_init(void) { struct jdec_private *priv; - + priv = (struct jdec_private *)calloc(1, sizeof(struct jdec_private)); if (priv == NULL) return NULL; @@ -888,7 +888,7 @@ int tinyjpeg_get_bytes_per_row(struct jdec_private *priv, for (i=0; i<ncomponents; i++) bytes[i] = priv->bytes_per_row[i]; return 0; -} +} int tinyjpeg_set_bytes_per_row(struct jdec_private *priv, const unsigned int *bytes, @@ -900,7 +900,7 @@ int tinyjpeg_set_bytes_per_row(struct jdec_private *priv, for (i=0; i<ncomponents; i++) priv->bytes_per_row[i] = bytes[i]; return 0; -} +} int tinyjpeg_set_flags(struct jdec_private *priv, int flags) { diff --git a/com32/lib/jpeg/yuv420p.c b/com32/lib/jpeg/yuv420p.c index 6d2bd056..0c5edf7c 100644 --- a/com32/lib/jpeg/yuv420p.c +++ b/com32/lib/jpeg/yuv420p.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE diff --git a/com32/lib/math/strtod.c b/com32/lib/math/strtod.c index 7289f90b..2624538e 100644 --- a/com32/lib/math/strtod.c +++ b/com32/lib/math/strtod.c @@ -1,7 +1,7 @@ /* * strtod.c * - * Convert string to double + * Convert string to double * * Copyright (C) 2002 Michael Ringgaard. All rights reserved. * Copyright (C) 2006-2007 H. Peter Anvin. @@ -9,16 +9,16 @@ * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * + * without specific prior written permission. + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS @@ -61,8 +61,8 @@ double strtod(const char *str, char **endptr) // Handle optional sign negative = 0; - switch (*p) - { + switch (*p) + { case '-': negative = 1; // Fall through to increment position case '+': p++; } @@ -81,7 +81,7 @@ double strtod(const char *str, char **endptr) } // Process decimal part - if (*p == '.') + if (*p == '.') { p++; @@ -106,25 +106,25 @@ double strtod(const char *str, char **endptr) if (negative) number = -number; // Process an exponent string - if (*p == 'e' || *p == 'E') + if (*p == 'e' || *p == 'E') { // Handle optional sign negative = 0; - switch(*++p) - { + switch(*++p) + { case '-': negative = 1; // Fall through to increment pos case '+': p++; } // Process string of digits n = 0; - while (isdigit(*p)) - { + while (isdigit(*p)) + { n = n * 10 + (*p - '0'); p++; } - if (negative) + if (negative) exponent -= n; else exponent += n; @@ -141,9 +141,9 @@ double strtod(const char *str, char **endptr) p10 = 10.; n = exponent; if (n < 0) n = -n; - while (n) + while (n) { - if (n & 1) + if (n & 1) { if (exponent < 0) number /= p10; @@ -159,4 +159,3 @@ double strtod(const char *str, char **endptr) return number; } - diff --git a/com32/lib/sys/ansicon_write.c b/com32/lib/sys/ansicon_write.c index c500adbc..4f8eaee0 100644 --- a/com32/lib/sys/ansicon_write.c +++ b/com32/lib/sys/ansicon_write.c @@ -50,7 +50,7 @@ static void ansicon_set_cursor(int, int, int); static struct term_state ts; struct ansi_ops __ansicon_ops = { .erase = ansicon_erase, - .write_char = ansicon_write_char, + .write_char = ansicon_write_char, .showcursor = ansicon_showcursor, .set_cursor = ansicon_set_cursor, .scroll_up = ansicon_scroll_up, diff --git a/com32/lib/sys/vesa/alphatbl.pl b/com32/lib/sys/vesa/alphatbl.pl index dd716482..d70c76eb 100644 --- a/com32/lib/sys/vesa/alphatbl.pl +++ b/com32/lib/sys/vesa/alphatbl.pl @@ -51,4 +51,3 @@ for ($i = 0; $i <= 4079; $i++) { printf "\t%3d,\n", linear_to_srgb(($i+0.5)/4079.937744); } print "};\n\n"; - diff --git a/com32/lib/sys/vesa/background.c b/com32/lib/sys/vesa/background.c index ed0ab24d..29c22750 100644 --- a/com32/lib/sys/vesa/background.c +++ b/com32/lib/sys/vesa/background.c @@ -62,7 +62,7 @@ static void draw_background_line(int line, int start, int npixels) lbp = line_buf; while (npixels--) lbp = format_pixel(lbp, *bgptr++, pixel_format); - + memcpy(fbptr, line_buf, lbp-line_buf); } @@ -73,10 +73,10 @@ static void draw_background(void) const int bottom_border = VIDEO_BORDER + (TEXT_PIXEL_ROWS % __vesacon_font_height); const int right_border = VIDEO_BORDER + (TEXT_PIXEL_COLS % FONT_WIDTH); - + for (i = 0; i < VIDEO_BORDER; i++) draw_background_line(i, 0, VIDEO_X_SIZE); - + for (i = VIDEO_BORDER; i < VIDEO_Y_SIZE-bottom_border; i++) { draw_background_line(i, 0, VIDEO_BORDER); draw_background_line(i, VIDEO_X_SIZE-right_border, right_border); @@ -271,13 +271,13 @@ int vesacon_load_background(const char *filename) default_background(); } else { fp = fopen(filename, "r"); - + if (!fp) goto err; - + if (fread(header, 1, 8, fp) != 8) goto err; - + if (!png_sig_cmp(header, 0, 8)) { rv = read_png_file(fp); } else if (!jpeg_sig_cmp(header, 8)) { diff --git a/com32/lib/sys/vesa/drawtxt.c b/com32/lib/sys/vesa/drawtxt.c index a4efb86e..b27ce4b3 100644 --- a/com32/lib/sys/vesa/drawtxt.c +++ b/com32/lib/sys/vesa/drawtxt.c @@ -53,7 +53,7 @@ static inline __attribute__((always_inline)) tmp = __vesacon_srgb_to_linear[fg] * alpha; tmp += __vesacon_srgb_to_linear[bg] * (255-alpha); - + return __vesacon_linear_to_srgb[tmp >> 12]; } @@ -87,9 +87,9 @@ static void vesacon_update_characters(int row, int col, int nrows, int ncols) uint8_t row_buffer[VIDEO_X_SIZE*4], *rowbufptr; uint8_t *fbrowptr; uint8_t sha; - + bgrowptr = &__vesacon_background[row*height+VIDEO_BORDER][col*width+VIDEO_BORDER]; - + pixel_offset = ((row*height+VIDEO_BORDER)*VIDEO_X_SIZE)+ (col*width+VIDEO_BORDER); diff --git a/com32/lib/sys/vesa/fill.h b/com32/lib/sys/vesa/fill.h index 379852eb..6a350125 100644 --- a/com32/lib/sys/vesa/fill.h +++ b/com32/lib/sys/vesa/fill.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2006 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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/vesa/fmtpixel.h b/com32/lib/sys/vesa/fmtpixel.h index b1d9fa50..33cc30a5 100644 --- a/com32/lib/sys/vesa/fmtpixel.h +++ b/com32/lib/sys/vesa/fmtpixel.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2006 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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 @@ -53,7 +53,7 @@ static inline __attribute__((always_inline)) *(uint32_t *)ptr = bgra; ptr = (uint8_t *)ptr + 3; break; - + case PXF_LE_RGB16_565: { uint16_t pxv = diff --git a/com32/lib/sys/vesa/initvesa.c b/com32/lib/sys/vesa/initvesa.c index febb5804..c70f1cdb 100644 --- a/com32/lib/sys/vesa/initvesa.c +++ b/com32/lib/sys/vesa/initvesa.c @@ -152,7 +152,7 @@ static int vesacon_set_mode(void) mi->rpos, mi->gpos, mi->bpos); /* Must be an LFB color graphics mode supported by the hardware. - + The bits tested are: 7 - linear frame buffer available 4 - graphics mode @@ -171,7 +171,7 @@ static int vesacon_set_mode(void) (depending on VESA version ) */ pxf = PXF_NONE; /* Not usable */ - if (mi->bpp == 32 && + if (mi->bpp == 32 && (mi->memory_layout == 4 || (mi->memory_layout == 6 && mi->rpos == 16 && mi->gpos == 8 && mi->bpos == 0))) diff --git a/com32/lib/sys/vesacon_write.c b/com32/lib/sys/vesacon_write.c index 87f70666..2a9c61d3 100644 --- a/com32/lib/sys/vesacon_write.c +++ b/com32/lib/sys/vesacon_write.c @@ -51,7 +51,7 @@ static void vesacon_scroll_up(const struct term_state *); static struct term_state ts; static struct ansi_ops op = { .erase = vesacon_erase, - .write_char = vesacon_write_char, + .write_char = vesacon_write_char, .showcursor = vesacon_showcursor, .set_cursor = __vesacon_set_cursor, /* in drawtxt.c */ .scroll_up = vesacon_scroll_up, diff --git a/com32/lib/syslinux/addlist.c b/com32/lib/syslinux/addlist.c index faa80c1d..fbb166c2 100644 --- a/com32/lib/syslinux/addlist.c +++ b/com32/lib/syslinux/addlist.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2007 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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/syslinux/dump_mmap.c b/com32/lib/syslinux/dump_mmap.c index b25b33f2..cdd5daea 100644 --- a/com32/lib/syslinux/dump_mmap.c +++ b/com32/lib/syslinux/dump_mmap.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2007 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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/syslinux/dump_movelist.c b/com32/lib/syslinux/dump_movelist.c index b4ff4230..0723dcd1 100644 --- a/com32/lib/syslinux/dump_movelist.c +++ b/com32/lib/syslinux/dump_movelist.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2007 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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 @@ -45,4 +45,3 @@ void syslinux_dump_movelist(FILE *file, struct syslinux_movelist *ml) ml = ml->next; } } - diff --git a/com32/lib/syslinux/freelist.c b/com32/lib/syslinux/freelist.c index b37dc6e4..ebbe2617 100644 --- a/com32/lib/syslinux/freelist.c +++ b/com32/lib/syslinux/freelist.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2007 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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/syslinux/memmap.c b/com32/lib/syslinux/memmap.c index 45a5efd9..e0a435b7 100644 --- a/com32/lib/syslinux/memmap.c +++ b/com32/lib/syslinux/memmap.c @@ -101,18 +101,18 @@ struct syslinux_memmap *syslinux_memory_map(void) len = 0; start = 0x100000ULL; } - + maxlen = 0x100000000ULL-start; if (len > maxlen) len = maxlen; - + if (len) { if (syslinux_add_memmap(&mmap, (addr_t)start, (addr_t)len, type)) goto bail; memfound = 1; } } - + ireg.ebx.l = oreg.ebx.l; } while (oreg.ebx.l); @@ -144,7 +144,7 @@ struct syslinux_memmap *syslinux_memory_map(void) SMT_FREE)) goto bail; } - + return mmap; bail: diff --git a/com32/lib/syslinux/movebits.c b/com32/lib/syslinux/movebits.c index 17e0adea..9287758c 100644 --- a/com32/lib/syslinux/movebits.c +++ b/com32/lib/syslinux/movebits.c @@ -347,7 +347,7 @@ syslinux_compute_movelist(struct syslinux_movelist **moves, Then move a chunk of ourselves into place. */ for ( op = &f->next, o = *op ; o ; op = &o->next, o = *op ) { - dprintf("O: 0x%08x bytes at 0x%08x -> 0x%08x\n", + dprintf("O: 0x%08x bytes at 0x%08x -> 0x%08x\n", o->len, o->src, o->dst); if ( !(o->src <= needbase && o->src+o->len > needbase) ) @@ -438,7 +438,7 @@ syslinux_compute_movelist(struct syslinux_movelist **moves, } rv = 0; - bail: + bail: if (mmap) syslinux_free_memmap(mmap); return rv; diff --git a/com32/lib/syslinux/shuffle.c b/com32/lib/syslinux/shuffle.c index 22719544..47ef51cb 100644 --- a/com32/lib/syslinux/shuffle.c +++ b/com32/lib/syslinux/shuffle.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2007 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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 syslinux_prepare_shuffle(struct syslinux_movelist *fraglist, for (mp = moves; mp; mp = mp->next) { if (np >= 65536/12) goto bail; /* Way too many descriptors... */ - + dp->dst = mp->dst; dp->src = mp->src; dp->len = mp->len; @@ -89,4 +89,3 @@ int syslinux_prepare_shuffle(struct syslinux_movelist *fraglist, return rv; } - diff --git a/com32/lib/syslinux/shuffle_pm.c b/com32/lib/syslinux/shuffle_pm.c index c49ff917..ed1a97a0 100644 --- a/com32/lib/syslinux/shuffle_pm.c +++ b/com32/lib/syslinux/shuffle_pm.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2007 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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,12 +50,12 @@ int syslinux_shuffle_boot_pm(struct syslinux_movelist *fraglist, nd = syslinux_prepare_shuffle(fraglist, memmap); if (nd < 0) return -1; - + regbuf = (char *)__com32.cs_bounce + (12*nd); memcpy(regbuf, regs, sizeof(*regs)); memset(&ireg, 0, sizeof ireg); - + ireg.eax.w[0] = 0x001a; ireg.edx.w[0] = bootflags; ireg.es = SEG(__com32.cs_bounce); diff --git a/com32/lib/syslinux/shuffle_rm.c b/com32/lib/syslinux/shuffle_rm.c index e87028aa..31e88277 100644 --- a/com32/lib/syslinux/shuffle_rm.c +++ b/com32/lib/syslinux/shuffle_rm.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2007 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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,12 +50,12 @@ int syslinux_shuffle_boot_rm(struct syslinux_movelist *fraglist, nd = syslinux_prepare_shuffle(fraglist, memmap); if (nd < 0) return -1; - + regbuf = (char *)__com32.cs_bounce + (12*nd); memcpy(regbuf, regs, sizeof(*regs)); memset(&ireg, 0, sizeof ireg); - + ireg.eax.w[0] = 0x001b; ireg.edx.w[0] = bootflags; ireg.es = SEG(__com32.cs_bounce); diff --git a/com32/lib/syslinux/zonelist.c b/com32/lib/syslinux/zonelist.c index c6948001..a4c42ed0 100644 --- a/com32/lib/syslinux/zonelist.c +++ b/com32/lib/syslinux/zonelist.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2007 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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 @@ -188,7 +188,7 @@ int syslinux_memmap_largest(struct syslinux_memmap *list, best = list; best_size = size; } - + list = list->next; } @@ -222,7 +222,7 @@ struct syslinux_memmap *syslinux_dup_memmap(struct syslinux_memmap *list) { struct syslinux_memmap *newlist = NULL, **nlp = &newlist; struct syslinux_memmap *ml; - + while (list) { ml = malloc(sizeof(*ml)); if (!ml) { @@ -234,7 +234,7 @@ struct syslinux_memmap *syslinux_dup_memmap(struct syslinux_memmap *list) ml->next = NULL; *nlp = ml; nlp = &ml->next; - + list = list->next; } diff --git a/com32/lib/vsnprintf.c b/com32/lib/vsnprintf.c index 8279d7a8..80280059 100644 --- a/com32/lib/vsnprintf.c +++ b/com32/lib/vsnprintf.c @@ -27,7 +27,7 @@ enum flags { enum ranks { rank_char = -2, rank_short = -1, - rank_int = 0, + rank_int = 0, rank_long = 1, rank_longlong = 2 }; diff --git a/com32/lib/vsscanf.c b/com32/lib/vsscanf.c index 1882765d..06156790 100644 --- a/com32/lib/vsscanf.c +++ b/com32/lib/vsscanf.c @@ -27,7 +27,7 @@ enum flags { enum ranks { rank_char = -2, rank_short = -1, - rank_int = 0, + rank_int = 0, rank_long = 1, rank_longlong = 2, rank_ptr = INT_MAX /* Special value used for pointers */ diff --git a/com32/modules/Makefile b/com32/modules/Makefile index 1f5643e3..19fb3b33 100644 --- a/com32/modules/Makefile +++ b/com32/modules/Makefile @@ -31,7 +31,7 @@ LNXLDFLAGS = -g SFLAGS = -D__COM32__ -march=i386 LDFLAGS = -T ../lib/com32.ld OBJCOPY = objcopy -PPMTOLSS16 = ../ppmtolss16 +PPMTOLSS16 = ../ppmtolss16 LIBGCC := $(shell $(CC) --print-libgcc) LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC) LNXLIBS = ../libutil/libutil_lnx.a @@ -46,7 +46,7 @@ COM32DIR = $(AUXDIR)/com32 MODULES = chain.c32 menu.c32 vesamenu.c32 ethersel.c32 mboot.c32 \ dmitest.c32 cpuidtest.c32 pcitest.c32 elf.c32 -TESTFILES = +TESTFILES = all: $(MODULES) $(TESTFILES) diff --git a/com32/modules/cpuid.c b/com32/modules/cpuid.c index acb18bf5..00f810e8 100644 --- a/com32/modules/cpuid.c +++ b/com32/modules/cpuid.c @@ -183,7 +183,7 @@ void generic_identify(struct cpuinfo_x86 *c) { u32 tfms, xlvl; int junk; - /* Get vendor name */ + /* Get vendor name */ cpuid(0x00000000, &c->cpuid_level, (int *)&c->x86_vendor_id[0], (int *)&c->x86_vendor_id[8], diff --git a/com32/modules/cpuidtest.c b/com32/modules/cpuidtest.c index ce96d681..ed340bfd 100644 --- a/com32/modules/cpuidtest.c +++ b/com32/modules/cpuidtest.c @@ -29,13 +29,13 @@ int main(void) openconsole(&dev_stdcon_r, &dev_stdcon_w); for (;;) { - detect_cpu(&cpu); - printf("Vendor = %s\n",cpu.vendor); - printf("Model = %s\n",cpu.model); - printf("Vendor ID = %d\n",cpu.vendor_id); - printf("Family = %d\n",cpu.family); - printf("Model ID = %d\n",cpu.model_id); - printf("Stepping = %d\n",cpu.stepping); + detect_cpu(&cpu); + printf("Vendor = %s\n",cpu.vendor); + printf("Model = %s\n",cpu.model); + printf("Vendor ID = %d\n",cpu.vendor_id); + printf("Family = %d\n",cpu.family); + printf("Model ID = %d\n",cpu.model_id); + printf("Stepping = %d\n",cpu.stepping); printf("Flags = "); if (cpu.flags.fpu) printf("fpu "); if (cpu.flags.vme) printf("vme "); @@ -74,7 +74,7 @@ int main(void) printf("\n"); printf("SMP = "); if (cpu.flags.smp) printf("yes\n"); - else printf("no\n"); + else printf("no\n"); break; } diff --git a/com32/modules/elf.c b/com32/modules/elf.c index bdbf6e5d..3fb1ad6f 100644 --- a/com32/modules/elf.c +++ b/com32/modules/elf.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- * - * + * * Copyright 2007 H. Peter Anvin - All Rights Reserved * * Permission is hereby granted, free of charge, to any person @@ -10,10 +10,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 @@ -208,7 +208,7 @@ int boot_elf(void *ptr, size_t len, char **argv) spp = (uint32_t *)stack_frame; sfp = stack_frame + argc*sizeof(char *) + 5*sizeof(long); sfa = stack_pointer + argc*sizeof(char *) + 5*sizeof(long); - + *spp++ = argc; for (argp = argv; *argp; argp++) { int bytes = strlen(*argp) + 1; /* Including final null */ @@ -218,7 +218,7 @@ int boot_elf(void *ptr, size_t len, char **argv) sfa += bytes; } /* Zero fields are aready taken care of by calloc() */ - + /* ... and we'll want to move it into the right place... */ #if DEBUG if (syslinux_memmap_type(amap, stack_pointer, stack_frame_size) diff --git a/com32/modules/menumain.c b/com32/modules/menumain.c index 342e587c..32c760fe 100644 --- a/com32/modules/menumain.c +++ b/com32/modules/menumain.c @@ -400,7 +400,7 @@ draw_menu(int sel, int top, int edit_line) tabmsg = messages[MSG_TAB].msg; else tabmsg = messages[MSG_NOTAB].msg; - + printf("\1#08\033[%d;1H%s", TABMSG_ROW, pad_line(tabmsg, 1, WIDTH)); printf("\1#00\033[%d;1H", END_ROW); } diff --git a/com32/modules/pcitest.c b/com32/modules/pcitest.c index 2b0b6be2..614c89d1 100644 --- a/com32/modules/pcitest.c +++ b/com32/modules/pcitest.c @@ -37,7 +37,7 @@ void display_pci_devices(s_pci_device_list *pci_device_list) { int pci_dev; for (pci_dev=0; pci_dev<pci_device_list->count;pci_dev++) { s_pci_device *pci_device = &pci_device_list->pci_device[pci_dev]; - printf("PCI: Vendor=%04x Product=%04x Sub_vendor=%04x Sub_Product=%04x Release=%02x\n",pci_device->vendor,pci_device->product,pci_device->sub_vendor,pci_device->sub_product,pci_device->revision); + printf("PCI: Vendor=%04x Product=%04x Sub_vendor=%04x Sub_Product=%04x Release=%02x\n",pci_device->vendor,pci_device->product,pci_device->sub_vendor,pci_device->sub_product,pci_device->revision); } printf("PCI: %d devices found\n",pci_device_list->count); } @@ -51,7 +51,7 @@ void display_pci_bus(s_pci_bus_list *pci_bus_list, bool display_pci_devices) { int pci_dev; for (pci_dev=0;pci_dev<pci_bus.pci_device_count;pci_dev++) { s_pci_device pci_device=*(pci_bus.pci_device[pci_dev]); - printf("%s:%s#(%04x:%04x[%04x:%04x])\n",pci_device.vendor_name,pci_device.product_name,pci_device.vendor,pci_device.product,pci_device.sub_vendor,pci_device.sub_product); + printf("%s:%s#(%04x:%04x[%04x:%04x])\n",pci_device.vendor_name,pci_device.product_name,pci_device.vendor,pci_device.product,pci_device.sub_vendor,pci_device.sub_product); } } } diff --git a/com32/modules/readconfig.c b/com32/modules/readconfig.c index cf180bd9..12ea76cd 100644 --- a/com32/modules/readconfig.c +++ b/com32/modules/readconfig.c @@ -45,7 +45,7 @@ struct menu_entry *menu_hotkeys[256]; struct messages messages[MSG_COUNT] = { [MSG_TITLE] = { "title", "", NULL }, - [MSG_AUTOBOOT] = + [MSG_AUTOBOOT] = { "autoboot", "Automatic boot in # seconds", NULL }, [MSG_TAB] = { "tabmsg", "Press [Tab] to edit options", NULL }, @@ -555,10 +555,10 @@ static void parse_config_file(FILE *f) int xlen; p = skipspace(p+4); - + if (looking_at(p, "help")) cmd = TEXT_HELP; - + while ( fgets(line, sizeof line, f) ) { p = skipspace(line); if (looking_at(p, "endtext")) diff --git a/com32/samples/Makefile b/com32/samples/Makefile index 291413a6..b694a489 100644 --- a/com32/samples/Makefile +++ b/com32/samples/Makefile @@ -31,14 +31,14 @@ LNXLDFLAGS = -g SFLAGS = -D__COM32__ -march=i386 LDFLAGS = -T ../lib/com32.ld OBJCOPY = objcopy -PPMTOLSS16 = ../ppmtolss16 +PPMTOLSS16 = ../ppmtolss16 LIBGCC := $(shell $(CC) --print-libgcc) LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC) LNXLIBS = ../libutil/libutil_lnx.a .SUFFIXES: .lss .c .o .elf .c32 .lnx -all: hello.c32 cat.c32 resolv.c32 vesainfo.c32 \ +all: hello.c32 cat.c32 resolv.c32 vesainfo.c32 \ fancyhello.c32 fancyhello.lnx \ keytest.c32 keytest.lnx \ |