Mon, 22 Aug 2022 21:40:04 -0500
Inline pidgin_make_scrollable
We need to change it for GTK4, and there are few enough that it can be inlined. Eventually, that code might be a `.ui` anyway.
Testing Done:
Compile only.
Reviewed at https://reviews.imfreedom.org/r/1615/
| 2086 | 1 | /* This file is part of the Project Athena Zephyr Notification System. |
| 2 | * It contains source for the ZFormatAuthenticNotice function. | |
| 3 | * | |
| 4 | * Created by: Robert French | |
| 11105 | 5 | |
| 2086 | 6 | * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology. |
| 7 | * For copying and distribution information, see the file | |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
15435
diff
changeset
|
8 | * "mit-copyright.h". |
| 2086 | 9 | */ |
| 10 | ||
|
8792
b0645c9dc276
[gaim-migrate @ 9554]
Christian Hammond <chipx86@chipx86.com>
parents:
8354
diff
changeset
|
11 | #include "internal.h" |
| 2086 | 12 | |
| 13 | #ifdef ZEPHYR_USES_KERBEROS | |
|
40166
811f82db29dd
zephyr: Modernize K&R function prototypes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
14 | Code_t |
|
811f82db29dd
zephyr: Modernize K&R function prototypes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
15 | ZFormatAuthenticNotice(ZNotice_t *notice, register char *buffer, |
|
811f82db29dd
zephyr: Modernize K&R function prototypes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31294
diff
changeset
|
16 | register int buffer_len, int *len, C_Block session) |
| 2086 | 17 | { |
| 18 | ZNotice_t newnotice; | |
| 19 | char *ptr; | |
| 20 | int retval, hdrlen; | |
| 21 | ||
| 22 | newnotice = *notice; | |
| 23 | newnotice.z_auth = 1; | |
| 24 | newnotice.z_authent_len = 0; | |
| 25 | newnotice.z_ascii_authent = ""; | |
| 26 | ||
| 27 | if ((retval = Z_FormatRawHeader(&newnotice, buffer, buffer_len, | |
| 28 | &hdrlen, &ptr, NULL)) != ZERR_NONE) | |
| 29 | return (retval); | |
| 30 | ||
| 31 | #ifdef NOENCRYPTION | |
| 32 | newnotice.z_checksum = 0; | |
| 33 | #else | |
| 34 | newnotice.z_checksum = | |
| 8354 | 35 | (ZChecksum_t)des_quad_cksum(buffer, NULL, ptr - buffer, 0, (C_Block*)session); |
| 2086 | 36 | #endif |
| 37 | if ((retval = Z_FormatRawHeader(&newnotice, buffer, buffer_len, | |
| 38 | &hdrlen, NULL, NULL)) != ZERR_NONE) | |
| 39 | return (retval); | |
| 40 | ||
| 41 | ptr = buffer+hdrlen; | |
| 42 | ||
| 43 | if (newnotice.z_message_len+hdrlen > buffer_len) | |
| 44 | return (ZERR_PKTLEN); | |
| 45 | ||
| 46 | (void) memcpy(ptr, newnotice.z_message, newnotice.z_message_len); | |
| 47 | ||
| 48 | *len = hdrlen+newnotice.z_message_len; | |
| 49 | ||
| 50 | if (*len > Z_MAXPKTLEN) | |
| 51 | return (ZERR_PKTLEN); | |
| 52 | ||
| 53 | return (ZERR_NONE); | |
| 54 | } | |
| 55 | #endif |