From 64d7ea7b604c2ca9ab8f7236374b3a1c05005e55 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 14 Mar 2007 22:07:09 -0700 Subject: [PATCH] Stealth whitespace cleanup (automated) --- bcopy32.inc | 6 ++-- com32/include/assert.h | 1 - com32/include/bitsize/stdint.h | 4 +-- com32/include/colortbl.h | 6 ++-- com32/include/dmi/dmi.h | 2 +- com32/include/dmi/dmi_base_board.h | 10 +++--- com32/include/dmi/dmi_bios.h | 18 +++++----- com32/include/dmi/dmi_chassis.h | 48 +++++++++++++------------- com32/include/dmi/dmi_processor.h | 38 ++++++++++----------- com32/include/dmi/dmi_system.h | 28 +++++++-------- com32/include/sys/elfcommon.h | 70 +++++++++++++++++++------------------- com32/include/sys/pci.h | 2 +- com32/include/sys/times.h | 2 +- com32/include/syslinux/bootpm.h | 7 ++-- com32/include/syslinux/bootrm.h | 7 ++-- com32/include/tinyjpeg.h | 7 ++-- com32/lib/Makefile | 18 +++++----- com32/lib/jpeg/bgr24.c | 8 ++--- com32/lib/jpeg/bgra32.c | 8 ++--- com32/lib/jpeg/decode1.c | 6 ++-- com32/lib/jpeg/decode3.c | 8 ++--- com32/lib/jpeg/grey.c | 4 +-- com32/lib/jpeg/jidctflt.c | 33 +++++++++--------- com32/lib/jpeg/rgb24.c | 8 ++--- com32/lib/jpeg/rgba32.c | 8 ++--- com32/lib/jpeg/tinyjpeg-internal.h | 13 ++++--- com32/lib/jpeg/tinyjpeg.c | 52 ++++++++++++++-------------- com32/lib/jpeg/yuv420p.c | 4 +-- com32/lib/math/strtod.c | 37 ++++++++++---------- com32/lib/sys/ansicon_write.c | 2 +- com32/lib/sys/vesa/alphatbl.pl | 1 - com32/lib/sys/vesa/background.c | 12 +++---- com32/lib/sys/vesa/drawtxt.c | 6 ++-- com32/lib/sys/vesa/fill.h | 6 ++-- com32/lib/sys/vesa/fmtpixel.h | 8 ++--- com32/lib/sys/vesa/initvesa.c | 4 +-- com32/lib/sys/vesacon_write.c | 2 +- com32/lib/syslinux/addlist.c | 6 ++-- com32/lib/syslinux/dump_mmap.c | 6 ++-- com32/lib/syslinux/dump_movelist.c | 7 ++-- com32/lib/syslinux/freelist.c | 6 ++-- com32/lib/syslinux/memmap.c | 8 ++--- com32/lib/syslinux/movebits.c | 4 +-- com32/lib/syslinux/shuffle.c | 9 +++-- com32/lib/syslinux/shuffle_pm.c | 10 +++--- com32/lib/syslinux/shuffle_rm.c | 10 +++--- com32/lib/syslinux/zonelist.c | 12 +++---- com32/lib/vsnprintf.c | 2 +- com32/lib/vsscanf.c | 2 +- com32/modules/Makefile | 4 +-- com32/modules/cpuid.c | 2 +- com32/modules/cpuidtest.c | 16 ++++----- com32/modules/elf.c | 10 +++--- com32/modules/menumain.c | 2 +- com32/modules/pcitest.c | 4 +-- com32/modules/readconfig.c | 6 ++-- com32/samples/Makefile | 4 +-- comboot.doc | 8 ++--- comboot.inc | 2 +- dos/syslinux.c | 6 ++-- extlinux.asm | 6 ++-- extlinux/ext2_fs.h | 26 +++++++------- extlinux/extlinux.c | 2 +- font.inc | 2 +- getc.inc | 2 +- isolinux.asm | 36 ++++++++++---------- keywords.inc | 16 ++++----- ldlinux.asm | 14 ++++---- mbr/Makefile | 2 +- mbr/checksize.pl | 3 +- mbr/mbr.S | 22 ++++++------ memdisk/memdisk.asm | 2 +- memdisk/memdisk16.asm | 2 +- memdisk/setup.c | 2 +- menu/libmenu/des.c | 18 +++++----- parseconfig.inc | 6 ++-- ppmtolss16 | 2 +- pxelinux.asm | 6 ++-- pxelinux.doc | 18 +++++----- rllpack.inc | 2 +- runkernel.inc | 10 +++--- sample/Makefile | 2 +- sample/sample.msg | 2 -- stack.inc | 2 +- syslinux.doc | 2 +- syslinux.spec.in | 4 +-- ui.inc | 4 +-- unix/syslinux.c | 24 ++++++------- win32/Makefile | 2 +- win32/syslinux.c | 4 +-- 90 files changed, 440 insertions(+), 455 deletions(-) diff --git a/bcopy32.inc b/bcopy32.inc index 36af62e..b8e1a5b 100644 --- a/bcopy32.inc +++ b/bcopy32.inc @@ -191,7 +191,7 @@ bcopy: push eax ; %define io_delay call _io_delay %define IO_DELAY_PORT 80h ; Invalid port (we hope!) -%define disable_wait 32 ; How long to wait for a disable +%define disable_wait 32 ; How long to wait for a disable ; Note the skip of 2 here %define A20_DUNNO 0 ; A20 type unknown @@ -442,8 +442,8 @@ try_wbinvd: ; SS register. That is the responsibility of the caller. ; ; Inputs: -; DS:BX -> Pointer to list of (dst, src, len) pairs -; AX -> Number of list entries +; DS:BX -> Pointer to list of (dst, src, len) pairs +; AX -> Number of list entries ; [CS:EntryPoint] -> CS:IP to jump to ; On stack - initial state (fd, ad, ds, es, fs, gs) ; diff --git a/com32/include/assert.h b/com32/include/assert.h index b0eef03..b303bb9 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 40b4649..bdfe132 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 ac3f340..05add6d 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 5e72b82..ceed3b4 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 8de8adc..d6634c0 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 735647f..d9be233 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 933b80b..1456ede 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 3417720..26ac97a 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 02f2382..2729364 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 0d81db5..cc8f923 100644 --- a/com32/include/sys/elfcommon.h +++ b/com32/include/sys/elfcommon.h @@ -8,45 +8,45 @@ #include /* 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 4862cda..e471faa 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 8d03af0..dd60a3c 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 6064ea9..cfe2810 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 d7df9fa..2a3b618 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 d320f9b..e88d09a 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 158e2dc..9b6e4d2 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 3f2f4f9..ffdcbdf 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 fe6b813..7e2c72b 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 9d76a05..554f7f1 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 9e49eee..2f79ec9 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 bb55b7e..0034ce2 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 1327b82..e5e66ed 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 d3ee07a..e37cc77 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 2ad9112..5fcbe99 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 a414581..78cb042 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 a93a512..f8e881f 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; ibytes_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; ibytes_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 6d2bd05..0c5edf7 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 7289f90..2624538 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 c500adb..4f8eaee 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 dd71648..d70c76e 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 ed0ab24..29c2275 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 a4efb86..b27ce4b 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 379852e..6a35012 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 b1d9fa5..33cc30a 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 febb580..c70f1cd 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 87f7066..2a9c61d 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 faa80c1..fbb166c 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 b25b33f..cdd5dae 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 b4ff423..0723dcd 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 b37dc6e..ebbe261 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 45a5efd..e0a435b 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 17e0ade..9287758 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 2271954..47ef51c 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 c49ff91..ed1a97a 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 e87028a..31e8827 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 c694800..a4c42ed 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 8279d7a..8028005 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 1882765..0615679 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 1f5643e..19fb3b3 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 acb18bf..00f810e 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 ce96d68..ed340bf 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 bdbf6e5..3fb1ad6 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 342e587..32c760f 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 2b0b6be..614c89d 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_devcount;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 new_ldlinux_name+3) { if (!slash) diff --git a/extlinux.asm b/extlinux.asm index eb55dab..c784073 100644 --- a/extlinux.asm +++ b/extlinux.asm @@ -396,11 +396,11 @@ getlinsec_ebios: popad lea sp,[si+16] ; Remove DAPA jc .error - pop bp + pop bp add eax,edi ; Advance sector pointer sub bp,di ; Sectors left shl di,SECTOR_SHIFT ; 512-byte sectors - add bx,di ; Advance buffer pointer + add bx,di ; Advance buffer pointer and bp,bp jnz .loop @@ -518,7 +518,7 @@ disk_error: kaboom: xor si,si mov ss,si - mov sp,StackBuf-4 ; Reset stack + mov sp,StackBuf-4 ; Reset stack mov ds,si ; Reset data segment pop dword [fdctab] ; Restore FDC table .patch: ; When we have full code, intercept here diff --git a/extlinux/ext2_fs.h b/extlinux/ext2_fs.h index e0b4bbe..c0eeb7b 100644 --- a/extlinux/ext2_fs.h +++ b/extlinux/ext2_fs.h @@ -48,7 +48,7 @@ # define ext2_debug(f, a...) { \ printk ("EXT2-fs DEBUG (%s, %d): %s:", \ __FILE__, __LINE__, __FUNCTION__); \ - printk (f, ## a); \ + printk (f, ## a); \ } #else # define ext2_debug(f, a...) /**/ @@ -331,7 +331,7 @@ struct ext2_super_block { __u16 s_magic; /* Magic signature */ __u16 s_state; /* File system state */ __u16 s_errors; /* Behaviour when detecting errors */ - __u16 s_minor_rev_level; /* minor revision level */ + __u16 s_minor_rev_level; /* minor revision level */ __u32 s_lastcheck; /* time of last check */ __u32 s_checkinterval; /* max. time between checks */ __u32 s_creator_os; /* OS */ @@ -351,15 +351,15 @@ struct ext2_super_block { * feature set, it must abort and not try to meddle with * things it doesn't understand... */ - __u32 s_first_ino; /* First non-reserved inode */ - __u16 s_inode_size; /* size of inode structure */ - __u16 s_block_group_nr; /* block group # of this superblock */ - __u32 s_feature_compat; /* compatible feature set */ - __u32 s_feature_incompat; /* incompatible feature set */ - __u32 s_feature_ro_compat; /* readonly-compatible feature set */ + __u32 s_first_ino; /* First non-reserved inode */ + __u16 s_inode_size; /* size of inode structure */ + __u16 s_block_group_nr; /* block group # of this superblock */ + __u32 s_feature_compat; /* compatible feature set */ + __u32 s_feature_incompat; /* incompatible feature set */ + __u32 s_feature_ro_compat; /* readonly-compatible feature set */ __u8 s_uuid[16]; /* 128-bit uuid for volume */ - char s_volume_name[16]; /* volume name */ - char s_last_mounted[64]; /* directory where last mounted */ + char s_volume_name[16]; /* volume name */ + char s_last_mounted[64]; /* directory where last mounted */ __u32 s_algorithm_usage_bitmap; /* For compression */ /* * Performance hints. Directory preallocation should only @@ -389,7 +389,7 @@ struct ext2_super_block { * Revision levels */ #define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */ -#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */ +#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */ #define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV #define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV @@ -499,8 +499,8 @@ enum { * * NOTE: It must be a multiple of 4 */ -#define EXT2_DIR_PAD 4 -#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1) +#define EXT2_DIR_PAD 4 +#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1) #define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \ ~EXT2_DIR_ROUND) diff --git a/extlinux/extlinux.c b/extlinux/extlinux.c index 75de5b9..5ed548f 100644 --- a/extlinux/extlinux.c +++ b/extlinux/extlinux.c @@ -681,7 +681,7 @@ install_loader(const char *path, int update_only) a new device with the appropriate device type */ snprintf(devname_buf, sizeof devname_buf, "/tmp/dev-%u:%u", major(st.st_dev), minor(st.st_dev)); - + if (mknod(devname_buf, S_IFBLK|0600, st.st_dev)) { fprintf(stderr, "%s: cannot create device %s\n", program, devname); return 1; diff --git a/font.inc b/font.inc index 4eeee1d..5da4d59 100644 --- a/font.inc +++ b/font.inc @@ -55,7 +55,7 @@ loadfont: ; ; use_font: -; This routine activates whatever font happens to be in the +; This routine activates whatever font happens to be in the ; vgafontbuf, and updates the adjust_screen data. ; Must be called with CS = DS = ES ; diff --git a/getc.inc b/getc.inc index 1be5176..4b0dd47 100644 --- a/getc.inc +++ b/getc.inc @@ -239,7 +239,7 @@ unhexchar: ja .err sub al,'a'-10 ; CF <- 0 ret -.err: stc +.err: stc .ret: ret ; diff --git a/isolinux.asm b/isolinux.asm index c36c2bc..9bc1b45 100644 --- a/isolinux.asm +++ b/isolinux.asm @@ -137,7 +137,7 @@ sp_devspec: resw 1 ; IDE/SCSI information sp_buffer: resw 1 ; User-provided buffer sp_loadseg: resw 1 ; Load segment sp_sectors: resw 1 ; Sector count -sp_chs: resb 3 ; Simulated CHS geometry +sp_chs: resb 3 ; Simulated CHS geometry sp_dummy: resb 1 ; Scratch, safe to overwrite ; @@ -475,8 +475,8 @@ award_oldint13 dd 0 ;; award_string db 0b8h,1,2,0bbh,0,7ch,0b9h,6,0,0bah,80h,1,09ch,09ah ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -award_hack: mov si,spec_err_msg ; Moved to this place from - call writemsg ; spec_query_faild +award_hack: mov si,spec_err_msg ; Moved to this place from + call writemsg ; spec_query_faild ; %ifdef DEBUG_MESSAGES ; ; @@ -495,17 +495,17 @@ award_hack: mov si,spec_err_msg ; Moved to this place from call writestr ; %endif ; push es ; save ES - mov ax,0f000h ; ES = BIOS Seg - mov es,ax ; - cld ; - xor di,di ; start at ES:DI = f000:0 -award_loop: push di ; save DI - mov si,award_string ; scan for award_string + mov ax,0f000h ; ES = BIOS Seg + mov es,ax ; + cld ; + xor di,di ; start at ES:DI = f000:0 +award_loop: push di ; save DI + mov si,award_string ; scan for award_string mov cx,7 ; length of award_string = 7dw - repz cmpsw ; compare - pop di ; restore DI - jcxz award_found ; jmp if found - inc di ; not found, inc di + repz cmpsw ; compare + pop di ; restore DI + jcxz award_found ; jmp if found + inc di ; not found, inc di jno award_loop ; ; award_failed: pop es ; No, not this way :-(( @@ -540,10 +540,10 @@ award_found: mov eax,[es:di+0eh] ; load possible int 13 addr mov si,award_not_crlf ; call writestr ; %endif ; - mov ax,4B01h ; try to read the spec packet - mov dl,[DriveNo] ; now ... it should not fail - mov si,spec_packet ; any longer - int 13h ; + mov ax,4B01h ; try to read the spec packet + mov dl,[DriveNo] ; now ... it should not fail + mov si,spec_packet ; any longer + int 13h ; jc award_fail2 ; ; %ifdef DEBUG_MESSAGES ; @@ -1529,7 +1529,7 @@ default_str db 'default', 0 default_len equ ($-default_str) boot_dir db '/boot' ; /boot/isolinux isolinux_dir db '/isolinux', 0 -config_name db 'isolinux.cfg', 0 +config_name db 'isolinux.cfg', 0 err_disk_image db 'Cannot load disk image (invalid file)?', CR, LF, 0 %ifdef DEBUG_MESSAGES diff --git a/keywords.inc b/keywords.inc index 02510a1..ab202b5 100644 --- a/keywords.inc +++ b/keywords.inc @@ -54,14 +54,14 @@ keywd_table: keyword implicit, pc_setint16, AllowImplicit keyword kbdmap, pc_filecmd, loadkeys keyword kernel, pc_kernel, VK_KERNEL - keyword linux, pc_kernel, VK_LINUX - keyword boot, pc_kernel, VK_BOOT - keyword bss, pc_kernel, VK_BSS - keyword pxe, pc_kernel, VK_PXE - keyword fdimage, pc_kernel, VK_FDIMAGE - keyword comboot, pc_kernel, VK_COMBOOT - keyword com32, pc_kernel, VK_COM32 - keyword config, pc_kernel, VK_CONFIG + keyword linux, pc_kernel, VK_LINUX + keyword boot, pc_kernel, VK_BOOT + keyword bss, pc_kernel, VK_BSS + keyword pxe, pc_kernel, VK_PXE + keyword fdimage, pc_kernel, VK_FDIMAGE + keyword comboot, pc_kernel, VK_COMBOOT + keyword com32, pc_kernel, VK_COM32 + keyword config, pc_kernel, VK_CONFIG keyword label, pc_label keyword prompt, pc_setint16, ForcePrompt keyword say, pc_say diff --git a/ldlinux.asm b/ldlinux.asm index fda4fb9..3cfa13e 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -403,11 +403,11 @@ getlinsec_ebios: popad lea sp,[si+16] ; Remove DAPA jc .error - pop bp + pop bp add eax,edi ; Advance sector pointer sub bp,di ; Sectors left shl di,SECTOR_SHIFT ; 512-byte sectors - add bx,di ; Advance buffer pointer + add bx,di ; Advance buffer pointer and bp,bp jnz .loop @@ -525,7 +525,7 @@ disk_error: kaboom: xor si,si mov ss,si - mov sp,StackBuf-4 ; Reset stack + mov sp,StackBuf-4 ; Reset stack mov ds,si ; Reset data segment pop dword [fdctab] ; Restore FDC table .patch: ; When we have full code, intercept here @@ -1164,7 +1164,7 @@ kaboom2: ; ; This verifies that a filename is < FILENAME_MAX characters, ; doesn't contain whitespace, zero-pads the output buffer, -; and removes trailing dots and redundant slashes, plus changes +; and removes trailing dots and redundant slashes, plus changes ; backslashes to forward slashes, ; so "repe cmpsb" can do a compare, and the path-searching routine ; gets a bit of an easier job. @@ -1465,10 +1465,10 @@ nextcluster_fat28: ; ; nextsector: Given a sector in EAX on input, return the next sector -; of the same filesystem object, which may be the root -; directory or a cluster chain. Returns EOF. +; of the same filesystem object, which may be the root +; directory or a cluster chain. Returns EOF. ; -; Assumes CS == DS. +; Assumes CS == DS. ; nextsector: push edi diff --git a/mbr/Makefile b/mbr/Makefile index d61f7f1..7662a0a 100644 --- a/mbr/Makefile +++ b/mbr/Makefile @@ -1,5 +1,5 @@ ## ----------------------------------------------------------------------- -## +## ## Copyright 2007 H. Peter Anvin - All Rights Reserved ## ## This program is free software; you can redistribute it and/or modify diff --git a/mbr/checksize.pl b/mbr/checksize.pl index b7d560a..4feb20a 100755 --- a/mbr/checksize.pl +++ b/mbr/checksize.pl @@ -1,5 +1,5 @@ ## ----------------------------------------------------------------------- -## +## ## Copyright 2007 H. Peter Anvin - All Rights Reserved ## ## This program is free software; you can redistribute it and/or modify @@ -28,4 +28,3 @@ if ($size > $maxsize) { } else { exit 0; } - diff --git a/mbr/mbr.S b/mbr/mbr.S index 81e5dd0..3eff070 100644 --- a/mbr/mbr.S +++ b/mbr/mbr.S @@ -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 @@ -42,7 +42,7 @@ BIOS_page = 0x462 bootsec: .space 512 - .text + .text .globl _start _start: cli @@ -100,7 +100,7 @@ next: pushl %eax /* Base */ pushl %eax /* Root */ call scan_partition_table - + /* If we get here, we have no OS */ jmp missing_os @@ -155,7 +155,7 @@ read_partition_table: 20: popal ret - + /* * scan_partition_table: * Scan a partition table currently loaded in the partition table @@ -165,12 +165,12 @@ read_partition_table: * 18(%bp) - root (offset from MBR, or 0 for MBR) * 22(%bp) - base (location of this partition table) */ - + scan_partition_table: pusha movw %sp, %bp - /* Search for active partitions */ + /* Search for active partitions */ movw $ptab, %di movw $4, %cx xorw %ax, %ax @@ -198,7 +198,7 @@ scan_partition_table: je 8f cmpb $0x85, %al /* Linux extended */ jne 9f - + /* It is an extended partition. Read the extended partition and try to scan it. If the scan returns, re-load the current partition table and resume scan. */ @@ -221,7 +221,7 @@ scan_partition_table: movl 22(%bp), %eax call read_partition_table - /* fall through */ + /* fall through */ 9: /* Not an extended partition */ addw $16, %di @@ -264,7 +264,7 @@ disk_error: too_many_active: movw $too_many_active_msg, %si /* jmp error */ - + error: 2: lodsb diff --git a/memdisk/memdisk.asm b/memdisk/memdisk.asm index 1d3d39d..90779cb 100644 --- a/memdisk/memdisk.asm +++ b/memdisk/memdisk.asm @@ -717,7 +717,7 @@ bcopy: mov ax,2400h ; Disable A20 int 15h .skip_a20d: - popfd ; + popfd ; jmp .done .protmode: diff --git a/memdisk/memdisk16.asm b/memdisk/memdisk16.asm index 87c088f..99d7fd2 100644 --- a/memdisk/memdisk16.asm +++ b/memdisk/memdisk16.asm @@ -223,7 +223,7 @@ A20Type dw 0 ; Default = unknown ; %define io_delay call _io_delay %define IO_DELAY_PORT 80h ; Invalid port (we hope!) -%define disable_wait 32 ; How long to wait for a disable +%define disable_wait 32 ; How long to wait for a disable %define A20_DUNNO 0 ; A20 type unknown %define A20_NONE 1 ; A20 always on? diff --git a/memdisk/setup.c b/memdisk/setup.c index d1eabc5..bad056c 100644 --- a/memdisk/setup.c +++ b/memdisk/setup.c @@ -680,7 +680,7 @@ void setup(syscall_t cs_syscall, void *cs_bounce) ranges (each insertrange() can worst-case turn 1 area into 3) plus the terminating range, over what nranges currently show. */ cmdlinelen = strlen(shdr->cmdline)+1; - total_size = hptr->total_size; /* Actual memdisk code */ + total_size = hptr->total_size; /* Actual memdisk code */ total_size += (nranges+3)*sizeof(ranges[0]); /* E820 memory ranges */ total_size += cmdlinelen; /* Command line */ total_size += STACK_NEEDED; /* Stack */ diff --git a/menu/libmenu/des.c b/menu/libmenu/des.c index d806059..47ff78c 100644 --- a/menu/libmenu/des.c +++ b/menu/libmenu/des.c @@ -395,7 +395,7 @@ des_init(void) static void setup_ip_maskl(void) { - int i, j, k, inbit, obit; + int i, j, k, inbit, obit; my_u_int32_t *il; for (k = 0; k < 8; k++) { @@ -415,7 +415,7 @@ setup_ip_maskl(void) static void setup_ip_maskr(void) { - int i, j, k, inbit, obit; + int i, j, k, inbit, obit; my_u_int32_t *ir; for (k = 0; k < 8; k++) { @@ -435,7 +435,7 @@ setup_ip_maskr(void) static void setup_fp_maskl(void) { - int i, j, k, inbit, obit; + int i, j, k, inbit, obit; my_u_int32_t *fl; for (k = 0; k < 8; k++) { @@ -455,7 +455,7 @@ setup_fp_maskl(void) static void setup_fp_maskr(void) { - int i, j, k, inbit, obit; + int i, j, k, inbit, obit; my_u_int32_t *fr; for (k = 0; k < 8; k++) { @@ -475,7 +475,7 @@ setup_fp_maskr(void) static void setup_key_perm_maskl(void) { - int i, j, k, inbit, obit; + int i, j, k, inbit, obit; my_u_int32_t *il; for (k = 0; k < 8; k++) { @@ -497,7 +497,7 @@ setup_key_perm_maskl(void) static void setup_key_perm_maskr(void) { - int i, j, k, inbit, obit; + int i, j, k, inbit, obit; my_u_int32_t *ir; for (k = 0; k < 8; k++) { @@ -519,7 +519,7 @@ setup_key_perm_maskr(void) static void setup_comp_maskl(void) { - int i, j, k, inbit, obit; + int i, j, k, inbit, obit; my_u_int32_t *il; for (k = 0; k < 8; k++) { @@ -541,7 +541,7 @@ setup_comp_maskl(void) static void setup_comp_maskr(void) { - int i, j, k, inbit, obit; + int i, j, k, inbit, obit; my_u_int32_t *ir; for (k = 0; k < 8; k++) { @@ -563,7 +563,7 @@ setup_comp_maskr(void) static void setup_psbox(void) { - int i, j, b; + int i, j, b; my_u_int32_t *p; for (b = 0; b < 4; b++) diff --git a/parseconfig.inc b/parseconfig.inc index 95a9797..090aa9a 100644 --- a/parseconfig.inc +++ b/parseconfig.inc @@ -51,7 +51,7 @@ pc_append: cmp byte [VKernel],0 mov di,AppendBuf call getline sub di,AppendBuf -.app1: mov [AppendLen],di +.app1: mov [AppendLen],di ret .vk: mov di,VKernelBuf+vk_append ; "append" command (vkernel) call getline @@ -288,11 +288,11 @@ pc_label: call commit_vk ; Commit any current vkernel mov di,VKernelBuf+vk_vname call mangle_name ; Mangle virtual name mov byte [VKernel],1 ; We've seen a "label" statement - mov si,VKernelBuf+vk_vname ; By default, rname == vname + mov si,VKernelBuf+vk_vname ; By default, rname == vname ; mov di,VKernelBuf+vk_rname ; -- already set mov cx,FILENAME_MAX rep movsb - mov si,AppendBuf ; Default append==global append + mov si,AppendBuf ; Default append==global append mov di,VKernelBuf+vk_append mov cx,[AppendLen] mov [VKernelBuf+vk_appendlen],cx diff --git a/ppmtolss16 b/ppmtolss16 index 7fd5a21..199bb03 100755 --- a/ppmtolss16 +++ b/ppmtolss16 @@ -221,7 +221,7 @@ if ( $form == 1 || $form == 4 ) { } else { $maxcol = get_numeric_token(); } -$maxmult = 64/($maxcol+1); # Equal buckets conversion +$maxmult = 64/($maxcol+1); # Equal buckets conversion @data = (); diff --git a/pxelinux.asm b/pxelinux.asm index 1dd6aff..73e6cdd 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -172,7 +172,7 @@ tftp_pktbuf resw 1 ; Packet buffer offset ; ; Memory below this point is reserved for the BIOS and the MBR ; - section .earlybss + section .earlybss trackbufsize equ 8192 trackbuf resb trackbufsize ; Track buffer goes here getcbuf resb trackbufsize @@ -1806,8 +1806,8 @@ get_packet: ; Send ACK packet. This is a common operation and so is worth canning. ; ; Entry: -; SI = TFTP block -; AX = Packet # to ack (network byte order) +; SI = TFTP block +; AX = Packet # to ack (network byte order) ; Exit: ; ZF = 0 -> Error ; All registers preserved diff --git a/pxelinux.doc b/pxelinux.doc index c029ed5..45405a9 100644 --- a/pxelinux.doc +++ b/pxelinux.doc @@ -144,9 +144,9 @@ syntax: # You need an entry like this for every host # unless you're using dynamic addresses host { - hardware ethernet ; - fixed-address ; - } + hardware ethernet ; + fixed-address ; + } } Note that if your particular TFTP daemon runs under chroot (tftp-hpa @@ -184,9 +184,9 @@ vendor-class-identifier" if you are using DHCP 3.0): # You need an entry like this for every host # unless you're using dynamic addresses host { - hardware ethernet ; - fixed-address ; - } + hardware ethernet ; + fixed-address ; + } } Here, the boot file name is obtained from the PXE server. @@ -218,9 +218,9 @@ configurations correctly; however, there are no guarantees: # You need an entry like this for every host # unless you're using dynamic addresses host { - hardware ethernet ; - fixed-address ; - } + hardware ethernet ; + fixed-address ; + } } Note that this *will not* boot some clients that *will* boot with the diff --git a/rllpack.inc b/rllpack.inc index e31f949..da5618d 100644 --- a/rllpack.inc +++ b/rllpack.inc @@ -19,7 +19,7 @@ ; ; Format of leading byte ; 1-128 = x verbatim bytes follow -; 129-255 = (x-126) times subsequent byte +; 129-255 = (x-126) times subsequent byte ; 0 = end of data ; diff --git a/runkernel.inc b/runkernel.inc index 0c10516..aabbd86 100644 --- a/runkernel.inc +++ b/runkernel.inc @@ -106,10 +106,10 @@ kernel_sane: push ax ; construct_cmdline: mov di,[CmdLinePtr] - mov si,boot_image ; BOOT_IMAGE= + mov si,boot_image ; BOOT_IMAGE= mov cx,boot_image_len rep movsb - mov si,KernelCName ; Unmangled kernel name + mov si,KernelCName ; Unmangled kernel name mov cx,[KernelCNameLen] rep movsb mov al,' ' ; Space @@ -302,7 +302,7 @@ nk_noinitrd: ; ; Abandon hope, ye that enter here! We do no longer permit aborts. ; - call abort_check ; Last chance!! + call abort_check ; Last chance!! mov si,ready_msg call cwritestr @@ -467,7 +467,7 @@ kill_motor: ; initrd, and are always loaded low. ; old_kernel: - cmp word [InitRDPtr],0 ; Old kernel can't have initrd + cmp word [InitRDPtr],0 ; Old kernel can't have initrd je load_old_kernel mov si,err_oldkernel jmp abort_load @@ -615,7 +615,7 @@ loadinitrd: mov si,crlf_msg jmp abort_load -no_high_mem: ; Error routine +no_high_mem: ; Error routine mov si,err_nohighmem jmp abort_load diff --git a/sample/Makefile b/sample/Makefile index bacc57c..f301b9f 100644 --- a/sample/Makefile +++ b/sample/Makefile @@ -28,7 +28,7 @@ CFLAGS = $(M32) -W -Wall -march=i386 -Os -fomit-frame-pointer -I../com32/inc SFLAGS = $(M32) -march=i386 LDFLAGS = -s OBJCOPY = objcopy -PPMTOLSS16 = ../ppmtolss16 +PPMTOLSS16 = ../ppmtolss16 LIB = liboldcom32.a LIBOBJS = conio.o atou.o skipatou.o printf.o c32exit.o diff --git a/sample/sample.msg b/sample/sample.msg index e93cd62..f8aac7f 100644 --- a/sample/sample.msg +++ b/sample/sample.msg @@ -9,5 +9,3 @@ Please note colors do not work quite as expected in graphics mode!  04 RED 07 02 GREEN 07 01 BLUE 07 47 RED 07 27 GREEN 07 17 BLUE 07 - - diff --git a/stack.inc b/stack.inc index adb08b5..0e39b6e 100644 --- a/stack.inc +++ b/stack.inc @@ -31,7 +31,7 @@ mov es,%1 %if IS_SYSLINUX || IS_EXTLINUX mov ss,%1 ; Just in case... - mov sp,StackBuf-2*3 ; Reset stack + mov sp,StackBuf-2*3 ; Reset stack %elif IS_PXELINUX lss esp,[BaseStack] %elif IS_ISOLINUX diff --git a/syslinux.doc b/syslinux.doc index 69a64d4..7aea49b 100644 --- a/syslinux.doc +++ b/syslinux.doc @@ -296,7 +296,7 @@ SERIAL port [[baudrate] flowcontrol] "flowcontrol" is a combination of the following bits: 0x001 - Assert DTR - 0x002 - Assert RTS + 0x002 - Assert RTS 0x010 - Wait for CTS assertion 0x020 - Wait for DSR assertion 0x040 - Wait for RI assertion diff --git a/syslinux.spec.in b/syslinux.spec.in index 115a6f2..af5a883 100644 --- a/syslinux.spec.in +++ b/syslinux.spec.in @@ -81,9 +81,9 @@ make CC='%{my_cc}' -C sample tidy cp mkdiskimage sys2ansi.pl keytab-lilo.pl %{buildroot}%{_datadir}/syslinux cp %{buildroot}%{_datadir}/syslinux/*.c32 %{buildroot}/boot cp %{buildroot}%{_datadir}/syslinux/memdisk %{buildroot}/boot -cp %{buildroot}%{_datadir}/syslinux/*.c32 %{buildroot}/tftpboot +cp %{buildroot}%{_datadir}/syslinux/*.c32 %{buildroot}/tftpboot cp %{buildroot}%{_datadir}/syslinux/pxelinux.0 %{buildroot}/tftpboot -cp %{buildroot}%{_datadir}/syslinux/memdisk %{buildroot}/tftpboot +cp %{buildroot}%{_datadir}/syslinux/memdisk %{buildroot}/tftpboot %clean rm -rf %{buildroot} diff --git a/ui.inc b/ui.inc index 7150118..400c2d6 100644 --- a/ui.inc +++ b/ui.inc @@ -331,7 +331,7 @@ get_kernel: mov byte [KernelName+FILENAME_MAX],0 ; Zero-terminate filename/e .no_skip: mov [KernelExtPtr],di mov bx,exten_table .search_loop: push bx - mov di,KernelName ; Search on disk + mov di,KernelName ; Search on disk call searchdir pop bx jnz kernel_good @@ -448,7 +448,7 @@ getchar_timeout: ; that decision on the file extension. The following extensions are ; recognized; case insensitive: ; -; .com - COMBOOT image +; .com - COMBOOT image ; .cbt - COMBOOT image ; .c32 - COM32 image ; .bs - Boot sector diff --git a/unix/syslinux.c b/unix/syslinux.c index 4270d72..ad729c1 100644 --- a/unix/syslinux.c +++ b/unix/syslinux.c @@ -181,7 +181,7 @@ int make_block_map(uint32_t *sectors, int len, int dev_fd, int fd) block = nblock++; if (ioctl(fd, FIBMAP, &block) < 0) die("ioctl FIBMAP failed"); - + for (i = 0; i < blocksize; i++) { if (len <= 0) break; @@ -214,7 +214,7 @@ int do_mount(int dev_fd, int *cookie, const char *mntpath, const char *fstype) unsigned int n = 0; struct loop_info64 loopinfo; int loop_fd; - + for ( n = 0 ; loop_fd < 0 ; n++ ) { snprintf(devfdname, sizeof devfdname, "/dev/loop%u", n); loop_fd = open(devfdname, O_RDWR); @@ -228,20 +228,20 @@ int do_mount(int dev_fd, int *cookie, const char *mntpath, const char *fstype) else continue; } - + if ( ioctl(loop_fd, LOOP_GET_STATUS64, &loopinfo) || (loopinfo.lo_offset = filesystem_offset, ioctl(loop_fd, LOOP_SET_STATUS64, &loopinfo)) ) die("cannot set up loopback device"); } - + *cookie = loop_fd; } else { snprintf(devfdname, sizeof devfdname, "/proc/%lu/fd/%d", (unsigned long)mypid, dev_fd); *cookie = -1; - } - + } + return mount(devfdname, mntpath, fstype, MS_NOEXEC|MS_NOSUID, "umask=077,quiet"); } @@ -253,7 +253,7 @@ int do_mount(int dev_fd, int *cookie, const char *mntpath, const char *fstype) snprintf(devfdname, sizeof devfdname, "/proc/%lu/fd/%d", (unsigned long)mypid, dev_fd); - + f = fork(); if ( f < 0 ) { return -1; @@ -269,7 +269,7 @@ int do_mount(int dev_fd, int *cookie, const char *mntpath, const char *fstype) devfdname, mntpath, NULL); _exit(255); /* execl failed */ } - + w = waitpid(f, &status, 0); return ( w != f || status ) ? -1 : 0; } @@ -283,16 +283,16 @@ void do_umount(const char *mntpath, int cookie) { #if DO_DIRECT_MOUNT int loop_fd = cookie; - + if ( umount2(mntpath, 0) ) die("could not umount path"); - + if ( loop_fd != -1 ) { ioctl(loop_fd, LOOP_CLR_FD, 0); /* Free loop device */ close(loop_fd); loop_fd = -1; } - + #else pid_t f = fork(); pid_t w; @@ -305,7 +305,7 @@ void do_umount(const char *mntpath, int cookie) } else if ( f == 0 ) { execl(_PATH_UMOUNT, _PATH_UMOUNT, mntpath, NULL); } - + w = waitpid(f, &status, 0); if ( w != f || status ) { exit(1); diff --git a/win32/Makefile b/win32/Makefile index 7843819..c811a5c 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -20,7 +20,7 @@ OSTYPE = $(shell uname -msr) ifeq ($(findstring CYGWIN,$(OSTYPE)),CYGWIN) WINCC = gcc -WINAR = ar +WINAR = ar WINRANLIB = ranlib WINCFLAGS = -mno-cygwin -W -Wall -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 WINPIC = diff --git a/win32/syslinux.c b/win32/syslinux.c index 613b1fc..6b48d5b 100644 --- a/win32/syslinux.c +++ b/win32/syslinux.c @@ -461,7 +461,7 @@ int main(int argc, char *argv[]) new_ldlinux_name[0] = drive[0]; new_ldlinux_name[1] = ':'; new_ldlinux_name[2] = '\\'; - + for (sd = subdir; *sd; sd++) { char c = *sd; @@ -476,7 +476,7 @@ int main(int argc, char *argv[]) *cp++ = c; } - + /* Skip if subdirectory == root */ if (cp > new_ldlinux_name+3) { if (!slash) -- 2.7.4