3eedb3295a
OK jasper@, landry@, gsoares@
23 lines
759 B
Plaintext
23 lines
759 B
Plaintext
$OpenBSD: patch-xclip_c,v 1.1 2011/06/23 15:17:13 sebastia Exp $
|
|
|
|
fix build with gcc-2.95
|
|
|
|
--- xclip.c.orig Wed Jun 22 16:17:57 2011
|
|
+++ xclip.c Wed Jun 22 16:18:21 2011
|
|
@@ -158,6 +158,7 @@ utf16_lf2crlf(uint8 * data, uint32 * size)
|
|
uint8 *result;
|
|
uint16 *inptr, *outptr;
|
|
RD_BOOL swap_endianess;
|
|
+ uint16 uvalue_previous = 0; /* Kept so we'll avoid translating CR-LF to CR-CR-LF */
|
|
|
|
/* Worst case: Every char is LF */
|
|
result = xmalloc((*size * 2) + 2);
|
|
@@ -170,7 +171,6 @@ utf16_lf2crlf(uint8 * data, uint32 * size)
|
|
/* Check for a reversed BOM */
|
|
swap_endianess = (*inptr == 0xfffe);
|
|
|
|
- uint16 uvalue_previous = 0; /* Kept so we'll avoid translating CR-LF to CR-CR-LF */
|
|
while ((uint8 *) inptr < data + *size)
|
|
{
|
|
uint16 uvalue = *inptr;
|