summaryrefslogtreecommitdiff
path: root/nt
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2003-02-04 14:56:31 +0000
committerJuanma Barranquero <lekktu@gmail.com>2003-02-04 14:56:31 +0000
commit177c0ea74342272645959b82cf219faa0b3dba16 (patch)
tree44e22b210a9904eab25a66d12e708804b671df75 /nt
parentdb95369be096960245dd38678f68464627698678 (diff)
downloademacs-177c0ea74342272645959b82cf219faa0b3dba16.tar.gz
Trailing whitespace deleted.
Diffstat (limited to 'nt')
-rw-r--r--nt/INSTALL6
-rw-r--r--nt/addpm.c30
-rw-r--r--nt/addsection.c30
-rw-r--r--nt/cmdproxy.c18
-rw-r--r--nt/config.nt4
-rw-r--r--nt/ddeclient.c2
-rw-r--r--nt/gmake.defs24
-rw-r--r--nt/inc/sys/time.h4
-rw-r--r--nt/makefile.def12
-rw-r--r--nt/makefile.nt10
-rw-r--r--nt/makefile.w32-in8
-rw-r--r--nt/nmake.defs16
-rw-r--r--nt/preprep.c36
13 files changed, 100 insertions, 100 deletions
diff --git a/nt/INSTALL b/nt/INSTALL
index 46b831f4292..e9dcfb693f5 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -7,7 +7,7 @@
If you used WinZip to unpack the distribution, we suggest to
remove the files and unpack again with a different program!
WinZip is known to create some subtle and hard to debug problems,
- such as converting files to DOS CR-LF format, not creating empty
+ such as converting files to DOS CR-LF format, not creating empty
directories, etc. We suggest to use djtarnt.exe from the GNU FTP
site.
@@ -35,7 +35,7 @@
In addition, using 4NT as your shell is known to fail the build process,
at least for 4NT version 3.01. Use cmd.exe, the default NT shell,
instead.
-
+
sh exists no sh
cygwin b20.1 make (3.75): fails[1, 5] fails[2, 5]
@@ -46,7 +46,7 @@
cygwin compiled gmake 3.77: fails[1, 5] fails[2, 5]
cygwin compiled make 3.78.1: fails[5] fails[2, 5]
cygwin compiled make 3.79.1: fails[3, 5] fails[2?, 5]
- mingw32 compiled make 3.79.1: okay okay
+ mingw32 compiled make 3.79.1: okay okay
Notes:
diff --git a/nt/addpm.c b/nt/addpm.c
index 24fc0bbc591..fa0f4253abb 100644
--- a/nt/addpm.c
+++ b/nt/addpm.c
@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <stdio.h>
-HDDEDATA CALLBACK
+HDDEDATA CALLBACK
DdeCallback (UINT uType, UINT uFmt, HCONV hconv,
HSZ hsz1, HSZ hsz2, HDDEDATA hdata,
DWORD dwData1, DWORD dwData2)
@@ -50,8 +50,8 @@ static struct entry
{
char *name;
char *value;
-}
-env_vars[] =
+}
+env_vars[] =
{
{"emacs_dir", NULL},
{"EMACSLOADPATH", "%emacs_dir%/site-lisp;%emacs_dir%/../site-lisp;%emacs_dir%/lisp;%emacs_dir%/leim"},
@@ -65,7 +65,7 @@ env_vars[] =
{"TERM", "cmd"}
};
-BOOL
+BOOL
add_registry (path)
char *path;
{
@@ -73,39 +73,39 @@ add_registry (path)
DWORD dwDisp;
int i;
BOOL ok = TRUE;
-
- /* Check both the current user and the local machine to see if we
+
+ /* Check both the current user and the local machine to see if we
have any resources. */
-
+
if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT,
0, "", REG_OPTION_NON_VOLATILE,
- KEY_WRITE, NULL, &hrootkey, &dwDisp) != ERROR_SUCCESS
+ KEY_WRITE, NULL, &hrootkey, &dwDisp) != ERROR_SUCCESS
&& RegCreateKeyEx (HKEY_CURRENT_USER, REG_ROOT,
0, "", REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &hrootkey, &dwDisp) != ERROR_SUCCESS)
{
return FALSE;
}
-
- for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++)
+
+ for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++)
{
char * value = env_vars[i].value ? env_vars[i].value : path;
-
+
if (RegSetValueEx (hrootkey, env_vars[i].name,
0, REG_EXPAND_SZ,
value, lstrlen (value) + 1) != ERROR_SUCCESS)
ok = FALSE;
- }
-
+ }
+
RegCloseKey (hrootkey);
-
+
return (ok);
}
int
main (argc, argv)
int argc;
- char *argv[];
+ char *argv[];
{
DWORD idDde = 0;
HCONV HConversation;
diff --git a/nt/addsection.c b/nt/addsection.c
index 55e83977fb1..f9eff2f73f6 100644
--- a/nt/addsection.c
+++ b/nt/addsection.c
@@ -67,17 +67,17 @@ open_input_file (file_data *p_file, char *filename)
file = CreateFile (filename, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
- if (file == INVALID_HANDLE_VALUE)
+ if (file == INVALID_HANDLE_VALUE)
return FALSE;
size = GetFileSize (file, &upper_size);
- file_mapping = CreateFileMapping (file, NULL, PAGE_READONLY,
+ file_mapping = CreateFileMapping (file, NULL, PAGE_READONLY,
0, size, NULL);
- if (!file_mapping)
+ if (!file_mapping)
return FALSE;
file_base = MapViewOfFile (file_mapping, FILE_MAP_READ, 0, 0, size);
- if (file_base == 0)
+ if (file_base == 0)
return FALSE;
p_file->name = filename;
@@ -98,18 +98,18 @@ open_output_file (file_data *p_file, char *filename, unsigned long size)
file = CreateFile (filename, GENERIC_READ | GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
- if (file == INVALID_HANDLE_VALUE)
+ if (file == INVALID_HANDLE_VALUE)
return FALSE;
- file_mapping = CreateFileMapping (file, NULL, PAGE_READWRITE,
+ file_mapping = CreateFileMapping (file, NULL, PAGE_READWRITE,
0, size, NULL);
- if (!file_mapping)
+ if (!file_mapping)
return FALSE;
-
+
file_base = MapViewOfFile (file_mapping, FILE_MAP_WRITE, 0, 0, size);
- if (file_base == 0)
+ if (file_base == 0)
return FALSE;
-
+
p_file->name = filename;
p_file->size = size;
p_file->file = file;
@@ -270,7 +270,7 @@ relocate_offset (DWORD offset,
static void
-copy_executable_and_add_section (file_data *p_infile,
+copy_executable_and_add_section (file_data *p_infile,
file_data *p_outfile,
char *new_section_name,
DWORD new_section_size)
@@ -314,10 +314,10 @@ copy_executable_and_add_section (file_data *p_infile,
Note that dst is updated implicitly by each COPY_CHUNK. */
dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base;
- nt_header = (PIMAGE_NT_HEADERS) (((unsigned long) dos_header) +
+ nt_header = (PIMAGE_NT_HEADERS) (((unsigned long) dos_header) +
dos_header->e_lfanew);
section = IMAGE_FIRST_SECTION (nt_header);
-
+
dst = (unsigned char *) p_outfile->file_base;
COPY_CHUNK ("Copying DOS header...", dos_header,
@@ -477,7 +477,7 @@ main (int argc, char **argv)
/* Open the undumped executable file. */
if (!open_input_file (&in_file, in_filename))
{
- printf ("Failed to open %s (%d)...bailing.\n",
+ printf ("Failed to open %s (%d)...bailing.\n",
in_filename, GetLastError ());
exit (1);
}
@@ -491,7 +491,7 @@ main (int argc, char **argv)
* nt_header->FileHeader.NumberOfSections;
if (!open_output_file (&out_file, out_filename, size))
{
- printf ("Failed to open %s (%d)...bailing.\n",
+ printf ("Failed to open %s (%d)...bailing.\n",
out_filename, GetLastError ());
exit (1);
}
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c
index 09a3c672e79..9280f29c351 100644
--- a/nt/cmdproxy.c
+++ b/nt/cmdproxy.c
@@ -230,7 +230,7 @@ search_dir (char *dir, char *exec, int bufsize, char *buffer)
int i, rc;
/* Search the directory for the program. */
- for (i = 0; i < n_exts; i++)
+ for (i = 0; i < n_exts; i++)
{
rc = SearchPath (dir, exec, exts[i], bufsize, buffer, &dummy);
if (rc > 0)
@@ -240,7 +240,7 @@ search_dir (char *dir, char *exec, int bufsize, char *buffer)
return 0;
}
-/* Return the absolute name of executable file PROG, including
+/* Return the absolute name of executable file PROG, including
any file extensions. If an absolute name for PROG cannot be found,
return NULL. */
char *
@@ -272,18 +272,18 @@ make_absolute (char *prog)
return NULL;
}
- if (GetCurrentDirectory (MAX_PATH, curdir) <= 0)
+ if (GetCurrentDirectory (MAX_PATH, curdir) <= 0)
return NULL;
/* Relative path; search in current dir. */
- if (strpbrk (prog, "\\"))
+ if (strpbrk (prog, "\\"))
{
if (search_dir (curdir, prog, MAX_PATH, absname) > 0)
return strdup (absname);
- else
+ else
return NULL;
}
-
+
/* Just filename; search current directory then PATH. */
path = alloca (strlen (getenv ("PATH")) + strlen (curdir) + 2);
strcpy (path, curdir);
@@ -304,7 +304,7 @@ make_absolute (char *prog)
/* Move to the next directory. */
path = p + 1;
- }
+ }
return NULL;
}
@@ -322,7 +322,7 @@ setup_argv (void)
char * cmdline = GetCommandLine ();
int arg_bytes = 0;
-
+
}
#endif
@@ -384,7 +384,7 @@ spawn (char * progname, char * cmdline, char * dir, int * retcode)
sec_attrs.nLength = sizeof (sec_attrs);
sec_attrs.lpSecurityDescriptor = NULL;
sec_attrs.bInheritHandle = FALSE;
-
+
memset (&start, 0, sizeof (start));
start.cb = sizeof (start);
diff --git a/nt/config.nt b/nt/config.nt
index 4f5a641c7b9..a9246c255ea 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */
/* No code in Emacs #includes config.h twice, but some of the code
- intended to work with other packages as well (like gmalloc.c)
+ intended to work with other packages as well (like gmalloc.c)
think they can include it as many times as they like. */
#ifndef EMACS_CONFIG_H
#define EMACS_CONFIG_H
@@ -288,7 +288,7 @@ Boston, MA 02111-1307, USA. */
configuration names to use for them.
See s/template.h for documentation on writing s/SYSTEM.h files. */
-#undef config_opsysfile
+#undef config_opsysfile
#include "s/ms-w32.h"
/* The configuration script defines machfile to be the name of the
diff --git a/nt/ddeclient.c b/nt/ddeclient.c
index 406e99fe0a2..3a82395ca30 100644
--- a/nt/ddeclient.c
+++ b/nt/ddeclient.c
@@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <stdio.h>
-HDDEDATA CALLBACK
+HDDEDATA CALLBACK
DdeCallback (UINT uType, UINT uFmt, HCONV hconv,
HSZ hsz1, HSZ hsz2, HDDEDATA hdata,
DWORD dwData1, DWORD dwData2)
diff --git a/nt/gmake.defs b/nt/gmake.defs
index d3d24b9d578..afa1b855d94 100644
--- a/nt/gmake.defs
+++ b/nt/gmake.defs
@@ -1,17 +1,17 @@
#
# Makefile definition file for building GNU Emacs on the Microsoft W32 API.
# Copyright (c) 2000-2001 Free Software Foundation, Inc.
-#
+#
# GNU Emacs is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
-#
+#
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -21,7 +21,7 @@
all:
# NOTES
-#
+#
# I tried to force gmake to use the native shell for simplicity, by
# setting SHELL as below, but this didn't work reliably because of
# various case sensitivity niggles. Specifically, COMSPEC (which is in
@@ -31,7 +31,7 @@ all:
# thinks it doesn't exist (unless compiled with a switch to ignore
# case), and so doesn't change which shell it will invoke to execute
# commands.
-#
+#
# It would be possible, though very tedious using just gmake facilities,
# to convert the COMSPEC value to uppercase to solve this problem, but
# it isn't worth it. That is partly because, even when using the native
@@ -46,14 +46,14 @@ all:
# mandate that rm and cp be available, so we can use Unix-format file
# names everywhere. (Fortunately both MS and GNU make, and the
# respective compilers, are happy with Unix-format names.)
-#
+#
# Since we cannot easily force the choice of a particular shell, we must
# make the effort to cope with whichever shell is being used.
# Fortunately, the only command we need to use that is shell specific is
# the testing of a file's existence for the purpose of working out when
# we are copying files to their original location. That particular
# requirement is abstracted easily enough.
-#
+#
# The only other problem area was the change of directory when running
# temacs to dump emacs.exe (where gmake doesn't support cd foo in any
# useful way), but that has been resolved by modifying the Windows
@@ -117,7 +117,7 @@ endif
export EMACSLOADPATH
# Determine the architecture we're running on.
-# Define ARCH for our purposes;
+# Define ARCH for our purposes;
# Define CPU for use by ntwin32.mak;
# Define CONFIG_H to the appropriate config.h for the system;
#
@@ -162,8 +162,8 @@ RC = windres -O coff
RC_OUT = -o$(SPACE)
RC_INCLUDE = --include-dir$(SPACE)
-libc =
-baselibs =
+libc =
+baselibs =
O = o
A = a
@@ -181,7 +181,7 @@ WINMM = -lwinmm
ifdef NOOPT
DEBUG_CFLAGS = -DEMACSDEBUG
else
-DEBUG_CFLAGS =
+DEBUG_CFLAGS =
endif
CFLAGS = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 $(ARCH_CFLAGS) -D$(ARCH) \
-D_CRTAPI1=_cdecl \
@@ -238,7 +238,7 @@ DQUOTE = \"
endif
ifdef NODEBUG
-DEBUG_FLAG =
+DEBUG_FLAG =
DEBUG_LINK =
else
DEBUG_FLAG = -g
diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h
index 441b3faa650..881808c5323 100644
--- a/nt/inc/sys/time.h
+++ b/nt/inc/sys/time.h
@@ -5,12 +5,12 @@
* sys/time.h doesn't exist on NT
*/
-struct timeval
+struct timeval
{
long tv_sec; /* seconds */
long tv_usec; /* microseconds */
};
-struct timezone
+struct timezone
{
int tz_minuteswest; /* minutes west of Greenwich */
int tz_dsttime; /* type of dst correction */
diff --git a/nt/makefile.def b/nt/makefile.def
index 6fb05dfd20a..24003eb309f 100644
--- a/nt/makefile.def
+++ b/nt/makefile.def
@@ -1,17 +1,17 @@
#
# Makefile definition file for building GNU Emacs on Windows NT
# Copyright (c) 1994-2001 Free Software Foundation, Inc.
-#
+#
# GNU Emacs is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
-#
+#
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -63,7 +63,7 @@ _NMAKE_VER=$(_NMAKE_VER_4)
!endif
# Determine the architecture we're running on.
-# Define ARCH for our purposes;
+# Define ARCH for our purposes;
# Define CPU for use by ntwin32.mak;
# Define CONFIG_H to the appropriate config.h for the system;
#
@@ -100,8 +100,8 @@ OS_TYPE = windows95
# Include ntwin32.mak. So far, this file seems to be supported by every
# Microsoft compiler on NT and Windows 95 and properly defines the executable
-# names and libraries necessary to build Emacs. I do not have access
-# to any other vendor compilers, so I do not know if they supply this
+# names and libraries necessary to build Emacs. I do not have access
+# to any other vendor compilers, so I do not know if they supply this
# file, too. For now I'll assume that they do.
#
!include <ntwin32.mak>
diff --git a/nt/makefile.nt b/nt/makefile.nt
index e1378f611e7..d9ca04dabdf 100644
--- a/nt/makefile.nt
+++ b/nt/makefile.nt
@@ -3,17 +3,17 @@
# Copyright (c) 1993-2000 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
-#
+#
# GNU Emacs is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
-#
+#
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -130,7 +130,7 @@ install: all $(INSTALL_DIR)
$(INSTALL_CMD)
cd ..\leim
if exist makefile.nt $(INSTALL_CMD)
- cd ..\nt
+ cd ..\nt
- $(CP) $(BLD)\addpm.exe $(INSTALL_DIR)\bin
- $(CP) $(BLD)\ddeclient.exe $(INSTALL_DIR)\bin
- $(CP) $(BLD)\cmdproxy.exe $(INSTALL_DIR)\bin
@@ -187,7 +187,7 @@ real_install:
#
# Maintenance
-#
+#
CLEAN_CMD = $(MAKE) -f makefile.nt clean
clean:
- $(DEL) *~ *.pdb
diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in
index 10f6d6bebd2..4e8265f4da0 100644
--- a/nt/makefile.w32-in
+++ b/nt/makefile.w32-in
@@ -4,17 +4,17 @@
# Top level makefile for building GNU Emacs on Windows NT
#
# This file is part of GNU Emacs.
-#
+#
# GNU Emacs is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
-#
+#
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -216,7 +216,7 @@ install-other-dirs-gmake:
#
# Maintenance
-#
+#
clean: clean-other-dirs-$(MAKETYPE)
- $(DEL) *~ $(COMPILER_TEMP_FILES)
- $(DEL_TREE) $(OBJDIR)
diff --git a/nt/nmake.defs b/nt/nmake.defs
index e2bfd58fc57..99db4211f1b 100644
--- a/nt/nmake.defs
+++ b/nt/nmake.defs
@@ -1,17 +1,17 @@
#
# Makefile definition file for building GNU Emacs on the Microsoft W32 API.
# Copyright (c) 2000-2001 Free Software Foundation, Inc.
-#
+#
# GNU Emacs is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
-#
+#
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -64,7 +64,7 @@ _NMAKE_VER=$(_NMAKE_VER_4)
!endif
# Determine the architecture we're running on.
-# Define ARCH for our purposes;
+# Define ARCH for our purposes;
# Define CPU for use by ntwin32.mak;
# Define CONFIG_H to the appropriate config.h for the system;
#
@@ -110,7 +110,7 @@ RC_OUT = -Fo
RC_INCLUDE = -i
libc = libc.lib
-baselibs =
+baselibs =
O = obj
A = lib
@@ -128,7 +128,7 @@ WINMM = winmm.lib
!ifdef NOOPT
DEBUG_CFLAGS = -DEMACSDEBUG
!else
-DEBUG_CFLAGS =
+DEBUG_CFLAGS =
!endif
CFLAGS = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 $(ARCH_CFLAGS) -D$(ARCH) \
-D_CRTAPI1=_cdecl $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
@@ -166,8 +166,8 @@ DEL = rm
DEL_TREE = rm -r
!ifdef NODEBUG
-DEBUG_FLAG =
-DEBUG_LINK =
+DEBUG_FLAG =
+DEBUG_LINK =
!else
DEBUG_FLAG = -Zi
DEBUG_LINK = -debug:full -debugtype:both
diff --git a/nt/preprep.c b/nt/preprep.c
index 08a29ae5931..64cd1b73916 100644
--- a/nt/preprep.c
+++ b/nt/preprep.c
@@ -67,17 +67,17 @@ open_input_file (file_data *p_file, char *filename)
file = CreateFile (filename, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
- if (file == INVALID_HANDLE_VALUE)
+ if (file == INVALID_HANDLE_VALUE)
return FALSE;
size = GetFileSize (file, &upper_size);
- file_mapping = CreateFileMapping (file, NULL, PAGE_READONLY,
+ file_mapping = CreateFileMapping (file, NULL, PAGE_READONLY,
0, size, NULL);
- if (!file_mapping)
+ if (!file_mapping)
return FALSE;
file_base = MapViewOfFile (file_mapping, FILE_MAP_READ, 0, 0, size);
- if (file_base == 0)
+ if (file_base == 0)
return FALSE;
p_file->name = filename;
@@ -98,18 +98,18 @@ open_output_file (file_data *p_file, char *filename, unsigned long size)
file = CreateFile (filename, GENERIC_READ | GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
- if (file == INVALID_HANDLE_VALUE)
+ if (file == INVALID_HANDLE_VALUE)
return FALSE;
- file_mapping = CreateFileMapping (file, NULL, PAGE_READWRITE,
+ file_mapping = CreateFileMapping (file, NULL, PAGE_READWRITE,
0, size, NULL);
- if (!file_mapping)
+ if (!file_mapping)
return FALSE;
-
+
file_base = MapViewOfFile (file_mapping, FILE_MAP_WRITE, 0, 0, size);
- if (file_base == 0)
+ if (file_base == 0)
return FALSE;
-
+
p_file->name = filename;
p_file->size = size;
p_file->file = file;
@@ -129,17 +129,17 @@ open_inout_file (file_data *p_file, char *filename)
file = CreateFile (filename, GENERIC_READ | GENERIC_WRITE, 0, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
- if (file == INVALID_HANDLE_VALUE)
+ if (file == INVALID_HANDLE_VALUE)
return FALSE;
size = GetFileSize (file, &upper_size);
file_mapping = CreateFileMapping (file, NULL, PAGE_READWRITE,
0, size, NULL);
- if (!file_mapping)
+ if (!file_mapping)
return FALSE;
file_base = MapViewOfFile (file_mapping, FILE_MAP_WRITE, 0, 0, size);
- if (file_base == 0)
+ if (file_base == 0)
return FALSE;
p_file->name = filename;
@@ -341,7 +341,7 @@ relocate_offset (DWORD offset,
easy to parse. */
static void
-copy_executable_and_move_sections (file_data *p_infile,
+copy_executable_and_move_sections (file_data *p_infile,
file_data *p_outfile)
{
unsigned char *dst;
@@ -389,10 +389,10 @@ copy_executable_and_move_sections (file_data *p_infile,
Note that dst is updated implicitly by each COPY_CHUNK. */
dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base;
- nt_header = (PIMAGE_NT_HEADERS) (((unsigned long) dos_header) +
+ nt_header = (PIMAGE_NT_HEADERS) (((unsigned long) dos_header) +
dos_header->e_lfanew);
section = IMAGE_FIRST_SECTION (nt_header);
-
+
import_dir = &nt_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT];
import_section = rva_to_section (import_dir->VirtualAddress, nt_header);
@@ -776,7 +776,7 @@ main (int argc, char **argv)
/* Open the original (dumped) executable file for reference. */
if (!open_input_file (&in_file, in_filename))
{
- printf ("Failed to open %s (%d)...bailing.\n",
+ printf ("Failed to open %s (%d)...bailing.\n",
in_filename, GetLastError ());
exit (1);
}
@@ -786,7 +786,7 @@ main (int argc, char **argv)
which should fit in the alignment slop. */
if (!open_output_file (&out_file, out_filename, in_file.size))
{
- printf ("Failed to open %s (%d)...bailing.\n",
+ printf ("Failed to open %s (%d)...bailing.\n",
out_filename, GetLastError ());
exit (1);
}