1 /* This file is part of the Project Athena Zephyr Notification System.
2 * It contains source for the ZFormatRawNoticeList function.
4 * Created by: Robert French
8 * Copyright (c) 1987 by the Massachusetts Institute of Technology.
9 * For copying and distribution information, see the file
14 static char rcsid_ZFormatRawNoticeList_c[] = "$Id$";
20 ZFormatRawNoticeList(ZNotice_t *notice,
26 char header[Z_MAXHEADERLEN];
31 if ((retval = Z_FormatRawHeader(notice, header, sizeof(header),
32 &hdrlen, NULL, NULL)) != ZERR_NONE)
36 for (i=0;i<nitems;i++)
37 size += strlen(list[i])+1;
39 *ret_len = hdrlen+size;
41 if (!(*buffer = (char *) malloc((unsigned) *ret_len)))
44 (void) memcpy(*buffer, header, hdrlen);
48 for (;nitems;nitems--, list++) {
50 (void) memcpy(ptr, *list, i);