]> git.wh0rd.org - dump.git/blobdiff - restore/utilities.c
kill "register".
[dump.git] / restore / utilities.c
index e2bf2e2682f955f18df33bc80661ab32ab53f1ee..627e147875ee44d5454aa4f8810f8462e852ed97 100644 (file)
@@ -2,8 +2,8 @@
  *     Ported to Linux's Second Extended File System as part of the
  *     dump and restore backup suit
  *     Remy Card <card@Linux.EU.Org>, 1994-1997
- *     Stelian Pop <pop@noos.fr>, 1999-2000
- *     Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
+ *     Stelian Pop <stelian@popies.net>, 1999-2000
+ *     Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: utilities.c,v 1.14 2001/04/10 12:46:53 stelian Exp $";
+       "$Id: utilities.c,v 1.19 2002/01/25 15:09:00 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -56,7 +56,12 @@ static const char rcsid[] =
 
 #ifdef __linux__
 #include <sys/time.h>
+#include <time.h>
+#ifdef HAVE_EXT2FS_EXT2_FS_H
+#include <ext2fs/ext2_fs.h>
+#else
 #include <linux/ext2_fs.h>
+#endif
 #include <ext2fs/ext2fs.h>
 #include <bsdcompat.h>
 #else  /* __linux__ */
@@ -73,7 +78,7 @@ static const char rcsid[] =
 void
 pathcheck(char *name)
 {
-       register char *cp;
+       char *cp;
        struct entry *ep;
        char *start;
 
@@ -314,7 +319,7 @@ delwhiteout(struct entry *ep)
 dump_ino_t
 lowerbnd(dump_ino_t start)
 {
-       register struct entry *ep;
+       struct entry *ep;
 
        for ( ; start < maxino; start++) {
                ep = lookupino(start);
@@ -332,7 +337,7 @@ lowerbnd(dump_ino_t start)
 dump_ino_t
 upperbnd(dump_ino_t start)
 {
-       register struct entry *ep;
+       struct entry *ep;
 
        for ( ; start > ROOTINO; start--) {
                ep = lookupino(start);
@@ -480,13 +485,13 @@ panic(fmt, va_alist)
  * if no smaller inode found return tnum=0 and tpos=0
  */
 int
-Inode2Tapepos(dump_ino_t ino, long *tnum, long *tpos, int exactmatch)
+Inode2Tapepos(dump_ino_t ino, long *tnum, long long *tpos, int exactmatch)
 {
        char *p, *pp;
        char numbuff[32];
        unsigned long tmpino;
        long tmptnum;
-       long tmptpos;
+       long long tmptpos;
 
        *tpos = 0;
        *tnum = 0;
@@ -518,7 +523,7 @@ Inode2Tapepos(dump_ino_t ino, long *tnum, long *tpos, int exactmatch)
                /* read tapepos */
                while ((*p != 0) && (*p != '\t'))
                        *pp++ = *p++;
-               tmptpos = atol(numbuff);
+               tmptpos = atoll(numbuff);
 
                if (exactmatch) {
                        if (tmpino == ino)  {