]> andersk Git - moira.git/blobdiff - lib/sq.c
correct library name
[moira.git] / lib / sq.c
index fd2d163d3193f4e41aeb29d465342bc29c32628a..72fcfbacc718e41b397f8d3b49b83bc52a6356f4 100644 (file)
--- a/lib/sq.c
+++ b/lib/sq.c
@@ -1,9 +1,14 @@
 /* $Header$
  *
  * Generic Queue Routines
+ *
+ *  (c) Copyright 1988 by the Massachusetts Institute of Technology.
+ *  For copying and distribution information, please see the file
+ *  <mit-copyright.h>.
  */
 
-#include "sms_app.h"
+#include <mit-copyright.h>
+#include <moira.h>
 
 struct save_queue *
 sq_create()
@@ -89,6 +94,29 @@ sq_get_data(sq, data)
     return(1);
 }
 
+sq_remove_data(sq, data)
+    register struct save_queue *sq;
+    register char **data;
+{
+    if (sq->q_next != sq) {
+       *data = sq->q_next->q_data;
+       sq->q_next = sq->q_next->q_next;
+       free(sq->q_next->q_prev);
+       sq->q_next->q_prev = sq;
+       return(1);
+    }
+    return(0);
+}
+
+int sq_empty(sq)
+    register struct save_queue *sq;
+{
+    if (sq->q_next == sq)
+      return(1);
+    else
+      return(0);
+}
+
 sq_destroy(sq)
     register struct save_queue *sq;
 {
This page took 0.039911 seconds and 4 git commands to generate.