瀏覽代碼

Fixed minor compilation problems in xvnc.cc.

 - use xalloc/xfree instead ALLOCATE_LOCAL/DEALLOCATE_LOCAL
 - include keysym.h from $(includedir)/X11
 - removed "xor" and "and" macro defines (cannot be used with gcc 4)


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1.5-xserver@2446 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v0.0.90
Adam Tkac 16 年之前
父節點
當前提交
5cbdf986da
共有 1 個文件被更改,包括 7 次插入11 次删除
  1. 7
    11
      unix/xserver/hw/vnc/xvnc.cc

+ 7
- 11
unix/xserver/hw/vnc/xvnc.cc 查看文件

extern "C" { extern "C" {
#define class c_class #define class c_class
#define public c_public #define public c_public
#define xor c_xor
#define and c_and
#ifdef WIN32 #ifdef WIN32
#include <X11/Xwinsock.h> #include <X11/Xwinsock.h>
#endif #endif
#include "dix.h" #include "dix.h"
#include "miline.h" #include "miline.h"
#include "inputstr.h" #include "inputstr.h"
#include "keysym.h"
#include <X11/keysym.h>
extern int defaultColorVisualClass; extern int defaultColorVisualClass;
extern char buildtime[]; extern char buildtime[];
#undef class #undef class
#undef public #undef public
#undef xor
#undef and
} }


#define XVNCVERSION "TightVNC 1.5 series" #define XVNCVERSION "TightVNC 1.5 series"
swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue); swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue);
swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries); swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries);


ppix = (Pixel *)ALLOCATE_LOCAL(entries * sizeof(Pixel));
prgb = (xrgb *)ALLOCATE_LOCAL(entries * sizeof(xrgb));
defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem));
ppix = (Pixel *)xalloc(entries * sizeof(Pixel));
prgb = (xrgb *)xalloc(entries * sizeof(xrgb));
defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));


for (i = 0; i < entries; i++) ppix[i] = i; for (i = 0; i < entries; i++) ppix[i] = i;
/* XXX truecolor */ /* XXX truecolor */
} }
(*pmap->pScreen->StoreColors)(pmap, entries, defs); (*pmap->pScreen->StoreColors)(pmap, entries, defs);
DEALLOCATE_LOCAL(ppix);
DEALLOCATE_LOCAL(prgb);
DEALLOCATE_LOCAL(defs);
xfree(ppix);
xfree(prgb);
xfree(defs);
} }
} }



Loading…
取消
儲存