From 32fd0e1605c20406fcb5dad6f9619d6b5d747c8e Mon Sep 17 00:00:00 2001 From: John Kohl Date: Wed, 15 Jun 1988 13:22:06 +0000 Subject: Initial revision --- lib/ZFmtSmRLst.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 lib/ZFmtSmRLst.c (limited to 'lib/ZFmtSmRLst.c') diff --git a/lib/ZFmtSmRLst.c b/lib/ZFmtSmRLst.c new file mode 100644 index 0000000..cff1fd8 --- /dev/null +++ b/lib/ZFmtSmRLst.c @@ -0,0 +1,55 @@ +/* This file is part of the Project Athena Zephyr Notification System. + * It contains source for the ZFormatSmallRawNoticeList function. + * + * Created by: John Kohl + * + * $Source$ + * $Author$ + * + * Copyright (c) 1988 by the Massachusetts Institute of Technology. + * For copying and distribution information, see the file + * "mit-copyright.h". + */ +/* $Header$ */ + +#ifndef lint +static char rcsid_ZFormatRawNoticeList_c[] = "$Header$"; +#endif lint + +#include + +#include + +Code_t ZFormatSmallRawNoticeList(notice, list, nitems, buffer, ret_len) + ZNotice_t *notice; + char *list[]; + int nitems; + ZPacket_t buffer; + int *ret_len; +{ + Code_t retval; + int hdrlen, i, size; + + if ((retval = Z_FormatRawHeader(notice, buffer, Z_MAXHEADERLEN, &hdrlen)) + != ZERR_NONE) + return (retval); + + size = 0; + for (i=0;i Z_MAXPKTLEN) + return (ZERR_PKTLEN); + + ptr = buffer+hdrlen; + + for (;nitems;nitems--, list++) { + i = strlen(*list)+1; + bcopy(*list, ptr, i); + ptr += i; + } + + return (ZERR_NONE); +} -- cgit v1.2.3