Mon, 22 Nov 2004 22:13:12 +0000
[gaim-migrate @ 11377]
Removing trust parameter for gaim_notify_uri (see gaim-devel over past few
days). Removed URI scheme filtering for win32. Instead we'll allow what ever
the default http browser allows.
| 2086 | 1 | /* This file is part of the Project Athena Zephyr Notification System. |
| 2 | * It contains source for the ZFormatNotice function. | |
| 3 | * | |
| 4 | * Created by: Robert French | |
| 5 | * | |
| 6 | * $Source$ | |
|
8792
b0645c9dc276
[gaim-migrate @ 9554]
Christian Hammond <chipx86@chipx86.com>
parents:
2086
diff
changeset
|
7 | * $Author: chipx86 $ |
| 2086 | 8 | * |
| 9 | * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. | |
| 10 | * For copying and distribution information, see the file | |
| 11 | * "mit-copyright.h". | |
| 12 | */ | |
| 13 | /* $Header$ */ | |
| 14 | ||
| 15 | #ifndef lint | |
|
8792
b0645c9dc276
[gaim-migrate @ 9554]
Christian Hammond <chipx86@chipx86.com>
parents:
2086
diff
changeset
|
16 | static char rcsid_ZFormatNotice_c[] = "$Id: ZFmtNotice.c 9554 2004-04-24 09:02:28Z chipx86 $"; |
| 2086 | 17 | #endif |
| 18 | ||
|
8792
b0645c9dc276
[gaim-migrate @ 9554]
Christian Hammond <chipx86@chipx86.com>
parents:
2086
diff
changeset
|
19 | #include "internal.h" |
| 2086 | 20 | |
| 21 | Code_t ZFormatNotice(notice, buffer, ret_len, cert_routine) | |
| 22 | register ZNotice_t *notice; | |
| 23 | char **buffer; | |
| 24 | int *ret_len; | |
| 25 | Z_AuthProc cert_routine; | |
| 26 | { | |
| 27 | char header[Z_MAXHEADERLEN]; | |
| 28 | int hdrlen; | |
| 29 | Code_t retval; | |
| 30 | ||
| 31 | if ((retval = Z_FormatHeader(notice, header, sizeof(header), &hdrlen, | |
| 32 | cert_routine)) != ZERR_NONE) | |
| 33 | return (retval); | |
| 34 | ||
| 35 | *ret_len = hdrlen+notice->z_message_len; | |
| 36 | ||
| 37 | /* Length can never be zero, don't have to worry about malloc(0). */ | |
| 38 | if (!(*buffer = (char *) malloc((unsigned)*ret_len))) | |
| 39 | return (ENOMEM); | |
| 40 | ||
| 41 | (void) memcpy(*buffer, header, hdrlen); | |
| 42 | (void) memcpy(*buffer+hdrlen, notice->z_message, notice->z_message_len); | |
| 43 | ||
| 44 | return (ZERR_NONE); | |
| 45 | } |