-/*
- * $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;
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;
char qnames[80];
char *qnp;
int count;
- int qcmp();
count = QueryCount2;
if (!squeries2)
(*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;
(*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);
}