[ create a new paste ] login | about

Link: http://codepad.org/IyRRZWji    [ raw code | output | fork ]

C, pasted on Nov 24:
#pragma once

#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<X11/Xlib.h>
#include<string.h>

typedef int PixType;
#define MakePix(r,g,b) ( (r) << 16 |  (g) << 8 | (b) )
#define BPP 24

typedef struct {
  Display*d;
  Window w;
  XImage*img;
  PixType*data;
  int W,H;
  int lx,ly;
} Viewer;

void ViewerInit(Viewer*vw, int _W,int _H);

void ViewerEvent(Viewer*vw,int ev[4]);

typedef struct {
  unsigned char*data;
  int W,H;
} Image;

void ViewerImageWrite(Viewer*vw,Image*im);


Output:
1
2
3
Line 8: warning: #pragma once in main file
Line 20: error: X11/Xlib.h: No such file or directory
Line 14: error: expected specifier-qualifier-list before 'Display'


Create a new paste based on this one


Comments: