summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-05-03 17:32:15 -0700
committerH. Peter Anvin <hpa@zytor.com>2006-05-03 17:32:15 -0700
commit28eecd8965aedbd75727fb0797a2e7033d5c54ee (patch)
tree1cac9ffc5f7fe7fd82d59b4accd7b8cf85762f74
parentf8c463722022008c8412a69f90576d2bf38818ed (diff)
downloadsyslinux-28eecd8965aedbd75727fb0797a2e7033d5c54ee.tar.gz
Across-the-board stealth whitespace cleanup
-rw-r--r--Makefile10
-rw-r--r--Makefile.private4
-rw-r--r--NEWS6
-rw-r--r--abort.inc2
-rw-r--r--bcopy32.inc10
-rw-r--r--bin2c.pl2
-rwxr-xr-xbin2hex.pl7
-rw-r--r--bios.inc4
-rw-r--r--bootsect.inc10
-rw-r--r--cache.inc2
-rw-r--r--checkov.pl6
-rw-r--r--cmdline.inc6
-rw-r--r--com32.inc4
-rw-r--r--com32/LICENCE6
-rw-r--r--com32/include/console.h7
-rw-r--r--com32/include/dev.h7
-rw-r--r--com32/include/errno.h1
-rw-r--r--com32/include/minmax.h7
-rw-r--r--com32/include/netinet/in.h3
-rw-r--r--com32/include/png.h6
-rw-r--r--com32/include/pngconf.h28
-rw-r--r--com32/include/stdint.h4
-rw-r--r--com32/include/sys/cpu.h2
-rw-r--r--com32/include/syslinux.h6
-rw-r--r--com32/lib/MCONFIG1
-rw-r--r--com32/lib/Makefile1
-rw-r--r--com32/lib/abort.c1
-rw-r--r--com32/lib/asprintf.c2
-rw-r--r--com32/lib/atexit.h1
-rw-r--r--com32/lib/calloc.c1
-rw-r--r--com32/lib/ctypes.c2
-rw-r--r--com32/lib/exit.c6
-rw-r--r--com32/lib/fgetc.c1
-rw-r--r--com32/lib/fgets.c5
-rw-r--r--com32/lib/getopt.c4
-rw-r--r--com32/lib/libgcc/__ashldi3.S4
-rw-r--r--com32/lib/libgcc/__ashrdi3.S4
-rw-r--r--com32/lib/libgcc/__divdi3.c2
-rw-r--r--com32/lib/libgcc/__lshrdi3.S4
-rw-r--r--com32/lib/libgcc/__moddi3.c2
-rw-r--r--com32/lib/libgcc/__muldi3.S2
-rw-r--r--com32/lib/libgcc/__negdi2.S2
-rw-r--r--com32/lib/libgcc/__udivmoddi4.c2
-rw-r--r--com32/lib/libpng/CHANGES4
-rw-r--r--com32/lib/libpng/KNOWNBUG1
-rw-r--r--com32/lib/libpng/example.c4
-rw-r--r--com32/lib/libpng/libpng.31
-rw-r--r--com32/lib/libpng/png.51
-rw-r--r--com32/lib/libpng/pngerror.c2
-rw-r--r--com32/lib/libpng/pnggccrd.c4
-rw-r--r--com32/lib/libpng/pngpread.c2
-rw-r--r--com32/lib/libpng/pngread.c6
-rw-r--r--com32/lib/libpng/pngrtran.c2
-rw-r--r--com32/lib/libpng/pngset.c2
-rw-r--r--com32/lib/libpng/pngtest.c2
-rw-r--r--com32/lib/lrand48.c3
-rw-r--r--com32/lib/malloc.c10
-rw-r--r--com32/lib/memswap.c2
-rw-r--r--com32/lib/onexit.c4
-rw-r--r--com32/lib/pci/cfgtype.c7
-rw-r--r--com32/lib/pci/readbios.c3
-rw-r--r--com32/lib/pci/readx.c10
-rw-r--r--com32/lib/pci/writex.c4
-rw-r--r--com32/lib/qsort.c3
-rw-r--r--com32/lib/realloc.c3
-rw-r--r--com32/lib/seed48.c3
-rw-r--r--com32/lib/setjmp.S4
-rw-r--r--com32/lib/strerror.c1
-rw-r--r--com32/lib/strlcat.c2
-rw-r--r--com32/lib/strlcpy.c2
-rw-r--r--com32/lib/strlen.c1
-rw-r--r--com32/lib/strrchr.c2
-rw-r--r--com32/lib/strspn.c3
-rw-r--r--com32/lib/strtok.c1
-rw-r--r--com32/lib/sys/ansicon_write.c20
-rw-r--r--com32/lib/sys/ansiserial_write.c6
-rw-r--r--com32/lib/sys/argv.c9
-rw-r--r--com32/lib/sys/close.c10
-rw-r--r--com32/lib/sys/entry.S10
-rw-r--r--com32/lib/sys/err_read.c6
-rw-r--r--com32/lib/sys/err_write.c6
-rw-r--r--com32/lib/sys/exit.S4
-rw-r--r--com32/lib/sys/file.h6
-rw-r--r--com32/lib/sys/fileclose.c6
-rw-r--r--com32/lib/sys/fileread.c8
-rw-r--r--com32/lib/sys/fstat.c12
-rw-r--r--com32/lib/sys/ftell.c4
-rw-r--r--com32/lib/sys/idle.c8
-rw-r--r--com32/lib/sys/isatty.c6
-rw-r--r--com32/lib/sys/line_input.c13
-rw-r--r--com32/lib/sys/null_read.c6
-rw-r--r--com32/lib/sys/null_write.c6
-rw-r--r--com32/lib/sys/open.c12
-rw-r--r--com32/lib/sys/openconsole.c6
-rw-r--r--com32/lib/sys/opendev.c6
-rw-r--r--com32/lib/sys/rawcon_read.c8
-rw-r--r--com32/lib/sys/rawcon_write.c8
-rw-r--r--com32/lib/sys/read.c8
-rw-r--r--com32/lib/sys/serial_write.c8
-rw-r--r--com32/lib/sys/stdcon_read.c6
-rw-r--r--com32/lib/sys/stdcon_write.c8
-rw-r--r--com32/lib/sys/times.c6
-rw-r--r--com32/lib/sys/write.c6
-rw-r--r--com32/lib/vasprintf.c2
-rw-r--r--com32/lib/vsnprintf.c6
-rw-r--r--com32/lib/vsscanf.c12
-rw-r--r--com32/lib/zlib/trees.h1
-rw-r--r--com32/libutil/Makefile7
-rw-r--r--com32/libutil/ansiline.c11
-rw-r--r--com32/libutil/ansiraw.c11
-rw-r--r--com32/libutil/get_key.c11
-rw-r--r--com32/libutil/idle.c6
-rw-r--r--com32/libutil/include/base64.h6
-rw-r--r--com32/libutil/include/consoles.h7
-rw-r--r--com32/libutil/include/getkey.h6
-rw-r--r--com32/libutil/include/libutil.h6
-rw-r--r--com32/libutil/include/minmax.h7
-rw-r--r--com32/libutil/loadfile.c4
-rw-r--r--com32/libutil/movebits.c15
-rw-r--r--com32/libutil/sha1hash.c12
-rw-r--r--com32/libutil/unbase64.c13
-rw-r--r--com32/modules/Makefile3
-rw-r--r--com32/modules/ethersel.c1
-rw-r--r--com32/modules/mboot.doc3
-rw-r--r--com32/modules/menu.h1
-rw-r--r--com32/samples/Makefile2
-rw-r--r--com32/samples/fancyhello.c2
-rw-r--r--com32/samples/hello.c4
-rw-r--r--com32/samples/keytest.c6
-rw-r--r--com32/samples/resolv.c4
-rw-r--r--comboot.doc4
-rw-r--r--comboot.inc10
-rw-r--r--config.inc2
-rw-r--r--conio.inc8
-rw-r--r--copybs.asm8
-rw-r--r--cpuinit.inc5
-rw-r--r--distrib.doc1
-rw-r--r--dnsresolv.inc14
-rw-r--r--dos/Makefile3
-rw-r--r--dos/__divdi3.c2
-rw-r--r--dos/__udivmoddi4.c2
-rw-r--r--dos/argv.c7
-rw-r--r--dos/atou.c1
-rw-r--r--dos/conio.c2
-rw-r--r--dos/crt0.S6
-rw-r--r--dos/malloc.c8
-rw-r--r--dos/perror.c1
-rw-r--r--dos/printf.c45
-rw-r--r--dos/skipatou.c2
-rw-r--r--dos/stdio.h1
-rw-r--r--dos/syslinux.c23
-rw-r--r--ext2_fs.inc110
-rw-r--r--extlinux.asm22
-rw-r--r--extlinux.doc2
-rw-r--r--extlinux/Makefile3
-rw-r--r--extlinux/ext2_fs.h4
-rw-r--r--extlinux/extlinux.c34
-rw-r--r--font.inc6
-rwxr-xr-xgenhash.pl2
-rw-r--r--getc.inc2
-rw-r--r--gethostip.c2
-rw-r--r--graphics.inc5
-rw-r--r--highmem.inc8
-rw-r--r--init.inc3
-rw-r--r--isolinux.asm34
-rw-r--r--isolinux.doc2
-rw-r--r--kernel.inc4
-rw-r--r--keytab-lilo.doc76
-rw-r--r--keywords.inc3
-rw-r--r--layout.inc5
-rw-r--r--ldlinux.asm14
-rw-r--r--loadhigh.inc11
-rwxr-xr-xlss16toppm2
-rw-r--r--macros.inc4
-rw-r--r--mbr.asm14
-rw-r--r--memdisk/Makefile6
-rw-r--r--memdisk/conio.c51
-rw-r--r--memdisk/conio.h2
-rw-r--r--memdisk/e820.h2
-rw-r--r--memdisk/e820func.c7
-rw-r--r--memdisk/e820test.c10
-rw-r--r--memdisk/inflate.c18
-rw-r--r--memdisk/memdisk.asm8
-rw-r--r--memdisk/memdisk.doc2
-rw-r--r--memdisk/memdisk.h2
-rw-r--r--memdisk/memdisk16.asm20
-rw-r--r--memdisk/msetup.c8
-rwxr-xr-xmemdisk/postprocess.pl3
-rw-r--r--memdisk/setup.c44
-rw-r--r--memdisk/unzip.c22
-rw-r--r--memdisk/version.h2
-rw-r--r--menu/CHANGES13
-rw-r--r--menu/HISTORY8
-rw-r--r--menu/MANUAL145
-rw-r--r--menu/MENU_FORMAT87
-rw-r--r--menu/Makefile12
-rw-r--r--menu/README41
-rw-r--r--menu/TODO3
-rw-r--r--menu/adv_menu.tpl44
-rw-r--r--menu/complex.c25
-rw-r--r--menu/display.c2
-rw-r--r--menu/libmenu/com32io.c9
-rw-r--r--menu/libmenu/com32io.h20
-rw-r--r--menu/libmenu/des.c33
-rw-r--r--menu/libmenu/des.h1
-rw-r--r--menu/libmenu/help.c18
-rw-r--r--menu/libmenu/help.h2
-rw-r--r--menu/libmenu/menu.c189
-rw-r--r--menu/libmenu/menu.h56
-rw-r--r--menu/libmenu/passwords.c10
-rw-r--r--menu/libmenu/passwords.h4
-rw-r--r--menu/libmenu/scancodes.h4
-rw-r--r--menu/libmenu/syslnx.c9
-rw-r--r--menu/libmenu/syslnx.h6
-rw-r--r--menu/libmenu/tui.c36
-rw-r--r--menu/libmenu/tui.h18
-rw-r--r--menu/menugen.py44
-rw-r--r--menu/password7
-rw-r--r--menu/simple.c16
-rw-r--r--menu/test.menu1
-rw-r--r--menu/test2.menu1
-rwxr-xr-xmkdiskimage.in4
-rw-r--r--mtools/Makefile3
-rw-r--r--mtools/syslinux.c10
-rw-r--r--parsecmd.inc2
-rw-r--r--parseconfig.inc6
-rwxr-xr-xppmtolss1614
-rw-r--r--pxe.inc149
-rw-r--r--pxelinux.asm52
-rw-r--r--pxelinux.doc4
-rw-r--r--rawcon.inc3
-rw-r--r--regdump.inc2
-rw-r--r--rllpack.inc6
-rw-r--r--runkernel.inc4
-rw-r--r--sample/Makefile2
-rw-r--r--sample/atou.c1
-rw-r--r--sample/c32echo.c2
-rw-r--r--sample/c32entry.S8
-rw-r--r--sample/comecho.asm9
-rw-r--r--sample/conio.c4
-rw-r--r--sample/fd.c5
-rw-r--r--sample/filetest.c6
-rw-r--r--sample/hello.c2
-rw-r--r--sample/hello2.c4
-rw-r--r--sample/mdiskchk.c8
-rw-r--r--sample/printf.c45
-rw-r--r--sample/skipatou.c2
-rwxr-xr-xsha1pass2
-rw-r--r--strcpy.inc1
-rw-r--r--strecpy.inc3
-rw-r--r--syslinux.doc12
-rw-r--r--syslinux.h2
-rw-r--r--syslxmod.c13
-rw-r--r--tracers.inc4
-rw-r--r--ui.inc10
-rw-r--r--unix/Makefile3
-rw-r--r--unix/syslinux.c11
-rwxr-xr-xversion.pl2
-rw-r--r--win32/Makefile2
-rw-r--r--win32/syslinux.c62
-rw-r--r--writehex.inc3
-rw-r--r--writestr.inc2
262 files changed, 1321 insertions, 1459 deletions
diff --git a/Makefile b/Makefile
index 024eff9e..8667e792 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
## $Id$
## -----------------------------------------------------------------------
-##
+##
## Copyright 1998-2005 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
@@ -25,7 +25,7 @@ AR = ar
RANLIB = ranlib
NASM = nasm -O99
-NINCLUDE =
+NINCLUDE =
BINDIR = /usr/bin
SBINDIR = /sbin
LIBDIR = /usr/lib
@@ -41,9 +41,9 @@ VERSION = $(shell cat version)
#
# The BTARGET refers to objects that are derived from ldlinux.asm; we
-# like to keep those uniform for debugging reasons; however, distributors
+# like to keep those uniform for debugging reasons; however, distributors
# want to recompile the installers (ITARGET).
-#
+#
# BOBJECTS and IOBJECTS are the same thing, except used for
# installation, so they include objects that may be in subdirectories
# with their own Makefiles. Finally, there is a list of those
@@ -55,7 +55,7 @@ SOURCES = $(CSRC) *.h $(NASMSRC) *.inc
# _bin.c files required by both BTARGET and ITARGET installers
BINFILES = bootsect_bin.c ldlinux_bin.c mbr_bin.c \
- extlinux_bss_bin.c extlinux_sys_bin.c
+ extlinux_bss_bin.c extlinux_sys_bin.c
# syslinux.exe is BTARGET so as to not require everyone to have the
# mingw suite installed
diff --git a/Makefile.private b/Makefile.private
index 501dca24..e42c2d33 100644
--- a/Makefile.private
+++ b/Makefile.private
@@ -1,5 +1,5 @@
## -*- makefile -*- ------------------------------------------------------
-##
+##
## Copyright 2000-2005 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
@@ -89,7 +89,7 @@ prerel:
$(MAKE) -C $(PRERELDIR)/$(PREREL) dist
cd $(PRERELDIR)/$(PREREL) && rm -rf $(PRIVATE)
cd $(PRERELDIR) && tar cvvf - $(PREREL) | \
- gzip -9 > $(PREREL).tar.gz
+ gzip -9 > $(PREREL).tar.gz
cd $(PRERELDIR) && \
uuencode $(PREREL).tar.gz $(PREREL).tar.gz > uu/$(PREREL).uu
cd $(PRERELDIR)/$(PREREL) && \
diff --git a/NEWS b/NEWS
index 3bb5f13b..01f93488 100644
--- a/NEWS
+++ b/NEWS
@@ -544,7 +544,7 @@ Changes in 1.54:
due to a spec bug; match the most recent spec since that
seems to be what implementations actually do.
* SYSLINUX: Add some smarts to the boot sector, which
- hopefully should reduce the number of systems which require
+ hopefully should reduce the number of systems which require
stupid mode ("syslinux -s").
* PXELINUX: Document further some of the pathologies with old
PXE stacks.
@@ -720,10 +720,10 @@ Changes in 1.35:
* Added a "safe, slow and stupid" (-s) option to the
installers. This option will lobotomize the boot sector to
hopefully work on even very buggy BIOSes.
-
+
Changes in 1.34:
* Ability to load a VGA font on bootup (for localized Linux
- distributions.)
+ distributions.)
Changes in 1.33:
* Bug fix in the Linux installer.
diff --git a/abort.inc b/abort.inc
index de0f60e4..78347d5e 100644
--- a/abort.inc
+++ b/abort.inc
@@ -1,6 +1,6 @@
; $Id$
; -----------------------------------------------------------------------
-;
+;
; Copyright 2005 H. Peter Anvin - All Rights Reserved
;
; This program is free software; you can redistribute it and/or modify
diff --git a/bcopy32.inc b/bcopy32.inc
index 9eb782e2..652c4b31 100644
--- a/bcopy32.inc
+++ b/bcopy32.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2005 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
;;
;; bcopy32.inc
-;;
+;;
;; 32-bit bcopy routine for real mode
;;
@@ -117,7 +117,7 @@ bcopy: push eax
and ecx,3
shr eax,2
a32 rep movsb
-
+
; Change ESI/EDI to point to the last dword, instead
; of the last byte.
sub esi,3
@@ -159,7 +159,7 @@ bcopy: push eax
; IBM ThinkPad 760EL.
;
; We typically toggle A20 twice for every 64K transferred.
-;
+;
%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
@@ -383,7 +383,7 @@ empty_8042:
test al,2
jnz empty_8042
io_delay
-.done: ret
+.done: ret
;
; Execute a WBINVD instruction if possible on this CPU
diff --git a/bin2c.pl b/bin2c.pl
index 8c56ca6c..f50e2e7f 100644
--- a/bin2c.pl
+++ b/bin2c.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
## $Id$
## -----------------------------------------------------------------------
-##
+##
## Copyright 1998-2004 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
diff --git a/bin2hex.pl b/bin2hex.pl
index 8fdc46bb..528c6325 100755
--- a/bin2hex.pl
+++ b/bin2hex.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
## "$Id$"
## -----------------------------------------------------------------------
-##
+##
## Copyright 2003 H. Peter Anvin - All Rights Reserved
##
## Permission is hereby granted, free of charge, to any person
@@ -12,10 +12,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
@@ -43,4 +43,3 @@ while ( read(STDIN,$ch,1) ) {
}
print "\n" if ( $len );
exit 0;
-
diff --git a/bios.inc b/bios.inc
index 245d52ad..3925015c 100644
--- a/bios.inc
+++ b/bios.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2004 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
;;
;; bios.inc
-;;
+;;
;; Header file for the BIOS data structures etc.
;;
diff --git a/bootsect.inc b/bootsect.inc
index f22e845a..1bea87b2 100644
--- a/bootsect.inc
+++ b/bootsect.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2005 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
;;
;; bootsect.inc
-;;
+;;
;; Load a boot sector (or other bootstrap program.)
;;
;; Unlike previous versions of this software, this doesn't require that
@@ -97,13 +97,13 @@ replace_bootstrap_one:
push word 1 ; Length of descriptor list
; Fall through
-;
+;
; Entrypoint for "shut down and replace bootstrap" -- also invoked by
; the COMBOOT API. This routine expects two words on the stack:
; address of the copy list (versus DS) and count. Additionally,
; the values of ESI and EDX are passed on to the new bootstrap;
; the value of BX becomes the new DS.
-;
+;
replace_bootstrap:
;
; Prepare for shutting down
@@ -117,7 +117,7 @@ replace_bootstrap:
;
xor ax,ax
mov ds,ax
- mov es,ax
+ mov es,ax
%if IS_PXELINUX
test byte [KeepPXE],01h
diff --git a/cache.inc b/cache.inc
index 05f7d62d..0b7b954f 100644
--- a/cache.inc
+++ b/cache.inc
@@ -1,5 +1,5 @@
; -*- fundamental -*- ---------------------------------------------------
-;
+;
; Copyright 2004 H. Peter Anvin - All Rights Reserved
;
; This program is free software; you can redistribute it and/or modify
diff --git a/checkov.pl b/checkov.pl
index b9ebf7be..c7f018c8 100644
--- a/checkov.pl
+++ b/checkov.pl
@@ -12,7 +12,7 @@
sub overlap($$$$) {
my($s1,$e1,$s2,$e2) = @_;
-
+
return 1 if ( $s2 < $e1 && $e2 > $s1 );
return 1 if ( $s1 < $e2 && $e1 > $s2 );
@@ -56,12 +56,12 @@ foreach $s ( keys(%start) ) {
foreach $o ( keys(%start) ) {
next if ( $s ge $o );
-
+
$ostart = $start{$o};
$ovstart = $vstart{$o};
$oend = $ostart + $length{$o};
$ovend = $ovstart + $length{$o};
-
+
if ( overlap($sstart, $send, $ostart, $oend) ||
overlap($svstart, $svend, $ostart, $oend) ||
overlap($sstart, $send, $ovstart, $ovend) ||
diff --git a/cmdline.inc b/cmdline.inc
index d1cb2610..a168ace4 100644
--- a/cmdline.inc
+++ b/cmdline.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 2003 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -29,7 +29,7 @@ make_plain_cmdline:
mov si,[CmdOptPtr]
mov di,[CmdLinePtr]
-
+
call strcpy
dec di
@@ -37,5 +37,3 @@ make_plain_cmdline:
pop es
ret
-
-
diff --git a/com32.inc b/com32.inc
index fa312f25..e6075375 100644
--- a/com32.inc
+++ b/com32.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2003 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -89,7 +89,7 @@ com32_enter_pm:
or al,1
mov cr0,eax ; Enter protected mode
jmp 20h:.in_pm
-
+
bits 32
.in_pm:
xor eax,eax ; Available for future use...
diff --git a/com32/LICENCE b/com32/LICENCE
index b20d6544..ddb209dd 100644
--- a/com32/LICENCE
+++ b/com32/LICENCE
@@ -1,7 +1,7 @@
libcom32 and libutil are licensed under the MIT license:
## -----------------------------------------------------------------------
-##
+##
## Copyright 2004 H. Peter Anvin - All Rights Reserved
##
## Permission is hereby granted, free of charge, to any person
@@ -12,10 +12,10 @@ libcom32 and libutil are licensed under the MIT license:
## 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/console.h b/com32/include/console.h
index 494b0ba1..4c2e0f88 100644
--- a/com32/include/console.h
+++ b/com32/include/console.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -57,4 +57,3 @@ extern const struct output_dev dev_ansicon_w;
extern const struct output_dev dev_ansiserial_w;
#endif /* _CONSOLE_H */
-
diff --git a/com32/include/dev.h b/com32/include/dev.h
index a5afbaf1..dbbd7932 100644
--- a/com32/include/dev.h
+++ b/com32/include/dev.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -54,4 +54,3 @@ extern const struct input_dev dev_error_r;
extern const struct output_dev dev_error_w;
#endif /* _DEV_H */
-
diff --git a/com32/include/errno.h b/com32/include/errno.h
index d32f33f6..36690bf6 100644
--- a/com32/include/errno.h
+++ b/com32/include/errno.h
@@ -132,4 +132,3 @@ extern int errno;
#define EMEDIUMTYPE 124 /* Wrong medium type */
#endif /* _ERRNO_H */
-
diff --git a/com32/include/minmax.h b/com32/include/minmax.h
index 319db164..b333a656 100644
--- a/com32/include/minmax.h
+++ b/com32/include/minmax.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -41,4 +41,3 @@
xx > yy ? xx : yy; })
#endif /* _MINMAX_H */
-
diff --git a/com32/include/netinet/in.h b/com32/include/netinet/in.h
index 325bd4cf..e6a20489 100644
--- a/com32/include/netinet/in.h
+++ b/com32/include/netinet/in.h
@@ -38,6 +38,3 @@ static inline uint64_t __htonq(uint64_t v)
#define ntohq(x) __htonq(x)
#endif /* _NETINET_IN_H */
-
-
-
diff --git a/com32/include/png.h b/com32/include/png.h
index e87a3011..800b912e 100644
--- a/com32/include/png.h
+++ b/com32/include/png.h
@@ -336,7 +336,7 @@
#define PNG_LIBPNG_BUILD_RC 3
#define PNG_LIBPNG_BUILD_STABLE 4
#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7
-
+
/* Release-Specific Flags */
#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with
PNG_LIBPNG_BUILD_STABLE only */
@@ -367,12 +367,12 @@
/* Ref MSDN: Private as priority over Special
* VS_FF_PRIVATEBUILD File *was not* built using standard release
* procedures. If this value is given, the StringFileInfo block must
- * contain a PrivateBuild string.
+ * contain a PrivateBuild string.
*
* VS_FF_SPECIALBUILD File *was* built by the original company using
* standard release procedures but is a variation of the standard
* file of the same version number. If this value is given, the
- * StringFileInfo block must contain a SpecialBuild string.
+ * StringFileInfo block must contain a SpecialBuild string.
*/
#if defined(PNG_USER_PRIVATEBUILD)
diff --git a/com32/include/pngconf.h b/com32/include/pngconf.h
index 7f4cbede..3ac628c4 100644
--- a/com32/include/pngconf.h
+++ b/com32/include/pngconf.h
@@ -19,7 +19,7 @@
#define PNG_1_2_X
-/*
+/*
* PNG_USER_CONFIG has to be defined on the compiler command line. This
* includes the resource compiler for Windows DLL configurations.
*/
@@ -29,7 +29,7 @@
/*
* Added at libpng-1.2.8
- *
+ *
* If you create a private DLL you need to define in "pngusr.h" the followings:
* #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of
* the DLL was built>
@@ -40,8 +40,8 @@
* number and must match your private DLL name>
* e.g. // private DLL "libpng13gx.dll"
* #define PNG_USER_DLLFNAME_POSTFIX "gx"
- *
- * The following macros are also at your disposal if you want to complete the
+ *
+ * The following macros are also at your disposal if you want to complete the
* DLL VERSIONINFO structure.
* - PNG_USER_VERSIONINFO_COMMENTS
* - PNG_USER_VERSIONINFO_COMPANYNAME
@@ -129,9 +129,9 @@
* 'Cygwin' defines/defaults:
* PNG_BUILD_DLL -- (ignored) building the dll
* (no define) -- (ignored) building an application, linking to the dll
- * PNG_STATIC -- (ignored) building the static lib, or building an
+ * PNG_STATIC -- (ignored) building the static lib, or building an
* application that links to the static lib.
- * ALL_STATIC -- (ignored) building various static libs, or building an
+ * ALL_STATIC -- (ignored) building various static libs, or building an
* application that links to the static libs.
* Thus,
* a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
@@ -144,12 +144,12 @@
* PNG_BUILD_DLL
* PNG_STATIC
* (nothing) == PNG_USE_DLL
- *
+ *
* CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
- * of auto-import in binutils, we no longer need to worry about
+ * of auto-import in binutils, we no longer need to worry about
* __declspec(dllexport) / __declspec(dllimport) and friends. Therefore,
* we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
- * to __declspec() stuff. However, we DO need to worry about
+ * to __declspec() stuff. However, we DO need to worry about
* PNG_BUILD_DLL and PNG_STATIC because those change some defaults
* such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
*/
@@ -193,8 +193,8 @@
# if !defined(PNG_DLL)
# define PNG_DLL
# endif
-# endif
-# endif
+# endif
+# endif
# endif
#endif
@@ -690,7 +690,7 @@
# define PNG_EASY_ACCESS_SUPPORTED
#endif
-/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
+/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
# ifndef PNG_ASSEMBLER_CODE_SUPPORTED
@@ -1239,7 +1239,7 @@ typedef z_stream FAR * png_zstreamp;
# define PNGAPI __cdecl
# undef PNG_IMPEXP
# define PNG_IMPEXP
-#endif
+#endif
/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
* you may get warnings regarding the linkage of png_zalloc and png_zfree.
@@ -1404,7 +1404,7 @@ typedef z_stream FAR * png_zstreamp;
# define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128 /* >= */
#endif
#ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
-# define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */
+# define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */
#endif
/* Set this in the makefile for VC++ on Pentium, not here. */
diff --git a/com32/include/stdint.h b/com32/include/stdint.h
index bfe80323..9a5553b9 100644
--- a/com32/include/stdint.h
+++ b/com32/include/stdint.h
@@ -140,7 +140,3 @@ typedef uint64_t uintmax_t;
#endif /* STDC_CONSTANT_MACROS */
#endif /* _STDINT_H */
-
-
-
-
diff --git a/com32/include/sys/cpu.h b/com32/include/sys/cpu.h
index 1af2db71..0a7b4652 100644
--- a/com32/include/sys/cpu.h
+++ b/com32/include/sys/cpu.h
@@ -49,7 +49,7 @@ static inline uint32_t cpuid_edx(uint32_t level)
static inline uint64_t rdmsr(uint32_t msr)
{
uint64_t v;
-
+
asm volatile("rdmsr" : "=A" (v) : "c" (msr));
return v;
}
diff --git a/com32/include/syslinux.h b/com32/include/syslinux.h
index c7510076..c24af404 100644
--- a/com32/include/syslinux.h
+++ b/com32/include/syslinux.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/MCONFIG b/com32/lib/MCONFIG
index e740ed5e..7c4e2dfe 100644
--- a/com32/lib/MCONFIG
+++ b/com32/lib/MCONFIG
@@ -63,4 +63,3 @@ LDFLAGS = -m elf32_i386
.c.ls:
$(CC) $(CFLAGS) $(SOFLAGS) -S -o $@ $<
-
diff --git a/com32/lib/Makefile b/com32/lib/Makefile
index 5f9fb8fd..0f65852c 100644
--- a/com32/lib/Makefile
+++ b/com32/lib/Makefile
@@ -76,4 +76,3 @@ install: all
cp -r ../include $(INSTALLROOT)$(COM32DIR)
-include .*.d */.*.d
-
diff --git a/com32/lib/abort.c b/com32/lib/abort.c
index aacfbbf4..1c634643 100644
--- a/com32/lib/abort.c
+++ b/com32/lib/abort.c
@@ -9,4 +9,3 @@ void abort(void)
{
_exit(255);
}
-
diff --git a/com32/lib/asprintf.c b/com32/lib/asprintf.c
index 6002b576..6b1b4ff5 100644
--- a/com32/lib/asprintf.c
+++ b/com32/lib/asprintf.c
@@ -22,7 +22,7 @@ int asprintf(char **bufp, const char *format, ...)
*bufp = p = malloc(bytes);
if ( !p )
return -1;
-
+
rv = vsnprintf(p, bytes, format, ap);
va_end(ap);
diff --git a/com32/lib/atexit.h b/com32/lib/atexit.h
index 792141de..b3aabaf7 100644
--- a/com32/lib/atexit.h
+++ b/com32/lib/atexit.h
@@ -14,4 +14,3 @@ struct atexit {
};
#endif /* ATEXIT_H */
-
diff --git a/com32/lib/calloc.c b/com32/lib/calloc.c
index 228a1b70..ebab49bf 100644
--- a/com32/lib/calloc.c
+++ b/com32/lib/calloc.c
@@ -18,4 +18,3 @@ void *calloc(size_t nmemb, size_t size)
return ptr;
}
-
diff --git a/com32/lib/ctypes.c b/com32/lib/ctypes.c
index acfa05ab..cfe4821c 100644
--- a/com32/lib/ctypes.c
+++ b/com32/lib/ctypes.c
@@ -43,7 +43,7 @@ const unsigned char __ctypes[257] = {
__ctype_cntrl, /* control character */
__ctype_cntrl, /* control character */
__ctype_cntrl, /* control character */
-
+
__ctype_print|__ctype_space, /* space */
__ctype_print|__ctype_punct, /* punctuation */
__ctype_print|__ctype_punct, /* punctuation */
diff --git a/com32/lib/exit.c b/com32/lib/exit.c
index dcbbf373..a727fabc 100644
--- a/com32/lib/exit.c
+++ b/com32/lib/exit.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/fgetc.c b/com32/lib/fgetc.c
index 83eee16f..5aa6f76d 100644
--- a/com32/lib/fgetc.c
+++ b/com32/lib/fgetc.c
@@ -17,4 +17,3 @@ int fgetc(FILE *f)
return (_fread(&ch, 1, f) == 1) ? (int)ch : EOF;
}
-
diff --git a/com32/lib/fgets.c b/com32/lib/fgets.c
index 593bea36..474de49c 100644
--- a/com32/lib/fgets.c
+++ b/com32/lib/fgets.c
@@ -26,9 +26,6 @@ char *fgets(char *s, int n, FILE *f)
}
if ( n )
*p = '\0';
-
+
return s;
}
-
-
-
diff --git a/com32/lib/getopt.c b/com32/lib/getopt.c
index 5a992dcd..49b007a6 100644
--- a/com32/lib/getopt.c
+++ b/com32/lib/getopt.c
@@ -23,7 +23,7 @@ int getopt(int argc, char * const *argv, const char *optstring)
(void)argc;
/* First, eliminate all non-option cases */
-
+
if ( !carg || carg[0] != '-' || !carg[1] ) {
return -1;
}
@@ -70,5 +70,3 @@ int getopt(int argc, char * const *argv, const char *optstring)
return '?';
}
}
-
-
diff --git a/com32/lib/libgcc/__ashldi3.S b/com32/lib/libgcc/__ashldi3.S
index 80ed4be3..f2cc11cb 100644
--- a/com32/lib/libgcc/__ashldi3.S
+++ b/com32/lib/libgcc/__ashldi3.S
@@ -15,11 +15,11 @@ __ashldi3:
#endif
cmpb $32,%cl
jae 1f
-
+
shldl %cl,%eax,%edx
shl %cl,%eax
ret
-
+
1:
xorl %edx,%edx
shl %cl,%eax
diff --git a/com32/lib/libgcc/__ashrdi3.S b/com32/lib/libgcc/__ashrdi3.S
index ba43f902..3f9c5207 100644
--- a/com32/lib/libgcc/__ashrdi3.S
+++ b/com32/lib/libgcc/__ashrdi3.S
@@ -15,11 +15,11 @@ __ashrdi3:
#endif
cmpb $32,%cl
jae 1f
-
+
shrdl %cl,%edx,%eax
sarl %cl,%edx
ret
-
+
1:
sarl %cl,%edx
movl %edx,%eax
diff --git a/com32/lib/libgcc/__divdi3.c b/com32/lib/libgcc/__divdi3.c
index be13caed..3641396f 100644
--- a/com32/lib/libgcc/__divdi3.c
+++ b/com32/lib/libgcc/__divdi3.c
@@ -20,7 +20,7 @@ int64_t __divdi3(int64_t num, int64_t den)
den = -den;
minus ^= 1;
}
-
+
v = __udivmoddi4(num, den, NULL);
if ( minus )
v = -v;
diff --git a/com32/lib/libgcc/__lshrdi3.S b/com32/lib/libgcc/__lshrdi3.S
index 6e521ace..eee3aacb 100644
--- a/com32/lib/libgcc/__lshrdi3.S
+++ b/com32/lib/libgcc/__lshrdi3.S
@@ -15,11 +15,11 @@ __lshrdi3:
#endif
cmpb $32,%cl
jae 1f
-
+
shrdl %cl,%edx,%eax
shrl %cl,%edx
ret
-
+
1:
shrl %cl,%edx
xorl %eax,%eax
diff --git a/com32/lib/libgcc/__moddi3.c b/com32/lib/libgcc/__moddi3.c
index 3e613654..af94c232 100644
--- a/com32/lib/libgcc/__moddi3.c
+++ b/com32/lib/libgcc/__moddi3.c
@@ -20,7 +20,7 @@ int64_t __moddi3(int64_t num, int64_t den)
den = -den;
minus ^= 1;
}
-
+
(void) __udivmoddi4(num, den, &v);
if ( minus )
v = -v;
diff --git a/com32/lib/libgcc/__muldi3.S b/com32/lib/libgcc/__muldi3.S
index c164588b..648a88ad 100644
--- a/com32/lib/libgcc/__muldi3.S
+++ b/com32/lib/libgcc/__muldi3.S
@@ -28,7 +28,7 @@ __muldi3:
pop %esi
imull %esi,%ecx
addl %ecx,%edx
-#endif
+#endif
pop %esi
ret
.size __muldi3,.-__muldi3
diff --git a/com32/lib/libgcc/__negdi2.S b/com32/lib/libgcc/__negdi2.S
index 6c95cb23..37b0d2d4 100644
--- a/com32/lib/libgcc/__negdi2.S
+++ b/com32/lib/libgcc/__negdi2.S
@@ -3,7 +3,7 @@
*
* 64-bit negation
*/
-
+
.text
.align 4
.globl __negdi2
diff --git a/com32/lib/libgcc/__udivmoddi4.c b/com32/lib/libgcc/__udivmoddi4.c
index 1c456543..ad576809 100644
--- a/com32/lib/libgcc/__udivmoddi4.c
+++ b/com32/lib/libgcc/__udivmoddi4.c
@@ -4,7 +4,7 @@
uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t *rem_p)
{
uint64_t quot = 0, qbit = 1;
-
+
if ( den == 0 ) {
__divide_error();
return 0; /* If trap returns... */
diff --git a/com32/lib/libpng/CHANGES b/com32/lib/libpng/CHANGES
index 90c816e3..46f43dc9 100644
--- a/com32/lib/libpng/CHANGES
+++ b/com32/lib/libpng/CHANGES
@@ -1179,7 +1179,7 @@ version 1.2.4beta3 [June 28, 2002]
Plugged memory leak of row_buf in pngtest.c when there is a png_error().
Detect buffer overflow in pngpread.c when IDAT is corrupted with extra data.
Added "test-installed" target to makefile.32sunu, makefile.64sunu,
- makefile.beos, makefile.darwin, makefile.dec, makefile.macosx,
+ makefile.beos, makefile.darwin, makefile.dec, makefile.macosx,
makefile.solaris, makefile.hpux, makefile.hpgcc, and makefile.so9.
version 1.2.4rc1 and 1.0.14rc1 [July 2, 2002]
Added "test-installed" target to makefile.cygwin and makefile.sco.
@@ -1386,7 +1386,7 @@ version 1.2.8beta5 [November 20, 2004]
Use png_ptr->flags instead of png_ptr->transformations to pass
PNG_STRIP_ALPHA info to png_do_strip_filler(), to preserve ABI
compatibility.
- Revised handling of SPECIALBUILD, PRIVATEBUILD,
+ Revised handling of SPECIALBUILD, PRIVATEBUILD,
PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING.
version 1.2.8rc1 [November 24, 2004]
Moved handling of BUILD macros from pngconf.h to png.h
diff --git a/com32/lib/libpng/KNOWNBUG b/com32/lib/libpng/KNOWNBUG
index 620296f6..48147bba 100644
--- a/com32/lib/libpng/KNOWNBUG
+++ b/com32/lib/libpng/KNOWNBUG
@@ -8,4 +8,3 @@ Known bugs in libpng version 1.2.8
STATUS: Under investigation. The change to pnggccrd.c in libpng-1.2.1
fixed a problem under FreeBSD but not the problem with NetBSD, which
still fails as of libpng-1.2.2rc1.
-
diff --git a/com32/lib/libpng/example.c b/com32/lib/libpng/example.c
index ba0ecc5b..8a902959 100644
--- a/com32/lib/libpng/example.c
+++ b/com32/lib/libpng/example.c
@@ -490,10 +490,10 @@ row_callback(png_structp png_ptr, png_bytep new_row,
* In this function you will receive a pointer to new row data from
* libpng called new_row that is to replace a corresponding row (of
* the same data format) in a buffer allocated by your application.
- *
+ *
* The new row data pointer new_row may be NULL, indicating there is
* no new data to be replaced (in cases of interlace loading).
- *
+ *
* If new_row is not NULL then you need to call
* png_progressive_combine_row() to replace the corresponding row as
* shown below:
diff --git a/com32/lib/libpng/libpng.3 b/com32/lib/libpng/libpng.3
index 1feceee3..151e603c 100644
--- a/com32/lib/libpng/libpng.3
+++ b/com32/lib/libpng/libpng.3
@@ -4019,4 +4019,3 @@ glennrp at users.sourceforge.net
December 3, 2004
.\" end of man page
-
diff --git a/com32/lib/libpng/png.5 b/com32/lib/libpng/png.5
index db7c8341..990de518 100644
--- a/com32/lib/libpng/png.5
+++ b/com32/lib/libpng/png.5
@@ -71,4 +71,3 @@ The PNG-1.0 specification is copyright (c) 1996 Massachusetts Institute of
Technology. See the specification for conditions of use and distribution.
.LP
.\" end of man page
-
diff --git a/com32/lib/libpng/pngerror.c b/com32/lib/libpng/pngerror.c
index 6fa40123..9d4ec532 100644
--- a/com32/lib/libpng/pngerror.c
+++ b/com32/lib/libpng/pngerror.c
@@ -56,7 +56,7 @@ png_error(png_structp png_ptr, png_const_charp error_message)
{
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
{
- msg[0]='0';
+ msg[0]='0';
msg[1]='\0';
error_message=msg;
}
diff --git a/com32/lib/libpng/pnggccrd.c b/com32/lib/libpng/pnggccrd.c
index 248e1b3b..ee518f11 100644
--- a/com32/lib/libpng/pnggccrd.c
+++ b/com32/lib/libpng/pnggccrd.c
@@ -5102,7 +5102,7 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
case 1: sprintf(filnm, "sub-%s",
#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
#if !defined(PNG_1_0_X)
- (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" :
+ (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" :
#endif
#endif
"x86");
@@ -5397,7 +5397,7 @@ png_mmx_support(void)
// , "memory" // if write to a variable gcc thought was in a reg
// , "cc" // "condition codes" (flag bits)
);
-#else
+#else
_mmx_supported = 0;
#endif /* PNG_MMX_CODE_SUPPORTED */
diff --git a/com32/lib/libpng/pngpread.c b/com32/lib/libpng/pngpread.c
index 8c35faae..7ef6fa4e 100644
--- a/com32/lib/libpng/pngpread.c
+++ b/com32/lib/libpng/pngpread.c
@@ -614,7 +614,7 @@ png_push_save_buffer(png_structp png_ptr)
png_size_t new_max;
png_bytep old_buffer;
- if (png_ptr->save_buffer_size > PNG_SIZE_MAX -
+ if (png_ptr->save_buffer_size > PNG_SIZE_MAX -
(png_ptr->current_buffer_size + 256))
{
png_error(png_ptr, "Potential overflow of save_buffer");
diff --git a/com32/lib/libpng/pngread.c b/com32/lib/libpng/pngread.c
index 5924333d..b92a1385 100644
--- a/com32/lib/libpng/pngread.c
+++ b/com32/lib/libpng/pngread.c
@@ -75,7 +75,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
png_free(png_ptr, png_ptr->zbuf);
png_ptr->zbuf=NULL;
#ifdef PNG_USER_MEM_SUPPORTED
- png_destroy_struct_2((png_voidp)png_ptr,
+ png_destroy_struct_2((png_voidp)png_ptr,
(png_free_ptr)free_fn, (png_voidp)mem_ptr);
#else
png_destroy_struct((png_voidp)png_ptr);
@@ -188,7 +188,7 @@ png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
{
/* We only come here via pre-1.0.12-compiled applications */
#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE)
- if(png_sizeof(png_struct) > png_struct_size ||
+ if(png_sizeof(png_struct) > png_struct_size ||
png_sizeof(png_info) > png_info_size)
{
char msg[80];
@@ -736,7 +736,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf,
png_ptr->rowbytes + 1);
-
+
#if defined(PNG_MNG_FEATURES_SUPPORTED)
if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
(png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))
diff --git a/com32/lib/libpng/pngrtran.c b/com32/lib/libpng/pngrtran.c
index e1d6e3ce..da9ef6e8 100644
--- a/com32/lib/libpng/pngrtran.c
+++ b/com32/lib/libpng/pngrtran.c
@@ -788,7 +788,7 @@ png_init_read_transformations(png_structp png_ptr)
{
if (color_type == PNG_COLOR_TYPE_PALETTE)
{
- /* could skip if no transparency and
+ /* could skip if no transparency and
*/
png_color back, back_1;
png_colorp palette = png_ptr->palette;
diff --git a/com32/lib/libpng/pngset.c b/com32/lib/libpng/pngset.c
index 5922cad0..13ecb281 100644
--- a/com32/lib/libpng/pngset.c
+++ b/com32/lib/libpng/pngset.c
@@ -309,7 +309,7 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
if(!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
(filter_type == PNG_INTRAPIXEL_DIFFERENCING) &&
((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) &&
- (color_type == PNG_COLOR_TYPE_RGB ||
+ (color_type == PNG_COLOR_TYPE_RGB ||
color_type == PNG_COLOR_TYPE_RGB_ALPHA)))
png_error(png_ptr, "Unknown filter method in IHDR");
if(png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)
diff --git a/com32/lib/libpng/pngtest.c b/com32/lib/libpng/pngtest.c
index f2085e1e..163f9f7a 100644
--- a/com32/lib/libpng/pngtest.c
+++ b/com32/lib/libpng/pngtest.c
@@ -1435,7 +1435,7 @@ main(int argc, char *argv[])
current_allocation);
while (pinfo != NULL)
{
- fprintf(STDERR, " %lu bytes at %x\n", pinfo->size,
+ fprintf(STDERR, " %lu bytes at %x\n", pinfo->size,
(unsigned int) pinfo->pointer);
pinfo = pinfo->next;
}
diff --git a/com32/lib/lrand48.c b/com32/lib/lrand48.c
index 4d05de2e..f26d0996 100644
--- a/com32/lib/lrand48.c
+++ b/com32/lib/lrand48.c
@@ -17,7 +17,7 @@ long jrand48(unsigned short xsubi[3])
((uint64_t)xsubi[2] << 32);
x = (0x5deece66dULL * x) + 0xb;
-
+
xsubi[0] = (unsigned short)x;
xsubi[1] = (unsigned short)(x >> 16);
xsubi[2] = (unsigned short)(x >> 32);
@@ -39,4 +39,3 @@ long lrand48(void)
{
return (long)((uint32_t)(mrand48() >> 1));
}
-
diff --git a/com32/lib/malloc.c b/com32/lib/malloc.c
index e7a1cdc9..2f8362b4 100644
--- a/com32/lib/malloc.c
+++ b/com32/lib/malloc.c
@@ -41,14 +41,14 @@ static void __constructor init_memory_arena(void)
if ( __stack_size == 0 || __stack_size > total_space >> 1 )
__stack_size = total_space >> 1; /* Half for the stack, half for the heap... */
-
+
if ( total_space < __stack_size + 4*sizeof(struct arena_header) )
__stack_size = total_space - 4*sizeof(struct arena_header);
fp = (struct free_arena_header *)start;
fp->a.type = ARENA_TYPE_FREE;
fp->a.size = total_space - __stack_size;
-
+
/* Insert into chains */
fp->a.next = fp->a.prev = &__malloc_head;
fp->next_free = fp->prev_free = &__malloc_head;
@@ -62,7 +62,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size)
struct free_arena_header *nfp, *na;
fsize = fp->a.size;
-
+
/* We need the 2* to account for the larger requirements of a free block */
if ( fsize >= size+2*sizeof(struct arena_header) ) {
/* Bigger block than required -- split block */
@@ -79,7 +79,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size)
nfp->a.next = na;
na->a.prev = nfp;
fp->a.next = nfp;
-
+
/* Replace current block on free chain */
nfp->next_free = fp->next_free;
nfp->prev_free = fp->prev_free;
@@ -93,7 +93,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size)
fp->next_free->prev_free = fp->prev_free;
fp->prev_free->next_free = fp->next_free;
}
-
+
return (void *)(&fp->a + 1);
}
diff --git a/com32/lib/memswap.c b/com32/lib/memswap.c
index 10440e34..97fa5197 100644
--- a/com32/lib/memswap.c
+++ b/com32/lib/memswap.c
@@ -17,7 +17,7 @@ void memswap(void *m1, void *m2, size_t n)
tmp = *p;
*p = *q;
*q = tmp;
-
+
p++; q++;
}
}
diff --git a/com32/lib/onexit.c b/com32/lib/onexit.c
index 70a9c01f..c9847927 100644
--- a/com32/lib/onexit.c
+++ b/com32/lib/onexit.c
@@ -12,11 +12,11 @@ static struct atexit *__atexit_list;
static __noreturn on_exit_exit(int rv)
{
struct atexit *ap;
-
+
for ( ap = __atexit_list ; ap ; ap = ap->next ) {
ap->fctn(rv, ap->arg); /* This assumes extra args are harmless */
}
-
+
_exit(rv);
}
diff --git a/com32/lib/pci/cfgtype.c b/com32/lib/pci/cfgtype.c
index 0f8c623f..97215d42 100644
--- a/com32/lib/pci/cfgtype.c
+++ b/com32/lib/pci/cfgtype.c
@@ -39,14 +39,14 @@ static int type2_ok(void)
outb(0, 0xcf8);
oldcfa = inb(0xcfa);
outb(0, 0xcfa);
-
+
cf8 = inb(0xcf8);
cfa = inb(0xcfa);
-
+
outb(oldcf8, 0xcf8);
outb(oldcfa, 0xcfa);
sti();
-
+
return cf8 == 0 && cfa == 0;
}
@@ -87,4 +87,3 @@ int pci_set_config_type(enum pci_config_type type)
return (__pci_cfg_type = type);
}
-
diff --git a/com32/lib/pci/readbios.c b/com32/lib/pci/readbios.c
index 92b4eeec..34f593c0 100644
--- a/com32/lib/pci/readbios.c
+++ b/com32/lib/pci/readbios.c
@@ -10,7 +10,6 @@ uint32_t __pci_read_bios(uint32_t call, pciaddr_t a)
rs.ebx.w[0] = a >> 8; /* bus:device:function */
rs.edi.b[0] = a; /* address:reg */
__intcall(0x1a, &rs, &rs);
-
+
return (rs.eflags.l & EFLAGS_CF) ? ~(uint32_t)0 : rs.ecx.l;
}
-
diff --git a/com32/lib/pci/readx.c b/com32/lib/pci/readx.c
index cbd7496f..3f19cad2 100644
--- a/com32/lib/pci/readx.c
+++ b/com32/lib/pci/readx.c
@@ -10,7 +10,7 @@ TYPE BWL(pci_read) (pciaddr_t a)
case PCI_CFG_AUTO:
pci_set_config_type(PCI_CFG_AUTO);
break; /* Try again */
-
+
case PCI_CFG_TYPE1:
{
uint32_t oldcf8;
@@ -22,14 +22,14 @@ TYPE BWL(pci_read) (pciaddr_t a)
sti();
}
return r;
-
+
case PCI_CFG_TYPE2:
{
uint8_t oldcf8, oldcfa;
-
+
if ( a & (0x10 << 11) )
return (TYPE)~0; /* Device 16-31 not supported */
-
+
cli();
oldcf8 = inb(0xcf8);
oldcfa = inb(0xcfa);
@@ -44,7 +44,7 @@ TYPE BWL(pci_read) (pciaddr_t a)
case PCI_CFG_BIOS:
return (TYPE) __pci_read_bios(BIOSCALL, a);
-
+
default:
return (TYPE)~0;
}
diff --git a/com32/lib/pci/writex.c b/com32/lib/pci/writex.c
index 14eb0377..d5a53c0f 100644
--- a/com32/lib/pci/writex.c
+++ b/com32/lib/pci/writex.c
@@ -23,10 +23,10 @@ void BWL(pci_write) (TYPE v, pciaddr_t a)
case PCI_CFG_TYPE2:
{
uint8_t oldcf8, oldcfa;
-
+
if ( a & (0x10 << 11) )
return; /* Devices 16-31 not supported */
-
+
cli();
oldcf8 = inb(0xcf8);
oldcfa = inb(0xcfa);
diff --git a/com32/lib/qsort.c b/com32/lib/qsort.c
index 185f4dac..312872db 100644
--- a/com32/lib/qsort.c
+++ b/com32/lib/qsort.c
@@ -29,7 +29,7 @@ void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, co
do {
gap = newgap(gap);
swapped = 0;
-
+
for ( i = 0, p1 = base ; i < nmemb-gap ; i++, p1 += size ) {
j = i+gap;
if ( compar(p1, p2 = (char *)base+j*size) > 0 ) {
@@ -39,4 +39,3 @@ void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, co
}
} while ( gap > 1 || swapped );
}
-
diff --git a/com32/lib/realloc.c b/com32/lib/realloc.c
index 577c2001..cfbdc762 100644
--- a/com32/lib/realloc.c
+++ b/com32/lib/realloc.c
@@ -36,7 +36,7 @@ void *realloc(void *ptr, size_t size)
/* Make me a new block. This is kind of bogus; we should
be checking the adjacent blocks to see if we can do an
in-place adjustment... fix that later. */
-
+
oldsize = ah->a.size - sizeof(struct arena_header);
newptr = malloc(size);
@@ -46,4 +46,3 @@ void *realloc(void *ptr, size_t size)
return newptr;
}
}
-
diff --git a/com32/lib/seed48.c b/com32/lib/seed48.c
index f8353c87..c1d17304 100644
--- a/com32/lib/seed48.c
+++ b/com32/lib/seed48.c
@@ -13,7 +13,6 @@ unsigned short *seed48(const unsigned short xsubi[3])
static unsigned short oldseed[3];
memcpy(oldseed, __rand48_seed, sizeof __rand48_seed);
memcpy(__rand48_seed, xsubi, sizeof __rand48_seed);
-
+
return oldseed;
}
-
diff --git a/com32/lib/setjmp.S b/com32/lib/setjmp.S
index 5c5fbeae..53b2dee8 100644
--- a/com32/lib/setjmp.S
+++ b/com32/lib/setjmp.S
@@ -20,7 +20,7 @@
.globl _setjmp
.type _setjmp, @function
_setjmp: # gcc 4.0.1 wants this as an alias?
-
+
.globl setjmp
.type setjmp, @function
setjmp:
@@ -28,7 +28,7 @@ setjmp:
movl %eax,%edx
#else
movl 4(%esp),%edx
-#endif
+#endif
popl %ecx # Return address, and adjust the stack
xorl %eax,%eax # Return value
movl %ebx,(%edx)
diff --git a/com32/lib/strerror.c b/com32/lib/strerror.c
index 62705553..5d3fc9a3 100644
--- a/com32/lib/strerror.c
+++ b/com32/lib/strerror.c
@@ -21,4 +21,3 @@ char *strerror(int errnum)
return (char *)memcpy(message+6, p, (numbuf+sizeof numbuf)-p);
}
-
diff --git a/com32/lib/strlcat.c b/com32/lib/strlcat.c
index 6111445f..f9db7156 100644
--- a/com32/lib/strlcat.c
+++ b/com32/lib/strlcat.c
@@ -27,5 +27,3 @@ size_t strlcat(char *dst, const char *src, size_t size)
*q = '\0';
return bytes;
}
-
-
diff --git a/com32/lib/strlcpy.c b/com32/lib/strlcpy.c
index eb384c98..ba4272b7 100644
--- a/com32/lib/strlcpy.c
+++ b/com32/lib/strlcpy.c
@@ -22,5 +22,3 @@ size_t strlcpy(char *dst, const char *src, size_t size)
*q = '\0';
return bytes;
}
-
-
diff --git a/com32/lib/strlen.c b/com32/lib/strlen.c
index 4d773f9a..847c16eb 100644
--- a/com32/lib/strlen.c
+++ b/com32/lib/strlen.c
@@ -11,4 +11,3 @@ size_t strlen(const char *s)
ss++;
return ss-s;
}
-
diff --git a/com32/lib/strrchr.c b/com32/lib/strrchr.c
index 3b424640..b9f20041 100644
--- a/com32/lib/strrchr.c
+++ b/com32/lib/strrchr.c
@@ -7,7 +7,7 @@
char *strrchr(const char *s, int c)
{
const char *found = NULL;
-
+
while ( *s ) {
if ( *s == (char) c )
found = s;
diff --git a/com32/lib/strspn.c b/com32/lib/strspn.c
index 856a9641..d569e029 100644
--- a/com32/lib/strspn.c
+++ b/com32/lib/strspn.c
@@ -61,7 +61,6 @@ char *
strpbrk(const char *s, const char *accept)
{
const char *ss = s+strxspn(s, accept, 1);
-
+
return *ss ? (char *)ss : NULL;
}
-
diff --git a/com32/lib/strtok.c b/com32/lib/strtok.c
index 6e84f1df..e89a9c56 100644
--- a/com32/lib/strtok.c
+++ b/com32/lib/strtok.c
@@ -13,4 +13,3 @@ char *strtok(char *s, const char *delim)
return strsep(&holder, delim);
}
-
diff --git a/com32/lib/sys/ansicon_write.c b/com32/lib/sys/ansicon_write.c
index b22421ef..0858a167 100644
--- a/com32/lib/sys/ansicon_write.c
+++ b/com32/lib/sys/ansicon_write.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -134,7 +134,7 @@ static void __constructor ansicon_init(void)
static void ansicon_erase(int x0, int y0, int x1, int y1)
{
static com32sys_t ireg;
-
+
ireg.eax.w[0] = 0x0600; /* Clear window */
ireg.ebx.b[1] = st.attr; /* Fill with current attribute */
ireg.ecx.b[0] = x0;
@@ -214,7 +214,7 @@ static void ansicon_putchar(int ch)
break;
}
break;
-
+
case st_esc:
switch ( ch ) {
case '%':
@@ -241,7 +241,7 @@ static void ansicon_putchar(int ch)
break;
}
break;
-
+
case st_csi:
{
int p0 = st.parms[0] ? st.parms[0] : 1;
@@ -353,7 +353,7 @@ static void ansicon_putchar(int ch)
case 2:
ansicon_erase(0, xy.y, cols-1, xy.y);
break;
-
+
default:
/* Ignore */
break;
@@ -443,7 +443,7 @@ static void ansicon_putchar(int ch)
break;
}
}
-
+
/* Turn into an attribute code */
{
int bg = st.bg;
@@ -508,8 +508,8 @@ static void ansicon_putchar(int ch)
ireg.edx.b[1] = xy.y;
ireg.edx.b[0] = xy.x;
__intcall(0x10, &ireg, NULL);
-}
-
+}
+
ssize_t __ansicon_write(struct file_info *fp, const void *buf, size_t count)
{
diff --git a/com32/lib/sys/ansiserial_write.c b/com32/lib/sys/ansiserial_write.c
index 95f1c747..0191bc25 100644
--- a/com32/lib/sys/ansiserial_write.c
+++ b/com32/lib/sys/ansiserial_write.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/argv.c b/com32/lib/sys/argv.c
index b4a57284..5238c9af 100644
--- a/com32/lib/sys/argv.c
+++ b/com32/lib/sys/argv.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -79,7 +79,7 @@ int __parse_argv(char ***argv, const char *str)
arg = ALIGN_UP(q,char *);
*argv = arg;
*arg++ = argv0; /* argv[0] */
-
+
q--; /* Point q to final null */
if ( mem < q )
*arg++ = mem; /* argv[1] */
@@ -95,4 +95,3 @@ int __parse_argv(char ***argv, const char *str)
return argc;
}
-
diff --git a/com32/lib/sys/close.c b/com32/lib/sys/close.c
index 765641f5..e34c29a3 100644
--- a/com32/lib/sys/close.c
+++ b/com32/lib/sys/close.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -50,13 +50,13 @@ int close(int fd)
if ( rv )
return rv;
}
-
+
if ( fp->oop->close ) {
rv = fp->oop->close(fp);
if ( rv )
return rv;
}
-
+
memset(fp, 0, sizeof *fp); /* File structure unused */
return 0;
}
diff --git a/com32/lib/sys/entry.S b/com32/lib/sys/entry.S
index 38e4c882..e12c65a7 100644
--- a/com32/lib/sys/entry.S
+++ b/com32/lib/sys/entry.S
@@ -1,6 +1,6 @@
#ident "$Id$"
# -----------------------------------------------------------------------
-#
+#
# Copyright 2003-2004 H. Peter Anvin - All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
# sell copies of the Software, and to permit persons to whom
# the Software is furnished to do so, subject to the following
# conditions:
-#
+#
# The above copyright notice and this permission notice shall
# be included in all copies or substantial portions of the Software.
-#
+#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -28,7 +28,7 @@
# COM32 start up code - must be linked first in the binary
-
+
.section ".init","ax"
.globl _start
.type _start, @function
@@ -82,7 +82,7 @@ _start:
call *(__exit_handler)
hlt
.size _start, .-_start
-
+
.bss
.globl __entry_esp
__entry_esp: .space 4
diff --git a/com32/lib/sys/err_read.c b/com32/lib/sys/err_read.c
index c980889f..3b71959f 100644
--- a/com32/lib/sys/err_read.c
+++ b/com32/lib/sys/err_read.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/err_write.c b/com32/lib/sys/err_write.c
index b0191c8f..216db292 100644
--- a/com32/lib/sys/err_write.c
+++ b/com32/lib/sys/err_write.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/exit.S b/com32/lib/sys/exit.S
index 22c9da78..412384ef 100644
--- a/com32/lib/sys/exit.S
+++ b/com32/lib/sys/exit.S
@@ -9,7 +9,7 @@ _exit:
#ifdef REGPARM
pushl %eax
#endif
-
+
# Run any destructors
movl $__dtors_start, %esi
2:
@@ -18,7 +18,7 @@ _exit:
call *(%esi)
addl $4,%esi
jmp 2b
-
+
1:
#ifdef REGPARM
popl %eax
diff --git a/com32/lib/sys/file.h b/com32/lib/sys/file.h
index 0096e8af..ea527617 100644
--- a/com32/lib/sys/file.h
+++ b/com32/lib/sys/file.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2003-2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/fileclose.c b/com32/lib/sys/fileclose.c
index c35cad8c..64ab7c3f 100644
--- a/com32/lib/sys/fileclose.c
+++ b/com32/lib/sys/fileclose.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/fileread.c b/com32/lib/sys/fileread.c
index b9cc0d0a..5007c8ad 100644
--- a/com32/lib/sys/fileread.c
+++ b/com32/lib/sys/fileread.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -57,7 +57,7 @@ ssize_t __file_read(struct file_info *fp, void *buf, size_t count)
ireg.esi.w[0] = fp->i.filedes;
ireg.ecx.w[0] = MAXBLOCK >> fp->i.blocklg2;
-
+
__intcall(0x22, &ireg, &oreg);
if ( oreg.eflags.l & EFLAGS_CF ) {
diff --git a/com32/lib/sys/fstat.c b/com32/lib/sys/fstat.c
index eba47b42..c6a33d8b 100644
--- a/com32/lib/sys/fstat.c
+++ b/com32/lib/sys/fstat.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -39,12 +39,12 @@
int fstat(int fd, struct stat *buf)
{
struct file_info *fp = &__file_info[fd];
-
+
if ( fd >= NFILES || !fp->iop ) {
errno = EBADF;
return -1;
}
-
+
if ( fp->iop->flags & __DEV_FILE ) {
buf->st_mode = S_IFREG | 0444;
buf->st_size = fp->i.length;
@@ -55,5 +55,3 @@ int fstat(int fd, struct stat *buf)
return 0;
}
-
-
diff --git a/com32/lib/sys/ftell.c b/com32/lib/sys/ftell.c
index 3db2814f..3f109163 100644
--- a/com32/lib/sys/ftell.c
+++ b/com32/lib/sys/ftell.c
@@ -11,8 +11,6 @@ long ftell(FILE *stream)
{
int fd = fileno(stream);
struct file_info *fp = &__file_info[fd];
-
+
return fp->i.offset;
}
-
-
diff --git a/com32/lib/sys/idle.c b/com32/lib/sys/idle.c
index 85e857fc..71060295 100644
--- a/com32/lib/sys/idle.c
+++ b/com32/lib/sys/idle.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -47,7 +47,7 @@ void syslinux_idle(void)
/* This call isn't supported on SYSLINUX < 3.08, but all it does
is return an error, so we don't care. */
-
+
if ( do_idle ) {
__intcall(0x22, &sys_idle, &idle_result);
diff --git a/com32/lib/sys/isatty.c b/com32/lib/sys/isatty.c
index 39146c7a..cb8eaffa 100644
--- a/com32/lib/sys/isatty.c
+++ b/com32/lib/sys/isatty.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/line_input.c b/com32/lib/sys/line_input.c
index a125ec8e..25d68712 100644
--- a/com32/lib/sys/line_input.c
+++ b/com32/lib/sys/line_input.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -56,12 +56,12 @@ ssize_t __line_input(struct file_info *fp, char *buf, size_t bufsize,
switch ( ch ) {
case '\n': /* Ignore incoming linefeed */
break;
-
+
case '\r':
*buf = '\n';
Write(fp, "\n", 1);
return n+1;
-
+
case '\b':
if ( n > 0 ) {
n--; buf--;
@@ -75,7 +75,7 @@ ssize_t __line_input(struct file_info *fp, char *buf, size_t bufsize,
Write(fp, "\b \b", 3);
}
break;
-
+
default:
if ( n < bufsize-1 ) {
*buf = ch;
@@ -87,4 +87,3 @@ ssize_t __line_input(struct file_info *fp, char *buf, size_t bufsize,
}
}
}
-
diff --git a/com32/lib/sys/null_read.c b/com32/lib/sys/null_read.c
index 8121faee..bac0da12 100644
--- a/com32/lib/sys/null_read.c
+++ b/com32/lib/sys/null_read.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/null_write.c b/com32/lib/sys/null_write.c
index bebf34b5..aa9ab30a 100644
--- a/com32/lib/sys/null_write.c
+++ b/com32/lib/sys/null_write.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/open.c b/com32/lib/sys/open.c
index 433a8ec4..86a61b64 100644
--- a/com32/lib/sys/open.c
+++ b/com32/lib/sys/open.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2003-2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -60,7 +60,7 @@ int open(const char *pathname, int flags, ...)
if ( fd < 0 )
return -1;
-
+
fp = &__file_info[fd];
strlcpy(__com32.cs_bounce, pathname, __com32.cs_bounce_size);
@@ -70,7 +70,7 @@ int open(const char *pathname, int flags, ...)
regs.es = SEG(__com32.cs_bounce);
__com32.cs_intcall(0x22, &regs, &regs);
-
+
if ( (regs.eflags.l & EFLAGS_CF) || regs.esi.w[0] == 0 ) {
errno = ENOENT;
return -1;
@@ -87,4 +87,4 @@ int open(const char *pathname, int flags, ...)
fp->i.nbytes = 0;
return fd;
-}
+}
diff --git a/com32/lib/sys/openconsole.c b/com32/lib/sys/openconsole.c
index fbc277b0..c1c77556 100644
--- a/com32/lib/sys/openconsole.c
+++ b/com32/lib/sys/openconsole.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/opendev.c b/com32/lib/sys/opendev.c
index 4384d1e9..68621ac7 100644
--- a/com32/lib/sys/opendev.c
+++ b/com32/lib/sys/opendev.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2003-2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/rawcon_read.c b/com32/lib/sys/rawcon_read.c
index fb720ef8..52a83319 100644
--- a/com32/lib/sys/rawcon_read.c
+++ b/com32/lib/sys/rawcon_read.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -50,7 +50,7 @@ ssize_t __rawcon_read(struct file_info *fp, void *buf, size_t count)
(void)fp;
- memset(&ireg, 0, sizeof ireg);
+ memset(&ireg, 0, sizeof ireg);
start = times(NULL);
diff --git a/com32/lib/sys/rawcon_write.c b/com32/lib/sys/rawcon_write.c
index 329a116d..09f82dc3 100644
--- a/com32/lib/sys/rawcon_write.c
+++ b/com32/lib/sys/rawcon_write.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -46,7 +46,7 @@ static ssize_t __rawcon_write(struct file_info *fp, const void *buf, size_t coun
(void)fp;
- memset(&ireg, 0, sizeof ireg);
+ memset(&ireg, 0, sizeof ireg);
ireg.eax.b[1] = 0x02;
while ( count-- ) {
diff --git a/com32/lib/sys/read.c b/com32/lib/sys/read.c
index 4f96aad7..0f361d89 100644
--- a/com32/lib/sys/read.c
+++ b/com32/lib/sys/read.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -42,7 +42,7 @@
ssize_t read(int fd, void *buf, size_t count)
{
struct file_info *fp = &__file_info[fd];
-
+
if ( fd >= NFILES || !fp->iop ) {
errno = EBADF;
return -1;
diff --git a/com32/lib/sys/serial_write.c b/com32/lib/sys/serial_write.c
index 44f3137f..5081db9d 100644
--- a/com32/lib/sys/serial_write.c
+++ b/com32/lib/sys/serial_write.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -46,7 +46,7 @@ ssize_t __serial_write(struct file_info *fp, const void *buf, size_t count)
(void)fp;
- memset(&ireg, 0, sizeof ireg);
+ memset(&ireg, 0, sizeof ireg);
ireg.eax.b[1] = 0x04;
while ( count-- ) {
diff --git a/com32/lib/sys/stdcon_read.c b/com32/lib/sys/stdcon_read.c
index 1f172cc9..4d56b03f 100644
--- a/com32/lib/sys/stdcon_read.c
+++ b/com32/lib/sys/stdcon_read.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/stdcon_write.c b/com32/lib/sys/stdcon_write.c
index d5f91851..876f8988 100644
--- a/com32/lib/sys/stdcon_write.c
+++ b/com32/lib/sys/stdcon_write.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -46,7 +46,7 @@ static ssize_t __stdcon_write(struct file_info *fp, const void *buf, size_t coun
(void)fp;
- memset(&ireg, 0, sizeof ireg);
+ memset(&ireg, 0, sizeof ireg);
ireg.eax.b[1] = 0x02;
while ( count-- ) {
diff --git a/com32/lib/sys/times.c b/com32/lib/sys/times.c
index b67a2a7c..58c59cf3 100644
--- a/com32/lib/sys/times.c
+++ b/com32/lib/sys/times.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/sys/write.c b/com32/lib/sys/write.c
index 2e27d6ff..e34ad884 100644
--- a/com32/lib/sys/write.c
+++ b/com32/lib/sys/write.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/lib/vasprintf.c b/com32/lib/vasprintf.c
index 657bfdc3..910e7d95 100644
--- a/com32/lib/vasprintf.c
+++ b/com32/lib/vasprintf.c
@@ -20,6 +20,6 @@ int vasprintf(char **bufp, const char *format, va_list ap)
*bufp = p = malloc(bytes);
if ( !p )
return -1;
-
+
return vsnprintf(p, bytes, format, ap);
}
diff --git a/com32/lib/vsnprintf.c b/com32/lib/vsnprintf.c
index 5cb93319..8279d7a8 100644
--- a/com32/lib/vsnprintf.c
+++ b/com32/lib/vsnprintf.c
@@ -369,10 +369,10 @@ int vsnprintf(char *buffer, size_t n, const char *format, va_list ap)
{
char sch;
int i;
-
+
if ( prec != -1 && slen > prec )
slen = prec;
-
+
if ( width > slen && !(flags & FL_MINUS) ) {
char pad = (flags & FL_ZERO) ? '0' : ' ';
while ( width > slen ) {
@@ -414,7 +414,7 @@ int vsnprintf(char *buffer, size_t n, const char *format, va_list ap)
}
}
break;
-
+
default: /* Anything else, including % */
EMIT(ch);
break;
diff --git a/com32/lib/vsscanf.c b/com32/lib/vsscanf.c
index 12a82b27..1882765d 100644
--- a/com32/lib/vsscanf.c
+++ b/com32/lib/vsscanf.c
@@ -210,7 +210,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap)
case 'u': /* Unsigned decimal integer */
base = 10; sign = 0;
goto scan_int;
-
+
case 'x': /* Hexadecimal integer */
case 'X':
base = 16; sign = 0;
@@ -259,7 +259,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap)
}
}
break;
-
+
case 'c': /* Character */
width = (flags & FL_WIDTH) ? width : 1; /* Default width == 1 */
sarg = va_arg(ap, char *);
@@ -289,7 +289,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap)
}
}
break;
-
+
case '[': /* Character range */
sarg = va_arg(ap, char *);
state = st_match_init;
@@ -310,7 +310,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap)
}
}
break;
-
+
case st_match_init: /* Initial state for %[ match */
if ( ch == '^' && !(flags & FL_INV) ) {
matchinv = 1;
@@ -319,7 +319,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap)
state = st_match;
}
break;
-
+
case st_match: /* Main state for %[ match */
if ( ch == ']' ) {
goto match_run;
@@ -330,7 +330,7 @@ int vsscanf(const char *buffer, const char *format, va_list ap)
set_bit(matchmap, (unsigned char)ch);
}
break;
-
+
case st_match_range: /* %[ match after - */
if ( ch == ']' ) {
set_bit(matchmap, (unsigned char)'-'); /* - was last character */
diff --git a/com32/lib/zlib/trees.h b/com32/lib/zlib/trees.h
index 72facf90..aadfa16d 100644
--- a/com32/lib/zlib/trees.h
+++ b/com32/lib/zlib/trees.h
@@ -125,4 +125,3 @@ local const int base_dist[D_CODES] = {
32, 48, 64, 96, 128, 192, 256, 384, 512, 768,
1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576
};
-
diff --git a/com32/libutil/Makefile b/com32/libutil/Makefile
index d66a8245..c46e05e4 100644
--- a/com32/libutil/Makefile
+++ b/com32/libutil/Makefile
@@ -1,6 +1,6 @@
#ident "$Id$"
## -----------------------------------------------------------------------
-##
+##
## Copyright 2001-2004 H. Peter Anvin - All Rights Reserved
##
## Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
## sell copies of the Software, and to permit persons to whom
## the Software is furnished to do so, subject to the following
## conditions:
-##
+##
## The above copyright notice and this permission notice shall
## be included in all copies or substantial portions of the Software.
-##
+##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
## EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
## OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -110,4 +110,3 @@ spotless: clean
install: all
mkdir -m 755 -p $(INSTALLROOT)$(COM32DIR)
install -m 644 libutil_com.a libutil_lnx.a $(INSTALLROOT)$(COM32DIR)
-
diff --git a/com32/libutil/ansiline.c b/com32/libutil/ansiline.c
index f79d229f..7ca7ca0e 100644
--- a/com32/libutil/ansiline.c
+++ b/com32/libutil/ansiline.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -51,7 +51,7 @@ void console_ansi_std(void)
fputs("\033[0m\033[20h", stdout);
}
-#else
+#else
#include <stdio.h>
#include <termios.h>
@@ -68,7 +68,7 @@ static void __attribute__((destructor)) console_cleanup(void)
fputs("\033[0m\033[20l", stdout);
tcsetattr(0, TCSANOW, &original_termios_settings);
}
-
+
void console_ansi_std(void)
{
@@ -89,4 +89,3 @@ void console_ansi_std(void)
}
#endif
-
diff --git a/com32/libutil/ansiraw.c b/com32/libutil/ansiraw.c
index 8761b596..8d85e257 100644
--- a/com32/libutil/ansiraw.c
+++ b/com32/libutil/ansiraw.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -51,7 +51,7 @@ void console_ansi_raw(void)
fputs("\033[0m\033[20h", stdout);
}
-#else
+#else
#include <stdio.h>
#include <termios.h>
@@ -68,7 +68,7 @@ static void __attribute__((destructor)) console_cleanup(void)
fputs("\033[0m\033[20l", stdout);
tcsetattr(0, TCSANOW, &original_termios_settings);
}
-
+
void console_ansi_raw(void)
{
@@ -91,4 +91,3 @@ void console_ansi_raw(void)
}
#endif
-
diff --git a/com32/libutil/get_key.c b/com32/libutil/get_key.c
index bd06008e..37241775 100644
--- a/com32/libutil/get_key.c
+++ b/com32/libutil/get_key.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -170,8 +170,3 @@ int get_key(FILE *f, clock_t timeout)
/* We really should remember this and return subsequent characters later */
return buffer[0];
}
-
-
-
-
-
diff --git a/com32/libutil/idle.c b/com32/libutil/idle.c
index 7f724900..c350a9fc 100644
--- a/com32/libutil/idle.c
+++ b/com32/libutil/idle.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/libutil/include/base64.h b/com32/libutil/include/base64.h
index 45c69afc..e17f11bf 100644
--- a/com32/libutil/include/base64.h
+++ b/com32/libutil/include/base64.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/libutil/include/consoles.h b/com32/libutil/include/consoles.h
index 81f17bf6..ca962b9e 100644
--- a/com32/libutil/include/consoles.h
+++ b/com32/libutil/include/consoles.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -39,4 +39,3 @@ void console_ansi_std(void);
void console_ansi_raw(void);
#endif /* LIBUTIL_CONSOLES_H */
-
diff --git a/com32/libutil/include/getkey.h b/com32/libutil/include/getkey.h
index 97a4ed84..d4e650d0 100644
--- a/com32/libutil/include/getkey.h
+++ b/com32/libutil/include/getkey.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/libutil/include/libutil.h b/com32/libutil/include/libutil.h
index 9138b6db..5c76fa33 100644
--- a/com32/libutil/include/libutil.h
+++ b/com32/libutil/include/libutil.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
diff --git a/com32/libutil/include/minmax.h b/com32/libutil/include/minmax.h
index 319db164..b333a656 100644
--- a/com32/libutil/include/minmax.h
+++ b/com32/libutil/include/minmax.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -41,4 +41,3 @@
xx > yy ? xx : yy; })
#endif /* _MINMAX_H */
-
diff --git a/com32/libutil/loadfile.c b/com32/libutil/loadfile.c
index 05f71184..3b580afe 100644
--- a/com32/libutil/loadfile.c
+++ b/com32/libutil/loadfile.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -68,5 +68,3 @@ int loadfile(const char *filename, void **ptr, size_t *len)
fclose(f);
return -1;
}
-
-
diff --git a/com32/libutil/movebits.c b/com32/libutil/movebits.c
index 07cc59f9..00bdad79 100644
--- a/com32/libutil/movebits.c
+++ b/com32/libutil/movebits.c
@@ -30,7 +30,7 @@ make_movelist(struct movelist *pptr, uintptr_t dst, uintptr_t src, uintptr_t len
if ( !ml )
return NULL;
-
+
ml->dst = dst;
ml->src = src;
ml->len = len;
@@ -102,7 +102,7 @@ split_movelist(uintptr_t start, uintptr_t len, struct movelist **parentptr)
assert(start >= ml->src);
assert(start < ml->src+ml->len);
-
+
/* Split off the beginning */
if ( start > ml->src ) {
uintptr_t l = start - ml->src;
@@ -210,7 +210,7 @@ allocate_from(uintptr_t start, uintptr_t len, struct movelist **parentptr)
parentptr = split_movelist(start, len, parentptr);
c = *parentptr;
}
-
+
*parentptr = c->next;
free(c);
}
@@ -218,7 +218,7 @@ allocate_from(uintptr_t start, uintptr_t len, struct movelist **parentptr)
/*
* Remove any chunk from the freelist which is already
* claimed by source data. This somewhat frivolously
- * assumes that the fragments are either completely
+ * assumes that the fragments are either completely
* covered by a free zone or not covered at all.
*/
static void
@@ -316,7 +316,7 @@ compute_movelist(struct movelist **moves, struct movelist *frags,
copylen = (*ep)->len;
}
allocate_from(copydst, copylen, ep);
-
+
if ( copylen >= o->len - (needbase-o->src) ) {
copysrc = o->src + (o->len - copylen);
} else {
@@ -354,7 +354,7 @@ compute_movelist(struct movelist **moves, struct movelist *frags,
goto move_chunk;
}
return -1; /* Stuck! */
-
+
move_chunk:
/* We're allowed to move the chunk into place now. */
@@ -363,7 +363,7 @@ compute_movelist(struct movelist **moves, struct movelist *frags,
fp = split_movelist(f->src, copylen+(needbase-f->dst), fp);
f = *fp;
}
-
+
mv = new_movelist(f->dst, f->src, f->len);
dprintf("A: 0x%08x bytes at 0x%08x -> 0x%08x\n",
mv->len, mv->src, mv->dst);
@@ -431,4 +431,3 @@ int main(int argc, char *argv[])
}
#endif /* TEST */
-
diff --git a/com32/libutil/sha1hash.c b/com32/libutil/sha1hash.c
index fc5cc358..6bd3f4be 100644
--- a/com32/libutil/sha1hash.c
+++ b/com32/libutil/sha1hash.c
@@ -4,7 +4,7 @@ By Steve Reid <sreid@sea-to-sky.net>
100% Public Domain
-----------------
-Modified 7/98
+Modified 7/98
By James H. Brown <jbrown@burgoyne.com>
Still 100% Public Domain
@@ -26,7 +26,7 @@ Since the file IO in main() reads 16K at a time, any file 8K or larger would
be guaranteed to generate the wrong hash (e.g. Test Vector #3, a million
"a"s).
-I also changed the declaration of variables i & j in SHA1Update to
+I also changed the declaration of variables i & j in SHA1Update to
unsigned long from unsigned int for the same reason.
These changes should make no difference to any 32 bit implementations since
@@ -53,7 +53,7 @@ Still 100% public domain
Modified 4/01
By Saul Kravitz <Saul.Kravitz@celera.com>
Still 100% PD
-Modified to run on Compaq Alpha hardware.
+Modified to run on Compaq Alpha hardware.
-----------------
Modified 2/03
@@ -103,7 +103,7 @@ A million repetitions of "a"
void SHAPrintContext(SHA1_CTX *context, char *msg){
printf("%s (%d,%d) %x %x %x %x %x\n",
msg,
- context->count[0], context->count[1],
+ context->count[0], context->count[1],
context->state[0],
context->state[1],
context->state[2],
@@ -241,7 +241,7 @@ unsigned char finalcount[8];
SHA1Transform(context->state, context->buffer);
#endif
}
-
+
/*************************************************************/
/* This is not quite the MIME base64 algorithm: it uses _ instead of /,
@@ -291,7 +291,7 @@ int main(int argc, char** argv)
fputs("Unable to open file.", stderr);
return(-1);
}
- }
+ }
SHA1Init(&context);
while (!feof(file)) { /* note: what if ferror(file) */
i = fread(buffer, 1, 16384, file);
diff --git a/com32/libutil/unbase64.c b/com32/libutil/unbase64.c
index a3948aa9..57671a02 100644
--- a/com32/libutil/unbase64.c
+++ b/com32/libutil/unbase64.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2005 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -47,13 +47,13 @@ size_t unbase64(unsigned char *buffer, size_t bufsiz, const char *txt)
char v;
size_t nbytes = 0;
-
+
memset(base64tbl, -1, sizeof base64tbl);
for ( i = 0 ; _base64chars[i] ; i++ ) {
base64tbl[_base64chars[i]] = i;
}
-
+
/* Also support filesystem safe alternate base64 encoding */
base64tbl['.'] = 62;
base64tbl['-'] = 62;
@@ -70,10 +70,9 @@ size_t unbase64(unsigned char *buffer, size_t bufsiz, const char *txt)
nbytes++;
nbits -= 8;
}
- }
+ }
txt++;
}
return nbytes;
}
-
diff --git a/com32/modules/Makefile b/com32/modules/Makefile
index 635d3b4c..e9736d78 100644
--- a/com32/modules/Makefile
+++ b/com32/modules/Makefile
@@ -1,6 +1,6 @@
#ident "$Id$"
## -----------------------------------------------------------------------
-##
+##
## Copyright 2001-2004 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
@@ -95,4 +95,3 @@ spotless: clean
install: all
mkdir -m 755 -p $(INSTALLROOT)$(AUXDIR)
install -m 644 $(MODULES) $(INSTALLROOT)$(AUXDIR)
-
diff --git a/com32/modules/ethersel.c b/com32/modules/ethersel.c
index d4dce9d0..fbbb1b8f 100644
--- a/com32/modules/ethersel.c
+++ b/com32/modules/ethersel.c
@@ -294,4 +294,3 @@ int main(int argc, char *argv[])
fputs("Error: no recognized network card found!\n", stderr);
return 1;
}
-
diff --git a/com32/modules/mboot.doc b/com32/modules/mboot.doc
index 006e46fa..5b4c1f3d 100644
--- a/com32/modules/mboot.doc
+++ b/com32/modules/mboot.doc
@@ -18,10 +18,9 @@ DEFAULT mboot.c32 xen.gz dom0_mem=15000 nosmp noacpi --- linux.gz console=tty0 r
or, as a choice in a menu:
LABEL Xen
- KERNEL mboot.c32
+ KERNEL mboot.c32
APPEND xen.gz dom0_mem=15000 nosmp noacpi --- linux.gz console=tty0 root=/dev/hda1 --- initrd.img
mboot.c32 requires version 2.12 or later of SYSLINUX.
Tim Deegan, May 2005
-
diff --git a/com32/modules/menu.h b/com32/modules/menu.h
index 0589c7a0..3ecd57ad 100644
--- a/com32/modules/menu.h
+++ b/com32/modules/menu.h
@@ -71,4 +71,3 @@ static inline int my_isspace(char c)
}
#endif /* MENU_H */
-
diff --git a/com32/samples/Makefile b/com32/samples/Makefile
index 709f4ca8..bce7ca3d 100644
--- a/com32/samples/Makefile
+++ b/com32/samples/Makefile
@@ -1,6 +1,6 @@
#ident "$Id$"
## -----------------------------------------------------------------------
-##
+##
## Copyright 2001-2004 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
diff --git a/com32/samples/fancyhello.c b/com32/samples/fancyhello.c
index d1323cbf..c0c908dc 100644
--- a/com32/samples/fancyhello.c
+++ b/com32/samples/fancyhello.c
@@ -1,7 +1,7 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/com32/samples/hello.c b/com32/samples/hello.c
index 4fbc1022..3cb5c8f2 100644
--- a/com32/samples/hello.c
+++ b/com32/samples/hello.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -36,6 +36,6 @@ int main(void)
break;
printf(": %s", buffer);
}
-
+
return 0;
}
diff --git a/com32/samples/keytest.c b/com32/samples/keytest.c
index 0433201e..d6a5c92b 100644
--- a/com32/samples/keytest.c
+++ b/com32/samples/keytest.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -40,7 +40,7 @@ static void cooked_keys(void)
exit(0);
} else if ( key == '?' )
return;
-
+
if ( key >= 0x20 && key < 0x100 ) {
putchar(key);
} else {
@@ -63,7 +63,7 @@ static void raw_keys(void)
exit(0);
} else if ( key == '!' )
return;
-
+
printf("<%02x>", key);
}
}
diff --git a/com32/samples/resolv.c b/com32/samples/resolv.c
index c82a974f..a0bb9e5a 100644
--- a/com32/samples/resolv.c
+++ b/com32/samples/resolv.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -62,6 +62,6 @@ int main(int argc, char *argv[])
} else {
printf("%s not found\n", argv[1]);
}
-
+
return 0;
}
diff --git a/comboot.doc b/comboot.doc
index 4af8045b..be57b8da 100644
--- a/comboot.doc
+++ b/comboot.doc
@@ -166,7 +166,7 @@ INT 21h AH=01h [2.01] Get Key with Echo
characters received from the keyboard are returned as NUL (00h)
+ the extended character code.
-
+
INT 21h AH=02h [2.01] Write Character
Writes a character in DL to the console (video and serial)
@@ -566,7 +566,7 @@ AX=0012h [3.05] Cleanup, shuffle and boot
The copies must not touch memory below address 7C00h.
ES:DI points to a list of CX descriptors each of the form:
-
+
Offset Size Meaning
0 dword destination address
4 dword source address
diff --git a/comboot.inc b/comboot.inc
index 4ed6fa6e..eaeab5c6 100644
--- a/comboot.inc
+++ b/comboot.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2005 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
;;
;; comboot.inc
-;;
+;;
;; Common code for running a COMBOOT image
;;
@@ -383,7 +383,7 @@ comapi_run:
jmp comboot_exit_special ; Terminate task, clean up
;
-; INT 22h AX=0004h Run default command
+; INT 22h AX=0004h Run default command
;
; Terminates the COMBOOT program and executes the default command line
; as if a timeout had happened or the user pressed <Enter>.
@@ -598,7 +598,7 @@ comapi_dnsresolv:
%else
comapi_dnsresolv equ comapi_err
%endif
-
+
section .text
;
@@ -698,7 +698,7 @@ comapi_runkernel:
mov [Kernel_SI],si
mov [Kernel_EAX],ax
mov [Kernel_EAX+2],dx
-
+
; It's not just possible, but quite likely, that ES:BX
; points into real_mode_seg, so we need to exercise some
; special care here... use xfer_buf_seg as an intermediary
diff --git a/config.inc b/config.inc
index bb87f34d..f5bd80a3 100644
--- a/config.inc
+++ b/config.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 2002-2005 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
diff --git a/conio.inc b/conio.inc
index 5860333e..12ff2136 100644
--- a/conio.inc
+++ b/conio.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2005 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -41,7 +41,7 @@ loadkeys:
rep movsd
loadkeys_ret: ret
-
+
;
; get_msg_file: Load a text file and write its contents to the screen,
; interpreting color codes. Is called with SI and DX:AX
@@ -279,8 +279,8 @@ write_serial:
in al,dx
and al,ah
cmp al,ah
- jne .waitspace
-.no_flow:
+ jne .waitspace
+.no_flow:
xchg dx,bx ; DX -> THR
pop ax
diff --git a/copybs.asm b/copybs.asm
index 15025da1..ba9bb661 100644
--- a/copybs.asm
+++ b/copybs.asm
@@ -1,7 +1,7 @@
; -*- fundamental -*- (asm-mode sucks)
; $Id$
; -----------------------------------------------------------------------
-;
+;
; Copyright 1998-2004 H. Peter Anvin - All Rights Reserved
;
; This program is free software; you can redistribute it and/or modify
@@ -62,7 +62,7 @@ dosver_ok:
xor cx,cx
mov si,pspCommandArg
mov cl,[pspCommandLen]
-
+
cmdscan1: jcxz bad_usage ; End of command line?
lodsb ; Load character
dec cx
@@ -112,7 +112,7 @@ copyfile: stosb
cmp al,' '
ja copyfile
jmp short got_cmdline
-
+
;
; We end up here if the command line doesn't parse
;
@@ -164,7 +164,7 @@ got_cmdline:
inc dl ; 1-based
mov ah,32h
int 21h ; Get Drive Parameter Block
-
+
and al,al
jnz filesystem_error
diff --git a/cpuinit.inc b/cpuinit.inc
index 8ac20f51..f3bd89bf 100644
--- a/cpuinit.inc
+++ b/cpuinit.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
;;
;; cpuinit.inc
-;;
+;;
;; CPU-dependent initialization and related checks.
;;
@@ -73,4 +73,3 @@ skip_checks:
mov byte [try_wbinvd],0c3h ; Near RET
is_486:
%endif ; DO_WBINVD
-
diff --git a/distrib.doc b/distrib.doc
index e599d0e5..5e71017d 100644
--- a/distrib.doc
+++ b/distrib.doc
@@ -27,4 +27,3 @@ distribution, do "make spotless".
I appreciate your assistance in this matter.
H. Peter Anvin
-
diff --git a/dnsresolv.inc b/dnsresolv.inc
index 8a64f400..8a042bd9 100644
--- a/dnsresolv.inc
+++ b/dnsresolv.inc
@@ -1,6 +1,6 @@
; -*- fundamental -*-
; -----------------------------------------------------------------------
-;
+;
; Copyright 2004-2005 H. Peter Anvin - All Rights Reserved
;
; This program is free software; you can redistribute it and/or modify
@@ -19,7 +19,7 @@
; this should be the normal thing for client-serving DNS servers.)
;
-DNS_PORT equ htons(53) ; Default DNS port
+DNS_PORT equ htons(53) ; Default DNS port
DNS_MAX_PACKET equ 512 ; Defined by protocol
; TFTP uses the range 49152-57343
DNS_LOCAL_PORT equ htons(60053) ; All local DNS queries come from this port #
@@ -94,7 +94,7 @@ dns_compare:
movzx cx,al ; End label?
and cx,cx ; ZF = 1 if match
jz .done
-
+
; We have a string of bytes that need to match now
repe cmpsb
je .label
@@ -206,7 +206,7 @@ dns_resolv:
stosw
stosw
stosw
-
+
call dns_mangle ; Convert name to DNS labels
push cs ; DS <- CS
@@ -264,7 +264,7 @@ dns_resolv:
push cx
push dx
- mov word [pxe_udp_write_pkt_dns.status],0
+ mov word [pxe_udp_write_pkt_dns.status],0
mov [pxe_udp_write_pkt_dns.sip],eax
mov [pxe_udp_read_pkt_dns.sip],eax
@@ -309,7 +309,7 @@ dns_resolv:
xor al,80h ; Query#/Answer bit
test ax,htons(0F80Fh)
jnz .badness
-
+
lodsw
xchg ah,al ; ntohs
mov cx,ax ; Questions echoed
@@ -368,7 +368,7 @@ dns_resolv:
; then at least try a different setver...
test word [DNSRecvBuf+dnshdr.flags],htons(0480h)
jz .timeout
-
+
xor eax,eax
jmp .gotresult
diff --git a/dos/Makefile b/dos/Makefile
index 7da22fe6..57edfcd0 100644
--- a/dos/Makefile
+++ b/dos/Makefile
@@ -55,6 +55,3 @@ syslinux.com: syslinux.elf
$(CC) $(CFLAGS) -D__ASSEMBLY__ -S -o $@ $<
-include .*.d
-
-
-
diff --git a/dos/__divdi3.c b/dos/__divdi3.c
index be13caed..3641396f 100644
--- a/dos/__divdi3.c
+++ b/dos/__divdi3.c
@@ -20,7 +20,7 @@ int64_t __divdi3(int64_t num, int64_t den)
den = -den;
minus ^= 1;
}
-
+
v = __udivmoddi4(num, den, NULL);
if ( minus )
v = -v;
diff --git a/dos/__udivmoddi4.c b/dos/__udivmoddi4.c
index 57b20e23..8e7661f5 100644
--- a/dos/__udivmoddi4.c
+++ b/dos/__udivmoddi4.c
@@ -3,7 +3,7 @@
uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t *rem_p)
{
uint64_t quot = 0, qbit = 1;
-
+
if ( den == 0 ) {
asm volatile("int $0");
return 0; /* If trap returns... */
diff --git a/dos/argv.c b/dos/argv.c
index 4c835896..98216e77 100644
--- a/dos/argv.c
+++ b/dos/argv.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2004 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
* sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following
* conditions:
- *
+ *
* The above copyright notice and this permission notice shall
* be included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -91,4 +91,3 @@ int __parse_argv(char ***argv, const char *str)
return argc;
}
-
diff --git a/dos/atou.c b/dos/atou.c
index 6d65106b..27663704 100644
--- a/dos/atou.c
+++ b/dos/atou.c
@@ -7,4 +7,3 @@ unsigned int atou(const char *s)
i = i*10 + (*s++ - '0');
return i;
}
-
diff --git a/dos/conio.c b/dos/conio.c
index e4cf3ed2..a5527bc9 100644
--- a/dos/conio.c
+++ b/dos/conio.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2001-2004 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/dos/crt0.S b/dos/crt0.S
index af8b8ba6..62ab80ff 100644
--- a/dos/crt0.S
+++ b/dos/crt0.S
@@ -3,14 +3,14 @@
#ifndef REGPARM
# error "This file assumes -mregparm=3 -DREGPARM=3"
#endif
-
+
.section ".init","ax"
.globl _start
.type _start,@function
_start:
# Align the stack and make sure the high half is zero
andl $0xfff8,%esp
-
+
# Clear the .bss
cld
xorl %eax,%eax
@@ -39,7 +39,7 @@ _start:
calll main
# Here %eax is the exit code, fall through into exit
-
+
.size _start,.-_start
.globl exit
diff --git a/dos/malloc.c b/dos/malloc.c
index 499d551a..052b0a5a 100644
--- a/dos/malloc.c
+++ b/dos/malloc.c
@@ -42,7 +42,7 @@ void __init_memory_arena(void)
fp = (struct free_arena_header *)start;
fp->a.type = ARENA_TYPE_FREE;
fp->a.size = total_space - __stack_size;
-
+
/* Insert into chains */
fp->a.next = fp->a.prev = &__malloc_head;
fp->next_free = fp->prev_free = &__malloc_head;
@@ -56,7 +56,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size)
struct free_arena_header *nfp, *na;
fsize = fp->a.size;
-
+
/* We need the 2* to account for the larger requirements of a free block */
if ( fsize >= size+2*sizeof(struct arena_header) ) {
/* Bigger block than required -- split block */
@@ -73,7 +73,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size)
nfp->a.next = na;
na->a.prev = nfp;
fp->a.next = nfp;
-
+
/* Replace current block on free chain */
nfp->next_free = fp->next_free;
nfp->prev_free = fp->prev_free;
@@ -87,7 +87,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size)
fp->next_free->prev_free = fp->prev_free;
fp->prev_free->next_free = fp->next_free;
}
-
+
return (void *)(&fp->a + 1);
}
diff --git a/dos/perror.c b/dos/perror.c
index ff8d5f2b..e6e82874 100644
--- a/dos/perror.c
+++ b/dos/perror.c
@@ -5,4 +5,3 @@ void perror(const char *msg)
{
printf("%s: error %s\n", msg, errno);
}
-
diff --git a/dos/printf.c b/dos/printf.c
index bea400de..99b389f6 100644
--- a/dos/printf.c
+++ b/dos/printf.c
@@ -45,7 +45,7 @@ static char * number(char * str, long num, int base, int size, int precision
char c,sign,tmp[66];
const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
int i;
-
+
if (type & LARGE)
digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (type & LEFT)
@@ -116,20 +116,20 @@ int vsprintf(char *buf, const char *fmt, va_list args)
int i, base;
char * str;
const char *s;
-
+
int flags; /* flags to number() */
-
+
int field_width; /* width of output field */
int precision; /* min. # of digits for integers; max
number of chars for from string */
int qualifier; /* 'h', 'l', or 'L' for integer fields */
-
+
for (str=buf ; *fmt ; ++fmt) {
if (*fmt != '%') {
*str++ = *fmt;
continue;
}
-
+
/* process flags */
flags = 0;
repeat:
@@ -141,7 +141,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
case '#': flags |= SPECIAL; goto repeat;
case '0': flags |= ZEROPAD; goto repeat;
}
-
+
/* get field width */
field_width = -1;
if (isdigit(*fmt))
@@ -155,11 +155,11 @@ int vsprintf(char *buf, const char *fmt, va_list args)
flags |= LEFT;
}
}
-
+
/* get the precision */
precision = -1;
if (*fmt == '.') {
- ++fmt;
+ ++fmt;
if (isdigit(*fmt))
precision = skip_atou(&fmt);
else if (*fmt == '*') {
@@ -170,17 +170,17 @@ int vsprintf(char *buf, const char *fmt, va_list args)
if (precision < 0)
precision = 0;
}
-
+
/* get the conversion qualifier */
qualifier = -1;
if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
qualifier = *fmt;
++fmt;
}
-
+
/* default base */
base = 10;
-
+
switch (*fmt) {
case 'c':
if (!(flags & LEFT))
@@ -190,11 +190,11 @@ int vsprintf(char *buf, const char *fmt, va_list args)
while (--field_width > 0)
*str++ = ' ';
continue;
-
+
case 's':
s = va_arg(args, char *);
len = strnlen(s, precision);
-
+
if (!(flags & LEFT))
while (len < field_width--)
*str++ = ' ';
@@ -203,7 +203,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
while (len < field_width--)
*str++ = ' ';
continue;
-
+
case 'p':
if (field_width == -1) {
field_width = 2*sizeof(void *);
@@ -213,8 +213,8 @@ int vsprintf(char *buf, const char *fmt, va_list args)
(unsigned long) va_arg(args, void *), 16,
field_width, precision, flags);
continue;
-
-
+
+
case 'n':
if (qualifier == 'l') {
long * ip = va_arg(args, long *);
@@ -224,28 +224,28 @@ int vsprintf(char *buf, const char *fmt, va_list args)
*ip = (str - buf);
}
continue;
-
+
case '%':
*str++ = '%';
continue;
-
+
/* integer number formats - set up the flags and "break" */
case 'o':
base = 8;
break;
-
+
case 'X':
flags |= LARGE;
case 'x':
base = 16;
break;
-
+
case 'd':
case 'i':
flags |= SIGN;
case 'u':
break;
-
+
default:
*str++ = '%';
if (*fmt)
@@ -274,7 +274,7 @@ int sprintf(char * buf, const char *fmt, ...)
{
va_list args;
int i;
-
+
va_start(args, fmt);
i=vsprintf(buf,fmt,args);
va_end(args);
@@ -295,4 +295,3 @@ int printf(const char *fmt, ...)
return printed;
}
-
diff --git a/dos/skipatou.c b/dos/skipatou.c
index 4c663f66..f71c5342 100644
--- a/dos/skipatou.c
+++ b/dos/skipatou.c
@@ -3,7 +3,7 @@
unsigned int skip_atou(const char **s)
{
int i=0;
-
+
while (isdigit(**s))
i = i*10 + *((*s)++) - '0';
return i;
diff --git a/dos/stdio.h b/dos/stdio.h
index ffc9b3f3..97988c24 100644
--- a/dos/stdio.h
+++ b/dos/stdio.h
@@ -19,4 +19,3 @@ int printf(const char *fmt, ...);
#define fprintf(x, y, ...) printf(y, ## __VA_ARGS__)
#endif /* STDIO_H */
-
diff --git a/dos/syslinux.c b/dos/syslinux.c
index 000b68c3..bd76518e 100644
--- a/dos/syslinux.c
+++ b/dos/syslinux.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 1998-2004 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -155,7 +155,7 @@ void read_device(int drive, const void *buf, size_t nsecs, unsigned int sector)
if ( err )
die("sector read error");
-}
+}
/* Both traditional DOS and FAT32 DOS return this structure, but
FAT32 return a lot more data, so make sure we have plenty of space */
@@ -187,7 +187,7 @@ uint32_t get_partition_offset(int drive)
struct deviceparams dp;
dp.specfunc = 1; /* Get current information */
-
+
rv = 0x440d;
asm volatile("int $0x21 ; setc %0"
: "=abcdm" (err), "+a" (rv)
@@ -195,7 +195,7 @@ uint32_t get_partition_offset(int drive)
if ( !err )
return dp.hiddensecs;
-
+
rv = 0x440d;
asm volatile("int $0x21 ; setc %0"
: "=abcdm" (err), "+a" (rv)
@@ -249,7 +249,7 @@ void write_mbr(int drive, const void *buf)
asm volatile("int $0x21 ; setc %0"
: "=abcdm" (err), "+a" (rv)
: "c" (0x4841), "d" (&mbr), "b" (drive));
-
+
if ( err )
die("mbr write error");
}
@@ -276,7 +276,7 @@ void read_mbr(int drive, const void *buf)
asm volatile("int $0x21 ; setc %0"
: "=abcdm" (err), "+a" (rv)
: "c" (0x4861), "d" (&mbr), "b" (drive));
-
+
if ( err )
die("mbr read error");
}
@@ -412,12 +412,12 @@ static void adjust_mbr(int device, int writembr, int set_active)
memcpy(sectbuf, syslinux_mbr, syslinux_mbr_len);
*(uint16_t *)(sectbuf+510) = 0xaa55;
}
-
+
if ( set_active ) {
uint32_t offset = get_partition_offset(device);
struct mbr_entry *me = (struct mbr_entry *)(sectbuf+446);
int found = 0;
-
+
for ( i = 0 ; i < 4 ; i++ ) {
if ( me->startlba == offset ) {
me->active = 0x80;
@@ -434,7 +434,7 @@ static void adjust_mbr(int device, int writembr, int set_active)
die("multiple aliased partitions found");
}
}
-
+
write_mbr(device, sectbuf);
}
@@ -460,7 +460,7 @@ int main(int argc, char *argv[])
dprintf("argv[%d] = %p = \"%s\"\n", i, argv[i], argv[i]);
(void)argc; /* Unused */
-
+
get_dos_version();
for ( argp = argv+1 ; *argp ; argp++ ) {
@@ -523,7 +523,7 @@ int main(int argc, char *argv[])
putchar('\n');
exit(1);
}
-
+
ldlinux_name[0] = dev_fd | 0x40;
set_attributes(ldlinux_name, 0);
@@ -591,4 +591,3 @@ int main(int argc, char *argv[])
return 0;
}
-
diff --git a/ext2_fs.inc b/ext2_fs.inc
index 30416167..57b3672c 100644
--- a/ext2_fs.inc
+++ b/ext2_fs.inc
@@ -1,6 +1,6 @@
; $Id$
; -----------------------------------------------------------------------
-;
+;
; Copyright 1998-2005 H. Peter Anvin - All Rights Reserved
;
; This program is free software; you can redistribute it and/or modify
@@ -70,45 +70,45 @@
; Structure definition for the ext2 superblock
;
struc ext2_super_block
-s_inodes_count resd 1 ; Inodes count
-s_blocks_count resd 1 ; Blocks count
-s_r_blocks_count resd 1 ; Reserved blocks count
-s_free_blocks_count resd 1 ; Free blocks count
-s_free_inodes_count resd 1 ; Free inodes count
-s_first_data_block resd 1 ; First Data Block
-s_log_block_size resd 1 ; Block size
-s_log_frag_size resd 1 ; Fragment size
-s_blocks_per_group resd 1 ; # Blocks per group
-s_frags_per_group resd 1 ; # Fragments per group
-s_inodes_per_group resd 1 ; # Inodes per group
-s_mtime resd 1 ; Mount time
-s_wtime resd 1 ; Write time
-s_mnt_count resw 1 ; Mount count
-s_max_mnt_count resw 1 ; Maximal mount count
-s_magic resw 1 ; Magic signature
-s_state resw 1 ; File system state
-s_errors resw 1 ; Behaviour when detecting errors
-s_minor_rev_level resw 1 ; minor revision level
-s_lastcheck resd 1 ; time of last check
-s_checkinterval resd 1 ; max. time between checks
-s_creator_os resd 1 ; OS
-s_rev_level resd 1 ; Revision level
-s_def_resuid resw 1 ; Default uid for reserved blocks
-s_def_resgid resw 1 ; Default gid for reserved blocks
-s_first_ino resd 1 ; First non-reserved inode
-s_inode_size resw 1 ; size of inode structure
-s_block_group_nr resw 1 ; block group # of this superblock
-s_feature_compat resd 1 ; compatible feature set
-s_feature_incompat resd 1 ; incompatible feature set
-s_feature_ro_compat resd 1 ; readonly-compatible feature set
-s_uuid resb 16 ; 128-bit uuid for volume
-s_volume_name resb 16 ; volume name
-s_last_mounted resb 64 ; directory where last mounted
-s_algorithm_usage_bitmap resd 1 ; For compression
+s_inodes_count resd 1 ; Inodes count
+s_blocks_count resd 1 ; Blocks count
+s_r_blocks_count resd 1 ; Reserved blocks count
+s_free_blocks_count resd 1 ; Free blocks count
+s_free_inodes_count resd 1 ; Free inodes count
+s_first_data_block resd 1 ; First Data Block
+s_log_block_size resd 1 ; Block size
+s_log_frag_size resd 1 ; Fragment size
+s_blocks_per_group resd 1 ; # Blocks per group
+s_frags_per_group resd 1 ; # Fragments per group
+s_inodes_per_group resd 1 ; # Inodes per group
+s_mtime resd 1 ; Mount time
+s_wtime resd 1 ; Write time
+s_mnt_count resw 1 ; Mount count
+s_max_mnt_count resw 1 ; Maximal mount count
+s_magic resw 1 ; Magic signature
+s_state resw 1 ; File system state
+s_errors resw 1 ; Behaviour when detecting errors
+s_minor_rev_level resw 1 ; minor revision level
+s_lastcheck resd 1 ; time of last check
+s_checkinterval resd 1 ; max. time between checks
+s_creator_os resd 1 ; OS
+s_rev_level resd 1 ; Revision level
+s_def_resuid resw 1 ; Default uid for reserved blocks
+s_def_resgid resw 1 ; Default gid for reserved blocks
+s_first_ino resd 1 ; First non-reserved inode
+s_inode_size resw 1 ; size of inode structure
+s_block_group_nr resw 1 ; block group # of this superblock
+s_feature_compat resd 1 ; compatible feature set
+s_feature_incompat resd 1 ; incompatible feature set
+s_feature_ro_compat resd 1 ; readonly-compatible feature set
+s_uuid resb 16 ; 128-bit uuid for volume
+s_volume_name resb 16 ; volume name
+s_last_mounted resb 64 ; directory where last mounted
+s_algorithm_usage_bitmap resd 1 ; For compression
s_prealloc_blocks resb 1 ; Nr of blocks to try to preallocate
-s_prealloc_dir_blocks resb 1 ; Nr to preallocate for dirs
+s_prealloc_dir_blocks resb 1 ; Nr to preallocate for dirs
s_padding1 resw 1
-s_reserved resd 204 ; Padding to the end of the block
+s_reserved resd 204 ; Padding to the end of the block
endstruc
%ifndef DEPEND
@@ -121,25 +121,25 @@ s_reserved resd 204 ; Padding to the end of the bloc
; Structure definition for the ext2 inode
;
struc ext2_inode
-i_mode resw 1 ; File mode
-i_uid resw 1 ; Owner Uid
-i_size resd 1 ; Size in bytes
-i_atime resd 1 ; Access time
-i_ctime resd 1 ; Creation time
-i_mtime resd 1 ; Modification time
-i_dtime resd 1 ; Deletion Time
-i_gid resw 1 ; Group Id
-i_links_count resw 1 ; Links count
-i_blocks resd 1 ; Blocks count
-i_flags resd 1 ; File flags
+i_mode resw 1 ; File mode
+i_uid resw 1 ; Owner Uid
+i_size resd 1 ; Size in bytes
+i_atime resd 1 ; Access time
+i_ctime resd 1 ; Creation time
+i_mtime resd 1 ; Modification time
+i_dtime resd 1 ; Deletion Time
+i_gid resw 1 ; Group Id
+i_links_count resw 1 ; Links count
+i_blocks resd 1 ; Blocks count
+i_flags resd 1 ; File flags
l_i_reserved1 resd 1
i_block resd EXT2_N_BLOCKS ; Pointer to blocks
-i_version resd 1 ; File version (for NFS)
-i_file_acl resd 1 ; File ACL
-i_dir_acl resd 1 ; Directory ACL
-i_faddr resd 1 ; Fragment address
-l_i_frag resb 1 ; Fragment number
-l_i_fsize resb 1 ; Fragment size
+i_version resd 1 ; File version (for NFS)
+i_file_acl resd 1 ; File ACL
+i_dir_acl resd 1 ; Directory ACL
+i_faddr resd 1 ; Fragment address
+l_i_frag resb 1 ; Fragment number
+l_i_fsize resb 1 ; Fragment size
i_pad1 resw 1
l_i_reserved2 resd 2
endstruc
diff --git a/extlinux.asm b/extlinux.asm
index 9bca724b..0b93e0a4 100644
--- a/extlinux.asm
+++ b/extlinux.asm
@@ -13,7 +13,7 @@
; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
; Boston MA 02111-1307, USA; either version 2 of the License, or
; (at your option) any later version; incorporated herein by reference.
-;
+;
; ****************************************************************************
%define IS_EXTLINUX 1
@@ -332,7 +332,7 @@ eddcheck:
mov eax,[FirstSector] ; Sector start
mov bx,ldlinux_sys ; Where to load it
call getonesec
-
+
; Some modicum of integrity checking
cmp dword [ldlinux_magic+4],LDLINUX_MAGIC^HEXDATE
jne kaboom
@@ -477,7 +477,7 @@ getlinsec_cbios:
cmp bp,si
jna .bp_ok
mov bp,si
-.bp_ok:
+.bp_ok:
shl ah,6 ; Because IBM was STOOPID
; and thought 8 bits were enough
@@ -516,14 +516,14 @@ getlinsec_cbios:
shr word [MaxTransfer],1
jnz .resume
; Fall through to disk_error
-
+
;
; kaboom: write a message and bail out.
;
disk_error:
kaboom:
xor si,si
- mov ss,si
+ mov ss,si
mov sp,StackBuf-4 ; Reset stack
mov ds,si ; Reset data segment
pop dword [fdctab] ; Restore FDC table
@@ -598,7 +598,7 @@ CurrentDir dd 2 ; "Current" directory inode number
SectorPtrs times 64 dd 0
ldlinux_ent:
-;
+;
; Note that some BIOSes are buggy and run the boot sector at 07C0:0000
; instead of 0000:7C00 and the like. We don't want to add anything
; more to the boot sector, so it is written to not assume a fixed
@@ -973,7 +973,7 @@ open_inode:
; Now, we need the block group descriptor.
; To get that, we first need the relevant descriptor block.
-
+
shl eax, ext2_group_desc_lg2size ; Get byte offset in desc table
xor edx,edx
div dword [ClustSize]
@@ -1130,7 +1130,7 @@ searchdir:
cmp byte [di],0 ; More path?
je .err ; If not, bad
-
+
.skipslash: ; Skip redundant slashes
cmp byte [di],'/'
jne .readdir
@@ -1148,7 +1148,7 @@ searchdir:
.getent:
cmp dword [bx+d_inode],0
je .endblock
-
+
push di
movzx cx,byte [bx+d_name_len]
lea si,[bx+d_name]
@@ -1168,7 +1168,7 @@ searchdir:
.maybe:
mov eax,[bx+d_inode]
-
+
; Does this match the end of the requested filename?
cmp byte [di],0
je .finish
@@ -1269,7 +1269,7 @@ SymlinkCtr resb 1
;
; FIX: we may want to support \-escapes here (and this would
; be the place.)
-;
+;
mangle_name:
push bx
xor ax,ax
diff --git a/extlinux.doc b/extlinux.doc
index dcc511a2..78f0910e 100644
--- a/extlinux.doc
+++ b/extlinux.doc
@@ -17,7 +17,7 @@ It works the same way as SYSLINUX, with a few slight modifications.
mkdir -p /boot/extlinux
extlinux -i /boot/extlinux
- ... to create a subdirectory and install extlinux in it.
+ ... to create a subdirectory and install extlinux in it.
2. The configuration file is called "extlinux.conf", and is expected
diff --git a/extlinux/Makefile b/extlinux/Makefile
index 3358f5af..a450a3dc 100644
--- a/extlinux/Makefile
+++ b/extlinux/Makefile
@@ -35,6 +35,3 @@ extlinux: $(OBJS)
$(CC) $(CFLAGS) -S -o $@ $<
-include .*.d
-
-
-
diff --git a/extlinux/ext2_fs.h b/extlinux/ext2_fs.h
index 6355d928..e0b4bbe1 100644
--- a/extlinux/ext2_fs.h
+++ b/extlinux/ext2_fs.h
@@ -172,7 +172,7 @@ struct ext2_group_desc
#define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
#define EXT2_NOCOMP_FL 0x00000400 /* Don't compress */
#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
-/* End compression flags --- maybe not all used */
+/* End compression flags --- maybe not all used */
#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
@@ -345,7 +345,7 @@ struct ext2_super_block {
* the incompatible feature set is that if there is a bit set
* in the incompatible feature set that the kernel doesn't
* know about, it should refuse to mount the filesystem.
- *
+ *
* e2fsck's requirements are more strict; if it doesn't know
* about a feature in either the compatible or incompatible
* feature set, it must abort and not try to meddle with
diff --git a/extlinux/extlinux.c b/extlinux/extlinux.c
index 03e84295..c9520e8b 100644
--- a/extlinux/extlinux.c
+++ b/extlinux/extlinux.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 1998-2005 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -94,7 +94,7 @@ static const struct option long_options[] = {
{ "help", 0, NULL, 'h' },
{ 0, 0, 0, 0 }
};
-
+
static const char short_options[] = "iUuzS:H:vh";
@@ -146,7 +146,7 @@ enum bs_offsets {
bs32VolumeLabel = 71,
bs32FileSysType = 82,
bs32Code = 90,
-
+
bsSignature = 0x1fe
};
@@ -317,7 +317,7 @@ sectmap(int fd, uint32_t *sectors, int nsectors)
nblk = 0;
while ( nsectors ) {
-
+
blk = nblk++;
dprintf("querying block %u\n", blk);
if ( ioctl(fd, FIBMAP, &blk) )
@@ -400,7 +400,7 @@ get_geometry(int devfd, uint64_t totalbytes, struct hd_geometry *geo)
geo->cylinders = fd_str.track;
geo->start = 0;
return 0;
- }
+ }
/* Didn't work. Let's see if this is one of the standard geometries */
for ( gp = standard_geometries ; gp->bytes ; gp++ ) {
@@ -488,33 +488,33 @@ patch_file_and_bootblock(int fd, int dirfd, int devfd)
/* First sector need pointer in boot sector */
set_32(boot_block+0x1F8, *sectp++);
nsect--;
-
+
/* Search for LDLINUX_MAGIC to find the patch area */
for ( p = boot_image ; get_32(p) != LDLINUX_MAGIC ; p += 4 );
patcharea = p+8;
-
+
/* Set up the totals */
dw = boot_image_len >> 2; /* COMPLETE dwords! */
set_16(patcharea, dw);
set_16(patcharea+2, nsect); /* Does not include the first sector! */
set_32(patcharea+8, dirst.st_ino); /* "Current" directory */
-
+
/* Set the sector pointers */
p = patcharea+12;
-
+
memset(p, 0, 64*4);
while ( nsect-- ) {
set_32(p, *sectp++);
p += 4;
}
-
+
/* Now produce a checksum */
set_32(patcharea+4, 0);
csum = LDLINUX_MAGIC;
for ( i = 0, p = boot_image ; i < dw ; i++, p += 4 )
csum -= get_32(p); /* Negative checksum */
-
+
set_32(patcharea+4, csum);
}
@@ -536,7 +536,7 @@ install_bootblock(int fd, const char *device)
fprintf(stderr, "no ext2/ext3 superblock found on %s\n", device);
return 1;
}
-
+
if ( xpwrite(fd, boot_block, boot_block_len, 0) != boot_block_len ) {
perror("writing bootblock");
return 1;
@@ -565,7 +565,7 @@ install_file(const char *path, int devfd, struct stat *rst)
perror(path);
goto bail;
}
-
+
fd = open(file, O_RDONLY);
if ( fd < 0 ) {
if ( errno != ENOENT ) {
@@ -589,7 +589,7 @@ install_file(const char *path, int devfd, struct stat *rst)
perror(file);
goto bail;
}
-
+
/* Write it the first time */
if ( xpwrite(fd, boot_image, boot_image_len, 0) != boot_image_len ) {
fprintf(stderr, "%s: write failure on %s\n", program, file);
@@ -657,7 +657,7 @@ install_loader(const char *path, int update_only)
fprintf(stderr, "%s: Not a directory: %s\n", program, path);
return 1;
}
-
+
devfd = -1;
if ( (mtab = setmntent("/proc/mounts", "r")) ) {
@@ -692,12 +692,12 @@ install_loader(const char *path, int update_only)
fprintf(stderr, "%s: cannot open device %s\n", program, devname);
return 1;
}
-
+
if ( update_only && !already_installed(devfd) ) {
fprintf(stderr, "%s: no previous extlinux boot sector found\n", program);
return 1;
}
-
+
install_file(path, devfd, &fst);
if ( fst.st_dev != st.st_dev ) {
diff --git a/font.inc b/font.inc
index d3dbf456..e49398fe 100644
--- a/font.inc
+++ b/font.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2004 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -117,7 +117,7 @@ vidrows_ok: mov [VidRows],al
popa
ret
-
+
; VGA font buffer at the end of memory (so loading a font works even
; in graphics mode, but don't put too much pressure on the .bss)
section .latebss
@@ -127,5 +127,3 @@ vgafontbuf resb 8192
align 2, db 0
VGAFontSize dw 16 ; Defaults to 16 byte font
UserFont db 0 ; Using a user-specified font
-
-
diff --git a/genhash.pl b/genhash.pl
index b1b4cc0e..c79139fd 100755
--- a/genhash.pl
+++ b/genhash.pl
@@ -7,7 +7,7 @@ eval { use bytes; };
while ( defined($keywd = <STDIN>) ) {
chomp $keywd;
-
+
($keywd,$keywdname) = split(/\s+/, $keywd);
$keywdname = $keywd unless ( $keywdname );
diff --git a/getc.inc b/getc.inc
index c32ee6c5..411f3676 100644
--- a/getc.inc
+++ b/getc.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
diff --git a/gethostip.c b/gethostip.c
index 8ba41cbf..6470c782 100644
--- a/gethostip.c
+++ b/gethostip.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2001-2004 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/graphics.inc b/graphics.inc
index df3b3a04..1b067688 100644
--- a/graphics.inc
+++ b/graphics.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -53,7 +53,7 @@ vgadisplayfile:
xor bx,bx ; First register number
mov cx,16 ; 16 registers
int 10h
-
+
.movecursor:
mov ax,[es:xbs_vgabuf+6] ; Number of pixel rows
mov dx,[VGAFontSize]
@@ -333,4 +333,3 @@ VGAFileBuf resb FILENAME_MAX ; Unmangled VGA image name
%endif
VGAFileBufEnd equ $
VGAFileMBuf resb FILENAME_MAX ; Mangled VGA image name
-
diff --git a/highmem.inc b/highmem.inc
index fdeaf691..0c7f0108 100644
--- a/highmem.inc
+++ b/highmem.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2004 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
;;
;; highmem.inc
-;;
+;;
;; Probe for the size of high memory. This can be overridden by a
;; mem= command on the command line while booting a new kernel.
;;
@@ -71,7 +71,7 @@ get_e820:
jnb .int_loop
mov [E820Max],edx
jmp .int_loop
-
+
.ram_range:
stc
sbb eax,eax ; eax <- 0xFFFFFFFF
@@ -112,7 +112,7 @@ no_e820:
mov ax,bx
shl eax,16 ; 64K chunks
add eax,(16 << 20) ; Add first 16M
- jmp short got_highmem
+ jmp short got_highmem
;
; INT 15:E801 failed. Try INT 15:88.
diff --git a/init.inc b/init.inc
index d2289d7e..9eb4c7b4 100644
--- a/init.inc
+++ b/init.inc
@@ -1,6 +1,6 @@
; -*- fundamental -*-
; -----------------------------------------------------------------------
-;
+;
; Copyright 2004 H. Peter Anvin - All Rights Reserved
;
; This program is free software; you can redistribute it and/or modify
@@ -64,4 +64,3 @@ linuxauto_cmd db 'linux auto',0
linuxauto_len equ $-linuxauto_cmd
section .text ; This is an inline file...
-
diff --git a/isolinux.asm b/isolinux.asm
index a843b478..113fba1f 100644
--- a/isolinux.asm
+++ b/isolinux.asm
@@ -330,7 +330,7 @@ found_drive:
mov si,noinfotable_msg
call writemsg
%endif
-
+
; No such luck. See if the the spec packet contained one.
mov eax,[sp_lba]
and eax,eax
@@ -340,7 +340,7 @@ found_drive:
mov si,noinfoinspec_msg
call writemsg
%endif
-
+
; No such luck. Get the Boot Record Volume, assuming single
; session disk, and that we're the first entry in the chain
mov eax,17 ; Assumed address of BRV
@@ -354,7 +354,7 @@ found_drive:
mov eax,[trackbuf+28h] ; First boot entry
; And hope and pray this is us...
- ; Some BIOSes apparently have limitations on the size
+ ; Some BIOSes apparently have limitations on the size
; that may be loaded (despite the El Torito spec being very
; clear on the fact that it must all be loaded.) Therefore,
; we load it ourselves, and *bleep* the BIOS.
@@ -442,7 +442,7 @@ integrity_ok:
;; Start of BrokenAwardHack --- 10-nov-2002 Knut_Petersen@t-online.de
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; There is a problem with certain versions of the AWARD BIOS ...
+;; There is a problem with certain versions of the AWARD BIOS ...
;; the boot sector will be loaded and executed correctly, but, because the
;; int 13 vector points to the wrong code in the BIOS, every attempt to
;; load the spec packet will fail. We scan for the equivalent of
@@ -459,7 +459,7 @@ integrity_ok:
;; for anybody to change it now or in the future. There are no opcodes
;; that use encodings relativ to IP, so scanning is easy. If we find the
;; code above in the BIOS code we can be pretty sure to run on a machine
-;; with an broken AWARD BIOS ...
+;; with an broken AWARD BIOS ...
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
@@ -494,7 +494,7 @@ award_hack: mov si,spec_err_msg ; Moved to this place from
%ifdef DEBUG_MESSAGES ;
;
call writehex8 ;
- mov si,award_not_crlf ;
+ mov si,award_not_crlf ;
call writestr ;
%endif ;
push es ; save ES
@@ -509,7 +509,7 @@ award_loop: push di ; save DI
pop di ; restore DI
jcxz award_found ; jmp if found
inc di ; not found, inc di
- jno award_loop ;
+ jno award_loop ;
;
award_failed: pop es ; No, not this way :-((
award_fail2: ;
@@ -535,7 +535,7 @@ award_found: mov eax,[es:di+0eh] ; load possible int 13 addr
;
%ifdef DEBUG_MESSAGES ;
;
- push eax ; display message and
+ push eax ; display message and
mov si,award_not_new ; new vector address
call writemsg ;
pop eax ;
@@ -546,7 +546,7 @@ award_found: mov eax,[es:di+0eh] ; load possible int 13 addr
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 ;
+ int 13h ;
jc award_fail2 ;
;
%ifdef DEBUG_MESSAGES ;
@@ -637,7 +637,7 @@ writemsg: push ax
call writestr
pop si
call writestr
- pop ax
+ pop ax
ret
;
@@ -885,7 +885,7 @@ all_read:
; mkisofs gave us a pointer to the primary volume descriptor
; (which will be at 16 only for a single-session disk!); from the PVD
; we should be able to find the rest of what we need to know.
-;
+;
get_fs_structures:
mov eax,[bi_pvd]
mov bx,trackbuf
@@ -901,7 +901,7 @@ get_fs_structures:
call crlf
%endif
mov eax,[trackbuf+156+10]
- mov [RootDir+dir_len],eax
+ mov [RootDir+dir_len],eax
mov [CurDir+dir_len],eax
add eax,SECTOR_SIZE-1
shr eax,SECTOR_SHIFT
@@ -1012,7 +1012,7 @@ is_disk_image:
mov bx,trackbuf
mov cx,1 ; Load 1 sector
call getfssec
-
+
cmp word [trackbuf+510],0aa55h ; Boot signature
jne .bad_image ; Image not bootable
@@ -1031,7 +1031,7 @@ is_disk_image:
.part_loop:
add di,byte 16
loop .part_scan
-
+
push eax ; H/S
push edx ; File size
mov bl,ah
@@ -1124,7 +1124,7 @@ local_boot:
call writestr
cmp ax,-1
je .int18
-
+
; Load boot sector from the specified BIOS device and jump to it.
mov dl,al
xor dh,dh
@@ -1320,7 +1320,7 @@ allocate_file:
ret
;
-; iso_compare_names:
+; iso_compare_names:
; Compare the names DS:SI and DS:DI and report if they are
; equal from an ISO 9660 perspective. SI is the name from
; the filesystem; CX indicates its length, and ';' terminates.
@@ -1379,7 +1379,7 @@ iso_compare_names:
; and removes trailing dots and redundant slashes,
; so "repe cmpsb" can do a compare, and the
; path-searching routine gets a bit of an easier job.
-;
+;
mangle_name:
push bx
xor ax,ax
diff --git a/isolinux.doc b/isolinux.doc
index 65565670..fa261362 100644
--- a/isolinux.doc
+++ b/isolinux.doc
@@ -107,5 +107,3 @@ on as many systems as possible, a hard disk image should have exactly
one partition, marked active, that covers the entire size of the disk
image file. Even so, hard disk images are not supported on all
BIOSes.
-
-
diff --git a/kernel.inc b/kernel.inc
index 37415217..459f4896 100644
--- a/kernel.inc
+++ b/kernel.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
;;
;; kernel.inc
-;;
+;;
;; Header file for the kernel interface definitions
;;
diff --git a/keytab-lilo.doc b/keytab-lilo.doc
index 44ec5dce..df9a1d9f 100644
--- a/keytab-lilo.doc
+++ b/keytab-lilo.doc
@@ -23,61 +23,61 @@ in syslinux.cfg, for example:
Keyboard translation
--------------------
-The PC keyboard emits so-called scan codes, which are basically key
-numbers. The BIOS then translates those scan codes to the character codes
-of the characters printed on the key-caps. By default, the BIOS normally
-assumes that the keyboard has a US layout. Once an operating system is
+The PC keyboard emits so-called scan codes, which are basically key
+numbers. The BIOS then translates those scan codes to the character codes
+of the characters printed on the key-caps. By default, the BIOS normally
+assumes that the keyboard has a US layout. Once an operating system is
loaded, this operating system can use a different mapping.
-At boot time, LILO only has access to the basic services provided by the
-BIOS and therefore receives the character codes for an US keyboard. It
-provides a simple mechanism to re-map the character codes to what is
+At boot time, LILO only has access to the basic services provided by the
+BIOS and therefore receives the character codes for an US keyboard. It
+provides a simple mechanism to re-map the character codes to what is
appropriate for the actual layout.*
- * The current mechanism isn't perfect, because it sits on top of the
- scan code to character code translation performed by the BIOS. This
- means that key combinations that don't produce any useful character on
- the US keyboard will be ignored by LILO. The advantage of this approach
+ * The current mechanism isn't perfect, because it sits on top of the
+ scan code to character code translation performed by the BIOS. This
+ means that key combinations that don't produce any useful character on
+ the US keyboard will be ignored by LILO. The advantage of this approach
is its simplicity.
Compiling keyboard translation tables
- - - - - - - - - - - - - - - - - - -
-LILO obtains layout information from the keyboard translation tables Linux
-uses for the text console. They are usually stored in
-/usr/lib/kbd/keytables. LILO comes with a program keytab-lilo.pl that reads
-those tables and generates a table suitable for use by the map installer.
-keytab-lilo.pl invokes the program loadkeys to print the tables in a format
+LILO obtains layout information from the keyboard translation tables Linux
+uses for the text console. They are usually stored in
+/usr/lib/kbd/keytables. LILO comes with a program keytab-lilo.pl that reads
+those tables and generates a table suitable for use by the map installer.
+keytab-lilo.pl invokes the program loadkeys to print the tables in a format
that is easy to parse.*
- * On some systems, only root can execute loadkeys. It is then necessary
+ * On some systems, only root can execute loadkeys. It is then necessary
to run keytab-lilo.pl as root too.
keytab-lilo.pl is used as follows:
- keytab-lilo.pl [ -p <old_code>=<new_code> ] ...
+ keytab-lilo.pl [ -p <old_code>=<new_code> ] ...
[<path>]<default_layout>[.<extension>] ]
- [<path>]<kbd_layout>[.<extension>] ]
-
- -p <old_code>=<new_code>
- Specifies corrections ("patches") to the mapping obtained from the
- translation table files. E.g. if pressing the upper case "A" should
- yield an at sign, -p 65=64 would be used. The -p option can be
- repeated any number of times. The codes can also be given as
- hexadecimal or as octal numbers if they are prefixed with 0x or 0,
- respectively.
- <path> The directory in which the file resides. The default path is
- /usr/lib/kbd/keytables.
- <extension> Usually the trailing .map, which is automatically added if
- the file name doesn't contain dots.
- <default_layout> Is the layout which specifies the translation by the
- BIOS. If none is specified, us is assumed.
- <kbd_layout> Is the actual layout of the keyboard.
-
-keytab-lilo.pl writes the resulting translation table as a binary string to
-standard output. Such tables can be stored anywhere with any name, but the
-suggested naming convention is /boot/<kbd>.ktl ("Keyboard Table for Lilo"),
+ [<path>]<kbd_layout>[.<extension>] ]
+
+ -p <old_code>=<new_code>
+ Specifies corrections ("patches") to the mapping obtained from the
+ translation table files. E.g. if pressing the upper case "A" should
+ yield an at sign, -p 65=64 would be used. The -p option can be
+ repeated any number of times. The codes can also be given as
+ hexadecimal or as octal numbers if they are prefixed with 0x or 0,
+ respectively.
+ <path> The directory in which the file resides. The default path is
+ /usr/lib/kbd/keytables.
+ <extension> Usually the trailing .map, which is automatically added if
+ the file name doesn't contain dots.
+ <default_layout> Is the layout which specifies the translation by the
+ BIOS. If none is specified, us is assumed.
+ <kbd_layout> Is the actual layout of the keyboard.
+
+keytab-lilo.pl writes the resulting translation table as a binary string to
+standard output. Such tables can be stored anywhere with any name, but the
+suggested naming convention is /boot/<kbd>.ktl ("Keyboard Table for Lilo"),
where <kbd> is the name of the keyboard layout.
Example:
diff --git a/keywords.inc b/keywords.inc
index e507e437..a3959955 100644
--- a/keywords.inc
+++ b/keywords.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -82,4 +82,3 @@ keywd_table:
%endif
keywd_count equ ($-keywd_table)/keywd_size
-
diff --git a/layout.inc b/layout.inc
index e3c1fbf3..4682ef4f 100644
--- a/layout.inc
+++ b/layout.inc
@@ -1,6 +1,6 @@
; $Id$
; -----------------------------------------------------------------------
-;
+;
; Copyright 1994-2004 H. Peter Anvin - All Rights Reserved
;
; This program is free software; you can redistribute it and/or modify
@@ -45,7 +45,7 @@ STACK_START equ TEXT_START-STACK_SIZE
; NASM BUG: refers to hacks to handle NASM 0.98.38 bugs; might need
; conditional compilation
-
+
section .earlybss nobits start=BSS_START
section .bcopy32 align=4 valign=16 follows=.data vfollows=.earlybss
; NASM BUG: follows= here should be vfollows=
@@ -61,4 +61,3 @@ STACK_START equ TEXT_START-STACK_SIZE
; Reserve space for stack
section .stack nobits align=16 start=STACK_START
Stack resb STACK_SIZE
-
diff --git a/ldlinux.asm b/ldlinux.asm
index 00ba61e6..0f5c0cdb 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -19,7 +19,7 @@
; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
; Boston MA 02111-1307, USA; either version 2 of the License, or
; (at your option) any later version; incorporated herein by reference.
-;
+;
; ****************************************************************************
%ifndef IS_MDSLINUX
@@ -338,7 +338,7 @@ eddcheck:
mov eax,[FirstSector] ; Sector start
mov bx,ldlinux_sys ; Where to load it
call getonesec
-
+
; Some modicum of integrity checking
cmp dword [ldlinux_magic+4],LDLINUX_MAGIC^HEXDATE
jne kaboom
@@ -483,7 +483,7 @@ getlinsec_cbios:
cmp bp,si
jna .bp_ok
mov bp,si
-.bp_ok:
+.bp_ok:
shl ah,6 ; Because IBM was STOOPID
; and thought 8 bits were enough
@@ -522,14 +522,14 @@ getlinsec_cbios:
shr word [MaxTransfer],1
jnz .resume
; Fall through to disk_error
-
+
;
; kaboom: write a message and bail out.
;
disk_error:
kaboom:
xor si,si
- mov ss,si
+ mov ss,si
mov sp,StackBuf-4 ; Reset stack
mov ds,si ; Reset data segment
pop dword [fdctab] ; Restore FDC table
@@ -607,7 +607,7 @@ CheckSum dd 0 ; Checksum starting at ldlinux_sys
SectorPtrs times 64 dd 0
ldlinux_ent:
-;
+;
; Note that some BIOSes are buggy and run the boot sector at 07C0:0000
; instead of 0000:7C00 and the like. We don't want to add anything
; more to the boot sector, so it is written to not assume a fixed
@@ -1514,7 +1514,7 @@ initrd_cmd_len equ 7
;
exten_table: db 'CBT',0 ; COMBOOT (specific)
db 'BSS',0 ; Boot Sector (add superblock)
- db 'BS ',0 ; Boot Sector
+ db 'BS ',0 ; Boot Sector
db 'COM',0 ; COMBOOT (same as DOS)
db 'C32',0 ; COM32
exten_table_end:
diff --git a/loadhigh.inc b/loadhigh.inc
index 0eef6858..07e810a3 100644
--- a/loadhigh.inc
+++ b/loadhigh.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
;;
;; loadhigh.inc
-;;
+;;
;; Load a file into high memory
;;
@@ -23,7 +23,7 @@
; load_high: loads (the remainder of) a file into high memory.
; This routine prints dots for each 64K transferred, and
; calls abort_check periodically.
-;
+;
; The xfer_buf_seg is used as a bounce buffer.
;
; The input address (EDI) should be dword aligned, and the final
@@ -68,7 +68,7 @@ load_high:
call getfssec ; Load the data into xfer_buf_seg
pop edi ; <C> Target buffer
pop ecx ; <B> Byte count this round
- push ecx ; <B> Byte count this round
+ push ecx ; <B> Byte count this round
push edi ; <C> Target buffer
.fix_slop:
test cx,dx
@@ -89,8 +89,7 @@ load_high:
add edi,ecx
sub eax,ecx
jnz .read_loop ; More to read...
-
+
.eof:
pop es
ret
-
diff --git a/lss16toppm b/lss16toppm
index 7424c682..d24262ed 100755
--- a/lss16toppm
+++ b/lss16toppm
@@ -1,7 +1,7 @@
#!/usr/bin/perl
## $Id$
## -----------------------------------------------------------------------
-##
+##
## Copyright 2001-2004 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
diff --git a/macros.inc b/macros.inc
index 00b18282..e8e93b7d 100644
--- a/macros.inc
+++ b/macros.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2004 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
;;
;; macros.inc
-;;
+;;
;; Convenient macros
;;
diff --git a/mbr.asm b/mbr.asm
index 7db0b6c8..31bf1fdf 100644
--- a/mbr.asm
+++ b/mbr.asm
@@ -1,5 +1,5 @@
; -----------------------------------------------------------------------
-;
+;
; Copyright 2003-2004 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
@@ -29,11 +29,11 @@
; mbr.asm
;
; Simple Master Boot Record, including support for EBIOS extensions.
-;
+;
; The MBR lives in front of the boot sector, and is responsible for
; loading the boot sector of the active partition. The EBIOS support
; is needed if the active partition starts beyond cylinder 1024.
-;
+;
; This MBR determines all geometry info at runtime. It uses only the
; linear block field in the partition table. It does, however, pass
; the partition table information unchanged to the target OS.
@@ -42,7 +42,7 @@
;
%include "bios.inc"
-
+
;
; Note: The MBR is actually loaded at 0:7C00h, but we quickly move it down to
; 0600h.
@@ -72,7 +72,7 @@ _start: cli
;
jmp 0:next ; Jump to copy at 0600h
-
+
next:
mov [DriveNo], dl ; Drive number stored in DL
;
diff --git a/memdisk/Makefile b/memdisk/Makefile
index 3844b212..ccfef5ed 100644
--- a/memdisk/Makefile
+++ b/memdisk/Makefile
@@ -1,6 +1,6 @@
#ident "$Id$"
## -----------------------------------------------------------------------
-##
+##
## Copyright 2001-2004 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
@@ -29,7 +29,7 @@ INCLUDE = -I../com32/include
LD = ld -m elf_i386
NASM = nasm -O99 # -dWITH_EDD
NFLAGS = -dVERSION='"$(VERSION)"' -dDATE='"$(DATE)"'
-NINCLUDE =
+NINCLUDE =
OBJCOPY = objcopy
PERL = perl
@@ -39,7 +39,7 @@ OBJS32 = start32.o setup.o msetup.o e820func.o conio.o memcpy.o memset.o \
unzip.o memdisk.o
CSRC = setup.c msetup.c e820func.c conio.c unzip.c
-SSRC =
+SSRC =
NASMSRC = memdisk.asm memdisk16.asm
all: memdisk e820test
diff --git a/memdisk/conio.c b/memdisk/conio.c
index 3c29b8c9..b096b211 100644
--- a/memdisk/conio.c
+++ b/memdisk/conio.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2001 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -29,7 +29,7 @@ int putchar(int ch)
/* \n -> \r\n */
putchar('\r');
}
-
+
regs.eax.w[0] = 0x0e00|(ch&0xff);
syscall(0x10, &regs, NULL);
@@ -68,7 +68,7 @@ isdigit(int ch)
static int skip_atoi(const char **s)
{
int i=0;
-
+
while (isdigit(**s))
i = i*10 + *((*s)++) - '0';
return i;
@@ -112,7 +112,7 @@ static char * number(char * str, long num, int base, int size, int precision
char c,sign,tmp[66];
const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
int i;
-
+
if (type & LARGE)
digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (type & LEFT)
@@ -183,20 +183,20 @@ int vsprintf(char *buf, const char *fmt, va_list args)
int i, base;
char * str;
const char *s;
-
+
int flags; /* flags to number() */
-
+
int field_width; /* width of output field */
int precision; /* min. # of digits for integers; max
number of chars for from string */
int qualifier; /* 'h', 'l', or 'L' for integer fields */
-
+
for (str=buf ; *fmt ; ++fmt) {
if (*fmt != '%') {
*str++ = *fmt;
continue;
}
-
+
/* process flags */
flags = 0;
repeat:
@@ -208,7 +208,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
case '#': flags |= SPECIAL; goto repeat;
case '0': flags |= ZEROPAD; goto repeat;
}
-
+
/* get field width */
field_width = -1;
if (isdigit(*fmt))
@@ -222,11 +222,11 @@ int vsprintf(char *buf, const char *fmt, va_list args)
flags |= LEFT;
}
}
-
+
/* get the precision */
precision = -1;
if (*fmt == '.') {
- ++fmt;
+ ++fmt;
if (isdigit(*fmt))
precision = skip_atoi(&fmt);
else if (*fmt == '*') {
@@ -237,17 +237,17 @@ int vsprintf(char *buf, const char *fmt, va_list args)
if (precision < 0)
precision = 0;
}
-
+
/* get the conversion qualifier */
qualifier = -1;
if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
qualifier = *fmt;
++fmt;
}
-
+
/* default base */
base = 10;
-
+
switch (*fmt) {
case 'c':
if (!(flags & LEFT))
@@ -257,11 +257,11 @@ int vsprintf(char *buf, const char *fmt, va_list args)
while (--field_width > 0)
*str++ = ' ';
continue;
-
+
case 's':
s = va_arg(args, char *);
len = strnlen(s, precision);
-
+
if (!(flags & LEFT))
while (len < field_width--)
*str++ = ' ';
@@ -270,7 +270,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
while (len < field_width--)
*str++ = ' ';
continue;
-
+
case 'p':
if (field_width == -1) {
field_width = 2*sizeof(void *);
@@ -280,8 +280,8 @@ int vsprintf(char *buf, const char *fmt, va_list args)
(unsigned long) va_arg(args, void *), 16,
field_width, precision, flags);
continue;
-
-
+
+
case 'n':
if (qualifier == 'l') {
long * ip = va_arg(args, long *);
@@ -291,28 +291,28 @@ int vsprintf(char *buf, const char *fmt, va_list args)
*ip = (str - buf);
}
continue;
-
+
case '%':
*str++ = '%';
continue;
-
+
/* integer number formats - set up the flags and "break" */
case 'o':
base = 8;
break;
-
+
case 'X':
flags |= LARGE;
case 'x':
base = 16;
break;
-
+
case 'd':
case 'i':
flags |= SIGN;
case 'u':
break;
-
+
default:
*str++ = '%';
if (*fmt)
@@ -341,7 +341,7 @@ int sprintf(char * buf, const char *fmt, ...)
{
va_list args;
int i;
-
+
va_start(args, fmt);
i=vsprintf(buf,fmt,args);
va_end(args);
@@ -362,4 +362,3 @@ int printf(const char *fmt, ...)
return printed;
}
-
diff --git a/memdisk/conio.h b/memdisk/conio.h
index b026409f..07da4f78 100644
--- a/memdisk/conio.h
+++ b/memdisk/conio.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2001 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/memdisk/e820.h b/memdisk/e820.h
index 0c93e0db..ba080acf 100644
--- a/memdisk/e820.h
+++ b/memdisk/e820.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2001 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/memdisk/e820func.c b/memdisk/e820func.c
index d9e59b63..7640622c 100644
--- a/memdisk/e820func.c
+++ b/memdisk/e820func.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2001 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -40,7 +40,7 @@ static void insertrange_at(int where, uint64_t start, uint32_t type)
for ( i = nranges ; i > where ; i-- )
ranges[i] = ranges[i-1];
-
+
ranges[where].start = start;
ranges[where].type = type;
@@ -58,7 +58,7 @@ void insertrange(uint64_t start, uint64_t len, uint32_t type)
/* Remove this to make len == 0 mean all of memory */
if ( len == 0 )
return; /* Nothing to insert */
-
+
last = start+len-1; /* May roll over */
i = 0;
@@ -102,4 +102,3 @@ void insertrange(uint64_t start, uint64_t len, uint32_t type)
nranges -= (i-j);
}
}
-
diff --git a/memdisk/e820test.c b/memdisk/e820test.c
index e1a548f6..0d4f413a 100644
--- a/memdisk/e820test.c
+++ b/memdisk/e820test.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2001-2003 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -57,11 +57,11 @@ int main(void)
p = strchr(line, ':');
p = p ? p+1 : line;
if ( sscanf(p, " %llx %llx %d", &start, &len, &type) == 3 ) {
- putchar('\n');
+ putchar('\n');
printf("%016llx %016llx %d <-\n", start, len, type);
- putchar('\n');
+ putchar('\n');
insertrange(start, len, type);
- printranges();
+ printranges();
}
}
@@ -75,7 +75,7 @@ int main(void)
/* Now, steal a chunk (2K) of DOS memory and make sure it registered OK */
insertrange(dos_mem-2048, 2048, 2); /* Type 2 = reserved */
-
+
printranges();
parse_mem();
diff --git a/memdisk/inflate.c b/memdisk/inflate.c
index 29749703..9e1d79aa 100644
--- a/memdisk/inflate.c
+++ b/memdisk/inflate.c
@@ -3,9 +3,9 @@
/* inflate.c -- Not copyrighted 1992 by Mark Adler
version c10p1, 10 January 1993 */
-/*
+/*
* Adapted for booting Linux by Hannu Savolainen 1993
- * based on gzip-1.0.3
+ * based on gzip-1.0.3
*
* Nicolas Pitre <nico@cam.org>, 1999/04/14 :
* Little mods for all variable to reside either into rodata or bss segments
@@ -52,7 +52,7 @@
chunks), otherwise the dynamic method is used. In the latter case, the
codes are customized to the probabilities in the current block, and so
can code it much better than the pre-determined fixed codes.
-
+
The Huffman codes themselves are decoded using a multi-level table
lookup, in order to maximize the speed of decoding plus the speed of
building the decoding tables. See the comments below that precede the
@@ -129,7 +129,7 @@ struct huft {
/* Function prototypes */
-STATIC int huft_build OF((unsigned *, unsigned, unsigned,
+STATIC int huft_build OF((unsigned *, unsigned, unsigned,
const ush *, const ush *, struct huft **, int *));
STATIC int huft_free OF((struct huft *));
STATIC int inflate_codes OF((struct huft *, struct huft *, int, int));
@@ -175,7 +175,7 @@ static const ush cpdext[] = { /* Extra bits for distance codes */
/* Macros for inflate() bit peeking and grabbing.
The usage is:
-
+
NEEDBITS(j)
x = b & mask_bits[j];
DUMPBITS(j)
@@ -302,7 +302,7 @@ DEBG("huft1 ");
memzero(c, sizeof(c));
p = b; i = n;
do {
- Tracecv(*p, (stderr, (n-i >= ' ' && n-i <= '~' ? "%c %d\n" : "0x%x %d\n"),
+ Tracecv(*p, (stderr, (n-i >= ' ' && n-i <= '~' ? "%c %d\n" : "0x%x %d\n"),
n-i, *p));
c[*p]++; /* assume all entries <= BMAX */
p++; /* Can't combine with above line (Solaris bug) */
@@ -496,7 +496,7 @@ struct huft *t; /* table to free */
q = (--p)->v.t;
free((char*)p);
p = q;
- }
+ }
return 0;
}
@@ -965,7 +965,7 @@ STATIC int inflate()
hufts = 0;
gzip_mark(&ptr);
if ((r = inflate_block(&e)) != 0) {
- gzip_release(&ptr);
+ gzip_release(&ptr);
return r;
}
gzip_release(&ptr);
@@ -1003,7 +1003,7 @@ static ulg crc; /* initialized in makecrc() so it'll reside in bss */
#define CRC_VALUE (crc ^ 0xffffffffL)
/*
- * Code to compute the CRC-32 table. Borrowed from
+ * Code to compute the CRC-32 table. Borrowed from
* gzip-1.0.3/makecrc.c.
*/
diff --git a/memdisk/memdisk.asm b/memdisk/memdisk.asm
index b2a4c881..6464defe 100644
--- a/memdisk/memdisk.asm
+++ b/memdisk/memdisk.asm
@@ -14,7 +14,7 @@
; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
; Boston MA 02111-1307, USA; either version 2 of the License, or
; (at your option) any later version; incorporated herein by reference.
-;
+;
; ****************************************************************************
%ifndef DEPEND
@@ -573,7 +573,7 @@ Int15Start:
je int15_88
oldint15: pop bp
jmp far [cs:OldInt15]
-
+
int15_e801:
mov ax,[cs:Mem1MB]
mov cx,ax
@@ -596,7 +596,7 @@ int15_88:
; Routine to copy in/out of high memory
; esi = linear source address
; edi = linear target address
-; ecx = 32-bit word count
+; ecx = 32-bit word count
;
; Assumes cs = ds = es
;
@@ -658,7 +658,7 @@ bcopy:
add dx,8
; DX = 16 for BIGRAW, 8 for RAW
; 8 is selector for a 64K flat segment,
- ; 16 is selector for a 4GB flat segment.
+ ; 16 is selector for a 4GB flat segment.
lgdt [cs:Shaker]
mov eax,cr0
diff --git a/memdisk/memdisk.doc b/memdisk/memdisk.doc
index 05c8a89d..8483c701 100644
--- a/memdisk/memdisk.doc
+++ b/memdisk/memdisk.doc
@@ -138,7 +138,7 @@ The MEMDISK info structure currently contains:
[ES:DI+2] byte MEMDISK minor version
[ES:DI+3] byte MEMDISK major version
[ES:DI+4] dword Pointer to MEMDISK data in high memory
- [ES:DI+8] dword Size of MEMDISK data in 512-byte sectors
+ [ES:DI+8] dword Size of MEMDISK data in 512-byte sectors
[ES:DI+12] 16:16 Far pointer to command line
[ES:DI+16] 16:16 Old INT 13h pointer
[ES:DI+20] 16:16 Old INT 15h pointer
diff --git a/memdisk/memdisk.h b/memdisk/memdisk.h
index 302cbbd9..75ad505d 100644
--- a/memdisk/memdisk.h
+++ b/memdisk/memdisk.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2001-2003 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/memdisk/memdisk16.asm b/memdisk/memdisk16.asm
index 5bf46749..9db5063f 100644
--- a/memdisk/memdisk16.asm
+++ b/memdisk/memdisk16.asm
@@ -1,7 +1,7 @@
;; -*- fundamental -*-
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2004 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -164,12 +164,12 @@ copy_cmdline:
dd (%2 & 0xffff) | ((%1 & 0xffff) << 16)
dd (%1 & 0xff000000) | (%2 & 0xf0000) | ((%3 & 0xf0ff) << 8) | ((%1 & 0x00ff0000) >> 16)
%endmacro
-
+
align 8, db 0
call32_gdt: dw call32_gdt_size-1 ; Null descriptor - contains GDT
.adj1: dd call32_gdt+CS_BASE ; pointer for LGDT instruction
dw 0
-
+
; 0008: Code segment, use16, readable, dpl 0, base CS_BASE, 64K
desc CS_BASE, 0xffff, 0x009b
@@ -184,25 +184,25 @@ call32_gdt: dw call32_gdt_size-1 ; Null descriptor - contains GDT
; 0028: Data segment, use32, read/write, dpl 0, base 0, 4G
desc 0, 0xfffff, 0xc093
-
+
call32_gdt_size: equ $-call32_gdt
err_a20: db 'ERROR: A20 gate not responding!',13,10,0
-
+
section .bss
alignb 4
SavedSSSP resd 1 ; Place to save SS:SP
Return resd 1 ; Return value
A20Test resw 1 ; Space to test A20
A20Tries resb 1
-
+
section .data
alignb 4
Target dd 0 ; Target address
Target_Seg dw 20h ; Target CS
A20Type dw 0 ; Default = unknown
-
+
section .text
bits 16
;
@@ -213,7 +213,7 @@ A20Type dw 0 ; Default = unknown
; IBM ThinkPad 760EL.
;
; We typically toggle A20 twice for every 64K transferred.
-;
+;
%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
@@ -459,7 +459,7 @@ empty_8042:
test al,2
jnz empty_8042
io_delay
-.done: ret
+.done: ret
;
; Execute a WBINVD instruction if possible on this CPU
@@ -518,7 +518,7 @@ call32_enter_pm:
or al,1
mov cr0,eax ; Enter protected mode
jmp 20h:dword .in_pm+CS_BASE
-
+
bits 32
.in_pm:
xor eax,eax ; Available for future use...
diff --git a/memdisk/msetup.c b/memdisk/msetup.c
index 89813aa0..a5b969cf 100644
--- a/memdisk/msetup.c
+++ b/memdisk/msetup.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2001-2003 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -41,13 +41,13 @@ static inline int get_e820(void)
regs.edx.l = 0x534d4150;
regs.edi.w[0] = OFFS(buf);
regs.es = SEG(buf);
-
+
syscall(0x15, &regs, &regs);
copied = (regs.eflags.l & 1) ? 0 : regs.ecx.l;
-
+
if ( regs.eax.l != 0x534d4150 || copied < 20 )
break;
-
+
printf("e820: %08x%08x %08x%08x %d\n",
(uint32_t)(buf->base >> 32), (uint32_t)buf->base,
(uint32_t)(buf->len >> 32), (uint32_t)buf->len,
diff --git a/memdisk/postprocess.pl b/memdisk/postprocess.pl
index 08d0f6d7..b93e097b 100755
--- a/memdisk/postprocess.pl
+++ b/memdisk/postprocess.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
## -----------------------------------------------------------------------
-##
+##
## Copyright 2001 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
@@ -55,4 +55,3 @@ while ( ($n = read(FILE, $f32, 65536)) > 0 ) {
close(FILE);
close(OUT);
-
diff --git a/memdisk/setup.c b/memdisk/setup.c
index ed349887..273f96a8 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2001-2005 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -19,7 +19,7 @@
const char memdisk_version[] =
"MEMDISK " VERSION " " DATE;
-const char copyright[] =
+const char copyright[] =
"Copyright " FIRSTYEAR "-" COPYYEAR " H. Peter Anvin";
extern const char _binary_memdisk_bin_start[], _binary_memdisk_bin_end[];
@@ -65,7 +65,7 @@ struct patch_area {
uint32_t diskbuf;
uint32_t disksize;
uint16_t cmdline_off, cmdline_seg;
-
+
uint32_t oldint13;
uint32_t oldint15;
@@ -218,11 +218,11 @@ const char *getcmditem(const char *what)
break;
}
}
-
+
/* Check for matching string at end of line */
if ( match == 1 && *wp == '\0' )
return CMD_BOOL;
-
+
return CMD_NOTFOUND;
}
@@ -261,7 +261,7 @@ void unzip_if_needed(uint32_t *where_p, uint32_t *size_p)
for ( i = nranges-1 ; i >= 0 ; i-- ) {
/* We can't use > 4G memory (32 bits only.) Truncate to 2^32-1
so we don't have to deal with funny wraparound issues. */
-
+
/* Must be memory */
if ( ranges[i].type != 1 )
continue;
@@ -298,14 +298,14 @@ void unzip_if_needed(uint32_t *where_p, uint32_t *size_p)
if ( (uint64_t)where+size >= gzwhere && where < endrange ) {
/* Need to move source data to avoid compressed/uncompressed overlap */
uint32_t newwhere;
-
+
if ( gzwhere-startrange < size )
continue; /* Can't fit both old and new */
-
+
newwhere = (gzwhere - size) & ~(UNZIP_ALIGN-1);
printf("Moving compressed data from 0x%08x to 0x%08x\n",
where, newwhere);
-
+
/* Our memcpy() is OK, because we always move from a higher
address to a lower one */
memcpy((void *)newwhere, (void *)where, size);
@@ -344,7 +344,7 @@ struct geometry {
};
static const struct geometry geometries[] =
-{
+{
{ 360*2, 40, 2, 9, 0, 0x01, 0 }, /* 360 K */
{ 720*2, 80, 2, 9, 0, 0x03, 0 }, /* 720 K*/
{ 1200*2, 80, 2, 15, 0, 0x02, 0 }, /* 1200 K */
@@ -426,7 +426,7 @@ const struct geometry *get_disk_image_geometry(uint32_t where, uint32_t size)
hd_geometry.h = v;
if ( CMD_HASDATA(p = getcmditem("s")) && (v = atou(p)) )
hd_geometry.s = v;
-
+
if ( (p = getcmditem("floppy")) != CMD_NOTFOUND ) {
hd_geometry.driveno = CMD_HASDATA(p) ? atou(p) & 0x7f : 0;
if ( hd_geometry.type == 0 )
@@ -442,30 +442,30 @@ const struct geometry *get_disk_image_geometry(uint32_t where, uint32_t size)
(hd_geometry.s == 0) ) {
/* Hard disk image, need to examine the partition table for geometry */
memcpy(&ptab, (char *)where+hd_geometry.offset+(512-2-4*16), sizeof ptab);
-
+
max_c = max_h = 0; max_s = 1;
for ( i = 0 ; i < 4 ; i++ ) {
if ( ptab[i].type ) {
c = ptab[i].start_c + (ptab[i].start_s >> 6);
s = (ptab[i].start_s & 0x3f);
h = ptab[i].start_h;
-
+
if ( max_c < c ) max_c = c;
if ( max_h < h ) max_h = h;
if ( max_s < s ) max_s = s;
-
+
c = ptab[i].end_c + (ptab[i].end_s >> 6);
s = (ptab[i].end_s & 0x3f);
h = ptab[i].end_h;
-
+
if ( max_c < c ) max_c = c;
if ( max_h < h ) max_h = h;
if ( max_s < s ) max_s = s;
}
}
-
+
max_c++; max_h++; /* Convert to count (1-based) */
-
+
if ( !hd_geometry.h )
hd_geometry.h = max_h;
if ( !hd_geometry.s )
@@ -682,7 +682,7 @@ uint32_t setup(syscall_t cs_syscall, void *cs_bounce)
regs.eax.b[1] = 0x08;
regs.edx.b[0] = geometry->driveno & 0x80;
syscall(0x13, &regs, &regs);
-
+
if ( regs.eflags.l & 1 ) {
printf("INT 13 08: Failure, assuming this is the only drive\n");
pptr->drivecnt = 1;
@@ -711,10 +711,10 @@ uint32_t setup(syscall_t cs_syscall, void *cs_bounce)
/* Install the interrupt handlers */
printf("old: int13 = %08x int15 = %08x\n",
rdz_32(BIOS_INT13), rdz_32(BIOS_INT15));
-
+
wrz_32(BIOS_INT13, driverptr+hptr->int13_offs);
wrz_32(BIOS_INT15, driverptr+hptr->int15_offs);
-
+
printf("new: int13 = %08x int15 = %08x\n",
rdz_32(BIOS_INT13), rdz_32(BIOS_INT15));
@@ -737,7 +737,7 @@ uint32_t setup(syscall_t cs_syscall, void *cs_bounce)
nflop = 4;
equip &= 0x3E;
- if ( nflop )
+ if ( nflop )
equip |= ((nflop-1) << 6) | 0x01;
wrz_8(BIOS_EQUIP, equip);
@@ -758,7 +758,7 @@ uint32_t setup(syscall_t cs_syscall, void *cs_bounce)
puts("MEMDISK: Failed to load new boot sector\n");
die();
}
-
+
if ( getcmditem("pause") != CMD_NOTFOUND ) {
puts("press any key to boot... ");
regs.eax.w[0] = 0;
diff --git a/memdisk/unzip.c b/memdisk/unzip.c
index be0ac73d..15b3f7dc 100644
--- a/memdisk/unzip.c
+++ b/memdisk/unzip.c
@@ -1,7 +1,7 @@
/*
* unzip.c
- *
- * This is a collection of several routines from gzip-1.0.3
+ *
+ * This is a collection of several routines from gzip-1.0.3
* adapted for Linux.
*
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
@@ -105,17 +105,17 @@ static ulg free_mem_ptr, free_mem_end_ptr;
static void *malloc(int size)
{
void *p;
-
+
if (size < 0) error("malloc error");
-
+
free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */
-
+
p = (void *)free_mem_ptr;
free_mem_ptr += size;
-
+
if (free_mem_ptr >= free_mem_end_ptr)
error("out of memory");
-
+
return p;
}
@@ -134,7 +134,7 @@ static void gzip_release(void **ptr)
{
free_mem_ptr = (long) *ptr;
}
-
+
/* ===========================================================================
* Fill the input buffer. This is called only when the buffer is empty
* and at least one byte is really needed.
@@ -159,7 +159,7 @@ static void flush_window(void)
if ( bytes_out+outcnt > output_size )
error("output buffer overrun");
-
+
in = window;
out = output_data;
for (n = 0; n < outcnt; n++) {
@@ -274,7 +274,7 @@ int check_zip(void *indata, uint32_t size, uint32_t *zbytes_p,
}
offset++;
}
-
+
if (gzh->flags & COMMENT) {
/* Discard the comment */
uint8_t *p = indata;
@@ -296,7 +296,7 @@ int check_zip(void *indata, uint32_t size, uint32_t *zbytes_p,
}
else if (pkzh->magic == 0x04034b50UL) {
/* Magic number matches pkzip file. */
-
+
offset = sizeof (*pkzh);
if (pkzh->flags & PK_ENCRYPTED) {
error("pkzip file is encrypted; not supported");
diff --git a/memdisk/version.h b/memdisk/version.h
index 8c9dcece..a3ce67a6 100644
--- a/memdisk/version.h
+++ b/memdisk/version.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2002 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/menu/CHANGES b/menu/CHANGES
index ed497ac7..cce21838 100644
--- a/menu/CHANGES
+++ b/menu/CHANGES
@@ -1,11 +1,11 @@
Changes in v1.2
---------------
-* Allowed menu's to have names. Submenu's can be referred to by names
- instead of their index in the menu system. This allows user to refer
+* Allowed menu's to have names. Submenu's can be referred to by names
+ instead of their index in the menu system. This allows user to refer
to submenus which are not yet part of the menusystem.
-* help pages can be longer than one screen
+* help pages can be longer than one screen
* menugen.py: Python script for converting .menu files to C source code
- .menu files can be used to descibe most static uses of menu system,
+ .menu files can be used to descibe most static uses of menu system,
including SubMenus, Checkboxes, RadioButtons, User Authentication and
Context sensitive help. You can also restrict use of certain items
to users with certain credentials.
@@ -13,7 +13,7 @@ Changes in v1.2
See MENU_FORMAT for the format of .menu files
* display.c32: Takes the name of the text file to display and displays it
- allowing user to scroll through the text.
+ allowing user to scroll through the text.
USAGE: display.c32 <filename>
@@ -24,10 +24,9 @@ Changes in v1.1
* Additional handler type: Keys handler
* Menuitem handlers now have a return value of type t_handler_return.
For all simple cases, you just return ACTION_VALID or ACTION_INVALID
- (For some types of menu items, handlers are ignored, and for
+ (For some types of menu items, handlers are ignored, and for
others the return value is ignored)
* add_menu takes an extra argument (to better control memory footprint)
You can just set it to -1 to choose the default value
* Now the menu system support long menu's using scroll bars.
* Support for passwords and context sensitive help is added.
-
diff --git a/menu/HISTORY b/menu/HISTORY
index 06d3360c..8e9beb3f 100644
--- a/menu/HISTORY
+++ b/menu/HISTORY
@@ -2,19 +2,19 @@
GCC & 32-bit code
-----------------
Due to the limitations of the COM file format,
-(64KB limit on memory footprint) the code has been changed
+(64KB limit on memory footprint) the code has been changed
so that the code compiles to a 32-bit COMBOOT program.
Since the code makes use of BIOS calls, this code cannot be
-compiled into a format which can execute under Linux. As a
+compiled into a format which can execute under Linux. As a
side effect, there is no nice way to debug this code. In order
to debug this code, you will have to run the code under syslinux.
GCC & 16-bit code
-----------------
-The code was ported to GCC by Peter Anvin.
+The code was ported to GCC by Peter Anvin.
OpenWatcom & 16-bit code
------------------------
Originally this code was written for the Openwatcom compiler
and generated .COM files, which could execute under DOS as well as
-SYSLINUX.
+SYSLINUX.
diff --git a/menu/MANUAL b/menu/MANUAL
index df8a4db6..4e70149c 100644
--- a/menu/MANUAL
+++ b/menu/MANUAL
@@ -6,14 +6,14 @@ For simple cases, you should start by using simple.c as a template.
complex.c illustrates most of the features available in the menu system.
Menu Features currently supported are:
-* menu items,
-* submenus,
+* menu items,
+* submenus,
* disabled items,
* checkboxes,
* invisible items (useful for dynamic menus), and
* Radio menus,
* Context sensitive help
-* Authenticated users
+* Authenticated users
The keys used are:
@@ -26,35 +26,35 @@ The keys used are:
1. Overview
-----------
-The code usually consists of many stages.
+The code usually consists of many stages.
* Configuring the menusytem
* Installing global handlers [optional]
- * Populating the menusystem
+ * Populating the menusystem
* Executing the menusystem
* Processing the result
1.1 Configuring the menusystem
------------------------------
-This includes setting the window the menu system should use,
+This includes setting the window the menu system should use,
the choice of colors, the title of the menu etc. In most functions
calls, a value of -1 indicates that the default value be used.
-For details about what the arguments are look at function
+For details about what the arguments are look at function
declarations in menu.h
<code>
// Choose the default title and setup default values for all attributes....
init_menusystem(NULL);
set_window_size(1,1,23,78); // Leave one row/col border all around
-
+
// Choose the default values for all attributes and char's
// -1 means choose defaults (Actually the next 4 lines are not needed)
- set_normal_attr (-1,-1,-1,-1);
- set_status_info (-1,-1);
- set_title_info (-1,-1);
+ set_normal_attr (-1,-1,-1,-1);
+ set_status_info (-1,-1);
+ set_title_info (-1,-1);
set_misc_info(-1,-1,-1,-1);
</code>
-
+
1.2 Populating the menusystem
-----------------------------
This involves adding a menu to the system, and the options which
@@ -71,14 +71,14 @@ should appear in the menu. An example is given below.
add_item("Exit ","Status String",OPT_EXITMENU,NULL,0);
</code>
-The call to add_menu has two arguments, the first being the title of
+The call to add_menu has two arguments, the first being the title of
the menu and the second an upper bound on the number of items in the menu.
Putting a -1, will use the default (see MENUSIZE in menu.h). If you try
-to add more items than specified, the extra items will not appear in
+to add more items than specified, the extra items will not appear in
the menu. The accuracy of this number affects the memory required
-to run the system.
+to run the system.
-If you do not want to keep track of the return values, you can also use
+If you do not want to keep track of the return values, you can also use
the following variant of add_menu
<code>
@@ -95,36 +95,36 @@ The third argument indicates the type of this menuitem. It is one of
the following
* OPT_RUN : executable content
- * OPT_EXITMENU : exits menu to parent
+ * OPT_EXITMENU : exits menu to parent
* OPT_SUBMENU : if selected, displays a submenu
* OPT_CHECKBOX : associates a boolean with this item which can be toggled
- * OPT_RADIOMENU: associates this with a radio menu.
- After execution, the data field of this item will point
+ * OPT_RADIOMENU: associates this with a radio menu.
+ After execution, the data field of this item will point
to the option selected.
* OPT_SEP : A menu seperator (visually divide menu into parts)
* OPT_RADIOITEM: this item is one of the options in a RADIOMENU
* OPT_INACTIVE : A disabled item (user cannot select this)
* OPT_INVISIBLE: This item will not be displayed.
-
-The fourth argument is the value of the data field always a string.
+
+The fourth argument is the value of the data field always a string.
Usually this string is just copied and nothing is done with it. Two
cases, where it is used.
In case of a radiomenu the input string is ignored and the "data" field
-points to the menuitem chosen (Dont forget to typecast this pointer to
+points to the menuitem chosen (Dont forget to typecast this pointer to
(t_menuitem *) when reading this info).
-In case of a submenu, this string if non-trivial is interpreted as the
+In case of a submenu, this string if non-trivial is interpreted as the
name of the submenu which should be linked there. This interpretation
-happens when the menu is first run and not when the menu system is being
-created. This allows the user to create the menusystem in an arbitrary
-order.
+happens when the menu is first run and not when the menu system is being
+created. This allows the user to create the menusystem in an arbitrary
+order.
-The fifth argument is a number whose meaning depends on the type of the
+The fifth argument is a number whose meaning depends on the type of the
item. For a CHECKBOX it should be 0/1 setting the initial state of the
checkbox. For a SUBMENU it should be the index of the menu which should
-be displayed if this option is chosen. Incase the data field is non-trivial,
+be displayed if this option is chosen. Incase the data field is non-trivial,
this number is ignored and computed later. For a RADIOMENU it should be the
index of the menu which contains all the options (All items in that menu
not of type RADIOITEM are ignored). For all other types, this
@@ -141,16 +141,16 @@ item which was selected by the user.
<code>
choice = showmenus(MAIN); // Initial menu is the one with index MAIN
- // or choice = showmenus(find_menu_num("main")); // Initial menu is the one named "main"
+ // or choice = showmenus(find_menu_num("main")); // Initial menu is the one named "main"
</code>
1.4 Processing the result
-------------------------
-This pointer will either be NULL (user hit Escape) or always point
+This pointer will either be NULL (user hit Escape) or always point
to a menuitem which can be "executed", i.e. it will be of type OPT_RUN.
-Usually at this point, all we need to do is to ask syslinux to run
+Usually at this point, all we need to do is to ask syslinux to run
the command associated with this menuitem. The following code executes
-the command stored in choice->data (there is no other use for the data
+the command stored in choice->data (there is no other use for the data
field, except for radiomenu's)
<code>
@@ -181,7 +181,7 @@ itself does not use this field in anyway.
----------
Every item also has a field called "helpid". It is meant to hold some
kind of identifier which can be referenced and used to generate
-a context sensitive help system. This can be set after a call to
+a context sensitive help system. This can be set after a call to
add_item as follows
<code>
add_item("selfloop","Status 2",OPT_SUBMENU,NULL,MAINMENU);
@@ -192,10 +192,10 @@ The first is the shortcut key for this entry. You can put -1 to ensure
that the shortcut key is not reset. The second is some unsigned integer.
If this value is 0xFFFF, then the helpid is not changed.
-2.3 Installing global handlers
+2.3 Installing global handlers
------------------------------
It is possible to register handlers for the menu system. These are
-user functions which are called by the menusystem in certain
+user functions which are called by the menusystem in certain
situations. Usually the handlers get a pointer to the menusystem
datastructure as well as a pointer to the current item selected.
Some handlers may get additional information. Some handlers are
@@ -208,7 +208,7 @@ Currently the menusystem support three types of global handlers
2.3.1 timeout handler
---------------------
-This is installed using a call to "reg_ontimeout(fn,numsteps,stepsize)"
+This is installed using a call to "reg_ontimeout(fn,numsteps,stepsize)"
function. fn is a pointer to a function which takes no arguments and
returns one of CODE_WAIT, CODE_ENTER, CODE_ESCAPE. This function is
called when numsteps*stepsize Centiseconds have gone by without any
@@ -220,9 +220,9 @@ the user hit ENTER or ESCAPE on the keyboard and acts accordingly.
2.3.2 Screen handler
--------------------
This is installed using a call to "reg_handler(HDLR_SCREEN,fn)". fn is
-a pointer to a function which takes a pointer to the menusystem
+a pointer to a function which takes a pointer to the menusystem
datastructure and the current item selected and returns nothing.
-This is called everytime a menu is drawn (i.e. everytime user changes
+This is called everytime a menu is drawn (i.e. everytime user changes
the current selection). This is meant for displaying any additional
information which reflects the current state of the system.
@@ -231,14 +231,14 @@ information which reflects the current state of the system.
This is installed using a call to "reg_handler(HDLR_KEYS,fn)". fn is
a pointer to a function which takes a pointer to the menusystem
datastructure, the current item and the scan code of a key and returns
-nothing. This function is called when the user presses a key which
-the menusystem does not know to dealwith. In any case, when this call
+nothing. This function is called when the user presses a key which
+the menusystem does not know to dealwith. In any case, when this call
returns the screen should not have changed in any way. Usually,
-one can change the active page and display any output needed and
+one can change the active page and display any output needed and
reset the active page when you return from this call.
complex.c implements a key_handler, which implements a simple
-context sensitive help system, by displaying the contents of a
+context sensitive help system, by displaying the contents of a
file whose name is based on the helpid of the active item.
Also, complex.c's handler allows certain users to make changes
@@ -246,9 +246,9 @@ to edit the commands associated with a menu item.
2.4 Installing item level handlers
----------------------------------
-In addition to global handlers, one can also install handlers for each
+In addition to global handlers, one can also install handlers for each
individual item. A handler for an individual item is a function which
-takes a pointer to the menusystem datastructure and a pointer to the
+takes a pointer to the menusystem datastructure and a pointer to the
current item and return a structure of type t_handler_return. Currently
it has two bit fields "valid" and "refresh".
@@ -261,39 +261,39 @@ For e.g. in a radiomenu handler, one can change the text displayed
on the menuitem depending on which choice was selected (see complex.c
for an example). The return values are ignored for RADIOMENU's.
-In case of RUN items: the return values are used as follows. If the
+In case of RUN items: the return values are used as follows. If the
return value of "valid" was false, then this user choice is ignored.
-This is useful if the handler has useful side effects. For e.g.
-complex.c has a Login item, whose handler always return INVALID. It
+This is useful if the handler has useful side effects. For e.g.
+complex.c has a Login item, whose handler always return INVALID. It
sets a global variable to the name of the user logged in, and enables
-some menu items, and makes some invisible items visible.
-
-* If the handler does not change the visibility status of any items,
- the handler should set "refresh" to 0.
-* If the handler changes the visibility status of items in the current
- menu set "refresh" to 1.
-* If you are changing the visibility status of items in menu's currently
- not displayed, then you can set "refresh" to 0.
+some menu items, and makes some invisible items visible.
+
+* If the handler does not change the visibility status of any items,
+ the handler should set "refresh" to 0.
+* If the handler changes the visibility status of items in the current
+ menu set "refresh" to 1.
+* If you are changing the visibility status of items in menu's currently
+ not displayed, then you can set "refresh" to 0.
* Changing the visibility status of items in another menu
- which is currently displayed, is not supported. If you do it,
- the screen contents may not reflect the change until you get to the
+ which is currently displayed, is not supported. If you do it,
+ the screen contents may not reflect the change until you get to the
menu which was changed. When you do get to that menu, you may notice
pieces of the old menu still on the screen.
-In case of CHECKBOXES: the return value of "valid" is ignored. Because,
+In case of CHECKBOXES: the return value of "valid" is ignored. Because,
the handler can change the value of checkbox if the user selected value
is not appropriate. only the value of "refresh" is honored. In this case
all the caveats in the previous paragraph apply.
-menu.h defines two instances of t_handler_return
-ACTION_VALID and ACTION_INVALID for common use. These set the valid flag
+menu.h defines two instances of t_handler_return
+ACTION_VALID and ACTION_INVALID for common use. These set the valid flag
to 1 and 0 respectively and the refresh flag to 0.
3. Things to look out for
-------------------------
-When you define the menu system, always declare it in the opposite
+When you define the menu system, always declare it in the opposite
order, i.e. all lower level menu's should be defined before the higher
-level menus. This is because in order to define the MAINMENU, you need
+level menus. This is because in order to define the MAINMENU, you need
to know the index assigned to all its submenus.
4. Additional Modules
@@ -308,22 +308,22 @@ handlers.
-------------
This module was written by Th. Gebhardt. This is basically a modification
of the DES crypt function obtained by removing the dependence of the
-original crypt function on C libraries. The following functions are
+original crypt function on C libraries. The following functions are
defined
- init_passwords(PWDFILE)
+ init_passwords(PWDFILE)
// Read in the password database from the file
- authenticate_user(user,pwd)
+ authenticate_user(user,pwd)
// Checks if user,pwd is valid
- isallowed(user,perm)
+ isallowed(user,perm)
// Checks if the user has a specified permission
- close_passwords()
+ close_passwords()
// Unloads password database from memory
See the sample password file for more details about the file format
and the implementation of permissions.
-See complex.c for a example of how to use this.
+See complex.c for a example of how to use this.
4.2 Help
--------
@@ -341,9 +341,8 @@ the hlp<NNNNN>.txt files and initialize the help system by specifying
the base directory.
The first line of this file assumed to be the title of the help screen.
-You can use ^N and ^O to change attributes absolutely and relatively,
-i.e. [^O]46 (i.e. Ctrl-O followed by chars 4 and 6) will set the
-attribute to 46, while [^N]08 will XOR the current attribute with
-specified number, thus in this case the first [^N]08 will turn on
+You can use ^N and ^O to change attributes absolutely and relatively,
+i.e. [^O]46 (i.e. Ctrl-O followed by chars 4 and 6) will set the
+attribute to 46, while [^N]08 will XOR the current attribute with
+specified number, thus in this case the first [^N]08 will turn on
highlighting and the second one will turn it off.
-
diff --git a/menu/MENU_FORMAT b/menu/MENU_FORMAT
index 4a294085..24cb02f8 100644
--- a/menu/MENU_FORMAT
+++ b/menu/MENU_FORMAT
@@ -1,25 +1,25 @@
-A .menu file can be used to describe basic menu structures which can be converted
-into C code which can then be compiled into a .c32 file for use with SYSLINUX.
-The format of a .menu file is similar to an ini file, but with important
+A .menu file can be used to describe basic menu structures which can be converted
+into C code which can then be compiled into a .c32 file for use with SYSLINUX.
+The format of a .menu file is similar to an ini file, but with important
differences.
-Lines starting with # and ; are treated as comments. Blank lines are used to
-separate the attributes of one menu item from another. Multiple blank lines are
+Lines starting with # and ; are treated as comments. Blank lines are used to
+separate the attributes of one menu item from another. Multiple blank lines are
equivalent to a single one. In other contexts Blank lines are not significant.
Menus
-----
Each menu declaration starts with a line containing the name of menu in [ ].
This is the "nickname" of the menu and should be different for different menus.
-This is not visible to the user of the menu system. The initial menu must
+This is not visible to the user of the menu system. The initial menu must
be called "main"
The menu declaration is followed by lines which set the attributes of the menu.
-This is followed by a blank line and followed by declaration of menu items in
+This is followed by a blank line and followed by declaration of menu items in
that menu.
-All lines which occur before the first menu declaration is considered as
-a global declaration.
+All lines which occur before the first menu declaration is considered as
+a global declaration.
Abstract Format
---------------
@@ -52,29 +52,29 @@ The overall format should look like this
GLOBAL SETTINGS
---------------
The following global settings are now supported. Many of the keywords
-accept what we call a "DOT COMMAND" as argument. Simply put they are
-instructions to the menu system to perform certain actions.
-The syntax and semantics of DOT COMMANDS are given later in the section
+accept what we call a "DOT COMMAND" as argument. Simply put they are
+instructions to the menu system to perform certain actions.
+The syntax and semantics of DOT COMMANDS are given later in the section
titled "DOT COMMANDS".
videomode: (default 0xFF) [Use with care]
The textmode in which the whole menu system should operate.
Must be a number (use 0x notation for hexadecimal).
- Lookup Ralph Brown Interrupt List and search for Video Mode
+ Lookup Ralph Brown Interrupt List and search for Video Mode
to find a number to put here.
- setting to 0xFF will mean, menu system will use the current
+ setting to 0xFF will mean, menu system will use the current
video mode.
-title:
+title:
The title of the whole menu system
top, left, bot, right: (default 0,0,21,79)
The area of the screen used by the menu system. The remaining
- part of the screen can be used by the user for anything.
+ part of the screen can be used by the user for anything.
helpdir: (default /isolinux/help)
- Location of the directory where help information is stored. The
+ Location of the directory where help information is stored. The
help files must be called "hlpNNNNN.txt" where NNNNN is the helpid.
pwdfile: (default /isolinux/passwd)
@@ -97,9 +97,9 @@ skipif: (default 0)
to be skipped all together (0 means menu system always runs). It can also
be a combination of "Alt","Ctrl","Shift","Caps","Ins","Scroll".
When menu system starts it checks if any of the specified keys are On/pressed.
- If true, the system exits immediately and executes the skipcmd.
+ If true, the system exits immediately and executes the skipcmd.
- e.g. setting it to "shift-alt-caps" means menu will be skipped if alt OR shift
+ e.g. setting it to "shift-alt-caps" means menu will be skipped if alt OR shift
is pressed OR caps is on. setting to "0" means menu will always run.
skipcmd: (default .exit)
@@ -109,29 +109,29 @@ skipcmd: (default .exit)
quits back to the boot prompt.
startfile: (default "")
- if non-empty the system will display the contents of this file before launching
- the menusystem. This happens only if the menusystem is not skipped. Can be used
+ if non-empty the system will display the contents of this file before launching
+ the menusystem. This happens only if the menusystem is not skipped. Can be used
to display licensing, usage or welcome messages. A file with given name
is expected to be found in the helpdir directory.
exitcmd: (default .exit)
valid terminal commands: .exit .repeat or any syslinux command
- The default command to execute when user quits the menu system.
+ The default command to execute when user quits the menu system.
exitcmdroot: (default =exitcmd)
Same as exitcmd except applies when current user has "root" privileges. If not
specified, it is assumed to be the same as exitcmd
-
+
timeout: (default 3000)
The amount of time (in multiple of 0.1 seconds) to wait for user keypress. If no
- key pressed for specified duration then the timeoutcmd is executed.
+ key pressed for specified duration then the timeoutcmd is executed.
totaltimeout: (default 0)
The total amount of time (in multiples of 0.1 seconds) the system will wait for
user to make a decision. If no decision has been made in the specified duration
totaltimeoutcmd will be executed
- NOTE: This does not include the time spent browsing the help system or
+ NOTE: This does not include the time spent browsing the help system or
the time taken for the user to enter his/her authentication credentials.
timeoutcmd: (default .beep)
@@ -157,7 +157,7 @@ row,col: [Usage not recomended]
ITEM ATTRIBUTES
---------------
-item:
+item:
The string displayed to the user. Characters enclosed in < > are highlighted.
shortcut: (default -1) valid values A-Za-z0-9 or -1 [Usage not recommended]
@@ -167,25 +167,25 @@ shortcut: (default -1) valid values A-Za-z0-9 or -1 [Usage not recommended]
info: (default same as data)
Additional textual information displayed in the status bar
-type:
+type:
the type of entry this item represents. This is one of the following:
run: choosing this will run something in SYSLINUX
use data to specify the actual command to execute
exitmenu: exit to parent menu
submenu: choosing will open up submenu
- use data to specify the "nickname" of the menu
+ use data to specify the "nickname" of the menu
which should come here
sep: Position a separator here
inactive: menu item is disabled
- checkbox: this is a checkbox
+ checkbox: this is a checkbox
use state to set initial state
invisible: User does not see this item
radioitem: One choice in a radiomenu
- radiomenu: Allow user to choose one of many choices
+ radiomenu: Allow user to choose one of many choices
(initial choice is always NULL)
login: Selecting this will allow user to login to system
-
+
data:
for run items, the syslinux command to execute
for submenus and radiomenus, nickname of menu
@@ -194,7 +194,7 @@ data:
ipappend:
ipappend flag to pass to PXELINUX (harmless for other variants of SYSLINUX)
- See syslinux documentation for meaning of the FLAGS
+ See syslinux documentation for meaning of the FLAGS
helpid: (default 65535 which is not a valid id)
associates a context for the help system.
@@ -208,9 +208,9 @@ perms: (default "")
then user needs the permission in order to open the submenu
argsmenu: (default "")
- Name of the menu to be scanned for setting additional arguments to
+ Name of the menu to be scanned for setting additional arguments to
pass to command line when this item is chosen for execution. Submenus
- of specified menu are also scanned. Only checkboxes and radiomenu's
+ of specified menu are also scanned. Only checkboxes and radiomenu's
are scanned. Items of other type in this menu is silently ignored.
@@ -221,32 +221,32 @@ Dot commands are basically instructions to the menu system to do certain things.
A "single command" is one of the following
[NT] A syslinux command (any DOT command not starting with a "." is assumed to be this)
-[NT] .beep [n]
-[NT] .help <file>
+[NT] .beep [n]
+[NT] .help <file>
[NT] .nop
[T] .exit or .quit (equivalent)
[T] .repeat or .wait or .ignore (all three are equivalent)
A dot command is a sequence of "single commands" separated by a "%". When a dot command
is executed the system executes all the given "single commands" in the specified order.
-All the commands marked "[T]" are terminal commands, i.e. when the system encounters
+All the commands marked "[T]" are terminal commands, i.e. when the system encounters
such a command it stops processing the dot command and returns the terminal command
-which caused the termination to the caller (who usually interprets the command
+which caused the termination to the caller (who usually interprets the command
appropriately).
-All commands marked with [NT] are non-terminal commands, i.e. once these commands are
-processed the system continues to process the remaining "single commands" specified in
+All commands marked with [NT] are non-terminal commands, i.e. once these commands are
+processed the system continues to process the remaining "single commands" specified in
the "DOT COMMAND".
Note: The case of a syslinux command is tricky. When executed, the command should never return
-(if the specified kernel exists) so the fact that we consider it a [NT] should be taken with
-a pinch of salt. However, if the syslinux command does return (in case of no kernel), then
+(if the specified kernel exists) so the fact that we consider it a [NT] should be taken with
+a pinch of salt. However, if the syslinux command does return (in case of no kernel), then
remaining "single commands" are processed. In particular "ker1 arg1 % ker2 arg2 % ker3 args"
has the effect of executing the first kernel which exists
.nop:
Does nothing.
-.beep:
+.beep:
.beep [n] produces a beep n times. n must be between 0 and 9. If not specified n=1.
(hence .beep 0 is equivalent to .nop)
.help:
@@ -260,4 +260,3 @@ The meaning of the Terminal commands can vary with the context in which it is us
a ".enter" or ".escape" does not have any meaning in the "onerrorcmd" context but it has a meaning
in the "ontimeout" context. In case the user gives a Terminal command which does not make sense, it
is upto the code (in this case adv_menu.tpl) to do what it pleases.
-
diff --git a/menu/Makefile b/menu/Makefile
index 8728dccc..727657fa 100644
--- a/menu/Makefile
+++ b/menu/Makefile
@@ -1,6 +1,6 @@
#ident "$Id$"
## -----------------------------------------------------------------------
-##
+##
## Copyright 2001-2005 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
@@ -30,14 +30,14 @@ LUDIR = $(COM32DIR)/libutil
LDIR = $(COM32DIR)/lib
CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I$(LUDIR)/include -I$(COM32DIR)/include -Ilibmenu -D__COM32__
SFLAGS = -D__COM32__ -march=i386
-LDFLAGS = -T $(LDIR)/com32.ld
+LDFLAGS = -T $(LDIR)/com32.ld
OBJCOPY = objcopy
LIBGCC := $(shell $(CC) --print-libgcc)
LIBS = libmenu/libmenu.a $(LUDIR)/libutil_com.a $(LDIR)/libcom32.a $(LIBGCC)
LIBMENU = libmenu/syslnx.o libmenu/com32io.o libmenu/tui.o \
- libmenu/menu.o libmenu/passwords.o libmenu/des.o libmenu/help.o
+ libmenu/menu.o libmenu/passwords.o libmenu/des.o libmenu/help.o
CMENUS = $(patsubst %.c,%.c32,$(wildcard *.c))
IMENUS = $(patsubst %.menu,%.c32,$(wildcard *.menu))
@@ -58,9 +58,9 @@ MENUS = $(CMENUS) $(IMENUS)
%.o: %.c %.h
$(CC) $(CFLAGS) -c -o $@ $<
-.PRECIOUS: %.elf
+.PRECIOUS: %.elf
%.elf: %.o $(LIBS)
- $(LD) $(LDFLAGS) -o $@ $^
+ $(LD) $(LDFLAGS) -o $@ $^
%.c32: %.elf
$(OBJCOPY) -O binary $< $@
@@ -73,7 +73,7 @@ libmenu/libmenu.a: $(LIBMENU)
$(RANLIB) $@
tidy:
- rm -f *.o *.lo *.a *.lst *.elf
+ rm -f *.o *.lo *.a *.lst *.elf
libclean:
rm -f libmenu/*.o libmenu/*.a
diff --git a/menu/README b/menu/README
index b6cc2524..d585d2fa 100644
--- a/menu/README
+++ b/menu/README
@@ -8,25 +8,25 @@ original author.
To configure the menus, you need to set up a menu configuration file
to have the menu items you desire, then build the menu system using
make. You can use either simple.c or complex.c as a starting point
-for your own menu configuration file; If your menu system is only going
-to have entries corresponding to things which can be executed directly,
+for your own menu configuration file; If your menu system is only going
+to have entries corresponding to things which can be executed directly,
then you can create a file in ".menu" format instead of the C code.
See MENU_FORMAT for the syntax of .menu files
The resulting code is a 32-bit COMBOOT code, and hence can be executed
only under syslinux. You can use tools like bochs to help debug your
-code.
+code.
Menu Features currently supported are:
-* menu items,
-* submenus,
+* menu items,
+* submenus,
* disabled items,
* checkboxes,
* invisible items (useful for dynamic menus), and
* Radio menus,
* Context sensitive help
-* Authenticated users
+* Authenticated users
* Editing commands associated with items
The keys used are:
@@ -39,7 +39,7 @@ The keys used are:
Features
--------
-This is a general purpose menu system implemented using only BIOS calls,
+This is a general purpose menu system implemented using only BIOS calls,
so it can be executed in a COMBOOT environment as well. It is highly
customizable. Some features include:
@@ -49,30 +49,30 @@ customizable. Some features include:
Specify a window within which the menu system draws all its menu's.
It is upto the user to ensure that the menu's fit within the window.
* Positioning submenus
- By default, each submenu is positioned just below the corresponding
+ By default, each submenu is positioned just below the corresponding
entry of the parent menu. However, the user may position each menu
at a specific location of his choice. This is useful, when the menu's
have lots of options.
-* Registering handlers for each menu item
+* Registering handlers for each menu item
This is mainly used for checkboxes and radiomenu's, where a selection may
- result in disabling other menu items/checkboxes
+ result in disabling other menu items/checkboxes
* Global Screen Handler
This is called every time the menu is redrawn. The user can display
- additional information (usually outside the window where the menu is
+ additional information (usually outside the window where the menu is
being displayed). See the complex.c for an example, where the global
handler is used to display the choices made so far.
* Global Keys Handler
This is called every time the user presses a key which the menu
system does not understand. This can be used to display context
sensitive help. See complex.c for how to use this hook to implement
- a context sensitive help system as well as "On the fly" editing
- of commands associated with menus.
+ a context sensitive help system as well as "On the fly" editing
+ of commands associated with menus.
* Shortcut Keys
- With each item one can register a shortcut key from [A-Za-z0-9].
+ With each item one can register a shortcut key from [A-Za-z0-9].
Pressing a key within that range, will take you to the next item
with that shortcut key (so you can have multiple items with the
- same shortcut key). The default shortcut key for each item, is
- the lower case version of the first char of the item in the range
+ same shortcut key). The default shortcut key for each item, is
+ the lower case version of the first char of the item in the range
[A-Za-z0-9].
* Escape Keys
Each item entry can have a substring enclosed in < and >. This part
@@ -80,17 +80,16 @@ customizable. Some features include:
if an item has a <, then the first char inside < and > in the range
[A-Za-z0-9] is converted to lower case and set as the shortcut key.
* Ontimeout handler
- The user can register an ontimeout handler, which gets called if
+ The user can register an ontimeout handler, which gets called if
no key has been pressed for a user specific amount of time (default 5 min).
For an example see the complex.c file.
Credits
-------
-* The Watcom developers and Peter Anvin for figuring out an OS
+* The Watcom developers and Peter Anvin for figuring out an OS
independent startup code.
-* Thomas for porting the crypt function and removing all C library
+* Thomas for porting the crypt function and removing all C library
dependencies
-* Peter Anvin for porting the code to GCC
+* Peter Anvin for porting the code to GCC
- Murali (gmurali+guicd@cs.uchicago.edu)
-
diff --git a/menu/TODO b/menu/TODO
index 52d3d5fb..d2ee82c4 100644
--- a/menu/TODO
+++ b/menu/TODO
@@ -1,3 +1,2 @@
* Write COMBOOT code to read .menu files and parse them directly
- - take the name of menu file to parse from commandline
-
+ - take the name of menu file to parse from commandline
diff --git a/menu/adv_menu.tpl b/menu/adv_menu.tpl
index f2bf79c2..6ce4acf8 100644
--- a/menu/adv_menu.tpl
+++ b/menu/adv_menu.tpl
@@ -1,7 +1,7 @@
All the lines in this file not in between --something BEGINS-- and --something ENDS--
is ignored completely and will not make it into the generated C file
-This file has sections of C code each section delimited by --secname BEGINS--
+This file has sections of C code each section delimited by --secname BEGINS--
and --secname ENDS--. In the generated C code certain section may be used multiple
times. Currently the different section which must be defined are
@@ -11,15 +11,15 @@ Any additional sections you define will be processed but will probably not make
to the C code if you do not modify menugen.py to use it.
header and footer go through unmolested. The remaining are % substituted using
-python rules. Basically it means %(var)s gets replaced by the value of the variable
+python rules. Basically it means %(var)s gets replaced by the value of the variable
"var" which is a processed form of what is read from the .menu file
-NOTE: There is absolutely no C code in the python script, so you are free to
+NOTE: There is absolutely no C code in the python script, so you are free to
modify this template to suit your needs
--header BEGINS--
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2006 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -54,7 +54,7 @@ typedef t_xtra *pt_xtra; // Pointer to extra datastructure
// Types of dot commands for which caller takes responsibility of handling
// In some case some commands may not make sense, it is up to the caller
// to handle cases which do not make sense
-typedef enum {QUIT_CMD, REPEAT_CMD, ENTER_CMD, ESCAPE_CMD} t_dotcmd;
+typedef enum {QUIT_CMD, REPEAT_CMD, ENTER_CMD, ESCAPE_CMD} t_dotcmd;
/*----------------- Global Variables */
@@ -89,7 +89,7 @@ char * strip(char *str)
{
char *p,*s,*e;
if (!str) return NULL;
- p = str;
+ p = str;
s = NULL;
e = NULL;
while (*p) {
@@ -103,10 +103,10 @@ char * strip(char *str)
return s;
}
-// executes a list of % separated commands
+// executes a list of % separated commands
// non-dot commands are assumed to be syslinux commands
// All syslinux commands are appended with the contents of kerargs
-// If it fails (kernel not found) then the next one is tried in the
+// If it fails (kernel not found) then the next one is tried in the
// list
// returns QUIT_CMD or RPT_CMD
t_dotcmd execdotcmd(const char *cmd, char *defcmd, const char *kerargs)
@@ -124,11 +124,11 @@ t_dotcmd execdotcmd(const char *cmd, char *defcmd, const char *kerargs)
p = strchr(next,'%');
if (p) {
*p--='\0'; next=p+2;
- while (*p == ' ') p--;
+ while (*p == ' ') p--;
*(++p)='\0'; // remove trailing spaces
} else {
if (*defcmd) { // execute defcmd next
- next=defcmd;
+ next=defcmd;
defcmd=NULL; // exec def cmd only once
} else next=NULL;
}
@@ -147,7 +147,7 @@ t_dotcmd execdotcmd(const char *cmd, char *defcmd, const char *kerargs)
while (*args == ' ') args++; // skip over spaces
}
if ( (strcmp(curr,".exit")==0) ||
- (strcmp(curr,".quit")==0)
+ (strcmp(curr,".quit")==0)
)
return QUIT_CMD;
if ( (strcmp(curr,".repeat")==0) ||
@@ -156,7 +156,7 @@ t_dotcmd execdotcmd(const char *cmd, char *defcmd, const char *kerargs)
)
return RPT_CMD;
if (strcmp(curr,".beep")==0) {
- if ((args) && ('0' <= args[0]) && (args[0] <= '9'))
+ if ((args) && ('0' <= args[0]) && (args[0] <= '9'))
ctr = args[0]-'0';
else ctr=1;
for (;ctr>0; ctr--) beep();
@@ -173,9 +173,9 @@ TIMEOUTCODE timeout(const char *cmd)
t_dotcmd c;
c = execdotcmd(cmd,".wait",NULL);
switch(c) {
- case ENTER_CMD:
+ case ENTER_CMD:
return CODE_ENTER;
- case ESCAPE_CMD:
+ case ESCAPE_CMD:
return CODE_ESCAPE;
default:
return CODE_WAIT;
@@ -204,7 +204,7 @@ void keys_handler(t_menusystem *ms, t_menuitem *mi,unsigned int scancode)
// and user has privileges to edit it, edit it in place.
if (((scancode & 0xFF) == 0x09) && (mi->action == OPT_RUN) &&
(EDIT_ROW < getnumrows()) && (EDIT_ROW > 0) &&
- (isallowed(username,"editcmd") || isallowed(username,"root"))) {
+ (isallowed(username,"editcmd") || isallowed(username,"root"))) {
nc = getnumcols();
// User typed TAB and has permissions to edit command line
gotoxy(EDIT_ROW,1,ms->menupage);
@@ -240,7 +240,7 @@ t_handler_return login_handler(t_menusystem *ms, t_menuitem *mi)
if (authenticate_user(login,pwd))
{
- strcpy(username,login);
+ strcpy(username,login);
strcpy(logoutstr,"<L>ogout ");
strcat(logoutstr,username);
mi->item = logoutstr; // Change item to read "Logout"
@@ -328,7 +328,7 @@ void set_xtra(pt_menuitem mi, const char *argsmenu, const char *perms, unsigned
if (!bad_argsmenu) {
xtra->argsmenu = (char *) malloc(sizeof(char)*(strlen(argsmenu)+1));
strcpy(xtra->argsmenu,argsmenu);
- }
+ }
if (!bad_perms) {
xtra->perms = (char *) malloc(sizeof(char)*(strlen(perms)+1));
strcpy(xtra->perms,perms);
@@ -343,7 +343,7 @@ int main(void)
char exitcmd[MAX_CMD_LINE_LENGTH];
char exitcmdroot[MAX_CMD_LINE_LENGTH];
char onerrcmd[MAX_CMD_LINE_LENGTH];
- char startfile[MAX_CMD_LINE_LENGTH];
+ char startfile[MAX_CMD_LINE_LENGTH];
char *ecmd; // effective exit command or onerrorcmd
char skipbits;
char skipcmd[MAX_CMD_LINE_LENGTH];
@@ -364,7 +364,7 @@ int main(void)
strcpy(exitcmd,"%(exitcmd)s");
strcpy(exitcmdroot,"%(exitcmdroot)s");
// If not specified exitcmdroot = exitcmd
- if (exitcmdroot[0] == '\0') strcpy(exitcmdroot,exitcmd);
+ if (exitcmdroot[0] == '\0') strcpy(exitcmdroot,exitcmd);
// Timeout stuff
timeout = %(timeout)s;
strcpy(timeoutcmd,"%(timeoutcmd)s");
@@ -410,7 +410,7 @@ int main(void)
if (getshiftflags() & skipbits) { // we must skip the menu altogther and execute skipcmd
dotrv = execdotcmd(skipcmd,".beep%.exit",NULL); // Worst case we beep and exit
if (dotrv == QUIT_CMD) quit = 1;
- }
+ }
// Switch vide mode if required
if (vmode != 0xFF) setvideomode(vmode);
@@ -442,10 +442,10 @@ int main(void)
}
}
-// Deallocate space used and quit
+// Deallocate space used and quit
close_passwords();
close_help();
- close_menusystem();
+ close_menusystem();
return 0;
}
diff --git a/menu/complex.c b/menu/complex.c
index dc4cbce3..94627c4f 100644
--- a/menu/complex.c
+++ b/menu/complex.c
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -76,7 +76,7 @@ void keys_handler(t_menusystem *ms, t_menuitem *mi,unsigned int scancode)
// If user hit TAB, and item is an "executable" item
// and user has privileges to edit it, edit it in place.
if (((scancode & 0xFF) == 0x09) && (mi->action == OPT_RUN) &&
- (isallowed(username,"editcmd") || isallowed(username,"root"))) {
+ (isallowed(username,"editcmd") || isallowed(username,"root"))) {
nc = getnumcols();
// User typed TAB and has permissions to edit command line
gotoxy(EDITPROMPT,1,ms->menupage);
@@ -109,7 +109,7 @@ t_handler_return login_handler(t_menusystem *ms, t_menuitem *mi)
if (authenticate_user(login,pwd))
{
- strcpy(username,login);
+ strcpy(username,login);
mi->item = logoutstr; // Change item to read "Logout"
}
else strcpy(username,GUEST_USER);
@@ -125,7 +125,7 @@ t_handler_return login_handler(t_menusystem *ms, t_menuitem *mi)
prepopt->action = OPT_INACTIVE;
secret->action = OPT_INVISIBLE;
}
- else
+ else
{
prepopt->action = OPT_SUBMENU;
prepopt->itemdata.radiomenunum = PREPMENU;
@@ -195,7 +195,7 @@ t_handler_return checkbox_handler(t_menusystem *ms, t_menuitem *mi)
(void)ms; /* Unused */
if (mi->action != OPT_CHECKBOX) return ACTION_INVALID;
-
+
if (strcmp(mi->data,"baseurl") == 0) flags.baseurl = (mi->itemdata.checked ? 1 : 0);
if (strcmp(mi->data,"winrepair") == 0) {
if (mi->itemdata.checked)
@@ -226,7 +226,7 @@ t_handler_return checkbox_handler(t_menusystem *ms, t_menuitem *mi)
}
/*
- Clears keyboard buffer and then
+ Clears keyboard buffer and then
wait for stepsize*numsteps milliseconds for user to press any key
checks for keypress every stepsize milliseconds.
Returns: 1 if user pressed a key (not read from the buffer),
@@ -261,12 +261,12 @@ int main()
init_help("/isolinux/help");
init_menusystem(NULL);
set_window_size(1,1,20,78); // Leave some space around
-
+
// Choose the default values for all attributes and char's
// -1 means choose defaults (Actually the next 4 lines are not needed)
- //set_normal_attr (-1,-1,-1,-1);
+ //set_normal_attr (-1,-1,-1,-1);
//set_status_info (-1,-1); // Display status on the last line
- //set_title_info (-1,-1);
+ //set_title_info (-1,-1);
//set_misc_info(-1,-1,-1,-1);
// Register the menusystem handler
@@ -275,7 +275,7 @@ int main()
// Register the ontimeout handler, with a time out of 10 seconds
reg_ontimeout(ontimeout,1000,0);
- NETMENU = add_menu(" Init Network ",-1);
+ NETMENU = add_menu(" Init Network ",-1);
none = add_item("<N>one","Dont start network",OPT_RADIOITEM,"no ",0);
dhcp = add_item("<d>hcp","Use DHCP",OPT_RADIOITEM,"dhcp ",0);
stat = add_item("<s>tatic","Use static IP I will specify later",OPT_RADIOITEM,"static ",0);
@@ -356,7 +356,7 @@ int main()
add_item("<8>","A",OPT_RUN,"A",0);
add_item("<9>","A",OPT_RUN,"A",0);
- MAIN = add_menu(" Main Menu ",8);
+ MAIN = add_menu(" Main Menu ",8);
curr = add_item(loginstr,"Login as a privileged user",OPT_RUN,NULL,0);
set_item_options(-1,23);
curr->handler = &login_handler;
@@ -416,9 +416,8 @@ int main()
// Deallocate space used for these data structures
close_passwords();
close_help();
- close_menusystem();
+ close_menusystem();
// Return to prompt
return 0;
}
-
diff --git a/menu/display.c b/menu/display.c
index a9bf70e1..5391d7fd 100644
--- a/menu/display.c
+++ b/menu/display.c
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2006 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/menu/libmenu/com32io.c b/menu/libmenu/com32io.c
index 33f0c3e6..31aec5df 100644
--- a/menu/libmenu/com32io.c
+++ b/menu/libmenu/com32io.c
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -35,7 +35,7 @@ void setdisppage(char num) // Set the display page to specified number
__intcall(0x10,&inreg,&outreg);
}
-char getdisppage() // Get current display page
+char getdisppage() // Get current display page
{
REG_AH(inreg) = 0x0f;
__intcall(0x10,&inreg,&outreg);
@@ -74,7 +74,7 @@ void beep()
{
REG_AH(inreg) = 0x0E;
REG_AL(inreg) = 0x07;
- REG_BH(inreg) = 0;
+ REG_BH(inreg) = 0;
__intcall(0x10,&inreg,&outreg);
}
@@ -96,7 +96,7 @@ char inputc(char * scancode)
if (scancode) *scancode = REG_AH(outreg);
return REG_AL(outreg);
}
-
+
void getcursorshape(char *start, char *end)
{
char page = getdisppage();
@@ -144,4 +144,3 @@ unsigned char getcharat(char page)
__intcall(0x16,&inreg,&outreg);
return REG_AL(outreg);
}
-
diff --git a/menu/libmenu/com32io.h b/menu/libmenu/com32io.h
index 26bec0fc..78ce72fa 100644
--- a/menu/libmenu/com32io.h
+++ b/menu/libmenu/com32io.h
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,7 @@
/* BIOS Assisted output routines */
-void cswprint(const char *str, char attr, char left);
+void cswprint(const char *str, char attr, char left);
// Print a C str (NUL-terminated) respecting the left edge of window
// i.e. \n in str will move cursor to column left
// Print a C str (NUL-terminated)
@@ -31,11 +31,11 @@ static inline void csprint(const char *str, char attr)
cswprint(str,attr,0);
}
-void cprint(char chr,char attr,unsigned int times, char disppage); // Print a char
+void cprint(char chr,char attr,unsigned int times, char disppage); // Print a char
void setdisppage(char num); // Set the display page to specified number
-char getdisppage(); // Get current display page
+char getdisppage(); // Get current display page
void gotoxy(char row,char col, char page);
@@ -44,7 +44,7 @@ void getpos(char * row, char * col, char page);
char inputc(char * scancode); // Return ASCII char by val, and scancode by reference
static inline void putch(char x, char attr, char page)
-{
+{
cprint(x,attr,1,page);
}
@@ -52,7 +52,7 @@ void setcursorshape(char start,char end); // Set cursor shape
void getcursorshape(char *start,char *end); // Get shape for current page
// Get char displayed at current position in specified page
-unsigned char getcharat(char page);
+unsigned char getcharat(char page);
static inline void cursoroff(void) /* Turns off cursor */
{
@@ -90,10 +90,10 @@ static inline void scrollup(void) //Scroll up display screen by one line
{
scrollupwindow(0,0,getnumrows(),getnumcols(),0x07,1);
}
-
+
void setvideomode(char mode); // Set the video mode.
-static inline char getvideomode(void) // Get the current video mode
+static inline char getvideomode(void) // Get the current video mode
{
return readbiosb(0x449);
}
@@ -105,8 +105,8 @@ void beep(); // A Bell
unsigned char checkkbdbuf(); // Check to see if there is kbd buffer is non-empty?
static inline void clearkbdbuf() // Clear the kbd buffer (how many chars removed?)
-{
+{
while (checkkbdbuf()) inputc(NULL);
-}
+}
#endif
diff --git a/menu/libmenu/des.c b/menu/libmenu/des.c
index 6309453e..d8060598 100644
--- a/menu/libmenu/des.c
+++ b/menu/libmenu/des.c
@@ -70,7 +70,7 @@
typedef unsigned long my_u_int32_t;
typedef unsigned char my_u_char_t;
-/* Re-entrantify me -- all this junk needs to be in
+/* Re-entrantify me -- all this junk needs to be in
* struct crypt_data to make this really reentrant... */
static my_u_char_t inv_key_perm[64];
static my_u_char_t inv_comp_perm[56];
@@ -94,8 +94,8 @@ static my_u_int32_t old_rawkey0, old_rawkey1;
static my_u_int32_t common[8][256];
#endif
-/* Static stuff that stays resident and doesn't change after
- * being initialized, and therefore doesn't need to be made
+/* Static stuff that stays resident and doesn't change after
+ * being initialized, and therefore doesn't need to be made
* reentrant. */
static my_u_char_t init_perm[64], final_perm[64];
static my_u_char_t m_sbox[4][4096];
@@ -229,7 +229,7 @@ static const my_u_char_t bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02,
// static const my_u_int32_t *bits28, *bits24;
-static int
+static int
ascii_to_bin(char ch)
{
if (ch > 'z')
@@ -317,7 +317,7 @@ des_init(void)
* and for the key initial and compression permutations.
*/
-#ifndef LOWSPACE
+#ifndef LOWSPACE
for (k = 0; k < 8; k++) {
for (i = 0; i < 256; i++) {
*(il = &ip_maskl[k][i]) = 0L;
@@ -376,7 +376,7 @@ des_init(void)
for (i = 0; i < 32; i++)
un_pbox[pbox[i] - 1] = (my_u_char_t)i;
-#ifndef LOWSPACE
+#ifndef LOWSPACE
for (b = 0; b < 4; b++)
for (i = 0; i < 256; i++) {
*(p = &psbox[b][i]) = 0L;
@@ -397,7 +397,7 @@ setup_ip_maskl(void)
{
int i, j, k, inbit, obit;
my_u_int32_t *il;
-
+
for (k = 0; k < 8; k++) {
for (i = 0; i < 256; i++) {
*(il = &common[k][i]) = 0L;
@@ -417,7 +417,7 @@ setup_ip_maskr(void)
{
int i, j, k, inbit, obit;
my_u_int32_t *ir;
-
+
for (k = 0; k < 8; k++) {
for (i = 0; i < 256; i++) {
*(ir = &common[k][i]) = 0L;
@@ -451,7 +451,7 @@ setup_fp_maskl(void)
}
}
}
-
+
static void
setup_fp_maskr(void)
{
@@ -471,7 +471,7 @@ setup_fp_maskr(void)
}
}
}
-
+
static void
setup_key_perm_maskl(void)
{
@@ -515,7 +515,7 @@ setup_key_perm_maskr(void)
}
}
}
-
+
static void
setup_comp_maskl(void)
{
@@ -565,7 +565,7 @@ setup_psbox(void)
{
int i, j, b;
my_u_int32_t *p;
-
+
for (b = 0; b < 4; b++)
for (i = 0; i < 256; i++) {
*(p = &common[b][i]) = 0L;
@@ -645,7 +645,7 @@ des_setkey(const char *key)
* Do key permutation and split into two 28-bit subkeys.
*/
-#ifdef LOWSPACE
+#ifdef LOWSPACE
setup_key_perm_maskl();
k0 = common[0][rawkey0 >> 25]
| common[1][(rawkey0 >> 17) & 0x7f]
@@ -695,7 +695,7 @@ des_setkey(const char *key)
t0 = (k0 << shifts) | (k0 >> (28 - shifts));
t1 = (k1 << shifts) | (k1 >> (28 - shifts));
-#ifdef LOWSPACE
+#ifdef LOWSPACE
setup_comp_maskl();
de_keysl[15 - round] =
en_keysl[round] = common[0][(t0 >> 21) & 0x7f]
@@ -773,7 +773,7 @@ do_des( my_u_int32_t l_in, my_u_int32_t r_in, my_u_int32_t *l_out, my_u_int32_t
/*
* Do initial permutation (IP).
*/
-
+
#ifdef LOWSPACE
setup_ip_maskl();
l = common[0][l_in >> 24]
@@ -1046,7 +1046,7 @@ char *crypt(const char *key, const char *setting)
*/
output[9] = '\0';
p = (my_u_char_t *)output + strlen(output);
- } else
+ } else
#endif
{
/*
@@ -1099,4 +1099,3 @@ char *crypt(const char *key, const char *setting)
return(output);
}
-
diff --git a/menu/libmenu/des.h b/menu/libmenu/des.h
index a03e58a7..67fc6b70 100644
--- a/menu/libmenu/des.h
+++ b/menu/libmenu/des.h
@@ -6,4 +6,3 @@
extern char *crypt (const char *key, const char *salt);
#endif
-
diff --git a/menu/libmenu/help.c b/menu/libmenu/help.c
index 0727a380..c71cd266 100644
--- a/menu/libmenu/help.c
+++ b/menu/libmenu/help.c
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -23,7 +23,7 @@ char * findline(char*buffer,int count)
{
int ctr;
char *p= buffer-1;
-
+
if (count < 1) return buffer;
for (ctr=0; ctr < count; ctr++) {
p = strchr(p+1,'\n');
@@ -51,16 +51,16 @@ void printtext(char*buf, int from)
char *p,*f;
char right,bot,nlines;
- // clear window to print
+ // clear window to print
right = getnumcols() - HELP_RIGHT_MARGIN;
bot = getnumrows() - HELP_BOTTOM_MARGIN;
nlines = bot-HELP_BODY_ROW+1;
- scrollupwindow(HELP_BODY_ROW,HELP_LEFT_MARGIN,bot,right,0x07,nlines);
+ scrollupwindow(HELP_BODY_ROW,HELP_LEFT_MARGIN,bot,right,0x07,nlines);
f = findline(buf,from);
if (!f) return; // nothing to print
if (*f=='\n') f++; // start of from+1st line
- p = findline(f,nlines);
+ p = findline(f,nlines);
if (p && (*p=='\n')) *p = '\0'; // change to NUL
gotoxy(HELP_BODY_ROW,HELP_LEFT_MARGIN,HELPPAGE);
cswprint(f,0x07,HELP_LEFT_MARGIN);
@@ -72,7 +72,7 @@ void showhelp(const char *filename)
char nc,nr,ph;
char *title,*text;
union { char *buffer; void *vbuf; } buf; // This is to avoild type-punning issues
-
+
char line[512];
size_t size;
char scan;
@@ -95,7 +95,7 @@ void showhelp(const char *filename)
cls();
return;
}
-
+
rv = loadfile(filename,(void **)&buf.vbuf, &size); // load entire file into memory
if (rv < 0) { // Error reading file or no such file
sprintf(line, "Error reading file or file not found\n file=%s",filename);
@@ -123,11 +123,11 @@ void showhelp(const char *filename)
while(scan != ESCAPE) {
printtext(text,curr_line);
gotoxy(HELP_BODY_ROW-1,nc-HELP_RIGHT_MARGIN,HELPPAGE);
- if (curr_line > 0)
+ if (curr_line > 0)
putch(HELP_MORE_ABOVE,0x07,HELPPAGE);
else putch(' ',0x07,HELPPAGE);
gotoxy(nr-HELP_BOTTOM_MARGIN+1,nc-HELP_RIGHT_MARGIN,HELPPAGE);
- if (curr_line < numlines - ph)
+ if (curr_line < numlines - ph)
putch(HELP_MORE_BELOW,0x07,HELPPAGE);
else putch(' ',0x07,HELPPAGE);
diff --git a/menu/libmenu/help.h b/menu/libmenu/help.h
index 77db9909..06832d84 100644
--- a/menu/libmenu/help.h
+++ b/menu/libmenu/help.h
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/menu/libmenu/menu.c b/menu/libmenu/menu.c
index 31831d2f..841e59ca 100644
--- a/menu/libmenu/menu.c
+++ b/menu/libmenu/menu.c
@@ -25,10 +25,10 @@ char EMPTYSTR[] = "";
/* Forward declarations */
int calc_visible(pt_menu menu,int first);
-int next_visible(pt_menu menu,int index);
-int prev_visible(pt_menu menu,int index);
-int next_visible_sep(pt_menu menu,int index);
-int prev_visible_sep(pt_menu menu,int index);
+int next_visible(pt_menu menu,int index);
+int prev_visible(pt_menu menu,int index);
+int next_visible_sep(pt_menu menu,int index);
+int prev_visible_sep(pt_menu menu,int index);
int calc_first_early(pt_menu menu,int curr);
int calc_first_late(pt_menu menu,int curr);
int isvisible(pt_menu menu,int first, int curr);
@@ -56,7 +56,7 @@ char getch(char *scan)
if (checkkbdbuf()) return inputc(scan);
sleep(ms->tm_stepsize);
if ( (ms->tm_total_timeout == 0) || (ms->ontotaltimeout==NULL))
- continue; // Dont bother with calculations if no handler
+ continue; // Dont bother with calculations if no handler
ms->tm_sofar_timeout += ms->tm_stepsize;
if (ms->tm_sofar_timeout >= ms->tm_total_timeout) {
th = ms->ontotaltimeout;
@@ -91,7 +91,7 @@ void printmenuitem(const char *str,uchar* attr)
getpos(&row,&col,page);
while ( *str ) {
- switch (*str)
+ switch (*str)
{
case '\b':
--col;
@@ -129,17 +129,17 @@ void printmenuitem(const char *str,uchar* attr)
}
}
-int find_shortcut(pt_menu menu,uchar shortcut, int index)
+int find_shortcut(pt_menu menu,uchar shortcut, int index)
// Find the next index with specified shortcut key
{
int ans;
pt_menuitem mi;
// Garbage in garbage out
- if ((index <0) || (index >= menu->numitems)) return index;
+ if ((index <0) || (index >= menu->numitems)) return index;
ans = index+1;
// Go till end of menu
- while (ans < menu->numitems)
+ while (ans < menu->numitems)
{
mi = menu->items[ans];
if ((mi->action == OPT_INVISIBLE) || (mi->action == OPT_SEP)
@@ -171,7 +171,7 @@ void printmenu(pt_menu menu, int curr, uchar top, uchar left, uchar first)
uchar *attr; // attribute attr
char sep[MENULEN];// and inbetween the item or a seperator is printed
pt_menuitem ci;
-
+
numitems = calc_visible(menu,first);
if (numitems > menu->menuheight) numitems = menu->menuheight;
@@ -181,7 +181,7 @@ void printmenu(pt_menu menu, int curr, uchar top, uchar left, uchar first)
drawbox(top-1,left-3,top+numitems,left+menuwidth,
ms->menupage,ms->normalattr[NOHLITE],ms->menubt);
memset(sep,ms->box_horiz,menuwidth); // String containing the seperator string
- sep[menuwidth-1] = 0;
+ sep[menuwidth-1] = 0;
// Menu title
x = (menuwidth - strlen(menu->title) - 1) >> 1;
gotoxy(top-1,left+x,ms->menupage);
@@ -194,7 +194,7 @@ void printmenu(pt_menu menu, int curr, uchar top, uchar left, uchar first)
row++;
if (row >= numitems) break; // Already have enough number of items
// Setup the defaults now
- lchar[0] = fchar[0] = ' ';
+ lchar[0] = fchar[0] = ' ';
lchar[1] = fchar[1] = '\0'; // fchar and lchar are just spaces
str = ci->item; // Pointer to item string
attr = (x==curr ? ms->reverseattr : ms->normalattr); // Normal attributes
@@ -234,7 +234,7 @@ void printmenu(pt_menu menu, int curr, uchar top, uchar left, uchar first)
csprint(lchar,attr[NOHLITE]); // Print last part
}
// Check if we need to MOREABOVE and MOREBELOW to be added
- // reuse x
+ // reuse x
row = 0;
x = next_visible_sep(menu,0); // First item
if (! isvisible(menu,first,x)) // There is more above
@@ -259,8 +259,8 @@ void printmenu(pt_menu menu, int curr, uchar top, uchar left, uchar first)
if (ms->handler) ms->handler(ms,menu->items[curr]);
}
-// Difference between this and regular menu, is that only
-// OPT_INVISIBLE, OPT_SEP are honoured
+// Difference between this and regular menu, is that only
+// OPT_INVISIBLE, OPT_SEP are honoured
void printradiomenu(pt_menu menu, int curr, uchar top, uchar left, int first)
{
int x,row; // x = index, row = position from top
@@ -270,7 +270,7 @@ void printradiomenu(pt_menu menu, int curr, uchar top, uchar left, int first)
uchar *attr; // all in the attribute attr
char sep[MENULEN];// and inbetween the item or a seperator is printed
pt_menuitem ci;
-
+
numitems = calc_visible(menu,first);
if (numitems > menu->menuheight) numitems = menu->menuheight;
@@ -280,7 +280,7 @@ void printradiomenu(pt_menu menu, int curr, uchar top, uchar left, int first)
drawbox(top-1,left-3,top+numitems,left+menuwidth,
ms->menupage,ms->normalattr[NOHLITE],ms->menubt);
memset(sep,ms->box_horiz,menuwidth); // String containing the seperator string
- sep[menuwidth-1] = 0;
+ sep[menuwidth-1] = 0;
// Menu title
x = (menuwidth - strlen(menu->title) - 1) >> 1;
gotoxy(top-1,left+x,ms->menupage);
@@ -294,10 +294,10 @@ void printradiomenu(pt_menu menu, int curr, uchar top, uchar left, int first)
if (row > numitems) break;
// Setup the defaults now
fchar[0] = RADIOUNSEL; fchar[1]='\0'; // Unselected ( )
- lchar[0] = '\0'; // Nothing special after
+ lchar[0] = '\0'; // Nothing special after
str = ci->item; // Pointer to item string
attr = ms->normalattr; // Always same attribute
- fchar[0] = (x==curr ? RADIOSEL : RADIOUNSEL);
+ fchar[0] = (x==curr ? RADIOSEL : RADIOUNSEL);
switch (ci->action) // set up attr,str,fchar,lchar for everything
{
case OPT_INACTIVE:
@@ -321,7 +321,7 @@ void printradiomenu(pt_menu menu, int curr, uchar top, uchar left, int first)
csprint(lchar,attr[NOHLITE]); // Print last part
}
// Check if we need to MOREABOVE and MOREBELOW to be added
- // reuse x
+ // reuse x
row = 0;
x = next_visible_sep(menu,0); // First item
if (! isvisible(menu,first,x)) // There is more above
@@ -364,7 +364,7 @@ pt_menuitem getradiooption(pt_menu menu, uchar top, uchar left, uchar startopt)
uchar asc,scan;
uchar numitems;
pt_menuitem ci; // Current item
-
+
numitems = calc_visible(menu,0);
// Setup status line
gotoxy(ms->minrow+ms->statline,ms->mincol,ms->menupage);
@@ -382,7 +382,7 @@ pt_menuitem getradiooption(pt_menu menu, uchar top, uchar left, uchar startopt)
{
printradiomenu(menu,curr,top,left,first);
ci = menu->items[curr];
-
+
asc = getch(&scan);
switch (scan)
{
@@ -408,7 +408,7 @@ pt_menuitem getradiooption(pt_menu menu, uchar top, uchar left, uchar startopt)
break;
case DNARROW:
curr = next_visible(menu,curr+1);
- if (! isvisible(menu,first,curr))
+ if (! isvisible(menu,first,curr))
first = calc_first_late(menu,curr);
break;
case LTARROW:
@@ -431,7 +431,7 @@ pt_menuitem getradiooption(pt_menu menu, uchar top, uchar left, uchar startopt)
tmp = find_shortcut(menu,asc,curr);
if ((tmp > curr) && (! isvisible(menu,first,tmp)))
first = calc_first_late(menu,tmp);
- if (tmp < curr)
+ if (tmp < curr)
first = calc_first_early(menu,tmp);
curr = tmp;
}
@@ -458,13 +458,13 @@ pt_menuitem getmenuoption(pt_menu menu, uchar top, uchar left, uchar startopt)
uchar numitems;
pt_menuitem ci; // Current item
t_handler_return hr; // Return value of handler
-
+
numitems = calc_visible(menu,0);
// Setup status line
gotoxy(ms->minrow+ms->statline,ms->mincol,ms->menupage);
cprint(ms->spacechar,ms->statusattr[NOHLITE],ms->numcols,ms->menupage);
- // Initialise current menu item
+ // Initialise current menu item
curr = next_visible(menu,startopt);
gotoxy(ms->minrow+ms->statline,ms->mincol,ms->menupage);
@@ -501,7 +501,7 @@ pt_menuitem getmenuoption(pt_menu menu, uchar top, uchar left, uchar startopt)
break;
case DNARROW:
curr = next_visible(menu,curr+1);
- if (! isvisible(menu,first,curr))
+ if (! isvisible(menu,first,curr))
first = calc_first_late(menu,curr);
break;
case LTARROW:
@@ -519,17 +519,17 @@ pt_menuitem getmenuoption(pt_menu menu, uchar top, uchar left, uchar startopt)
if (ci->action == OPT_RADIOMENU) return ci;
if (ci->handler != NULL) // Do we have a handler
{
- hr = ci->handler(ms,ci);
+ hr = ci->handler(ms,ci);
if (hr.refresh) // Do we need to refresh
{
// Cleanup menu using old number of items
- cleanupmenu(menu,top,left,numitems);
+ cleanupmenu(menu,top,left,numitems);
// Recalculate the number of items
numitems = calc_visible(menu,0);
// Reprint the menu
printmenu(menu,curr,top,left,first);
}
- if (hr.valid) return ci;
+ if (hr.valid) return ci;
}
else return ci;
break;
@@ -538,11 +538,11 @@ pt_menuitem getmenuoption(pt_menu menu, uchar top, uchar left, uchar startopt)
ci->itemdata.checked = !ci->itemdata.checked;
if (ci->handler != NULL) // Do we have a handler
{
- hr = ci->handler(ms,ci);
+ hr = ci->handler(ms,ci);
if (hr.refresh) // Do we need to refresh
{
// Cleanup menu using old number of items
- cleanupmenu(menu,top,left,numitems);
+ cleanupmenu(menu,top,left,numitems);
// Recalculate the number of items
numitems = calc_visible(menu,0);
// Reprint the menu
@@ -559,7 +559,7 @@ pt_menuitem getmenuoption(pt_menu menu, uchar top, uchar left, uchar startopt)
tmp = find_shortcut(menu,asc,curr);
if ((tmp > curr) && (! isvisible(menu,first,tmp)))
first = calc_first_late(menu,tmp);
- if (tmp < curr)
+ if (tmp < curr)
first = calc_first_early(menu,tmp);
curr = tmp;
}
@@ -601,7 +601,7 @@ pt_menuitem runmenusystem(uchar top, uchar left, pt_menu cmenu, uchar startopt,
startover:
// Set the menu height
cmenu->menuheight = ms->maxrow - top-3;
- if (cmenu->menuheight > ms->maxmenuheight)
+ if (cmenu->menuheight > ms->maxmenuheight)
cmenu->menuheight = ms->maxmenuheight;
if (menutype == NORMALMENU)
opt = getmenuoption(cmenu,top,left,startopt);
@@ -615,13 +615,13 @@ pt_menuitem runmenusystem(uchar top, uchar left, pt_menu cmenu, uchar startopt,
return NULL;
}
// Are we done with the menu system?
- if ((opt->action != OPT_SUBMENU) && (opt->action != OPT_RADIOMENU))
+ if ((opt->action != OPT_SUBMENU) && (opt->action != OPT_RADIOMENU))
{
cleanupmenu(cmenu,top,left,calc_visible(cmenu,0));
return opt; // parent cleanup other menus
}
// Either radiomenu or submenu
- // Do we have a valid menu number? The next hack uses the fact that
+ // Do we have a valid menu number? The next hack uses the fact that
// itemdata.submenunum = itemdata.radiomenunum (since enum data type)
if (opt->itemdata.submenunum >= ms->nummenus) // This is Bad....
{
@@ -648,7 +648,7 @@ pt_menuitem runmenusystem(uchar top, uchar left, pt_menu cmenu, uchar startopt,
if (opt->action == OPT_RADIOMENU)
{
if (choice != NULL) opt->data = (void *)choice; // store choice in data field
- if (opt->handler != NULL) opt->handler(ms,opt);
+ if (opt->handler != NULL) opt->handler(ms,opt);
choice = NULL; // Pretend user hit esc
}
if (choice==NULL) // User hit Esc in submenu
@@ -672,7 +672,7 @@ uchar find_menu_num(const char *name)
if (name == NULL) return (uchar)(-1);
for (i=0; i < ms->nummenus; i++)
- {
+ {
m = ms->menus[i];
if ((m->name) && (strcmp(m->name,name)==0)) return i;
}
@@ -695,7 +695,7 @@ void fix_submenus()
for (j=0; j < m->numitems; j++)
{
mi = m->items[j];
- // if submenu with non-trivial data string
+ // if submenu with non-trivial data string
// again using hack that itemdata is a union data type
if ( mi->data && ((mi->action == OPT_SUBMENU) || (mi->action == OPT_RADIOMENU)) )
mi->itemdata.submenunum = find_menu_num (mi->data);
@@ -710,15 +710,15 @@ pt_menuitem showmenus(uchar startmenu)
pt_menuitem rv;
uchar oldpage,tpos;
- fix_submenus(); // Fix submenu numbers incase nick names were used
+ fix_submenus(); // Fix submenu numbers incase nick names were used
// Setup screen for menusystem
oldpage = getdisppage();
setdisppage(ms->menupage);
cls();
- clearwindow(ms->minrow, ms->mincol, ms->maxrow, ms->maxcol,
+ clearwindow(ms->minrow, ms->mincol, ms->maxrow, ms->maxcol,
ms->menupage, ms->fillchar, ms->fillattr);
- tpos = (ms->numcols - strlen(ms->title) - 1) >> 1; // center it on line
+ tpos = (ms->numcols - strlen(ms->title) - 1) >> 1; // center it on line
gotoxy(ms->minrow,ms->mincol,ms->menupage);
cprint(ms->tfillchar,ms->titleattr,ms->numcols,ms->menupage);
gotoxy(ms->minrow,ms->mincol+tpos,ms->menupage);
@@ -727,8 +727,8 @@ pt_menuitem showmenus(uchar startmenu)
cursoroff(); // Doesn't seem to work?
- // Go, main menu cannot be a radio menu
- rv = runmenusystem(ms->minrow+MENUROW, ms->mincol+MENUCOL,
+ // Go, main menu cannot be a radio menu
+ rv = runmenusystem(ms->minrow+MENUROW, ms->mincol+MENUCOL,
ms->menus[(unsigned int)startmenu], 0, NORMALMENU);
// Hide the garbage we left on the screen
@@ -742,15 +742,15 @@ pt_menuitem showmenus(uchar startmenu)
pt_menusystem init_menusystem(const char *title)
{
int i;
-
+
ms = NULL;
ms = (pt_menusystem) malloc(sizeof(t_menusystem));
if (ms == NULL) return NULL;
ms->nummenus = 0;
// Initialise all menu pointers
- for (i=0; i < MAXMENUS; i++) ms->menus[i] = NULL;
-
- ms->title = (char *)malloc(TITLELEN+1);
+ for (i=0; i < MAXMENUS; i++) ms->menus[i] = NULL;
+
+ ms->title = (char *)malloc(TITLELEN+1);
if (title == NULL)
strcpy(ms->title,TITLESTR); // Copy string
else strcpy(ms->title,title);
@@ -759,7 +759,7 @@ pt_menusystem init_menusystem(const char *title)
ms->tm_stepsize = TIMEOUTSTEPSIZE;
ms->tm_numsteps = TIMEOUTNUMSTEPS;
- ms->normalattr[NOHLITE] = NORMALATTR;
+ ms->normalattr[NOHLITE] = NORMALATTR;
ms->normalattr[HLITE] = NORMALHLITE;
ms->reverseattr[NOHLITE] = REVERSEATTR;
@@ -777,7 +777,7 @@ pt_menusystem init_menusystem(const char *title)
ms->statline = STATLINE;
ms->tfillchar= TFILLCHAR;
ms->titleattr= TITLEATTR;
-
+
ms->fillchar = FILLCHAR;
ms->fillattr = FILLATTR;
ms->spacechar= SPACECHAR;
@@ -787,9 +787,9 @@ pt_menusystem init_menusystem(const char *title)
// Initialise all handlers
ms->handler = NULL;
- ms->keys_handler = NULL;
+ ms->keys_handler = NULL;
ms->ontimeout=NULL; // No timeout handler
- ms->tm_total_timeout = 0;
+ ms->tm_total_timeout = 0;
ms->tm_sofar_timeout = 0;
ms->ontotaltimeout = NULL;
@@ -809,8 +809,8 @@ pt_menusystem init_menusystem(const char *title)
// How many entries per menu can we display at a time
ms->maxmenuheight = ms->maxrow - ms->minrow - 3;
- if (ms->maxmenuheight > MAXMENUHEIGHT)
- ms->maxmenuheight= MAXMENUHEIGHT;
+ if (ms->maxmenuheight > MAXMENUHEIGHT)
+ ms->maxmenuheight= MAXMENUHEIGHT;
// Set up the look of the box
set_box_type(MENUBOXTYPE);
@@ -862,19 +862,19 @@ void set_box_type(boxtype bt)
ms->menubt = bt;
bxc = getboxchars(bt);
ms->box_horiz = bxc[BOX_HORIZ]; // The char used to draw top line
- ms->box_ltrt = bxc[BOX_LTRT];
- ms->box_rtlt = bxc[BOX_RTLT];
+ ms->box_ltrt = bxc[BOX_LTRT];
+ ms->box_rtlt = bxc[BOX_RTLT];
}
-void set_menu_options(uchar maxmenuheight)
+void set_menu_options(uchar maxmenuheight)
{
if (maxmenuheight != 0xFF) ms->maxmenuheight = maxmenuheight;
}
// Set the window which menusystem should use
-void set_window_size(uchar top, uchar left, uchar bot, uchar right)
+void set_window_size(uchar top, uchar left, uchar bot, uchar right)
{
-
+
uchar nr,nc;
if ((top > bot) || (left > right)) return; // Sorry no change will happen here
nr = getnumrows();
@@ -942,15 +942,15 @@ void unreg_ontotaltimeout()
}
-int next_visible(pt_menu menu, int index)
+int next_visible(pt_menu menu, int index)
{
int ans;
if (index < 0) ans = 0 ;
else if (index >= menu->numitems) ans = menu->numitems-1;
else ans = index;
- while ((ans < menu->numitems-1) &&
- ((menu->items[ans]->action == OPT_INVISIBLE) ||
- (menu->items[ans]->action == OPT_SEP)))
+ while ((ans < menu->numitems-1) &&
+ ((menu->items[ans]->action == OPT_INVISIBLE) ||
+ (menu->items[ans]->action == OPT_SEP)))
ans++;
return ans;
}
@@ -961,21 +961,21 @@ int prev_visible(pt_menu menu, int index) // Return index of prev visible
if (index < 0) ans = 0;
else if (index >= menu->numitems) ans = menu->numitems-1;
else ans = index;
- while ((ans > 0) &&
+ while ((ans > 0) &&
((menu->items[ans]->action == OPT_INVISIBLE) ||
- (menu->items[ans]->action == OPT_SEP)))
+ (menu->items[ans]->action == OPT_SEP)))
ans--;
return ans;
}
-int next_visible_sep(pt_menu menu, int index)
+int next_visible_sep(pt_menu menu, int index)
{
int ans;
if (index < 0) ans = 0 ;
else if (index >= menu->numitems) ans = menu->numitems-1;
else ans = index;
- while ((ans < menu->numitems-1) &&
- (menu->items[ans]->action == OPT_INVISIBLE))
+ while ((ans < menu->numitems-1) &&
+ (menu->items[ans]->action == OPT_INVISIBLE))
ans++;
return ans;
}
@@ -986,8 +986,8 @@ int prev_visible_sep(pt_menu menu, int index) // Return index of prev visible
if (index < 0) ans = 0;
else if (index >= menu->numitems) ans = menu->numitems-1;
else ans = index;
- while ((ans > 0) &&
- (menu->items[ans]->action == OPT_INVISIBLE))
+ while ((ans > 0) &&
+ (menu->items[ans]->action == OPT_INVISIBLE))
ans--;
return ans;
}
@@ -996,7 +996,7 @@ int calc_visible(pt_menu menu,int first)
{
int ans,i;
- if (menu == NULL) return 0;
+ if (menu == NULL) return 0;
ans = 0;
for (i=first; i < menu->numitems; i++)
if (menu->items[i]->action != OPT_INVISIBLE) ans++;
@@ -1033,8 +1033,8 @@ int calc_first_early(pt_menu menu,int curr)
nv = calc_visible(menu,0);
if (nv <= menu->menuheight) return 0;
- // Start with curr and go back till >= menu->menuheight
- // items are visible
+ // Start with curr and go back till >= menu->menuheight
+ // items are visible
nv = calc_visible(menu,curr); // Already nv of them are visible
ans = curr;
for (i=0; i < menu->menuheight - nv; i++)
@@ -1043,7 +1043,7 @@ int calc_first_early(pt_menu menu,int curr)
}
// Create a new menu and return its position
-uchar add_menu(const char *title, int maxmenusize)
+uchar add_menu(const char *title, int maxmenusize)
{
int num,i;
pt_menu m;
@@ -1063,15 +1063,15 @@ uchar add_menu(const char *title, int maxmenusize)
else m->maxmenusize = maxmenusize;
m->items = (pt_menuitem *) malloc(sizeof(pt_menuitem)*(m->maxmenusize));
for (i=0; i < m->maxmenusize; i++) m->items[i] = NULL;
-
+
m->title = (char *)malloc(MENULEN+1);
if (title)
{
if (strlen(title) > MENULEN - 2)
strcpy(m->title,TITLELONG);
- else strcpy(m->title,title);
+ else strcpy(m->title,title);
}
- else strcpy(m->title,EMPTYSTR);
+ else strcpy(m->title,EMPTYSTR);
m ->menuwidth = strlen(m->title);
ms->nummenus ++;
return ms->nummenus - 1;
@@ -1091,12 +1091,12 @@ void set_menu_name(const char *name) // Set the "name" of this menu
if (name)
{
m->name = (char *)malloc(strlen(name)+1);
- strcpy(m->name,name);
+ strcpy(m->name,name);
}
}
// Create a new named menu and return its position
-uchar add_named_menu(const char * name, const char *title, int maxmenusize)
+uchar add_named_menu(const char * name, const char *title, int maxmenusize)
{
add_menu(title,maxmenusize);
set_menu_name(name);
@@ -1133,8 +1133,8 @@ pt_menuitem add_sep() // Add a separator to current menu
}
// Add item to the "current" menu
-pt_menuitem add_item(const char *item, const char *status, t_action action,
- const char *data, uchar itemdata)
+pt_menuitem add_item(const char *item, const char *status, t_action action,
+ const char *data, uchar itemdata)
{
pt_menuitem mi;
pt_menu m;
@@ -1155,21 +1155,21 @@ pt_menuitem add_item(const char *item, const char *status, t_action action,
if (item) {
if (strlen(item) > MENULEN) {
- strcpy(mi->item,ITEMLONG);
+ strcpy(mi->item,ITEMLONG);
} else {
- strcpy(mi->item,item);
+ strcpy(mi->item,item);
}
if (strlen(mi->item) > m->menuwidth) m->menuwidth = strlen(mi->item);
- } else strcpy(mi->item,EMPTYSTR);
+ } else strcpy(mi->item,EMPTYSTR);
if (status) {
if (strlen(status) > STATLEN) {
- strcpy(mi->status,STATUSLONG);
+ strcpy(mi->status,STATUSLONG);
} else {
- strcpy(mi->status,status);
+ strcpy(mi->status,status);
}
- } else strcpy(mi->status,EMPTYSTR);
-
+ } else strcpy(mi->status,EMPTYSTR);
+
mi->action=action;
str = mi->item;
mi->shortcut = 0;
@@ -1178,7 +1178,7 @@ pt_menuitem add_item(const char *item, const char *status, t_action action,
// Find the first char in [A-Za-z0-9] after ENABLEHLITE and not arg to control char
while (*str)
{
- if (*str == ENABLEHLITE)
+ if (*str == ENABLEHLITE)
{
inhlite=1;
}
@@ -1186,8 +1186,8 @@ pt_menuitem add_item(const char *item, const char *status, t_action action,
{
inhlite = 0;
}
- if ( (inhlite == 1) &&
- (((*str >= 'A') && (*str <= 'Z')) ||
+ if ( (inhlite == 1) &&
+ (((*str >= 'A') && (*str <= 'Z')) ||
((*str >= 'a') && (*str <= 'z')) ||
((*str >= '0') && (*str <= '9'))))
{
@@ -1201,9 +1201,9 @@ pt_menuitem add_item(const char *item, const char *status, t_action action,
if (data) {
if (strlen(data) > ACTIONLEN) {
- strcpy(mi->data,ACTIONLONG);
+ strcpy(mi->data,ACTIONLONG);
} else {
- strcpy(mi->data,data);
+ strcpy(mi->data,data);
}
} else strcpy(mi->data,EMPTYSTR);
@@ -1234,7 +1234,7 @@ void set_item_options(uchar shortcut,int helpid)
pt_menuitem mi;
pt_menu m;
- m = (ms->menus[ms->nummenus-1]);
+ m = (ms->menus[ms->nummenus-1]);
if (m->numitems <= 0) return;
mi = m->items[(unsigned int) m->numitems-1];
@@ -1297,4 +1297,3 @@ void gen_append_line(const char *menu_name,char *line)
if (menunum < 0) return; // No such menu
append_line_helper(menunum,line);
}
-
diff --git a/menu/libmenu/menu.h b/menu/libmenu/menu.h
index ba03c299..446b3adb 100644
--- a/menu/libmenu/menu.h
+++ b/menu/libmenu/menu.h
@@ -35,7 +35,7 @@
* Could just quit the menu program
* beep and return.
- TIMEOUTSTEPSIZE is the interval for which the program sleeps without checking for
+ TIMEOUTSTEPSIZE is the interval for which the program sleeps without checking for
any keystroke. So increasing this will make the response of the system slow.
Decreasing this will make a lot of interrupt calls using up your CPU. Default
value of TIMEOUTSTEPSIZE of 0.1 seconds should be right in most cases.
@@ -43,7 +43,7 @@
TIMEOUTNUMSTEPS of 3000 corresponds to a wait time of 300 seconds or 5 minutes
*/
-#define TIMEOUTSTEPSIZE 10
+#define TIMEOUTSTEPSIZE 10
#define TIMEOUTNUMSTEPS 30000L
// Attributes
@@ -100,17 +100,17 @@
// Other Chars
#define SUBMENUCHAR 175 // This is >> symbol
-#define RADIOMENUCHAR '>' // > symbol for radio menu?
+#define RADIOMENUCHAR '>' // > symbol for radio menu?
#define EXITMENUCHAR 174 // This is << symbol
#define CHECKED 251 // Check mark
#define UNCHECKED 250 // Light bullet
-#define RADIOSEL '.' // Current Radio Selection
+#define RADIOSEL '.' // Current Radio Selection
#define RADIOUNSEL ' ' // Radio option not selected
typedef unsigned char uchar;
// Types of menu's
-#define NORMALMENU 1
+#define NORMALMENU 1
#define RADIOMENU 2
typedef enum {OPT_INACTIVE, OPT_SUBMENU, OPT_RUN, OPT_EXITMENU, OPT_CHECKBOX,
@@ -133,16 +133,16 @@ typedef struct {
unsigned int reserved:6; // For future expansion
} t_handler_return;
-t_handler_return ACTION_VALID,ACTION_INVALID; // Specific values
+t_handler_return ACTION_VALID,ACTION_INVALID; // Specific values
typedef t_handler_return (*t_item_handler)(struct s_menusystem *, struct s_menuitem *);
typedef void (*t_menusystem_handler)(struct s_menusystem *, struct s_menuitem *);
typedef void (*t_keys_handler)(struct s_menusystem *, struct s_menuitem *,
- unsigned int scancode);
+ unsigned int scancode);
// Last parameter = HIGH BYTE = scan code , LOW BYTE = ASCII CODE
-typedef enum {HDLR_SCREEN, HDLR_KEYS } t_handler;
-// Types of handlers for menu system
+typedef enum {HDLR_SCREEN, HDLR_KEYS } t_handler;
+// Types of handlers for menu system
// TIMEOUT is the list of possible values which can be returned by the handler
// instructing the menusystem what to do. The default is CODE_WAIT
@@ -152,9 +152,9 @@ typedef TIMEOUTCODE (*t_timeout_handler)(void);
typedef struct s_menuitem {
char *item;
char *status;
- char *data; // string containing kernel to run.. but...
+ char *data; // string containing kernel to run.. but...
// for radio menu's this is a pointer to the item selected or NULL (initially)
- // for submenu's this string could be name of menu
+ // for submenu's this string could be name of menu
void * extra_data; // Any other data user can point to
unsigned int helpid; // Used for Context sensitive help
t_item_handler handler; // Pointer to function of type menufn
@@ -162,8 +162,8 @@ typedef struct s_menuitem {
t_itemdata itemdata; // Data depends on action value
uchar shortcut; // one of [A-Za-z0-9] shortcut for this menu item
uchar index; // Index within the menu array
- uchar parindex; // Index of the menu in which this item appears.
-
+ uchar parindex; // Index of the menu in which this item appears.
+
} t_menuitem;
typedef t_menuitem *pt_menuitem; // Pointer to type menuitem
@@ -171,7 +171,7 @@ typedef t_menuitem *pt_menuitem; // Pointer to type menuitem
typedef struct s_menu {
pt_menuitem *items; // pointer to array of pointer to menuitems
char *title; // Title string for menu
- char *name; // menu can be referred to by this string
+ char *name; // menu can be referred to by this string
int maxmenusize; // the size of array allocated
uchar numitems; // how many items do we actually have
uchar menuwidth;
@@ -183,11 +183,11 @@ typedef t_menu *pt_menu; // Pointer to type menu
typedef struct s_menusystem {
pt_menu menus[MAXMENUS];
- char *title;
- t_menusystem_handler handler; // Menu system handler
+ char *title;
+ t_menusystem_handler handler; // Menu system handler
t_keys_handler keys_handler; // Handler for unknown keys
t_timeout_handler ontimeout; // Timeout handler
- unsigned long tm_numsteps;
+ unsigned long tm_numsteps;
// Time to wait for key press=numsteps * stepsize milliseconds
unsigned int tm_stepsize; // Timeout step size (in milliseconds)
// Total timeout max time spent idle before we call handler
@@ -211,11 +211,11 @@ typedef struct s_menusystem {
uchar shadowattr;
uchar statline;
uchar menupage;
- uchar maxrow,minrow,numrows; // Number of rows in the window
+ uchar maxrow,minrow,numrows; // Number of rows in the window
uchar maxcol,mincol,numcols; // Number of columns in the window
// Menu box look
- boxtype menubt; // What type of boxes should be drawn
+ boxtype menubt; // What type of boxes should be drawn
char box_horiz,box_ltrt,box_rtlt; // Some chars of the box, for redrawing portions of the box
} t_menusystem;
@@ -224,7 +224,7 @@ typedef t_menusystem *pt_menusystem; // Pointer to type menusystem
pt_menuitem showmenus(uchar startmenu);
-pt_menusystem init_menusystem(const char *title);
+pt_menusystem init_menusystem(const char *title);
void close_menusystem(); // Deallocate memory used
@@ -241,14 +241,14 @@ void set_box_type(boxtype bt);
void set_window_size(uchar top, uchar left, uchar bot, uchar right); // Set the window which menusystem should use
-void set_menu_options(uchar maxmenuheight);
+void set_menu_options(uchar maxmenuheight);
// maximum height of a menu
void reg_handler(t_handler htype, void * handler); // Register handler
-void unreg_handler( t_handler htype);
+void unreg_handler( t_handler htype);
-void reg_ontimeout(t_timeout_handler, unsigned int numsteps, unsigned int stepsize);
+void reg_ontimeout(t_timeout_handler, unsigned int numsteps, unsigned int stepsize);
// Set timeout handler, set 0 for default values.
// So stepsize=0 means numsteps is measured in centiseconds.
void unreg_ontimeout();
@@ -261,22 +261,22 @@ void unreg_ontotaltimeout();
uchar find_menu_num(const char *name);
// Create a new menu and return its position
-uchar add_menu(const char *title, int maxmenusize);
+uchar add_menu(const char *title, int maxmenusize);
// Create a named menu and return its position
-uchar add_named_menu(const char *name, const char *title, int maxmenusize);
+uchar add_named_menu(const char *name, const char *title, int maxmenusize);
void set_menu_pos(uchar row,uchar col); // Set the position of this menu.
-// Add item to the "current" menu
+// Add item to the "current" menu
pt_menuitem add_item(const char *item, const char *status, t_action action, const char *data, uchar itemdata);
// Set shortcut key and help id
void set_item_options(uchar shortcut,int helpid);
// Set the shortcut key for the current item
-static inline void set_shortcut(uchar shortcut)
-{
+static inline void set_shortcut(uchar shortcut)
+{
set_item_options(shortcut,0xFFFF);
}
diff --git a/menu/libmenu/passwords.c b/menu/libmenu/passwords.c
index f3855b47..40b5c49f 100644
--- a/menu/libmenu/passwords.c
+++ b/menu/libmenu/passwords.c
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
#include <stdio.h>
#include "tui.h"
-#define MAX_LINE 512
+#define MAX_LINE 512
// Max line length in a pwdfile
p_pwdentry userdb[MAX_USERS]; // Array of pointers
int numusers; // Actual number of users
@@ -78,7 +78,7 @@ void init_passwords(const char *filename)
for (i=0; i < MAX_USERS; i++) userdb[i] = NULL;
numusers = 0;
-
+
if ( !filename ) return; // No filename specified
f = fopen(filename,"r");
@@ -103,7 +103,7 @@ void init_passwords(const char *filename)
*p = '\0';
pwdhash = p+1;
if (*pwdhash == 0) continue; // Malformed line (no password specified)
- p = strchr(pwdhash,':');
+ p = strchr(pwdhash,':');
if (p == NULL) { // No perms specified
perms = NULL;
} else {
@@ -111,7 +111,7 @@ void init_passwords(const char *filename)
perms = p+1;
if (*perms == 0) perms = NULL;
}
- // At this point we have user,pwdhash and perms setup
+ // At this point we have user,pwdhash and perms setup
userdb[numusers] = (p_pwdentry)malloc(sizeof(pwdentry));
strcpy(userdb[numusers]->username,user);
strcpy(userdb[numusers]->pwdhash,pwdhash);
diff --git a/menu/libmenu/passwords.h b/menu/libmenu/passwords.h
index 1e68e3e2..00e5702d 100644
--- a/menu/libmenu/passwords.h
+++ b/menu/libmenu/passwords.h
@@ -1,6 +1,6 @@
#ifndef _PASSWORDS_H_
#define _PASSWORDS_H_
-
+
char authenticate_user(const char * username, const char* pwd);
char isallowed(const char *username, const char * perm);
@@ -16,7 +16,7 @@ void close_passwords();
typedef struct {
char username[USERNAME_LENGTH+1];
- char pwdhash[PWDHASH_LENGTH+1];
+ char pwdhash[PWDHASH_LENGTH+1];
char *perms; // pointer to string containing ":" delimited permissions
} pwdentry;
diff --git a/menu/libmenu/scancodes.h b/menu/libmenu/scancodes.h
index 6048c7e3..d3f625a6 100644
--- a/menu/libmenu/scancodes.h
+++ b/menu/libmenu/scancodes.h
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -81,6 +81,6 @@
#define ALT_PRESSED (1<<3)
#define CTRL_PRESSED (1<<2)
// actually 1<<1 is Left Shift, 1<<0 is right shift
-#define SHIFT_PRESSED (1<<1 | 1 <<0)
+#define SHIFT_PRESSED (1<<1 | 1 <<0)
#endif
diff --git a/menu/libmenu/syslnx.c b/menu/libmenu/syslnx.c
index 76961194..d2b0aef4 100644
--- a/menu/libmenu/syslnx.c
+++ b/menu/libmenu/syslnx.c
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -21,9 +21,9 @@ char issyslinux(void)
REG_EAX(inreg) = 0x00003000;
REG_EBX(inreg) = REG_ECX(inreg) = REG_EDX(inreg) = 0xFFFFFFFF;
__intcall(0x21,&inreg,&outreg);
- return (REG_EAX(outreg) == 0x59530000) &&
+ return (REG_EAX(outreg) == 0x59530000) &&
(REG_EBX(outreg) == 0x4c530000) &&
- (REG_ECX(outreg) == 0x4e490000) &&
+ (REG_ECX(outreg) == 0x4e490000) &&
(REG_EDX(outreg) == 0x58550000);
}
@@ -66,7 +66,7 @@ void runsyslinuximage(const char*cmd, long ipappend)
// Function 16h not supported Fall back to runcommand
if (numfun < 0x16) runsyslinuxcmd(cmd);
// Try the Run Kernel Image function
- // Split command line into
+ // Split command line into
strcpy(__com32.cs_bounce,cmd);
ptr = __com32.cs_bounce;
// serach for first space or end of string
@@ -86,4 +86,3 @@ void runsyslinuximage(const char*cmd, long ipappend)
__intcall(0x22,&inreg,&outreg); // If successful does not return
}
-
diff --git a/menu/libmenu/syslnx.h b/menu/libmenu/syslnx.h
index cd159aec..755b9690 100644
--- a/menu/libmenu/syslnx.h
+++ b/menu/libmenu/syslnx.h
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
#include <com32.h>
-//Macros which help user not have to remember the structure of register
+//Macros which help user not have to remember the structure of register
// Data structure
#define REG_AH(x) ((x).eax.b[1])
@@ -59,6 +59,6 @@ void syslinux_idle(void); /* Call syslinux idle loop */
/* Run command line with ipappend, returns if kernel image not found
If syslinux version too old, then defaults to runsyslinuxcmd */
-void runsyslinuximage(const char*cmd, long ipappend);
+void runsyslinuximage(const char*cmd, long ipappend);
#endif
diff --git a/menu/libmenu/tui.c b/menu/libmenu/tui.c
index 617b7312..cb8c1936 100644
--- a/menu/libmenu/tui.c
+++ b/menu/libmenu/tui.c
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2006 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -26,7 +26,7 @@ char eolstr[] = "\n$";
// showoldvalue <> 0 implies currentvalue displayed first
// If showoldvalue <> 0 then caller responsibility to ensure that
// str is NULL terminated.
-void getuserinput(char *stra, unsigned int size, unsigned int password,
+void getuserinput(char *stra, unsigned int size, unsigned int password,
unsigned int showoldvalue)
{
unsigned char c,scan;
@@ -61,7 +61,7 @@ void getuserinput(char *stra, unsigned int size, unsigned int password,
// Invariants: p is the current char
// col is the corresponding column on the screen
if (password == 0) // Not a password, print initial value
- {
+ {
gotoxy(row,col,page);
csprint(str,GETSTRATTR);
}
@@ -73,7 +73,7 @@ void getuserinput(char *stra, unsigned int size, unsigned int password,
break;
}
fudge = 0;
- // if scan code is regognized do something
+ // if scan code is regognized do something
// else if char code is recognized do something
// else ignore
switch(scan) {
@@ -86,13 +86,13 @@ void getuserinput(char *stra, unsigned int size, unsigned int password,
case LTARROW:
if (p > str) p--;
break;
- case CTRLLT:
+ case CTRLLT:
if (p==str) break;
- if (*p == ' ')
+ if (*p == ' ')
while ((p > str) && (*p == ' ')) p--;
else {
if (*(p-1) == ' ') {
- p--;
+ p--;
while ((p > str) && (*p == ' ')) p--;
}
}
@@ -101,9 +101,9 @@ void getuserinput(char *stra, unsigned int size, unsigned int password,
case RTARROW:
if (p < last) p++;
break;
- case CTRLRT:
+ case CTRLRT:
if (*p==0) break; // At end of string
- if (*p != ' ')
+ if (*p != ' ')
while ((*p!=0) && (*p != ' ')) p++;
while ((*p!=0) && ((*p == ' ') && (*(p+1) != ' '))) p++;
if (*p==' ') p++;
@@ -136,7 +136,7 @@ void getuserinput(char *stra, unsigned int size, unsigned int password,
p = str; *p=0; last = str;
break;
default: // Handle insert and overwrite mode
- if ((c >= ' ') && (c < 128) &&
+ if ((c >= ' ') && (c < 128) &&
((unsigned int)(p-str) < size-1) ) {
if (insmode == 0) { // Overwrite mode
if (p==last) last++;
@@ -186,7 +186,7 @@ void cswprint(const char *str,char attr,char left)
nc = getnumcols();
getpos(&row,&col,page);
while ( *str ) {
- switch (*str)
+ switch (*str)
{
case '\b':
--col;
@@ -205,9 +205,9 @@ void cswprint(const char *str,char attr,char left)
case CHABSATTR: // change attribute (absolute)
cha = *(str+1);
chb = *(str+2);
- if ((((cha >= '0') && (cha <= '9')) ||
+ if ((((cha >= '0') && (cha <= '9')) ||
((cha >= 'A') && (cha <= 'F'))) &&
- (((chb >= '0') && (chb <= '9')) ||
+ (((chb >= '0') && (chb <= '9')) ||
((chb >= 'A') && (chb <= 'F')))) // Next two chars are legal
{
if ((cha >= 'A') && (cha <= 'F'))
@@ -282,7 +282,7 @@ unsigned char * getboxchars(boxtype bt)
{
switch (bt)
{
- case BOX_SINSIN:
+ case BOX_SINSIN:
return SINSIN_CHARS;
break;
case BOX_DBLDBL:
@@ -302,12 +302,12 @@ unsigned char * getboxchars(boxtype bt)
}
// Draw box and lines
-void drawbox(char top,char left,char bot, char right,
+void drawbox(char top,char left,char bot, char right,
char page, char attr,boxtype bt)
{
unsigned char *box_chars; // pointer to array of box chars
unsigned char x;
-
+
box_chars = getboxchars(bt);
// Top border
gotoxy(top,left,page);
@@ -333,7 +333,7 @@ void drawbox(char top,char left,char bot, char right,
}
}
-void drawhorizline(char top, char left, char right, char page, char attr,
+void drawhorizline(char top, char left, char right, char page, char attr,
boxtype bt, char dumb)
{
unsigned char start,end;
@@ -351,7 +351,7 @@ void drawhorizline(char top, char left, char right, char page, char attr,
{
gotoxy(top,left,page);
cprint(box_chars[BOX_LTRT],attr,1,page);
- gotoxy(top,right,page);
+ gotoxy(top,right,page);
cprint(box_chars[BOX_RTLT],attr,1,page);
}
}
diff --git a/menu/libmenu/tui.h b/menu/libmenu/tui.h
index affdc2e4..92f93863 100644
--- a/menu/libmenu/tui.h
+++ b/menu/libmenu/tui.h
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -25,21 +25,21 @@
#define BELL 0x07
// CHRELATTR = ^N, CHABSATTR = ^O
-#define CHABSATTR 15
+#define CHABSATTR 15
#define CHRELATTR 14
-void clearwindow(char top, char left, char bot, char right,
+void clearwindow(char top, char left, char bot, char right,
char page, char fillchar, char fillattr);
void cls(void); /* Clears the entire current screen page */
-// Generic user input,
+// Generic user input,
// password = 0 iff chars echoed on screen
// showoldvalue <> 0 iff current displayed for editing
-void getuserinput(char *str, unsigned int size,
+void getuserinput(char *str, unsigned int size,
unsigned int password, unsigned int showoldvalue);
-static inline void getstring(char *str, unsigned int size)
+static inline void getstring(char *str, unsigned int size)
{
getuserinput(str,size,0,0);
}
@@ -65,8 +65,8 @@ static inline void getpwd(char * str, unsigned int size)
#define BOX_LEFT 0x5
#define BOX_RIGHT 0x5
#define BOX_VERT 0x5 // LEFT=RIGHT=VERT
-#define BOX_LTRT 0x6
-#define BOX_RTLT 0x7
+#define BOX_LTRT 0x6
+#define BOX_RTLT 0x7
#define BOX_TOPBOT 0x8
#define BOX_BOTTOP 0x9
#define BOX_MIDDLE 0xA
@@ -75,7 +75,7 @@ typedef enum {BOX_SINSIN,BOX_DBLDBL, BOX_SINDBL, BOX_DBLSIN} boxtype;
unsigned char * getboxchars(boxtype bt);
-void drawbox(char top,char left,char bot, char right,
+void drawbox(char top,char left,char bot, char right,
char page, char attr,boxtype bt);
// Draw a horizontal line
diff --git a/menu/menugen.py b/menu/menugen.py
index 78ea3160..70ec1f87 100644
--- a/menu/menugen.py
+++ b/menu/menugen.py
@@ -3,12 +3,12 @@
import sys, re, getopt
class Menusystem:
-
+
types = {"run" : "OPT_RUN",
- "inactive" : "OPT_INACTIVE",
+ "inactive" : "OPT_INACTIVE",
"checkbox" : "OPT_CHECKBOX",
- "radiomenu": "OPT_RADIOMENU",
- "sep" : "OPT_SEP",
+ "radiomenu": "OPT_RADIOMENU",
+ "sep" : "OPT_SEP",
"invisible": "OPT_INVISIBLE",
"radioitem": "OPT_RADIOITEM",
"exitmenu" : "OPT_EXITMENU",
@@ -26,18 +26,18 @@ class Menusystem:
"perms" : "", # permission required to execute this entry
"_updated" : None, # has this dictionary been updated
"type" : "run" }
-
+
menu_init = { "title" : "",
"row" : "0xFF", # let system decide position
- "col" : "0xFF",
+ "col" : "0xFF",
"_updated" : None,
"name" : "" }
system_init ={ "videomode" : "0xFF",
"title" : "Menu System",
- "top" : "1",
- "left" : "1" ,
- "bot" : "21",
+ "top" : "1",
+ "left" : "1" ,
+ "bot" : "21",
"right":"79",
"helpdir" : "/isolinux/help",
"pwdfile" : "",
@@ -97,7 +97,7 @@ class Menusystem:
self.menus[-1][0].update(self.menu)
self.init_menu()
if self.entry["_updated"]:
- if not self.entry["info"]:
+ if not self.entry["info"]:
self.entry["info"] = self.entry["data"]
if not self.menus:
print "Error before line %d" % self.lineno
@@ -143,7 +143,7 @@ class Menusystem:
if name == "skipcondn":
try: # is skipcondn a number?
a = int(value)
- except: # it is a "-" delimited sequence
+ except: # it is a "-" delimited sequence
value = value.lower()
parts = [ self.shift_flags.get(x.strip(),None) for x in value.split("-") ]
self.system["skipcondn"] = " | ".join(filter(None, parts))
@@ -160,7 +160,7 @@ class Menusystem:
if self.state == "menu":
err = self.set_menu(name,value)
# change state to entry it menu returns error
- if err:
+ if err:
err = None
self.state = "item"
if self.state == "item":
@@ -176,7 +176,7 @@ class Menusystem:
entry["type"] = self.types[entry["type"]]
if entry["type"] == "login": #special type
fd.write(self.templates["login"] % entry)
- else:
+ else:
fd.write(self.templates["item"] % entry)
def print_menu(self,menu,fd):
@@ -184,7 +184,7 @@ class Menusystem:
fd.write(self.templates["menu"] % menu)
if (menu["row"] != "0xFF") or (menu["col"] != "0xFF"):
fd.write(' set_menu_pos(%(row)s,%(col)s);\n' % menu)
-
+
def output(self,filename):
curr_template = None
@@ -208,29 +208,29 @@ class Menusystem:
if not curr_template: continue # lines between templates are ignored
contents.append(line)
ifd.close()
-
+
missing = None
for x in self.reqd_templates:
if not self.templates.has_key(x): missing = x
if missing:
print "Template %s required but not defined in %s" % (missing,self.code_template_filename)
-
+
if filename == "-":
fd = sys.stdout
else: fd = open(filename,"w")
self.foundmain = None
- fd.write(self.templates["header"])
+ fd.write(self.templates["header"])
fd.write(self.templates["system"] % self.system)
for (menu,items) in self.menus:
self.print_menu(menu,fd)
for entry in items: self.print_entry(entry,fd)
- fd.write(self.templates["footer"])
+ fd.write(self.templates["footer"])
fd.close()
if not self.foundmain:
print "main menu not found"
print self.menus
sys.exit(1)
-
+
def input(self,filename):
if filename == "-":
fd = sys.stdin
@@ -255,7 +255,7 @@ class Menusystem:
self.state = "menu"
self.add_menu(line[1:-1])
continue
-
+
# add property of current entry
pos = line.find("=") # find the first = in string
if pos < 0:
@@ -290,7 +290,7 @@ def main():
print "Unknown options %s" % args
usage()
for o,a in opts:
- if o in ["-i","--input"]:
+ if o in ["-i","--input"]:
ifile = a
elif o in ["-o", "--output"]:
ofile = a
@@ -305,5 +305,3 @@ def main():
if __name__ == "__main__":
main()
-
-
diff --git a/menu/password b/menu/password
index 00fc7cb8..3caffe22 100644
--- a/menu/password
+++ b/menu/password
@@ -1,19 +1,18 @@
-# This file should be available as /isolinux/password
+# This file should be available as /isolinux/password
# for complex.c to use.
#
# All lines starting with # and empty lines are ignored
#
# All non-comment lines here are of the form
# USERNAME:PWDHASH:PERM1:PERM2:...:
-#
+#
# where USERNAME is maximum of 12 chars,
# PWDHASH is maximum of 40 chars (DES ENCRYPTED)
# PERM1,... are arbitrary strings
#
-# The current lines correspond to
+# The current lines correspond to
# user1:secret1, user2:secret2, user3:secret3
user1:LcMRo3YZGtP0c:editcmd
user2:FqewzyxP78a7A:
user3:MKjmc.IHoXBNU:root
-
diff --git a/menu/simple.c b/menu/simple.c
index 8277c5ea..92e8ab12 100644
--- a/menu/simple.c
+++ b/menu/simple.c
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2004-2005 Murali Krishnan Ganapathy - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -28,21 +28,21 @@ int main(void)
// Choose the default title and setup default values for all attributes....
init_menusystem(NULL);
set_window_size(1,1,23,78); // Leave one row/col border all around
-
+
// Choose the default values for all attributes and char's
// -1 means choose defaults (Actually the next 4 lines are not needed)
- //set_normal_attr (-1,-1,-1,-1);
- //set_status_info (-1,-1);
- //set_title_info (-1,-1);
+ //set_normal_attr (-1,-1,-1,-1);
+ //set_status_info (-1,-1);
+ //set_title_info (-1,-1);
//set_misc_info(-1,-1,-1,-1);
-
+
// menuindex = add_named_menu("name"," Menu Title ",-1);
// add_item("Item string","Status String",TYPE,"any string",NUM)
// TYPE = OPT_RUN | OPT_EXITMENU | OPT_SUBMENU | OPT_CHECKBOX | OPT_INACTIVE
// "any string" useful for storing kernel names
// In case of OPT_SUBMENU, "any string" can be set to "name" of menu to be linked
// in which case value NUM is ignored
- // NUM = index of submenu if OPT_SUBMENU,
+ // NUM = index of submenu if OPT_SUBMENU,
// 0/1 default checked state if OPT_CHECKBOX
// unused otherwise.
@@ -57,7 +57,7 @@ int main(void)
add_item("Windows Rescue","winresc",OPT_RUN,"winresc",0);
add_item("Exit this menu","Go one level up",OPT_EXITMENU,"exit",0);
- add_named_menu("main"," Main Menu ",-1);
+ add_named_menu("main"," Main Menu ",-1);
add_item("Prepare","prep",OPT_RUN,"prep",0);
add_item("Rescue options...","Troubleshoot a system",OPT_SUBMENU,"rescue",0);
add_item("Testing...","Options to test hardware",OPT_SUBMENU,"testing",0);
diff --git a/menu/test.menu b/menu/test.menu
index 66b26584..061c548e 100644
--- a/menu/test.menu
+++ b/menu/test.menu
@@ -58,4 +58,3 @@ data="testing"
item="Exit this menu"
info="Go one level up"
type=exitmenu
-
diff --git a/menu/test2.menu b/menu/test2.menu
index 02e63b39..4570dc2c 100644
--- a/menu/test2.menu
+++ b/menu/test2.menu
@@ -140,4 +140,3 @@ data="testing"
item="<E>xit to prompt"
info="Exit the menu system"
type=exitmenu
-
diff --git a/mkdiskimage.in b/mkdiskimage.in
index d73ffc09..88a8c024 100755
--- a/mkdiskimage.in
+++ b/mkdiskimage.in
@@ -1,7 +1,7 @@
#!/usr/bin/perl
## -----------------------------------------------------------------------
## $Id$
-##
+##
## Copyright 2002-2004 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
@@ -243,7 +243,7 @@ if ( $opt{'F'} ) {
}
seek(OUTPUT, $offset + 0x36, 0);
read(OUTPUT, $fsname, 8);
-
+
# FAT12: adjust partition type
if ( $fsname eq 'FAT12 ' ) {
$fstype = 0x01; # FAT12
diff --git a/mtools/Makefile b/mtools/Makefile
index 920c85af..26909a30 100644
--- a/mtools/Makefile
+++ b/mtools/Makefile
@@ -35,6 +35,3 @@ syslinux: $(OBJS)
$(CC) $(CFLAGS) -S -o $@ $<
-include .*.d
-
-
-
diff --git a/mtools/syslinux.c b/mtools/syslinux.c
index d7ff0a89..5d939c3f 100644
--- a/mtools/syslinux.c
+++ b/mtools/syslinux.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 1998-2004 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -144,7 +144,7 @@ int main(int argc, char *argv[])
mypid = getpid();
program = argv[0];
-
+
device = NULL;
for ( argp = argv+1 ; *argp ; argp++ ) {
@@ -191,7 +191,7 @@ int main(int argc, char *argv[])
}
xpread(dev_fd, sectbuf, 512, filesystem_offset);
-
+
/*
* Check to see that what we got was indeed an MS-DOS boot sector/superblock
*/
@@ -217,7 +217,7 @@ int main(int argc, char *argv[])
dev_fd,
(unsigned long long)filesystem_offset);
fclose(mtc);
-
+
/*
* Run mtools to create the LDLINUX.SYS file
*/
@@ -231,7 +231,7 @@ int main(int argc, char *argv[])
mtp = popen("mcopy -D o -D O -o - s:ldlinux.sys", "w");
if ( !mtp ||
- (fwrite(syslinux_ldlinux, 1, syslinux_ldlinux_len, mtp)
+ (fwrite(syslinux_ldlinux, 1, syslinux_ldlinux_len, mtp)
!= syslinux_ldlinux_len) ||
(status = pclose(mtp), !WIFEXITED(status) || WEXITSTATUS(status)) ) {
die("failed to create ldlinux.sys");
diff --git a/parsecmd.inc b/parsecmd.inc
index 95432e5a..e8a6cd08 100644
--- a/parsecmd.inc
+++ b/parsecmd.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
diff --git a/parseconfig.inc b/parseconfig.inc
index 122a2308..acfc5d50 100644
--- a/parseconfig.inc
+++ b/parseconfig.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2004 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -20,7 +20,7 @@
section .text
;
; "default" command
-;
+;
pc_default: mov di,default_cmd
call getline
mov byte [di-1],0 ; null-terminate
@@ -172,7 +172,7 @@ pc_serial: call getint
call getint
mov [FlowControl], word 0 ; Default to no flow control
jc .nobaud
-.valid_baud:
+.valid_baud:
push ebx
call skipspace
jc .no_flow
diff --git a/ppmtolss16 b/ppmtolss16
index d2f14a99..19fbe2db 100755
--- a/ppmtolss16
+++ b/ppmtolss16
@@ -1,7 +1,7 @@
#!/usr/bin/perl
## $Id$
## -----------------------------------------------------------------------
-##
+##
## Copyright 2004 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
@@ -135,12 +135,12 @@ sub getrgb($) {
$r = ( $getrgb_leftover_bit_val & 0x80 ) ? 0x00 : 0xff;
$getrgb_leftover_bit_val <<= 1;
$getrgb_leftover_bit_cnt--;
-
+
return ($r,$r,$r);
} elsif ( $form == 1 ) {
# Plain PBM
my($ch);
-
+
do {
$ch = getc(STDIN);
return undef if ( !defined($ch) );
@@ -257,7 +257,7 @@ sub by_intensity() {
# If same, sort based on RGB components,
# with highest priority given to G, then R, then B.
-
+
return ( $ga <=> $gb ) if ( $ga != $gb );
return ( $ra <=> $rb ) if ( $ra != $rb );
return ( $ba <=> $bb );
@@ -364,7 +364,7 @@ sub output_run($$$) {
}
}
}
-
+
$bytes = 0;
undef $nybble_tmp;
@@ -392,7 +392,3 @@ $pixels = $xsize * $ysize;
$size = ($pixels+1)/2;
printf STDERR "%d pixels, %d bytes, (%2.2f%% compression)\n",
$pixels, $bytes, 100*($size-$bytes)/$size;
-
-
-
-
diff --git a/pxe.inc b/pxe.inc
index 3fa839d0..ff7782b5 100644
--- a/pxe.inc
+++ b/pxe.inc
@@ -1,5 +1,5 @@
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1999-2004 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -64,82 +64,81 @@
%define PXENV_START_BASE 0075h
%define PXENV_STOP_BASE 0076h
-%define PXENV_EXIT_SUCCESS 0x0000
-%define PXENV_EXIT_FAILURE 0x0001
+%define PXENV_EXIT_SUCCESS 0x0000
+%define PXENV_EXIT_FAILURE 0x0001
-%define PXENV_STATUS_SUCCESS 0x00
-%define PXENV_STATUS_FAILURE 0x01
-%define PXENV_STATUS_BAD_FUNC 0x02
-%define PXENV_STATUS_UNSUPPORTED 0x03
-%define PXENV_STATUS_KEEP_UNDI 0x04
-%define PXENV_STATUS_KEEP_ALL 0x05
-%define PXENV_STATUS_OUT_OF_RESOURCES 0x06
-%define PXENV_STATUS_ARP_TIMEOUT 0x11
-%define PXENV_STATUS_UDP_CLOSED 0x18
-%define PXENV_STATUS_UDP_OPEN 0x19
-%define PXENV_STATUS_TFTP_CLOSED 0x1A
-%define PXENV_STATUS_TFTP_OPEN 0x1B
-%define PXENV_STATUS_MCOPY_PROBLEM 0x20
-%define PXENV_STATUS_BIS_INTEGRITY_FAILURE 0x21
-%define PXENV_STATUS_BIS_VALIDATE_FAILURE 0x22
-%define PXENV_STATUS_BIS_INIT_FAILURE 0x23
-%define PXENV_STATUS_BIS_SHUTDOWN_FAILURE 0x24
-%define PXENV_STATUS_BIS_GBOA_FAILURE 0x25
-%define PXENV_STATUS_BIS_FREE_FAILURE 0x26
-%define PXENV_STATUS_BIS_GSI_FAILURE 0x27
-%define PXENV_STATUS_BIS_BAD_CKSUM 0x28
-%define PXENV_STATUS_TFTP_CANNOT_ARP_ADDRESS 0x30
+%define PXENV_STATUS_SUCCESS 0x00
+%define PXENV_STATUS_FAILURE 0x01
+%define PXENV_STATUS_BAD_FUNC 0x02
+%define PXENV_STATUS_UNSUPPORTED 0x03
+%define PXENV_STATUS_KEEP_UNDI 0x04
+%define PXENV_STATUS_KEEP_ALL 0x05
+%define PXENV_STATUS_OUT_OF_RESOURCES 0x06
+%define PXENV_STATUS_ARP_TIMEOUT 0x11
+%define PXENV_STATUS_UDP_CLOSED 0x18
+%define PXENV_STATUS_UDP_OPEN 0x19
+%define PXENV_STATUS_TFTP_CLOSED 0x1A
+%define PXENV_STATUS_TFTP_OPEN 0x1B
+%define PXENV_STATUS_MCOPY_PROBLEM 0x20
+%define PXENV_STATUS_BIS_INTEGRITY_FAILURE 0x21
+%define PXENV_STATUS_BIS_VALIDATE_FAILURE 0x22
+%define PXENV_STATUS_BIS_INIT_FAILURE 0x23
+%define PXENV_STATUS_BIS_SHUTDOWN_FAILURE 0x24
+%define PXENV_STATUS_BIS_GBOA_FAILURE 0x25
+%define PXENV_STATUS_BIS_FREE_FAILURE 0x26
+%define PXENV_STATUS_BIS_GSI_FAILURE 0x27
+%define PXENV_STATUS_BIS_BAD_CKSUM 0x28
+%define PXENV_STATUS_TFTP_CANNOT_ARP_ADDRESS 0x30
%define PXENV_STATUS_TFTP_OPEN_TIMEOUT 0x32
-%define PXENV_STATUS_TFTP_UNKNOWN_OPCODE 0x33
-%define PXENV_STATUS_TFTP_READ_TIMEOUT 0x35
-%define PXENV_STATUS_TFTP_ERROR_OPCODE 0x36
-%define PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION 0x38
-%define PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION 0x39
-%define PXENV_STATUS_TFTP_TOO_MANY_PACKAGES 0x3A
-%define PXENV_STATUS_TFTP_FILE_NOT_FOUND 0x3B
-%define PXENV_STATUS_TFTP_ACCESS_VIOLATION 0x3C
-%define PXENV_STATUS_TFTP_NO_MCAST_ADDRESS 0x3D
-%define PXENV_STATUS_TFTP_NO_FILESIZE 0x3E
-%define PXENV_STATUS_TFTP_INVALID_PACKET_SIZE 0x3F
-%define PXENV_STATUS_DHCP_TIMEOUT 0x51
-%define PXENV_STATUS_DHCP_NO_IP_ADDRESS 0x52
-%define PXENV_STATUS_DHCP_NO_BOOTFILE_NAME 0x53
-%define PXENV_STATUS_DHCP_BAD_IP_ADDRESS 0x54
-%define PXENV_STATUS_UNDI_INVALID_FUNCTION 0x60
-%define PXENV_STATUS_UNDI_MEDIATEST_FAILED 0x61
-%define PXENV_STATUS_UNDI_CANNOT_INIT_NIC_FOR_MCAST 0x62
-%define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC 0x63
-%define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_PHY 0x64
-%define PXENV_STATUS_UNDI_CANNOT_READ_CONFIG_DATA 0x65
-%define PXENV_STATUS_UNDI_CANNOT_READ_INIT_DATA 0x66
-%define PXENV_STATUS_UNDI_BAD_MAC_ADDRESS 0x67
-%define PXENV_STATUS_UNDI_BAD_EEPROM_CHECKSUM 0x68
-%define PXENV_STATUS_UNDI_ERROR_SETTING_ISR 0x69
-%define PXENV_STATUS_UNDI_INVALID_STATE 0x6A
-%define PXENV_STATUS_UNDI_TRANSMIT_ERROR 0x6B
-%define PXENV_STATUS_UNDI_INVALID_PARAMETER 0x6C
-%define PXENV_STATUS_BSTRAP_PROMPT_MENU 0x74
-%define PXENV_STATUS_BSTRAP_MCAST_ADDR 0x76
-%define PXENV_STATUS_BSTRAP_MISSING_LIST 0x77
-%define PXENV_STATUS_BSTRAP_NO_RESPONSE 0x78
-%define PXENV_STATUS_BSTRAP_FILE_TOO_BIG 0x79
-%define PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE 0xA0
-%define PXENV_STATUS_BINL_NO_PXE_SERVER 0xA1
-%define PXENV_STATUS_NOT_AVAILABLE_IN_PMODE 0xA2
-%define PXENV_STATUS_NOT_AVAILABLE_IN_RMODE 0xA3
-%define PXENV_STATUS_BUSD_DEVICE_NOT_SUPPORTED 0xB0
-%define PXENV_STATUS_LOADER_NO_FREE_BASE_MEMORY 0xC0
-%define PXENV_STATUS_LOADER_NO_BC_ROMID 0xC1
-%define PXENV_STATUS_LOADER_BAD_BC_ROMID 0xC2
-%define PXENV_STATUS_LOADER_BAD_BC_RUNTIME_IMAGE 0xC3
-%define PXENV_STATUS_LOADER_NO_UNDI_ROMID 0xC4
-%define PXENV_STATUS_LOADER_BAD_UNDI_ROMID 0xC5
-%define PXENV_STATUS_LOADER_BAD_UNDI_DRIVER_IMAGE 0xC6
-%define PXENV_STATUS_LOADER_NO_PXE_STRUCT 0xC8
-%define PXENV_STATUS_LOADER_NO_PXENV_STRUCT 0xC9
-%define PXENV_STATUS_LOADER_UNDI_START 0xCA
-%define PXENV_STATUS_LOADER_BC_START 0xCB
+%define PXENV_STATUS_TFTP_UNKNOWN_OPCODE 0x33
+%define PXENV_STATUS_TFTP_READ_TIMEOUT 0x35
+%define PXENV_STATUS_TFTP_ERROR_OPCODE 0x36
+%define PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION 0x38
+%define PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION 0x39
+%define PXENV_STATUS_TFTP_TOO_MANY_PACKAGES 0x3A
+%define PXENV_STATUS_TFTP_FILE_NOT_FOUND 0x3B
+%define PXENV_STATUS_TFTP_ACCESS_VIOLATION 0x3C
+%define PXENV_STATUS_TFTP_NO_MCAST_ADDRESS 0x3D
+%define PXENV_STATUS_TFTP_NO_FILESIZE 0x3E
+%define PXENV_STATUS_TFTP_INVALID_PACKET_SIZE 0x3F
+%define PXENV_STATUS_DHCP_TIMEOUT 0x51
+%define PXENV_STATUS_DHCP_NO_IP_ADDRESS 0x52
+%define PXENV_STATUS_DHCP_NO_BOOTFILE_NAME 0x53
+%define PXENV_STATUS_DHCP_BAD_IP_ADDRESS 0x54
+%define PXENV_STATUS_UNDI_INVALID_FUNCTION 0x60
+%define PXENV_STATUS_UNDI_MEDIATEST_FAILED 0x61
+%define PXENV_STATUS_UNDI_CANNOT_INIT_NIC_FOR_MCAST 0x62
+%define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC 0x63
+%define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_PHY 0x64
+%define PXENV_STATUS_UNDI_CANNOT_READ_CONFIG_DATA 0x65
+%define PXENV_STATUS_UNDI_CANNOT_READ_INIT_DATA 0x66
+%define PXENV_STATUS_UNDI_BAD_MAC_ADDRESS 0x67
+%define PXENV_STATUS_UNDI_BAD_EEPROM_CHECKSUM 0x68
+%define PXENV_STATUS_UNDI_ERROR_SETTING_ISR 0x69
+%define PXENV_STATUS_UNDI_INVALID_STATE 0x6A
+%define PXENV_STATUS_UNDI_TRANSMIT_ERROR 0x6B
+%define PXENV_STATUS_UNDI_INVALID_PARAMETER 0x6C
+%define PXENV_STATUS_BSTRAP_PROMPT_MENU 0x74
+%define PXENV_STATUS_BSTRAP_MCAST_ADDR 0x76
+%define PXENV_STATUS_BSTRAP_MISSING_LIST 0x77
+%define PXENV_STATUS_BSTRAP_NO_RESPONSE 0x78
+%define PXENV_STATUS_BSTRAP_FILE_TOO_BIG 0x79
+%define PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE 0xA0
+%define PXENV_STATUS_BINL_NO_PXE_SERVER 0xA1
+%define PXENV_STATUS_NOT_AVAILABLE_IN_PMODE 0xA2
+%define PXENV_STATUS_NOT_AVAILABLE_IN_RMODE 0xA3
+%define PXENV_STATUS_BUSD_DEVICE_NOT_SUPPORTED 0xB0
+%define PXENV_STATUS_LOADER_NO_FREE_BASE_MEMORY 0xC0
+%define PXENV_STATUS_LOADER_NO_BC_ROMID 0xC1
+%define PXENV_STATUS_LOADER_BAD_BC_ROMID 0xC2
+%define PXENV_STATUS_LOADER_BAD_BC_RUNTIME_IMAGE 0xC3
+%define PXENV_STATUS_LOADER_NO_UNDI_ROMID 0xC4
+%define PXENV_STATUS_LOADER_BAD_UNDI_ROMID 0xC5
+%define PXENV_STATUS_LOADER_BAD_UNDI_DRIVER_IMAGE 0xC6
+%define PXENV_STATUS_LOADER_NO_PXE_STRUCT 0xC8
+%define PXENV_STATUS_LOADER_NO_PXENV_STRUCT 0xC9
+%define PXENV_STATUS_LOADER_UNDI_START 0xCA
+%define PXENV_STATUS_LOADER_BC_START 0xCB
%endif ; _PXE_INC
-
diff --git a/pxelinux.asm b/pxelinux.asm
index 9ff832c3..e56f9aee 100644
--- a/pxelinux.asm
+++ b/pxelinux.asm
@@ -15,7 +15,7 @@
; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
; Boston MA 02111-1307, USA; either version 2 of the License, or
; (at your option) any later version; incorporated herein by reference.
-;
+;
; ****************************************************************************
%define IS_PXELINUX 1
@@ -40,7 +40,7 @@ REBOOT_TIME equ 5*60 ; If failure, time until full reset
MAX_OPEN_LG2 equ 5 ; log2(Max number of open sockets)
MAX_OPEN equ (1 << MAX_OPEN_LG2)
PKTBUF_SIZE equ (65536/MAX_OPEN) ; Per-socket packet buffer size
-TFTP_PORT equ htons(69) ; Default TFTP port
+TFTP_PORT equ htons(69) ; Default TFTP port
PKT_RETRY equ 6 ; Packet transmit retry count
PKT_TIMEOUT equ 12 ; Initial timeout, timer ticks @ 55 ms
; Desired TFTP block size
@@ -123,7 +123,7 @@ comboot_seg equ real_mode_seg ; COMBOOT image loading zone
;
; BOOTP/DHCP packet pattern
;
- struc bootp_t
+ struc bootp_t
bootp:
.opcode resb 1 ; BOOTP/DHCP "opcode"
.hardware resb 1 ; ARP hardware type
@@ -141,7 +141,7 @@ bootp:
.bootfile resb 128 ; Boot file name
.option_magic resd 1 ; Vendor option magic cookie
.options resb 1260 ; Vendor options
- endstruc
+ endstruc
BOOTP_OPTION_MAGIC equ htonl(0x63825363) ; See RFC 2132
@@ -274,7 +274,7 @@ _start:
xor ax,ax
mov ds,ax
- mov es,ax
+ mov es,ax
%ifndef DEPEND
%if TEXT_START != 0x7c00
@@ -351,7 +351,7 @@ _start1:
; to by SS:[SP+4], but support INT 1Ah, AX=5650h method as well.
; FIX: ES:BX should point to the PXENV+ structure on entry as well.
; We should make that the second test, and not trash ES:BX...
-;
+;
cmp dword [es:bx], '!PXE'
je have_pxe
@@ -592,12 +592,12 @@ query_bootp:
sub cx,di
xor ax,ax
rep stosb
-
+
mov si,bootif_str
mov di,BOOTIFStr
mov cx,bootif_str_len
rep movsb
-
+
pop cx
mov si,MACType
inc cx
@@ -675,7 +675,7 @@ check_dhcp_magic:
jnz .got_magic
mov byte [DHCPMagic], 0 ; If not, kill all other options
.got_magic:
-
+
;
; Initialize UDP stack
@@ -976,7 +976,7 @@ kaboom:
; On exit, if found:
; CF = 0, ES:BX -> !PXE structure
; Otherwise CF = 1, all registers saved
-;
+;
memory_scan_for_pxe_struct:
push ds
pusha
@@ -1036,7 +1036,7 @@ memory_scan_for_pxe_struct:
; On exit, if found:
; CF = 0, ES:BX -> PXENV+ structure
; Otherwise CF = 1, all registers saved
-;
+;
memory_scan_for_pxenv_struct:
pusha
mov si,trymempxenv_msg
@@ -1082,7 +1082,7 @@ memory_scan_for_pxenv_struct:
;
; searchdir:
;
-; Open a TFTP connection to the server
+; Open a TFTP connection to the server
;
; On entry:
; DS:DI = mangled filename
@@ -1109,9 +1109,9 @@ searchdir:
mov ax,PKT_RETRY ; Retry counter
mov word [PktTimeout],PKT_TIMEOUT ; Initial timeout
-
+
.sendreq: push ax ; [bp-2] - Retry counter
- push si ; [bp-4] - File name
+ push si ; [bp-4] - File name
mov di,packet_buf
mov [pxe_udp_write_pkt.buffer],di
@@ -1199,7 +1199,7 @@ searchdir:
pop ax
shl word [PktTimeout],1 ; Exponential backoff
jmp .failure
-
+
.got_packet:
mov si,[bp-6] ; TFTP pointer
mov bx,[bp-8] ; TID
@@ -1304,7 +1304,7 @@ searchdir:
; Success, done!
.done_pkt:
- pop si ; Junk
+ pop si ; Junk
pop si ; We want the packet ptr in SI
mov eax,[si+tftp_filesize]
@@ -1627,7 +1627,7 @@ getfssec: push si
movzx ecx,cx
shl ecx,TFTP_BLOCKSIZE_LG2 ; Convert to bytes
jz .hit_eof ; Nothing to do?
-
+
.need_more:
push ecx
@@ -1692,7 +1692,7 @@ getfssec: push si
get_packet:
mov ax,ds
mov es,ax
-
+
.packet_loop:
; Start by ACKing the previous packet; this should cause the
; next packet to be sent.
@@ -1744,7 +1744,7 @@ get_packet:
cmp ax,dx ; Same time -> don't advance timeout
je .wait_data ; Same clock tick
loop .wait_data ; Decrease timeout
-
+
pop cx ; <D> Didn't get any, send another ACK
shl word [PktTimeout],1 ; Exponential backoff
loop .send_ack
@@ -1814,7 +1814,7 @@ get_packet:
; Make sure we know we are at end of file
mov eax,[si+tftp_filepos]
mov [si+tftp_filesize],eax
-
+
ret
;
@@ -1877,7 +1877,7 @@ unload_pxe:
jae .new_api
mov si,old_api_unload
.new_api:
-
+
.call_loop: xor ax,ax
lodsb
and ax,ax
@@ -1933,7 +1933,7 @@ unload_pxe:
; Update the base stack pointer since it's in use
lss sp,[SavedSSSP]
-
+
.combootstack:
pop gs
popf
@@ -1964,7 +1964,7 @@ unload_pxe:
pop es
pop ds
ret
-
+
.cant_free:
mov si,cant_free_msg
call writestr
@@ -2023,7 +2023,7 @@ gendotquad:
aam 10
; Now AH = 10-digit; AL = remainder
add ah,'0'
- mov [es:di],ah
+ mov [es:di],ah
inc di
.lt10:
@@ -2413,9 +2413,9 @@ pxenventry_msg db 'PXENV entry point found (we hope) at ', 0
trymempxe_msg db 'Scanning memory for !PXE structure... ', 0
trymempxenv_msg db 'Scanning memory for PXENV+ structure... ', 0
undi_data_msg db 'UNDI data segment at: ',0
-undi_data_len_msg db 'UNDI data segment size: ',0
+undi_data_len_msg db 'UNDI data segment size: ',0
undi_code_msg db 'UNDI code segment at: ',0
-undi_code_len_msg db 'UNDI code segment size: ',0
+undi_code_len_msg db 'UNDI code segment size: ',0
cant_free_msg db 'Failed to free base memory, error ', 0
notfound_msg db 'not found', CR, LF, 0
myipaddr_msg db 'My IP address seems to be ',0
diff --git a/pxelinux.doc b/pxelinux.doc
index b863f95d..ee1fbeda 100644
--- a/pxelinux.doc
+++ b/pxelinux.doc
@@ -45,7 +45,7 @@ search for its config file on the boot server in the following way:
with dash separators; for example, for an Ethernet (ARP type 1)
with address 88:99:AA:BB:CC:DD it would search for the filename
01-88-99-aa-bb-cc-dd.
-
+
Next, it will search for the config file using its own IP address
in upper case hexadecimal, e.g. 192.0.2.91 -> C000025B
(you can use the included progam "gethostip" to compute the
@@ -69,7 +69,7 @@ search for its config file on the boot server in the following way:
/mybootdir/pxelinux.cfg/C0
/mybootdir/pxelinux.cfg/C
/mybootdir/pxelinux.cfg/default
-
+
... in that order.
Note that all filename references are relative to the directory
diff --git a/rawcon.inc b/rawcon.inc
index 9f02e4f2..34bb60ba 100644
--- a/rawcon.inc
+++ b/rawcon.inc
@@ -44,7 +44,7 @@ writechr:
ja .scroll
.curxyok: mov bh,[BIOS_page]
mov ah,02h ; Set cursor position
- int 10h
+ int 10h
.ret: popad
.nothing:
popfd
@@ -69,4 +69,3 @@ writechr:
jnc .curxyok
xor dh,dh
jmp short .curxyok
-
diff --git a/regdump.inc b/regdump.inc
index d9386367..739f1edf 100644
--- a/regdump.inc
+++ b/regdump.inc
@@ -107,5 +107,3 @@ regnames:
.fs db ' FS: ',0
.gs db ' GS: ',0
.ip db ' IP: ',0
-
-
diff --git a/rllpack.inc b/rllpack.inc
index 9d2aab30..b55e90e7 100644
--- a/rllpack.inc
+++ b/rllpack.inc
@@ -1,6 +1,6 @@
; -*- fundamental -*-
; -----------------------------------------------------------------------
-;
+;
; Copyright 2004 H. Peter Anvin - All Rights Reserved
;
; This program is free software; you can redistribute it and/or modify
@@ -66,7 +66,7 @@ rllpack:
jnz .normal
dec di ; We killed a whole stretch, remove start byte
.normal:
- inc bx
+ inc bx
sub di,bx
mov bp,di
mov al,bl
@@ -104,7 +104,7 @@ rllpack:
; rllunpack:
; Unpack bytes from DS:SI into ES:DI
; On return SI, DI are updated and CX contains number of bytes output
-;
+;
rllunpack:
push ax
push di
diff --git a/runkernel.inc b/runkernel.inc
index b18ef1a7..fcffd44e 100644
--- a/runkernel.inc
+++ b/runkernel.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2005 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
;;
;; runkernel.inc
-;;
+;;
;; Common code for running a Linux kernel
;;
diff --git a/sample/Makefile b/sample/Makefile
index 8bf7d880..d7c40fad 100644
--- a/sample/Makefile
+++ b/sample/Makefile
@@ -1,6 +1,6 @@
#ident "$Id$"
## -----------------------------------------------------------------------
-##
+##
## Copyright 2001-2004 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
diff --git a/sample/atou.c b/sample/atou.c
index 36585990..84475b68 100644
--- a/sample/atou.c
+++ b/sample/atou.c
@@ -11,4 +11,3 @@ unsigned int atou(const char *s)
i = i*10 + (*s++ - '0');
return i;
}
-
diff --git a/sample/c32echo.c b/sample/c32echo.c
index 6edb51a3..06d5c8f8 100644
--- a/sample/c32echo.c
+++ b/sample/c32echo.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2002 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/sample/c32entry.S b/sample/c32entry.S
index 55a7d116..3917168f 100644
--- a/sample/c32entry.S
+++ b/sample/c32entry.S
@@ -1,6 +1,6 @@
#ident "$Id$"
# -----------------------------------------------------------------------
-#
+#
# Copyright 2003 H. Peter Anvin - All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person
@@ -11,10 +11,10 @@
# sell copies of the Software, and to permit persons to whom
# the Software is furnished to do so, subject to the following
# conditions:
-#
+#
# The above copyright notice and this permission notice shall
# be included in all copies or substantial portions of the Software.
-#
+#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -28,7 +28,7 @@
# COM32 start up code - must be linked first in the binary
-
+
.section ".text","ax"
.globl _start
_start:
diff --git a/sample/comecho.asm b/sample/comecho.asm
index 3cdf601a..7125686a 100644
--- a/sample/comecho.asm
+++ b/sample/comecho.asm
@@ -13,7 +13,7 @@ _start:
mov dl,"<"
mov ah,02h
int 21h
-
+
.writechar:
lodsb
mov dl,al
@@ -27,9 +27,6 @@ _start:
; Exit with near return, INT 20h, or INT 21h AX=4C00h
ret
-
-
+
+
end_str db ">", 0Dh, 0Ah, "$"
-
-
- \ No newline at end of file
diff --git a/sample/conio.c b/sample/conio.c
index f6f5c058..ba3b7000 100644
--- a/sample/conio.c
+++ b/sample/conio.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2001-2003 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -38,7 +38,7 @@ int putchar(int ch)
/* \n -> \r\n */
putchar('\r');
}
-
+
regs.eax.b[1] = 0x02;
regs.edx.b[0] = ch;
__com32.cs_intcall(0x21, &regs, NULL);
diff --git a/sample/fd.c b/sample/fd.c
index 71d8d315..519885cc 100644
--- a/sample/fd.c
+++ b/sample/fd.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2003 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -58,6 +58,3 @@ int __start(void)
/* If we get here, badness happened */
return 255;
}
-
-
-
diff --git a/sample/filetest.c b/sample/filetest.c
index ca1d0a63..18b08361 100644
--- a/sample/filetest.c
+++ b/sample/filetest.c
@@ -34,7 +34,7 @@ int __start(void)
unsigned int ax,cx,si,t;
com32sys_t inreg,outreg;
char *p;
-
+
/* Test null system call */
inreg.eflags.l = 0xffffffff;
inreg.eax.l = 0x11110000;
@@ -63,7 +63,7 @@ int __start(void)
__com32.cs_intcall(0x22, &inreg, &outreg);
printregs(&outreg);
printf("----\n");
-
+
si = outreg.esi.w[0]; /* File handle */
cx = outreg.ecx.w[0]; /* Block size */
ax = outreg.eax.l; /* File length */
@@ -71,7 +71,7 @@ int __start(void)
while ( si ) {
/* We can only read 64K per call */
t = ( ax > 65536 ) ? 65536/cx : (ax+cx-1)/cx;
-
+
memset(&inreg, 0, sizeof inreg);
inreg.esi.w[0] = si;
inreg.ecx.w[0] = t; /* Block count */
diff --git a/sample/hello.c b/sample/hello.c
index d0842f78..b94c62f1 100644
--- a/sample/hello.c
+++ b/sample/hello.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2002 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/sample/hello2.c b/sample/hello2.c
index c2a7bcb2..ca94ef07 100644
--- a/sample/hello2.c
+++ b/sample/hello2.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2002 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -49,7 +49,7 @@ static void writemsg(const char *msg)
inreg.ebx.w[0] = OFFS(__com32.cs_bounce);
inreg.es = SEG(__com32.cs_bounce);
__com32.cs_intcall(0x22, &inreg, NULL);
-};
+};
int __start(void)
{
diff --git a/sample/mdiskchk.c b/sample/mdiskchk.c
index 0b4990fb..d13b8fb4 100644
--- a/sample/mdiskchk.c
+++ b/sample/mdiskchk.c
@@ -1,5 +1,5 @@
/* -*- c -*- ------------------------------------------------------------- *
- *
+ *
* Copyright 2003-2004 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -72,7 +72,7 @@ struct memdiskinfo * query_memdisk(int drive)
mov _es, es ;
mov _di, di ;
}
-
+
if ( _eax >> 16 != 0x4d21 ||
_ecx >> 16 != 0x4d45 ||
_edx >> 16 != 0x4944 ||
@@ -92,7 +92,7 @@ struct memdiskinfo * query_memdisk(int drive)
mm.cylinders = ((_ecx >> 8) & 0xff) + ((_ecx & 0xc0) << 2) + 1;
mm.heads = ((_edx >> 8) & 0xff) + 1;
mm.sectors = (_ecx & 0x3f);
-
+
return &mm;
}
@@ -142,6 +142,6 @@ int main(int argc, char *argv[])
found++;
}
}
-
+
return found;
}
diff --git a/sample/printf.c b/sample/printf.c
index eb16301e..23aa1446 100644
--- a/sample/printf.c
+++ b/sample/printf.c
@@ -54,7 +54,7 @@ static char * number(char * str, long num, int base, int size, int precision
char c,sign,tmp[66];
const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
int i;
-
+
if (type & LARGE)
digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (type & LEFT)
@@ -125,20 +125,20 @@ int vsprintf(char *buf, const char *fmt, va_list args)
int i, base;
char * str;
const char *s;
-
+
int flags; /* flags to number() */
-
+
int field_width; /* width of output field */
int precision; /* min. # of digits for integers; max
number of chars for from string */
int qualifier; /* 'h', 'l', or 'L' for integer fields */
-
+
for (str=buf ; *fmt ; ++fmt) {
if (*fmt != '%') {
*str++ = *fmt;
continue;
}
-
+
/* process flags */
flags = 0;
repeat:
@@ -150,7 +150,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
case '#': flags |= SPECIAL; goto repeat;
case '0': flags |= ZEROPAD; goto repeat;
}
-
+
/* get field width */
field_width = -1;
if (isdigit(*fmt))
@@ -164,11 +164,11 @@ int vsprintf(char *buf, const char *fmt, va_list args)
flags |= LEFT;
}
}
-
+
/* get the precision */
precision = -1;
if (*fmt == '.') {
- ++fmt;
+ ++fmt;
if (isdigit(*fmt))
precision = skip_atou(&fmt);
else if (*fmt == '*') {
@@ -179,17 +179,17 @@ int vsprintf(char *buf, const char *fmt, va_list args)
if (precision < 0)
precision = 0;
}
-
+
/* get the conversion qualifier */
qualifier = -1;
if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
qualifier = *fmt;
++fmt;
}
-
+
/* default base */
base = 10;
-
+
switch (*fmt) {
case 'c':
if (!(flags & LEFT))
@@ -199,11 +199,11 @@ int vsprintf(char *buf, const char *fmt, va_list args)
while (--field_width > 0)
*str++ = ' ';
continue;
-
+
case 's':
s = va_arg(args, char *);
len = strnlen(s, precision);
-
+
if (!(flags & LEFT))
while (len < field_width--)
*str++ = ' ';
@@ -212,7 +212,7 @@ int vsprintf(char *buf, const char *fmt, va_list args)
while (len < field_width--)
*str++ = ' ';
continue;
-
+
case 'p':
if (field_width == -1) {
field_width = 2*sizeof(void *);
@@ -222,8 +222,8 @@ int vsprintf(char *buf, const char *fmt, va_list args)
(unsigned long) va_arg(args, void *), 16,
field_width, precision, flags);
continue;
-
-
+
+
case 'n':
if (qualifier == 'l') {
long * ip = va_arg(args, long *);
@@ -233,28 +233,28 @@ int vsprintf(char *buf, const char *fmt, va_list args)
*ip = (str - buf);
}
continue;
-
+
case '%':
*str++ = '%';
continue;
-
+
/* integer number formats - set up the flags and "break" */
case 'o':
base = 8;
break;
-
+
case 'X':
flags |= LARGE;
case 'x':
base = 16;
break;
-
+
case 'd':
case 'i':
flags |= SIGN;
case 'u':
break;
-
+
default:
*str++ = '%';
if (*fmt)
@@ -283,7 +283,7 @@ int sprintf(char * buf, const char *fmt, ...)
{
va_list args;
int i;
-
+
va_start(args, fmt);
i=vsprintf(buf,fmt,args);
va_end(args);
@@ -304,4 +304,3 @@ int printf(const char *fmt, ...)
return printed;
}
-
diff --git a/sample/skipatou.c b/sample/skipatou.c
index 98881539..1641a131 100644
--- a/sample/skipatou.c
+++ b/sample/skipatou.c
@@ -7,7 +7,7 @@ isdigit(int ch)
unsigned int skip_atou(const char **s)
{
int i=0;
-
+
while (isdigit(**s))
i = i*10 + *((*s)++) - '0';
return i;
diff --git a/sha1pass b/sha1pass
index 76193f16..26ea76bc 100755
--- a/sha1pass
+++ b/sha1pass
@@ -7,7 +7,7 @@ use MIME::Base64;
sub random_bytes($) {
my($n) = @_;
my($v, $i);
-
+
if ( open(RANDOM, '<', '/dev/random') ||
open(RANDOM, '<', '/dev/urandom') ) {
read(RANDOM, $v, $n);
diff --git a/strcpy.inc b/strcpy.inc
index 5068a8eb..2bafa7fe 100644
--- a/strcpy.inc
+++ b/strcpy.inc
@@ -11,4 +11,3 @@ strcpy: push ax
jnz .loop
pop ax
ret
-
diff --git a/strecpy.inc b/strecpy.inc
index b4013ec6..1fc53e96 100644
--- a/strecpy.inc
+++ b/strecpy.inc
@@ -4,7 +4,7 @@
; BP holds a pointer to the first byte beyond the end of the
; target buffer; return with CF=1 if target buffer overflows;
; the output is still zero-terminated.
-;
+;
section .text
strecpy:
@@ -26,4 +26,3 @@ strecpy:
pop bp
pop ax
ret
-
diff --git a/syslinux.doc b/syslinux.doc
index 37cfdd24..356c2898 100644
--- a/syslinux.doc
+++ b/syslinux.doc
@@ -38,7 +38,7 @@ it, then execute the DOS command:
syslinux [-s] a:
-(or whichever drive letter is appropriate; the [] meaning -s is optional)
+(or whichever drive letter is appropriate; the [] meaning -s is optional)
Use "syslinux.com" (in the dos subdirectory of the distribution) for
plain DOS (MS-DOS, DR-DOS, PC-DOS, FreeDOS...) or Win9x/ME.
@@ -261,7 +261,7 @@ ONERROR kernel options...
... SYSLINUX will execute the following as if entered by the
user:
-
+
xyzzy plugh foo bar baz
SERIAL port [[baudrate] flowcontrol]
@@ -331,7 +331,7 @@ KBDMAP keymap
can be used to create such keymaps. The file keytab-lilo.doc
contains the documentation for this program.
-DISPLAY filename
+DISPLAY filename
Displays the indicated file on the screen at boot time (before
the boot: prompt, if displayed). Please see the section below
on DISPLAY files.
@@ -447,7 +447,7 @@ are interpreted:
For example:
<DC1>Text mode<DC2>Graphics mode<DC4>Serial port<ETB>
-
+
... will actually print out which mode the console is in!
<SUB> <SUB> = <Ctrl-Z> = ASCII 26
@@ -546,7 +546,7 @@ appropriate drive designator.
6. Unmount the disk (if applicable.)
umount /mnt
-
+
---- DOS/Windows procedure ----
To make this installation in DOS only, you need the utility copybs.com
@@ -577,7 +577,7 @@ syslinux.exe instead.
copy vmlinux a:
copy initrd.gz a:
-
+
++++ COMBOOT EXECUTABLES ++++
SYSLINUX supports simple standalone programs, using a file format
diff --git a/syslinux.h b/syslinux.h
index 6e4315b6..28418187 100644
--- a/syslinux.h
+++ b/syslinux.h
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 1998-2004 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
diff --git a/syslxmod.c b/syslxmod.c
index 71079601..87a634e9 100644
--- a/syslxmod.c
+++ b/syslxmod.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 1998-2004 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -66,7 +66,7 @@ enum bs_offsets {
bs32VolumeLabel = 71,
bs32FileSysType = 82,
bs32Code = 90,
-
+
bsSignature = 0x1fe
};
@@ -134,7 +134,7 @@ void syslinux_make_stupid(void)
/* Access only one sector at a time */
set_16(syslinux_bootsect+0x1FC, 1);
}
-
+
void syslinux_make_bootsect(void *bs)
{
unsigned char *bootsect = bs;
@@ -162,7 +162,7 @@ const char *syslinux_check_bootsect(const void *bs)
if ( get_8(sectbuf+bsMedia) != 0xF0 &&
get_8(sectbuf+bsMedia) < 0xF8 )
goto invalid;
-
+
sectorsize = get_16(sectbuf+bsBytesPerSec);
if ( sectorsize == 512 )
; /* ok */
@@ -221,7 +221,7 @@ const char *syslinux_check_bootsect(const void *bs)
} else {
goto invalid;
}
-
+
return NULL;
invalid:
@@ -251,7 +251,7 @@ int syslinux_patch(const uint32_t *sectors, int nsectors)
/* First sector need pointer in boot sector */
set_32(syslinux_bootsect+0x1F8, *sectors++);
nsect--;
-
+
/* Search for LDLINUX_MAGIC to find the patch area */
for ( p = syslinux_ldlinux ; get_32(p) != LDLINUX_MAGIC ; p += 4 );
patcharea = p+8;
@@ -281,4 +281,3 @@ int syslinux_patch(const uint32_t *sectors, int nsectors)
return 0;
}
-
diff --git a/tracers.inc b/tracers.inc
index 300523a9..e3a2e7ea 100644
--- a/tracers.inc
+++ b/tracers.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
;;
;; tracers.inc
-;;
+;;
;; Debugging tracers
;;
diff --git a/ui.inc b/ui.inc
index 091a9967..67eacd7e 100644
--- a/ui.inc
+++ b/ui.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2005 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -267,7 +267,7 @@ vk_check:
mov [CmdLinePtr],di ; Where to add rest of cmd
pop es
mov di,KernelName
- push di
+ push di
mov si,VKernelBuf+vk_rname
mov cx,FILENAME_MAX ; We need ECX == CX later
rep movsb
@@ -326,7 +326,7 @@ get_kernel: mov byte [KernelName+FILENAME_MAX],0 ; Zero-terminate filename/e
mov cx,FILENAME_MAX-5 ; Need 4 chars + null
repne scasb ; Scan for final null
jne .no_skip
- dec di ; Point to final null
+ dec di ; Point to final null
.no_skip: mov [KernelExtPtr],di
%endif
mov bx,exten_table
@@ -424,7 +424,7 @@ getchar_timeout:
cmp ax,[BIOS_timer] ; Has the timer advanced?
je .loop
DO_IDLE
-
+
dec dword [ThisKbdTo]
jz .timeout
dec dword [ThisTotalTo]
@@ -485,7 +485,7 @@ kernel_good:
sub di,KernelCName
mov [KernelCNameLen],di
popa
-
+
%if IS_SYSLINUX || IS_MDSLINUX
mov ecx,[KernelName+7]
mov cl,'.'
diff --git a/unix/Makefile b/unix/Makefile
index 39b25c00..5dfc0513 100644
--- a/unix/Makefile
+++ b/unix/Makefile
@@ -38,6 +38,3 @@ syslinux-nomtools: syslinux
$(CC) $(CFLAGS) -S -o $@ $<
-include .*.d
-
-
-
diff --git a/unix/syslinux.c b/unix/syslinux.c
index 32e9dded..bd9a6ef3 100644
--- a/unix/syslinux.c
+++ b/unix/syslinux.c
@@ -1,6 +1,6 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 1998-2005 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
@@ -190,7 +190,7 @@ int main(int argc, char *argv[])
program = argv[0];
mypid = getpid();
-
+
device = NULL;
umask(077);
@@ -321,7 +321,7 @@ int main(int argc, char *argv[])
else
continue;
}
-
+
if ( ioctl(loop_fd, LOOP_GET_STATUS64, &loopinfo) ||
(loopinfo.lo_offset = filesystem_offset,
ioctl(loop_fd, LOOP_SET_STATUS64, &loopinfo)) )
@@ -364,10 +364,10 @@ int main(int argc, char *argv[])
rmdir(mntpath);
exit(1); /* Mount failed */
}
-
+
#endif
}
-
+
ldlinux_name = alloca(strlen(mntpath)+13);
if ( !ldlinux_name ) {
perror(program);
@@ -502,4 +502,3 @@ umount:
return 0;
}
-
diff --git a/version.pl b/version.pl
index 4440369f..ee5c5c6c 100755
--- a/version.pl
+++ b/version.pl
@@ -22,5 +22,3 @@ print VI "$def VERSION \"$version\"\n";
print VI "$def VER_MAJOR $vma\n";
print VI "$def VER_MINOR $vmi\n";
close(VI);
-
-
diff --git a/win32/Makefile b/win32/Makefile
index cb9ee780..37986137 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -1,6 +1,6 @@
## $Id$
## -----------------------------------------------------------------------
-##
+##
## Copyright 1998-2004 H. Peter Anvin - All Rights Reserved
##
## This program is free software; you can redistribute it and/or modify
diff --git a/win32/syslinux.c b/win32/syslinux.c
index 283861b4..db5007db 100644
--- a/win32/syslinux.c
+++ b/win32/syslinux.c
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------- *
- *
+ *
* Copyright 2003 Lars Munch Christensen - All Rights Reserved
* Copyright 1998-2004 H. Peter Anvin - All Rights Reserved
- *
+ *
* Based on the Linux installer program for SYSLINUX by H. Peter Anvin
*
* This program is free software; you can redistribute it and/or modify
@@ -53,7 +53,7 @@ typedef struct _STORAGE_DEVICE_NUMBER {
BOOL GetStorageDeviceNumberByHandle( HANDLE handle, const STORAGE_DEVICE_NUMBER *sdn ) {
BOOL result = FALSE;
DWORD count;
-
+
if ( DeviceIoControl( handle, IOCTL_STORAGE_GET_DEVICE_NUMBER, NULL,
0, (LPVOID)sdn, sizeof( *sdn ), &count, NULL ) ) {
result = TRUE;
@@ -61,7 +61,7 @@ BOOL GetStorageDeviceNumberByHandle( HANDLE handle, const STORAGE_DEVICE_NUMBER
else {
error("GetDriveNumber: DeviceIoControl failed");
}
-
+
return( result );
}
@@ -69,23 +69,23 @@ int GetBytesPerSector( HANDLE drive ) {
int result = 0;
DISK_GEOMETRY g;
DWORD count;
-
+
if ( DeviceIoControl( drive, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0,
&g, sizeof( g ), &count, NULL ) ) {
result = g.BytesPerSector;
}
-
+
return( result );
}
BOOL FixMBR(int driveNum, int partitionNum, int write_mbr, int set_active) {
BOOL result = TRUE;
HANDLE drive;
-
+
char driveName[128];
-
+
sprintf( driveName, "\\\\.\\PHYSICALDRIVE%d", driveNum );
-
+
drive = CreateFile( driveName,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_WRITE | FILE_SHARE_READ,
@@ -93,22 +93,22 @@ BOOL FixMBR(int driveNum, int partitionNum, int write_mbr, int set_active) {
OPEN_EXISTING,
0,
NULL );
-
+
if( drive == INVALID_HANDLE_VALUE ) {
error("Accessing physical drive");
result = FALSE;
}
-
+
if( result ) {
unsigned char sector[SECTOR_SIZE];
DWORD howMany;
-
+
if( GetBytesPerSector( drive ) != SECTOR_SIZE ) {
fprintf(stderr, "Error: Sector size of this drive is %d; must be %d\n",
GetBytesPerSector( drive ), SECTOR_SIZE );
result = FALSE;
}
-
+
if ( result ) {
if ( ReadFile( drive, sector, sizeof( sector ), &howMany, NULL ) == 0 ) {
error("Reading raw drive");
@@ -119,7 +119,7 @@ BOOL FixMBR(int driveNum, int partitionNum, int write_mbr, int set_active) {
result = FALSE;
}
}
-
+
// Copy over the MBR code if specified (-m)
if ( write_mbr ) {
if ( result ) {
@@ -131,7 +131,7 @@ BOOL FixMBR(int driveNum, int partitionNum, int write_mbr, int set_active) {
}
}
}
-
+
// Check that our partition is active if specified (-a)
if ( set_active ) {
if ( sector[ PART_TABLE + ( PART_SIZE * ( partitionNum - 1 ) ) ] != 0x80 ) {
@@ -143,7 +143,7 @@ BOOL FixMBR(int driveNum, int partitionNum, int write_mbr, int set_active) {
if ( result ) {
SetFilePointer( drive, 0, NULL, FILE_BEGIN );
-
+
if ( WriteFile( drive, sector, sizeof( sector ), &howMany, NULL ) == 0 ) {
error("Writing MBR");
result = FALSE;
@@ -153,13 +153,13 @@ BOOL FixMBR(int driveNum, int partitionNum, int write_mbr, int set_active) {
result = FALSE;
}
}
-
+
if( !CloseHandle( drive ) ) {
error("CloseFile on drive");
result = FALSE;
}
}
-
+
return( result );
}
@@ -194,14 +194,14 @@ void error(char* msg)
LPVOID lpMsgBuf;
/* Format the Windows error message */
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf, 0, NULL );
-
+
/* Print it */
fprintf(stderr, "%s: %s", msg, (char*) lpMsgBuf);
@@ -283,7 +283,7 @@ int main(int argc, char *argv[])
syslinux_make_stupid();
break;
case 'f': /* Force install */
- force = 1;
+ force = 1;
break;
case 'm': /* Install MBR */
mbr = 1;
@@ -349,7 +349,7 @@ int main(int argc, char *argv[])
/*
* Make sure we can read the boot sector
- */
+ */
if ( !ReadFile(d_handle, sectbuf, 512, &bytes_read, NULL) ) {
error("Reading boot sector");
exit(1);
@@ -358,7 +358,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "Could not read the whole boot sector\n");
exit(1);
}
-
+
/* Check to see that what we got was indeed an MS-DOS boot sector/superblock */
if( (errmsg = syslinux_check_bootsect(sectbuf)) ) {
fprintf(stderr, "%s\n", errmsg);
@@ -376,11 +376,11 @@ int main(int argc, char *argv[])
/* Create ldlinux.sys file */
f_handle = CreateFile(ldlinux_name, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL, CREATE_ALWAYS,
+ NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM |
FILE_ATTRIBUTE_HIDDEN,
NULL );
-
+
if (f_handle == INVALID_HANDLE_VALUE) {
error("Unable to create ldlinux.sys");
exit(1);
@@ -443,7 +443,7 @@ int main(int argc, char *argv[])
}
}
- /* Close file */
+ /* Close file */
CloseHandle(f_handle);
/* Make the syslinux boot sector */
@@ -453,7 +453,7 @@ int main(int argc, char *argv[])
if ( bootsecfile ) {
f_handle = CreateFile(bootsecfile, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL, CREATE_ALWAYS,
+ NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_ARCHIVE,
NULL );
if (f_handle == INVALID_HANDLE_VALUE) {
@@ -474,8 +474,8 @@ int main(int argc, char *argv[])
fprintf(stderr, "Could not write the whole boot sector\n");
exit(1);
}
-
- /* Close file */
+
+ /* Close file */
CloseHandle(d_handle);
/* Done! */
diff --git a/writehex.inc b/writehex.inc
index f99f8306..180c333c 100644
--- a/writehex.inc
+++ b/writehex.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify
@@ -52,4 +52,3 @@ writehex_common:
popad
popfd
ret
-
diff --git a/writestr.inc b/writestr.inc
index 46d2aa14..e4d63caf 100644
--- a/writestr.inc
+++ b/writestr.inc
@@ -1,6 +1,6 @@
;; $Id$
;; -----------------------------------------------------------------------
-;;
+;;
;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
;;
;; This program is free software; you can redistribute it and/or modify