]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/lib/ZSendRLst.c
Initial revision
[1ts-debian.git] / zephyr / lib / ZSendRLst.c
1 /* This file is part of the Project Athena Zephyr Notification System.
2  * It contains source for the ZSendRawNotice function.
3  *
4  *      Created by:     John T. Kohl
5  *
6  *      $Id: ZSendRLst.c,v 1.5 1999/01/22 23:19:27 ghudson Exp $
7  *
8  *      Copyright (c) 1988 by the Massachusetts Institute of Technology.
9  *      For copying and distribution information, see the file
10  *      "mit-copyright.h". 
11  */
12
13 #ifndef lint
14 static char rcsid_ZSendRawList_c[] = "$Id: ZSendRLst.c,v 1.5 1999/01/22 23:19:27 ghudson Exp $";
15 #endif
16
17 #include <internal.h>
18
19 Code_t ZSendRawList(notice, list, nitems)
20     ZNotice_t *notice;
21     char *list[];
22     int nitems;
23 {
24     return(ZSrvSendRawList(notice, list, nitems, Z_XmitFragment));
25 }
26
27 Code_t ZSrvSendRawList(notice, list, nitems, send_routine)
28     ZNotice_t *notice;
29     char *list[];
30     int nitems;
31     Code_t (*send_routine)();
32 {
33     Code_t retval;
34     ZNotice_t newnotice;
35     char *buffer;
36     int len;
37
38     if ((retval = ZFormatRawNoticeList(notice, list, nitems, &buffer, 
39                                        &len)) != ZERR_NONE)
40         return (retval);
41
42     if ((retval = ZParseNotice(buffer, len, &newnotice)) != ZERR_NONE)
43         return (retval);
44     
45     retval = Z_SendFragmentedNotice(&newnotice, len, NULL, send_routine);
46
47     free(buffer);
48
49     return (retval);
50 }