budb: Only have one build rule for budb_errs.c
[openafs.git] / src / budb / struct_ops.c
index 9a5c4ff..1d67f78 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2000, International Business Machines Corporation and others.
  * All Rights Reserved.
- * 
+ *
  * This software has been released under the terms of the IBM Public
  * License.  For details, see the LICENSE file in the top-level source
  * directory or online at http://www.openafs.org/dl/license10.html
@@ -10,6 +10,7 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <roken.h>
 
 #include <stdio.h>
 #ifdef AFS_NT40_ENV
 #include <sys/file.h>
 #endif
 #include <sys/types.h>
+
 #include <afs/stds.h>
 #include <afs/bubasics.h>
+#include <afs/afsutil.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <string.h>
@@ -67,7 +70,7 @@ printDump(FILE *fid, struct dump *dptr)
 
 }
 
-void 
+void
 printDumpEntry(struct budb_dumpEntry *deptr)
 {
     time_t created = deptr->created;
@@ -295,7 +298,7 @@ printVolInfo(FILE *fid, struct volInfo *viptr)
 
 /* -----------------------------------------
  * structure xdr routines
- * ----------------------------------------- 
+ * -----------------------------------------
  */
 
 /* utilities - network to host conversion
@@ -303,7 +306,7 @@ printVolInfo(FILE *fid, struct volInfo *viptr)
  */
 
 void
-volFragment_ntoh(struct volFragment *netVfPtr, 
+volFragment_ntoh(struct volFragment *netVfPtr,
                 struct volFragment *hostVfPtr)
 {
     hostVfPtr->vol = ntohl(netVfPtr->vol);
@@ -320,7 +323,7 @@ volFragment_ntoh(struct volFragment *netVfPtr,
 }
 
 void
-volInfo_ntoh(struct volInfo *netViPtr, 
+volInfo_ntoh(struct volInfo *netViPtr,
             struct volInfo *hostViPtr)
 {
     strcpy(hostViPtr->name, netViPtr->name);
@@ -336,7 +339,7 @@ volInfo_ntoh(struct volInfo *netViPtr,
 }
 
 void
-tape_ntoh(struct tape *netTapePtr, 
+tape_ntoh(struct tape *netTapePtr,
          struct tape *hostTapePtr)
 {
     strcpy(hostTapePtr->name, netTapePtr->name);
@@ -358,12 +361,12 @@ tape_ntoh(struct tape *netTapePtr,
 }
 
 void
-dump_ntoh(struct dump *netDumpPtr, 
+dump_ntoh(struct dump *netDumpPtr,
          struct dump *hostDumpPtr)
 {
     hostDumpPtr->id = ntohl(netDumpPtr->id);
     hostDumpPtr->idHashChain = ntohl(netDumpPtr->idHashChain);
-    strlcpy(hostDumpPtr->dumpName, netDumpPtr->dumpName, 
+    strlcpy(hostDumpPtr->dumpName, netDumpPtr->dumpName,
            sizeof(hostDumpPtr->dumpName));
     strlcpy(hostDumpPtr->dumpPath, netDumpPtr->dumpPath,
            sizeof(hostDumpPtr->dumpPath));
@@ -384,7 +387,7 @@ dump_ntoh(struct dump *netDumpPtr,
 }
 
 void
-DbHeader_ntoh(struct DbHeader *netptr, 
+DbHeader_ntoh(struct DbHeader *netptr,
              struct DbHeader *hostptr)
 {
     hostptr->dbversion = ntohl(netptr->dbversion);
@@ -396,7 +399,7 @@ DbHeader_ntoh(struct DbHeader *netptr,
 }
 
 void
-dumpEntry_ntoh(struct budb_dumpEntry *netptr, 
+dumpEntry_ntoh(struct budb_dumpEntry *netptr,
               struct budb_dumpEntry *hostptr)
 {
     hostptr->id = ntohl(netptr->id);
@@ -417,7 +420,7 @@ dumpEntry_ntoh(struct budb_dumpEntry *netptr,
 }
 
 void
-principal_hton(struct budb_principal *hostptr, 
+principal_hton(struct budb_principal *hostptr,
               struct budb_principal *netptr)
 {
     strcpy(netptr->name, hostptr->name);
@@ -426,7 +429,7 @@ principal_hton(struct budb_principal *hostptr,
 }
 
 void
-principal_ntoh(struct budb_principal *netptr, 
+principal_ntoh(struct budb_principal *netptr,
               struct budb_principal *hostptr)
 {
     strcpy(hostptr->name, netptr->name);
@@ -435,7 +438,7 @@ principal_ntoh(struct budb_principal *netptr,
 }
 
 void
-structDumpHeader_hton(struct structDumpHeader *hostPtr, 
+structDumpHeader_hton(struct structDumpHeader *hostPtr,
                      struct structDumpHeader *netPtr)
 {
     netPtr->type = htonl(hostPtr->type);
@@ -444,7 +447,7 @@ structDumpHeader_hton(struct structDumpHeader *hostPtr,
 }
 
 void
-structDumpHeader_ntoh(struct structDumpHeader *netPtr, 
+structDumpHeader_ntoh(struct structDumpHeader *netPtr,
                      struct structDumpHeader *hostPtr)
 {
     hostPtr->type = ntohl(netPtr->type);
@@ -453,7 +456,7 @@ structDumpHeader_ntoh(struct structDumpHeader *netPtr,
 }
 
 void
-tapeEntry_ntoh(struct budb_tapeEntry *netptr, 
+tapeEntry_ntoh(struct budb_tapeEntry *netptr,
               struct budb_tapeEntry *hostptr)
 {
     strcpy(hostptr->name, netptr->name);
@@ -472,7 +475,7 @@ tapeEntry_ntoh(struct budb_tapeEntry *netptr,
 }
 
 int
-tapeSet_hton(struct budb_tapeSet *hostptr, 
+tapeSet_hton(struct budb_tapeSet *hostptr,
             struct budb_tapeSet *netptr)
 {
     netptr->id = htonl(hostptr->id);
@@ -485,7 +488,7 @@ tapeSet_hton(struct budb_tapeSet *hostptr,
 }
 
 int
-tapeSet_ntoh(struct budb_tapeSet *netptr, 
+tapeSet_ntoh(struct budb_tapeSet *netptr,
             struct budb_tapeSet *hostptr)
 {
     hostptr->id = ntohl(netptr->id);
@@ -498,7 +501,7 @@ tapeSet_ntoh(struct budb_tapeSet *netptr,
 }
 
 void
-textBlock_hton(struct textBlock *hostptr, 
+textBlock_hton(struct textBlock *hostptr,
               struct textBlock *netptr)
 {
     netptr->version = htonl(hostptr->version);
@@ -509,7 +512,7 @@ textBlock_hton(struct textBlock *hostptr,
 }
 
 void
-textBlock_ntoh(struct textBlock *netptr, 
+textBlock_ntoh(struct textBlock *netptr,
               struct textBlock *hostptr)
 {
     hostptr->version = ntohl(netptr->version);
@@ -542,7 +545,7 @@ textLock_ntoh(db_lockP netptr, db_lockP hostptr)
 }
 
 void
-volumeEntry_ntoh(struct budb_volumeEntry *netptr, 
+volumeEntry_ntoh(struct budb_volumeEntry *netptr,
                 struct budb_volumeEntry *hostptr)
 {
     strcpy(hostptr->name, netptr->name);
@@ -564,7 +567,7 @@ volumeEntry_ntoh(struct budb_volumeEntry *netptr,
 }
 
 /* -------------------------------------
- * structure conversion & copy routines 
+ * structure conversion & copy routines
  * -------------------------------------
  */
 
@@ -643,7 +646,7 @@ volsToBudbVol(struct volFragment *volFragPtr, struct volInfo *volInfoPtr,
 }
 
 /* ----------------------------------
- * structure initialization routines 
+ * structure initialization routines
  *  ---------------------------------
  */