1 /* This file is part of the Project Athena Zephyr Notification System.
2 * It contains source for the ZFormatSmallRawNotice 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 const char rcsid_ZFormatRawNotice_c[] = "$Id$";
20 ZFormatSmallRawNotice(ZNotice_t *notice,
27 if ((retval = Z_FormatRawHeader(notice, buffer, Z_MAXHEADERLEN,
28 &hdrlen, NULL, NULL)) != ZERR_NONE)
31 *ret_len = hdrlen+notice->z_message_len;
33 if (*ret_len > Z_MAXPKTLEN)
36 (void) memcpy(buffer+hdrlen, notice->z_message, notice->z_message_len);
42 ZNewFormatSmallRawNotice(ZNotice_t *notice,
49 if ((retval = Z_AsciiFormatRawHeader(notice, buffer, Z_MAXHEADERLEN,
50 &hdrlen, NULL, NULL, NULL, NULL))
54 *ret_len = hdrlen+notice->z_message_len;
56 if (*ret_len > Z_MAXPKTLEN)
59 (void) memcpy(buffer+hdrlen, notice->z_message, notice->z_message_len);