]> andersk Git - moira.git/blobdiff - update/get_file.c
second code style cleanup: void/void * usage, proper #includes. try to
[moira.git] / update / get_file.c
index 8ce07b3c7f6d7eb4b4a4fffdc1aac63e5b99e2fd..04053504d60b0cfe52308a68869fea9911bd3fb8 100644 (file)
@@ -1,28 +1,25 @@
-/*
- *     $Source$
- *     $Header$
+/* $Id$
+ *
+ * Copyright (C) 1988-1998 by the Massachusetts Institute of Technology.
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
  */
-/*  (c) Copyright 1988 by the Massachusetts Institute of Technology. */
-/*  For copying and distribution information, please see the file */
-/*  <mit-copyright.h>. */
-
-#ifndef lint
-static char *rcsid_get_file_c = "$Header$";
-#endif
 
 #include <mit-copyright.h>
-#include <stdio.h>
-#include <gdb.h>
-#include <ctype.h>
-#include <string.h>
-#include <sys/param.h>
-#include <sys/file.h>
-#include <fcntl.h>
-#include <des.h>
-#include <krb.h>
 #include <moira.h>
+#include "update_server.h"
 #include "update.h"
 
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include <des.h>
+#include <gdb.h>
+
+RCSID("$Header$");
+
 #ifndef MIN
 #define MIN(a, b)    (((a) < (b)) ? (a) : (b))
 #endif /* MIN */
@@ -30,7 +27,7 @@ static char *rcsid_get_file_c = "$Header$";
 extern CONNECTION conn;
 extern char buf[BUFSIZ];
 
-extern int code, errno, uid;
+extern int code, uid;
 extern char *whoami;
 
 extern int have_authorization, have_file, done;
@@ -38,7 +35,7 @@ extern C_Block session;
 static des_key_schedule sched;
 static des_cblock ivec;
 
-static int get_block();
+static int get_block(int fd, int max_size, int encrypt);
 
 /*
  * get_file()
@@ -135,7 +132,7 @@ int get_file(char *pathname, int file_size, int checksum,
        }
       n_written += n_wrote;
     }
-  lseek(fd, 0, L_SET);
+  lseek(fd, 0, SEEK_SET);
   if (send_ok())
     lose("sending okay for file transfer (get_file)");
   if (encrypt)
This page took 0.032368 seconds and 4 git commands to generate.