aboutsummaryrefslogtreecommitdiff
path: root/bfd/nlmswap.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-04-21 07:45:39 +0000
committerNick Clifton <nickc@redhat.com>2005-04-21 07:45:39 +0000
commit7920ce38c3e43d462e360b21db6cc9c17a40b4f4 (patch)
tree416f762ca89660f4cecf9e1391f12c6ac478ce46 /bfd/nlmswap.h
parentb450502905875e85aab17371f78bb6befe5a3059 (diff)
downloadgdb-7920ce38c3e43d462e360b21db6cc9c17a40b4f4.zip
gdb-7920ce38c3e43d462e360b21db6cc9c17a40b4f4.tar.gz
gdb-7920ce38c3e43d462e360b21db6cc9c17a40b4f4.tar.bz2
Update to ISO-C90 and fix formatting
Diffstat (limited to 'bfd/nlmswap.h')
-rw-r--r--bfd/nlmswap.h48
1 files changed, 21 insertions, 27 deletions
diff --git a/bfd/nlmswap.h b/bfd/nlmswap.h
index 2fbb102b..4ed72eb 100644
--- a/bfd/nlmswap.h
+++ b/bfd/nlmswap.h
@@ -1,24 +1,24 @@
/* NLM (NetWare Loadable Module) swapping routines for BFD.
- Copyright 1993, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1993, 2000, 2001, 2005 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, using ELF support as the
template.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program 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 of the License, or
-(at your option) any later version.
+ This program 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 of the License, or
+ (at your option) any later version.
-This program 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.
+ This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Although this is a header file, it defines functions. It is
included by NLM backends to define swapping functions that vary
@@ -29,22 +29,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
At the moment this is only needed for one structure, the fixed NLM
file header. */
-static void nlm_swap_fixed_header_in PARAMS ((bfd *, PTR,
- Nlm_Internal_Fixed_Header *));
-static void nlm_swap_fixed_header_out PARAMS ((bfd *,
- Nlm_Internal_Fixed_Header *,
- PTR));
-
/* Translate an NLM fixed length file header in external format into an NLM
file header in internal format. */
static void
-nlm_swap_fixed_header_in (abfd, realsrc, dst)
- bfd *abfd;
- PTR realsrc;
- Nlm_Internal_Fixed_Header *dst;
+nlm_swap_fixed_header_in (bfd *abfd,
+ void * realsrc,
+ Nlm_Internal_Fixed_Header *dst)
{
Nlm_External_Fixed_Header *src = (Nlm_External_Fixed_Header *) realsrc;
+
memcpy (dst->signature, src->signature, NLM_SIGNATURE_SIZE);
memcpy (dst->moduleName, src->moduleName, NLM_MODULE_NAME_SIZE);
dst->version =
@@ -99,12 +93,12 @@ nlm_swap_fixed_header_in (abfd, realsrc, dst)
an NLM file header in external format. */
static void
-nlm_swap_fixed_header_out (abfd, src, realdst)
- bfd *abfd;
- Nlm_Internal_Fixed_Header *src;
- PTR realdst;
+nlm_swap_fixed_header_out (bfd *abfd,
+ Nlm_Internal_Fixed_Header *src,
+ void * realdst)
{
Nlm_External_Fixed_Header *dst = (Nlm_External_Fixed_Header *) realdst;
+
memset (dst, 0, sizeof *dst);
memcpy (dst->signature, src->signature, NLM_SIGNATURE_SIZE);
memcpy (dst->moduleName, src->moduleName, NLM_MODULE_NAME_SIZE);