]> andersk Git - moira.git/blobdiff - server/qsubs.c
second code style cleanup: void/void * usage, proper #includes. try to
[moira.git] / server / qsubs.c
index 08e69d21877b0ddc413225a70f8e49d00d1abc9f..3933041bfa9f6c9c6d4fe04dc83614b890297e13 100644 (file)
@@ -1,26 +1,23 @@
-/*
- *     $Source$
- *     $Author$
- *     $Header$
- *
- *     Copyright (C) 1987 by the Massachusetts Institute of Technology
- *     For copying and distribution information, please see the file
- *     <mit-copyright.h>.
+/* $Id$
  *
+ * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
  */
 
-#ifndef lint
-static char *rcsid_qsubs_c = "$Header$";
-#endif lint
-
 #include <mit-copyright.h>
-#include <moira.h>
 #include "mr_server.h"
 #include "query.h"
 
+#include <stdlib.h>
+
+RCSID("$Header$");
+
 extern struct query Queries2[];
 extern int QueryCount2;
 
+int qcmp(const void *q1, const void *q2);
+
 struct query *get_query_by_name(char *name, int version)
 {
   struct query *q;
@@ -51,7 +48,8 @@ struct query *get_query_by_name(char *name, int version)
   return NULL;
 }
 
-void list_queries(int version, int (*action)(), char *actarg)
+void list_queries(int version, int (*action)(int, char *[], void *),
+                 void *actarg)
 {
   struct query *q;
   int i;
@@ -60,7 +58,6 @@ void list_queries(int version, int (*action)(), char *actarg)
   char qnames[80];
   char *qnp;
   int count;
-  int qcmp();
 
   count = QueryCount2;
   if (!squeries2)
@@ -88,7 +85,8 @@ void list_queries(int version, int (*action)(), char *actarg)
   (*action)(1, &qnp, actarg);
 }
 
-void help_query(struct query *q, int (*action)(), char *actarg)
+void help_query(struct query *q, int (*action)(int, char *[], void *),
+               void *actarg)
 {
   int argcount;
   int i;
@@ -146,7 +144,7 @@ void help_query(struct query *q, int (*action)(), char *actarg)
   (*action)(argcount, argv, actarg);
 }
 
-int qcmp(struct query **q1, struct query **q2)
+int qcmp(const void *q1, const void *q2)
 {
-  return strcmp((*q1)->name, (*q2)->name);
+  return strcmp((*(struct query **)q1)->name, (*(struct query **)q2)->name);
 }
This page took 0.034026 seconds and 4 git commands to generate.