]> gitweb @ CieloNegro.org - pkgsrc-cinelerra-cv.git/blob - patches/patch-title_C
shmmax patch
[pkgsrc-cinelerra-cv.git] / patches / patch-title_C
1 $NetBSD$
2
3 --- plugins/titler/title.C.orig 2010-02-01 08:26:24.000000000 +0000
4 +++ plugins/titler/title.C
5 @@ -35,6 +35,8 @@
6  #include FT_OUTLINE_H
7  #include FT_STROKER_H
8  
9 +#include "config.h"
10 +
11  #include "language.h"
12  #include "mwindow.inc"
13  #include "picon_png.h"
14 @@ -48,11 +50,14 @@
15  #include <stdint.h>
16  #include <stdio.h>
17  #include <string.h>
18 -#include <endian.h>
19 -#include <byteswap.h>
20  #include <iconv.h>
21  #include <sys/stat.h>
22  
23 +#define bswap_32(x) ((((x) << 24) & 0xff000000) | \
24 +                     (((x) <<  8) & 0x00ff0000) | \
25 +                     (((x) >>  8) & 0x0000ff00) | \
26 +                     (((x) >> 24) & 0x000000ff))
27 +
28  #define ZERO (1.0 / 64.0)
29  
30  #define FONT_SEARCHPATH "fonts"
31 @@ -1517,14 +1522,15 @@ void TitleMain::draw_glyphs()
32  
33                         size_t inbytes,outbytes;
34                         char inbuf;
35 -                       char *inp = (char*)&inbuf, *outp = (char *)&char_code;
36 +                       const char *inp = &inbuf;
37 +            char *outp = (char *)&char_code;
38                         
39                         inbuf = (char)c;
40                         inbytes = 1;
41                         outbytes = 4;
42         
43                         iconv (cd, &inp, &inbytes, &outp, &outbytes);
44 -#if     __BYTE_ORDER == __LITTLE_ENDIAN
45 +#if !defined(WORDS_BIGENDIAN)
46                                 char_code = bswap_32(char_code);
47  #endif                          /* Big endian.  */
48