Commit 27d7f53f authored by Linus Tolke Y's avatar Linus Tolke Y
Browse files

Ny funktion, lista per regexpar.

parent f78e4f34
......@@ -1444,6 +1444,7 @@ current conference to another session."
;;; =======================================================
;;; Listing people using regexps.
(defun kom-list-re (regexp)
"List all persons and conferences whose name matches REGEXP."
(interactive "sSearch regexp: ")
......@@ -1574,4 +1574,88 @@ The MAPS must be consecutive. No gaps or overlaps are currently allowed."
(eq (car-safe object) 'SERVER-INFO))
;;; ================================================================
;;; conf-z-info-list
;;; Constructor:
(defun lyskom-create-conf-z-info-list (conf-z-infos)
"Create a conf-z-info-list from all parameters."
(vector conf-z-infos)))
;;; Selector:
(defun conf-z-info-list->conf-z-infos (conf-z-info-list)
"Get conf-z-infos from conf-z-info-list."
(elt (cdr conf-z-info-list) 0))
;;; Modifier:
(defun set-conf-z-info-list->conf-z-infos (conf-z-info-list newval)
"Set conf-z-infos in conf-z-info-list to NEWVAL."
(aset (cdr conf-z-info-list) 0 newval))
;;; Predicate:
(defun lyskom-conf-z-info-list-p (object)
"Return t if OBJECT is a conf-z-info-list."
(eq (car-safe object) 'CONF-Z-INFO-LIST))
;;; ================================================================
;;; conf-z-info
;;; Constructor:
(defun lyskom-create-conf-z-info (name
"Create a conf-z-info from all parameters."
(vector name conf-type conf-no)))
;;; Selectors:
(defun conf-z-info->name (conf-z-info)
"Get name from conf-z-info."
(elt (cdr conf-z-info) 0))
(defun conf-z-info->conf-type (conf-z-info)
"Get conf-type from conf-z-info."
(elt (cdr conf-z-info) 1))
(defun conf-z-info->conf-no (conf-z-info)
"Get conf-no from conf-z-info."
(elt (cdr conf-z-info) 2))
;;; Modifiers:
(defun set-conf-z-info->name (conf-z-info newval)
"Set name in conf-z-info to NEWVAL."
(aset (cdr conf-z-info) 0 newval))
(defun set-conf-z-info->conf-type (conf-z-info newval)
"Set conf-type in conf-z-info to NEWVAL."
(aset (cdr conf-z-info) 1 newval))
(defun set-conf-z-info->conf-no (conf-z-info newval)
"Set conf-no in conf-z-info to NEWVAL."
(aset (cdr conf-z-info) 2 newval))
;;; Predicate:
(defun lyskom-conf-z-info-p (object)
"Return t if OBJECT is a conf-z-info."
(eq (car-safe object) 'CONF-Z-INFO))
;;; =======================================================
......@@ -668,6 +668,29 @@ Args: TEXT-NO. Value: text-stat."
(lyskom-parse-vector (lyskom-parse-num) 'lyskom-parse-who-info))
;;; ================================================================
;;; Parsing things for the regexp-matching of persons
(defun lyskom-parse-conf-z-info-list ()
"Parse result from functions that return a conf-z-info-list."
(let* ((list-len (lyskom-parse-num)))
(lyskom-parse-vector list-len 'lyskom-parse-conf-z-info))))
(defun lyskom-parse-conf-z-info ()
"Parse a conf-z-info."
(lyskom-parse-string) ;name
(lyskom-parse-conf-type) ;conf-type
(lyskom-parse-num))) ;conf-no
;;; ================================================================
;;; Initialization of the parsing buffer.
(defun lyskom-init-parse ()
"Does all initialization of the parsing routines.
i.e creates the buffer, sets all markers and pointers."
......@@ -620,6 +620,16 @@ Args: KOM-QUEUE HANDLER &rest DATA."
(lyskom-send-packet kom-queue (lyskom-format-objects 56)))
(defun initiate-re-z-lookup (kom-queue handler regexp want-persons want-confs
&rest data)
"Perform a regexp lookup.
(lyskom-call kom-queue lyskom-ref-no handler data
(lyskom-send-packet kom-queue (lyskom-format-objects 74 regexp want-persons
;;; ================================================================
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment