]> andersk Git - moira.git/blobdiff - regtape/vote.pc
second code style cleanup: void/void * usage, proper #includes. try to
[moira.git] / regtape / vote.pc
index 8593800a1cf7a2eb8bfdbd95aad788bc64b6ecbc..a66b983ec872fad54455e63a25da0ae0828d5d4f 100644 (file)
@@ -1,14 +1,21 @@
-/* $Header$
+/* $Id$
+ *
+ * Copyright (C) 1993-1998 by the Massachusetts Institute of Technology
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
  */
 
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/time.h>
+#include <mit-copyright.h>
 #include <moira.h>
 #include <moira_site.h>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+
 EXEC SQL INCLUDE sqlca;
 
+RCSID("$Header$");
 
 struct entry {
   char *line;
@@ -19,11 +26,13 @@ struct entry {
 char *whoami;
 int debug;
 
+struct entry *get_next_entry(FILE *in);
+int process_entry(struct entry *e);
 
 int main(int argc, char **argv)
 {
   FILE *in;
-  struct entry *e, *get_next_entry();
+  struct entry *e;
   int i, wait = 0;
   char buf[BUFSIZ], *file = NULL, *p, *p1, *db = "moira";
 
@@ -41,8 +50,6 @@ int main(int argc, char **argv)
     {
       if (!strcmp(argv[i], "-w"))
        wait++;
-      else if (!strcmp(argv[i], "-D"))
-       setenv("ING_SET", "set printqry");
       else if (!strcmp(argv[i], "-d"))
        debug = 1;
       else if (file)
@@ -89,8 +96,6 @@ int main(int argc, char **argv)
   exit(0);
 }
 
-
-
 struct entry *get_next_entry(FILE *in)
 {
   static struct entry e;
@@ -106,7 +111,6 @@ struct entry *get_next_entry(FILE *in)
   return &e;
 }
 
-
 int process_entry(struct entry *e)
 {
   EXEC SQL BEGIN DECLARE SECTION;
@@ -119,7 +123,7 @@ int process_entry(struct entry *e)
   EXEC SQL SELECT login INTO :login FROM users WHERE clearid = :id;
   if (sqlca.sqlcode)
     {
-      fprintf(stderr, "Error %d on %s\n", sqlca.sqlcode, e->line);
+      fprintf(stderr, "Error %ld on %s\n", sqlca.sqlcode, e->line);
       return -1;
     }
   strncpy(e->login, login, 8);
This page took 0.054345 seconds and 4 git commands to generate.