OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [MW_0_8_9PRE7/] [mw/] [src/] [drivers/] [vgaplan4.i] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 673 markom
# 1 "vgaplan4.c"
2
# 1 ""
3
# 1 ""
4
# 1 "vgaplan4.c"
5
# 21 "vgaplan4.c"
6
# 1 "/projects/or32-uclinux/include/assert.h" 1
7
# 25 "/projects/or32-uclinux/include/assert.h"
8
# 1 "/projects/or32-uclinux/include/features.h" 1
9
# 292 "/projects/or32-uclinux/include/features.h"
10
# 1 "/projects/or32-uclinux/include/sys/cdefs.h" 1
11
# 293 "/projects/or32-uclinux/include/features.h" 2
12
# 327 "/projects/or32-uclinux/include/features.h"
13
# 1 "/projects/or32-uclinux/include/bits/uClibc_config.h" 1
14
# 328 "/projects/or32-uclinux/include/features.h" 2
15
# 26 "/projects/or32-uclinux/include/assert.h" 2
16
# 36 "/projects/or32-uclinux/include/assert.h"
17
extern void __assert (const char *, const char *, int, const char *) ;
18
# 22 "vgaplan4.c" 2
19
# 1 "../include/device.h" 1
20
# 10 "../include/device.h"
21
# 1 "../include/mwtypes.h" 1
22
# 160 "../include/mwtypes.h"
23
    typedef unsigned char MWPIXELVAL;
24
# 176 "../include/mwtypes.h"
25
typedef int MWCOORD;
26
typedef int MWBOOL;
27
typedef unsigned char MWUCHAR;
28
typedef unsigned long MWCOLORVAL;
29
typedef unsigned short MWIMAGEBITS;
30
typedef unsigned long MWTIMEOUT;
31
 
32
 
33
typedef struct _mwlist {
34
        struct _mwlist *next;
35
        struct _mwlist *prev;
36
} MWLIST, *PMWLIST;
37
 
38
 
39
typedef struct _mwlisthead {
40
        struct _mwlist *head;
41
        struct _mwlist *tail;
42
} MWLISTHEAD, *PMWLISTHEAD;
43
 
44
 
45
typedef unsigned int MWKEYMOD;
46
 
47
 
48
typedef struct {
49
        MWCOORD rows;
50
        MWCOORD cols;
51
        int xdpcm;
52
        int ydpcm;
53
        int planes;
54
        int bpp;
55
        long ncolors;
56
        int fonts;
57
        int buttons;
58
        MWKEYMOD modifiers;
59
        int pixtype;
60
        int portrait;
61
        MWBOOL fbdriver;
62
        unsigned long rmask;
63
        unsigned long gmask;
64
        unsigned long bmask;
65
        MWCOORD xpos;
66
        MWCOORD ypos;
67
 
68
 
69
        int vs_width;
70
        int vs_height;
71
        int ws_width;
72
        int ws_height;
73
} MWSCREENINFO, *PMWSCREENINFO;
74
 
75
 
76
typedef struct {
77
        unsigned char * physpixels;
78
 
79
        unsigned char * winpixels;
80
        int pixtype;
81
        int bpp;
82
        int bytespp;
83
        int pitch;
84
        int x, y;
85
        int portrait_mode;
86
        MWCOORD xres;
87
        MWCOORD yres;
88
        MWCOORD xvirtres;
89
        MWCOORD yvirtres;
90
} MWWINDOWFBINFO;
91
 
92
 
93
typedef struct {
94
        int maxwidth;
95
        int height;
96
        int baseline;
97
        int firstchar;
98
        int lastchar;
99
        MWBOOL fixed;
100
        MWUCHAR widths[256];
101
} MWFONTINFO, *PMWFONTINFO;
102
 
103
 
104
typedef struct {
105
        char *ttname;
106
        char *mwname;
107
} MWFONTLIST, *PMWFONTLIST;
108
# 311 "../include/mwtypes.h"
109
typedef struct {
110
        long lfHeight;
111
        long lfWidth;
112
        long lfEscapement;
113
        long lfOrientation;
114
        long lfWeight;
115
        MWUCHAR lfItalic;
116
        MWUCHAR lfUnderline;
117
        MWUCHAR lfStrikeOut;
118
        MWUCHAR lfCharSet;
119
        MWUCHAR lfOutPrecision;
120
        MWUCHAR lfClipPrecision;
121
        MWUCHAR lfQuality;
122
 
123
 
124
        MWUCHAR lfRoman;
125
        MWUCHAR lfSerif;
126
        MWUCHAR lfSansSerif;
127
        MWUCHAR lfModern;
128
        MWUCHAR lfMonospace;
129
        MWUCHAR lfProportional;
130
        MWUCHAR lfOblique;
131
        MWUCHAR lfSmallCaps;
132
        MWUCHAR lfPitch;
133
 
134
        char lfFaceName[64];
135
} MWLOGFONT, *PMWLOGFONT;
136
# 402 "../include/mwtypes.h"
137
typedef struct {
138
        MWCOORD x;
139
        MWCOORD y;
140
} MWPOINT;
141
 
142
 
143
typedef struct {
144
        MWCOORD left;
145
        MWCOORD top;
146
        MWCOORD right;
147
        MWCOORD bottom;
148
} MWRECT;
149
 
150
 
151
typedef struct {
152
        int size;
153
        int numRects;
154
        int type;
155
        MWRECT *rects;
156
        MWRECT extents;
157
} MWCLIPREGION;
158
# 440 "../include/mwtypes.h"
159
typedef struct {
160
        MWUCHAR r;
161
        MWUCHAR g;
162
        MWUCHAR b;
163
} MWPALENTRY;
164
 
165
 
166
 
167
 
168
 
169
 
170
typedef struct {
171
        int width;
172
        int height;
173
        int planes;
174
        int bpp;
175
        int pitch;
176
        int bytesperpixel;
177
        int compression;
178
        int palsize;
179
        long transcolor;
180
        MWPALENTRY * palette;
181
        MWUCHAR * imagebits;
182
} MWIMAGEHDR, *PMWIMAGEHDR;
183
 
184
 
185
typedef struct {
186
        int id;
187
        int width;
188
        int height;
189
        int planes;
190
        int bpp;
191
        int pitch;
192
        int bytesperpixel;
193
        int compression;
194
        int palsize;
195
        MWPALENTRY palette[256];
196
} MWIMAGEINFO, *PMWIMAGEINFO;
197
 
198
 
199
 
200
 
201
typedef struct {
202
        int width;
203
        int height;
204
        MWCOORD hotx;
205
        MWCOORD hoty;
206
        MWCOLORVAL fgcolor;
207
        MWCOLORVAL bgcolor;
208
        MWIMAGEBITS image[16];
209
        MWIMAGEBITS mask[16];
210
} MWCURSOR, *PMWCURSOR;
211
 
212
typedef struct _mwfont * PMWFONT;
213
# 534 "../include/mwtypes.h"
214
typedef unsigned short MWKEY;
215
typedef unsigned char MWSCANCODE;
216
# 660 "../include/mwtypes.h"
217
typedef struct {
218
        int led;
219
        int led_mode;
220
} MWKBINFO, *PMWKBINFO;
221
# 11 "../include/device.h" 2
222
# 30 "../include/device.h"
223
typedef struct _mwscreendevice *PSD;
224
 
225
 
226
typedef struct {
227
        char * name;
228
        int maxwidth;
229
        int height;
230
        int ascent;
231
        int firstchar;
232
        int size;
233
        MWIMAGEBITS * bits;
234
        unsigned short *offset;
235
        unsigned char * width;
236
} MWCFONT, *PMWCFONT;
237
 
238
 
239
typedef struct {
240
        int encoding;
241
        MWBOOL (*GetFontInfo)(PMWFONT pfont, PMWFONTINFO pfontinfo);
242
        void (*GetTextSize)(PMWFONT pfont, const void *text, int cc,
243
                        MWCOORD *pwidth, MWCOORD *pheight, MWCOORD *pbase);
244
        void (*GetTextBits)(PMWFONT pfont, int ch, MWIMAGEBITS *retmap,
245
                        MWCOORD *pwidth, MWCOORD *pheight, MWCOORD *pbase);
246
        void (*DestroyFont)(PMWFONT pfont);
247
        void (*DrawText)(PMWFONT pfont, PSD psd, MWCOORD x, MWCOORD y,
248
                        const void *str, int count, int flags);
249
        void (*SetFontSize)(PMWFONT pfont, MWCOORD fontsize);
250
        void (*SetFontRotation)(PMWFONT pfont, int tenthdegrees);
251
        void (*SetFontAttr)(PMWFONT pfont, int setflags, int clrflags);
252
} MWFONTPROCS, *PMWFONTPROCS;
253
 
254
 
255
typedef struct _mwfont {
256
        PMWFONTPROCS fontprocs;
257
        MWCOORD fontsize;
258
        int fontrotation;
259
        int fontattr;
260
 
261
} MWFONT;
262
 
263
 
264
 
265
 
266
 
267
typedef struct {
268
        PMWFONTPROCS fontprocs;
269
        MWCOORD fontsize;
270
        int fontrotation;
271
        int fontattr;
272
 
273
        char * name;
274
        PMWCFONT cfont;
275
} MWCOREFONT, *PMWCOREFONT;
276
 
277
 
278
 
279
 
280
typedef struct {
281
        MWCOORD dstx, dsty, dstw, dsth, dst_linelen;
282
        MWCOORD srcx, srcy, src_linelen;
283
        void *pixels, *misc;
284
        MWPIXELVAL bg_color, fg_color;
285
        int gr_usebg;
286
} driver_gc_t;
287
# 104 "../include/device.h"
288
typedef struct {
289
        PSD dstpsd;
290
        MWCOORD dstx, dsty;
291
        MWCOORD dstw, dsth;
292
        MWCOORD srcx, srcy;
293
        MWCOORD srcw, srch;
294
        PSD srcpsd;
295
        unsigned long rop;
296
        PSD alphachan;
297
        MWPIXELVAL fgcolor;
298
        MWPIXELVAL bgcolor;
299
        MWPIXELVAL transcolor;
300
} MWBLITARGS, *PMWBLITARGS;
301
 
302
 
303
 
304
typedef struct {
305
        int (*Init)(PSD psd);
306
        void (*DrawPixel)(PSD psd, MWCOORD x, MWCOORD y, MWPIXELVAL c);
307
        MWPIXELVAL (*ReadPixel)(PSD psd, MWCOORD x, MWCOORD y);
308
        void (*DrawHorzLine)(PSD psd, MWCOORD x1, MWCOORD x2, MWCOORD y,
309
                        MWPIXELVAL c);
310
        void (*DrawVertLine)(PSD psd, MWCOORD x, MWCOORD y1, MWCOORD y2,
311
                        MWPIXELVAL c);
312
        void (*FillRect)(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,
313
                        MWCOORD y2,MWPIXELVAL c);
314
        void (*Blit)(PSD destpsd, MWCOORD destx, MWCOORD desty, MWCOORD w,
315
                        MWCOORD h,PSD srcpsd,MWCOORD srcx,MWCOORD srcy,long op);
316
        void (*DrawArea)(PSD psd, driver_gc_t *gc, int op);
317
        void (*StretchBlit)(PSD destpsd, MWCOORD destx, MWCOORD desty,
318
                        MWCOORD dstw, MWCOORD dsth, PSD srcpsd, MWCOORD srcx,
319
                        MWCOORD srcy, MWCOORD srcw, MWCOORD srch, long op);
320
} SUBDRIVER, *PSUBDRIVER;
321
 
322
 
323
 
324
 
325
 
326
typedef struct _mwscreendevice {
327
        MWCOORD xres;
328
        MWCOORD yres;
329
        MWCOORD xvirtres;
330
        MWCOORD yvirtres;
331
        int planes;
332
        int bpp;
333
        int linelen;
334
 
335
        int size;
336
        long ncolors;
337
        int pixtype;
338
        int flags;
339
        void * addr;
340
 
341
        PSD (*Open)(PSD psd);
342
        void (*Close)(PSD psd);
343
        void (*GetScreenInfo)(PSD psd,PMWSCREENINFO psi);
344
        void (*SetPalette)(PSD psd,int first,int count,MWPALENTRY *pal);
345
        void (*DrawPixel)(PSD psd,MWCOORD x,MWCOORD y,MWPIXELVAL c);
346
        MWPIXELVAL (*ReadPixel)(PSD psd,MWCOORD x,MWCOORD y);
347
        void (*DrawHorzLine)(PSD psd,MWCOORD x1,MWCOORD x2,MWCOORD y,
348
                        MWPIXELVAL c);
349
        void (*DrawVertLine)(PSD psd,MWCOORD x,MWCOORD y1,MWCOORD y2,
350
                        MWPIXELVAL c);
351
        void (*FillRect)(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,MWCOORD y2,
352
                        MWPIXELVAL c);
353
        PMWCOREFONT builtin_fonts;
354
 
355
 
356
 
357
 
358
        void (*Blit)(PSD destpsd,MWCOORD destx,MWCOORD desty,MWCOORD w,
359
                        MWCOORD h,PSD srcpsd,MWCOORD srcx,MWCOORD srcy,long op);
360
        void (*PreSelect)(PSD psd);
361
        void (*DrawArea)(PSD psd, driver_gc_t *gc, int op);
362
        int (*SetIOPermissions)(PSD psd);
363
        PSD (*AllocateMemGC)(PSD psd);
364
        MWBOOL (*MapMemGC)(PSD mempsd,MWCOORD w,MWCOORD h,int planes,int bpp,
365
                        int linelen,int size,void *addr);
366
        void (*FreeMemGC)(PSD mempsd);
367
        void (*StretchBlit)(PSD destpsd,MWCOORD destx,MWCOORD desty,
368
                        MWCOORD destw,MWCOORD desth,PSD srcpsd,MWCOORD srcx,
369
                        MWCOORD srcy,MWCOORD srcw,MWCOORD srch,long op);
370
        void (*SetPortrait)(PSD psd,int portraitmode);
371
        int portrait;
372
        PSUBDRIVER orgsubdriver;
373
} SCREENDEVICE;
374
# 200 "../include/device.h"
375
typedef struct _mousedevice {
376
        int (*Open)(struct _mousedevice *);
377
        void (*Close)(void);
378
        int (*GetButtonInfo)(void);
379
        void (*GetDefaultAccel)(int *pscale,int *pthresh);
380
        int (*Read)(MWCOORD *dx,MWCOORD *dy,MWCOORD *dz,int *bp);
381
        int (*Poll)(void);
382
} MOUSEDEVICE;
383
 
384
 
385
typedef struct _kbddevice {
386
        int (*Open)(struct _kbddevice *pkd);
387
        void (*Close)(void);
388
        void (*GetModifierInfo)(MWKEYMOD *modifiers, MWKEYMOD *curmodifiers);
389
        int (*Read)(MWKEY *buf,MWKEYMOD *modifiers,MWSCANCODE *scancode);
390
        int (*Poll)(void);
391
} KBDDEVICE;
392
 
393
 
394
 
395
 
396
 
397
 
398
 
399
typedef struct {
400
        MWCOORD x;
401
        MWCOORD y;
402
        MWCOORD width;
403
        MWCOORD height;
404
} MWCLIPRECT;
405
# 422 "../include/device.h"
406
PSD GdOpenScreen(void);
407
void GdCloseScreen(PSD psd);
408
int GdSetPortraitMode(PSD psd, int portraitmode);
409
int GdSetMode(int mode);
410
MWBOOL GdSetUseBackground(MWBOOL flag);
411
MWPIXELVAL GdSetForeground(MWPIXELVAL fg);
412
MWPIXELVAL GdSetBackground(MWPIXELVAL bg);
413
void GdResetPalette(void);
414
void GdSetPalette(PSD psd,int first, int count, MWPALENTRY *palette);
415
int GdGetPalette(PSD psd,int first, int count, MWPALENTRY *palette);
416
MWPIXELVAL GdFindColor(MWCOLORVAL c);
417
MWPIXELVAL GdFindNearestColor(MWPALENTRY *pal, int size, MWCOLORVAL cr);
418
int GdCaptureScreen(char *path);
419
void GdGetScreenInfo(PSD psd,PMWSCREENINFO psi);
420
void GdPoint(PSD psd,MWCOORD x, MWCOORD y);
421
void GdLine(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,MWCOORD y2,
422
                MWBOOL bDrawLastPoint);
423
void GdRect(PSD psd,MWCOORD x, MWCOORD y, MWCOORD width, MWCOORD height);
424
void GdFillRect(PSD psd,MWCOORD x, MWCOORD y, MWCOORD width, MWCOORD height);
425
void GdBitmap(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
426
                MWIMAGEBITS *imagebits);
427
MWBOOL GdColorInPalette(MWCOLORVAL cr,MWPALENTRY *palette,int palsize);
428
void GdMakePaletteConversionTable(PSD psd,MWPALENTRY *palette,int palsize,
429
                MWPIXELVAL *convtable,int fLoadType);
430
void GdDrawImage(PSD psd,MWCOORD x, MWCOORD y, PMWIMAGEHDR pimage);
431
void GdPoly(PSD psd,int count, MWPOINT *points);
432
void GdFillPoly(PSD psd,int count, MWPOINT *points);
433
void GdReadArea(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
434
                MWPIXELVAL *pixels);
435
void GdArea(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
436
                void *pixels, int pixtype);
437
void GdTranslateArea(MWCOORD width, MWCOORD height, void *in, int inpixtype,
438
                MWCOORD inpitch, void *out, int outpixtype, int outpitch);
439
void GdCopyArea(PSD psd,MWCOORD srcx,MWCOORD srcy,MWCOORD width,
440
                MWCOORD height, MWCOORD destx, MWCOORD desty);
441
void GdBlit(PSD dstpsd, MWCOORD dstx, MWCOORD dsty, MWCOORD width,
442
                MWCOORD height,PSD srcpsd,MWCOORD srcx,MWCOORD srcy,long rop);
443
void GdStretchBlit(PSD dstpsd, MWCOORD dstx, MWCOORD dsty, MWCOORD dstw,
444
                MWCOORD dsth, PSD srcpsd, MWCOORD srcx, MWCOORD srcy,
445
                MWCOORD srcw, MWCOORD srch, long rop);
446
int GdCalcMemGCAlloc(PSD psd, unsigned int width, unsigned int height,
447
                int planes, int bpp, int *size, int *linelen);
448
extern SCREENDEVICE scrdev;
449
 
450
 
451
 
452
void GdArcAngle(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,
453
                MWCOORD angle1, MWCOORD angle2, int type);
454
 
455
void GdArc(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,
456
                MWCOORD ax, MWCOORD ay, MWCOORD bx, MWCOORD by, int type);
457
void GdEllipse(PSD psd,MWCOORD x, MWCOORD y, MWCOORD rx, MWCOORD ry,
458
                MWBOOL fill);
459
 
460
 
461
void GdClearFontList(void);
462
int GdAddFont(char *fndry, char *family, char *fontname, PMWLOGFONT lf,
463
                  unsigned int flags);
464
PMWFONT GdSetFont(PMWFONT pfont);
465
PMWFONT GdCreateFont(PSD psd, const char *name, MWCOORD height,
466
                const PMWLOGFONT plogfont);
467
MWCOORD GdSetFontSize(PMWFONT pfont, MWCOORD fontsize);
468
void GdGetFontList(MWFONTLIST ***list, int *num);
469
void GdFreeFontList(MWFONTLIST ***list, int num);
470
int GdSetFontRotation(PMWFONT pfont, int tenthdegrees);
471
int GdSetFontAttr(PMWFONT pfont, int setflags, int clrflags);
472
void GdDestroyFont(PMWFONT pfont);
473
MWBOOL GdGetFontInfo(PMWFONT pfont, PMWFONTINFO pfontinfo);
474
int GdConvertEncoding(const void *istr, int iflags, int cc, void *ostr,
475
                int oflags);
476
void GdGetTextSize(PMWFONT pfont, const void *str, int cc, MWCOORD *pwidth,
477
                MWCOORD *pheight, MWCOORD *pbase, int flags);
478
int GdGetTextSizeEx(PMWFONT pfont, const void *str, int cc,
479
                int nMaxExtent, int *lpnFit, int *alpDx, MWCOORD *pwidth,
480
                MWCOORD *pheight, MWCOORD *pbase, int flags);
481
void GdText(PSD psd,MWCOORD x,MWCOORD y,const void *str,int count,int flags);
482
 
483
 
484
void GdSetClipRects(PSD psd,int count,MWCLIPRECT *table);
485
MWBOOL GdClipPoint(PSD psd,MWCOORD x,MWCOORD y);
486
int GdClipArea(PSD psd,MWCOORD x1, MWCOORD y1, MWCOORD x2, MWCOORD y2);
487
extern MWCOORD clipminx, clipminy, clipmaxx, clipmaxy;
488
 
489
 
490
void GdSetClipRegion(PSD psd, MWCLIPREGION *reg);
491
 
492
 
493
MWBOOL GdPtInRegion(MWCLIPREGION *rgn, MWCOORD x, MWCOORD y);
494
int GdRectInRegion(MWCLIPREGION *rgn, const MWRECT *rect);
495
MWBOOL GdEqualRegion(MWCLIPREGION *r1, MWCLIPREGION *r2);
496
MWBOOL GdEmptyRegion(MWCLIPREGION *rgn);
497
MWCLIPREGION *GdAllocRegion(void);
498
MWCLIPREGION *GdAllocRectRegion(MWCOORD left,MWCOORD top,MWCOORD right,MWCOORD bottom);
499
MWCLIPREGION *GdAllocRectRegionIndirect(MWRECT *prc);
500
void GdSetRectRegion(MWCLIPREGION *rgn, MWCOORD left, MWCOORD top,
501
                MWCOORD right, MWCOORD bottom);
502
void GdSetRectRegionIndirect(MWCLIPREGION *rgn, MWRECT *prc);
503
void GdDestroyRegion(MWCLIPREGION *rgn);
504
void GdOffsetRegion(MWCLIPREGION *rgn, MWCOORD x, MWCOORD y);
505
int GdGetRegionBox(MWCLIPREGION *rgn, MWRECT *prc);
506
void GdUnionRectWithRegion(const MWRECT *rect, MWCLIPREGION *rgn);
507
void GdSubtractRectFromRegion(const MWRECT *rect, MWCLIPREGION *rgn);
508
void GdCopyRegion(MWCLIPREGION *d, MWCLIPREGION *s);
509
void GdIntersectRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
510
void GdUnionRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
511
void GdSubtractRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
512
void GdXorRegion(MWCLIPREGION *d, MWCLIPREGION *s1, MWCLIPREGION *s2);
513
 
514
 
515
MWCLIPREGION *GdAllocPolygonRegion(MWPOINT *points, int count, int mode);
516
MWCLIPREGION *GdAllocPolyPolygonRegion(MWPOINT *points, int *count,
517
                int nbpolygons, int mode);
518
 
519
 
520
int GdOpenMouse(void);
521
void GdCloseMouse(void);
522
void GdGetButtonInfo(int *buttons);
523
void GdRestrictMouse(MWCOORD newminx,MWCOORD newminy,MWCOORD newmaxx,
524
                MWCOORD newmaxy);
525
void GdSetAccelMouse(int newthresh, int newscale);
526
void GdMoveMouse(MWCOORD newx, MWCOORD newy);
527
int GdReadMouse(MWCOORD *px, MWCOORD *py, int *pb);
528
void GdMoveCursor(MWCOORD x, MWCOORD y);
529
MWBOOL GdGetCursorPos(MWCOORD *px, MWCOORD *py);
530
void GdSetCursor(PMWCURSOR pcursor);
531
int GdShowCursor(PSD psd);
532
int GdHideCursor(PSD psd);
533
void GdCheckCursor(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,MWCOORD y2);
534
void GdFixCursor(PSD psd);
535
extern MOUSEDEVICE mousedev;
536
 
537
 
538
int GdOpenKeyboard(void);
539
void GdCloseKeyboard(void);
540
void GdGetModifierInfo(MWKEYMOD *modifiers, MWKEYMOD *curmodifiers);
541
int GdReadKeyboard(MWKEY *buf, MWKEYMOD *modifiers, MWSCANCODE *scancode);
542
extern KBDDEVICE kbddev;
543
 
544
 
545
 
546
int GdLoadImageFromBuffer(PSD psd, void *buffer, int size, int flags);
547
void GdDrawImageFromBuffer(PSD psd, MWCOORD x, MWCOORD y, MWCOORD width,
548
                 MWCOORD height, void *buffer, int size, int flags);
549
void GdDrawImageFromFile(PSD psd, MWCOORD x, MWCOORD y, MWCOORD width,
550
                MWCOORD height, char *path, int flags);
551
int GdLoadImageFromFile(PSD psd, char *path, int flags);
552
void GdDrawImageToFit(PSD psd, MWCOORD x, MWCOORD y, MWCOORD width,
553
                MWCOORD height, int id);
554
void GdFreeImage(int id);
555
MWBOOL GdGetImageInfo(int id, PMWIMAGEINFO pii);
556
void GdStretchImage(PMWIMAGEHDR src, MWCLIPRECT *srcrect, PMWIMAGEHDR dst,
557
                MWCLIPRECT *dstrect);
558
 
559
 
560
 
561
 
562
 
563
void * GdItemAlloc(unsigned int size);
564
void GdListAdd(PMWLISTHEAD pHead,PMWLIST pItem);
565
void GdListInsert(PMWLISTHEAD pHead,PMWLIST pItem);
566
void GdListRemove(PMWLISTHEAD pHead,PMWLIST pItem);
567
# 591 "../include/device.h"
568
# 1 "/projects/or32-uclinux/include/sys/time.h" 1
569
# 24 "/projects/or32-uclinux/include/sys/time.h"
570
# 1 "/projects/or32-uclinux/include/bits/types.h" 1
571
# 29 "/projects/or32-uclinux/include/bits/types.h"
572
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
573
# 201 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h"
574
typedef unsigned int size_t;
575
# 30 "/projects/or32-uclinux/include/bits/types.h" 2
576
 
577
 
578
typedef unsigned char __u_char;
579
typedef unsigned short __u_short;
580
typedef unsigned int __u_int;
581
typedef unsigned long __u_long;
582
 
583
__extension__ typedef unsigned long long int __u_quad_t;
584
__extension__ typedef long long int __quad_t;
585
# 49 "/projects/or32-uclinux/include/bits/types.h"
586
typedef signed char __int8_t;
587
typedef unsigned char __uint8_t;
588
typedef signed short int __int16_t;
589
typedef unsigned short int __uint16_t;
590
typedef signed int __int32_t;
591
typedef unsigned int __uint32_t;
592
 
593
__extension__ typedef signed long long int __int64_t;
594
__extension__ typedef unsigned long long int __uint64_t;
595
 
596
typedef __quad_t *__qaddr_t;
597
 
598
 
599
 
600
typedef __u_int __dev_t;
601
typedef __u_int __uid_t;
602
typedef __u_int __gid_t;
603
typedef __u_int __ino_t;
604
typedef __u_int __mode_t;
605
typedef __u_short __nlink_t;
606
typedef long int __off_t;
607
typedef __quad_t __loff_t;
608
typedef int __pid_t;
609
typedef int __ssize_t;
610
typedef __u_long __rlim_t;
611
typedef __u_quad_t __rlim64_t;
612
typedef __u_int __id_t;
613
 
614
typedef struct
615
  {
616
    int __val[2];
617
  } __fsid_t;
618
 
619
 
620
typedef int __daddr_t;
621
typedef char *__caddr_t;
622
typedef long int __time_t;
623
typedef unsigned int __useconds_t;
624
typedef long int __suseconds_t;
625
typedef long int __swblk_t;
626
 
627
typedef long int __clock_t;
628
 
629
 
630
typedef int __clockid_t;
631
 
632
 
633
typedef int __timer_t;
634
 
635
 
636
 
637
 
638
 
639
 
640
typedef int __key_t;
641
 
642
 
643
typedef unsigned short int __ipc_pid_t;
644
 
645
 
646
 
647
typedef long int __blksize_t;
648
 
649
 
650
 
651
 
652
typedef long int __blkcnt_t;
653
typedef __quad_t __blkcnt64_t;
654
 
655
 
656
typedef __u_long __fsblkcnt_t;
657
typedef __u_quad_t __fsblkcnt64_t;
658
 
659
 
660
typedef __u_long __fsfilcnt_t;
661
typedef __u_quad_t __fsfilcnt64_t;
662
 
663
 
664
typedef __u_quad_t __ino64_t;
665
 
666
 
667
typedef __loff_t __off64_t;
668
 
669
 
670
typedef long int __t_scalar_t;
671
typedef unsigned long int __t_uscalar_t;
672
 
673
 
674
typedef int __intptr_t;
675
 
676
 
677
typedef unsigned int __socklen_t;
678
 
679
 
680
 
681
 
682
# 1 "/projects/or32-uclinux/include/bits/pthreadtypes.h" 1
683
# 23 "/projects/or32-uclinux/include/bits/pthreadtypes.h"
684
# 1 "/projects/or32-uclinux/include/bits/sched.h" 1
685
# 68 "/projects/or32-uclinux/include/bits/sched.h"
686
struct __sched_param
687
  {
688
    int __sched_priority;
689
  };
690
# 24 "/projects/or32-uclinux/include/bits/pthreadtypes.h" 2
691
 
692
 
693
struct _pthread_fastlock
694
{
695
  long int __status;
696
  int __spinlock;
697
 
698
};
699
 
700
 
701
 
702
typedef struct _pthread_descr_struct *_pthread_descr;
703
 
704
 
705
 
706
 
707
 
708
typedef struct __pthread_attr_s
709
{
710
  int __detachstate;
711
  int __schedpolicy;
712
  struct __sched_param __schedparam;
713
  int __inheritsched;
714
  int __scope;
715
  size_t __guardsize;
716
  int __stackaddr_set;
717
  void *__stackaddr;
718
  size_t __stacksize;
719
} pthread_attr_t;
720
 
721
 
722
 
723
typedef struct
724
{
725
  struct _pthread_fastlock __c_lock;
726
  _pthread_descr __c_waiting;
727
} pthread_cond_t;
728
 
729
 
730
 
731
typedef struct
732
{
733
  int __dummy;
734
} pthread_condattr_t;
735
 
736
 
737
typedef unsigned int pthread_key_t;
738
 
739
 
740
 
741
 
742
 
743
typedef struct
744
{
745
  int __m_reserved;
746
  int __m_count;
747
  _pthread_descr __m_owner;
748
  int __m_kind;
749
  struct _pthread_fastlock __m_lock;
750
} pthread_mutex_t;
751
 
752
 
753
 
754
typedef struct
755
{
756
  int __mutexkind;
757
} pthread_mutexattr_t;
758
 
759
 
760
 
761
typedef int pthread_once_t;
762
# 140 "/projects/or32-uclinux/include/bits/pthreadtypes.h"
763
typedef unsigned long int pthread_t;
764
# 146 "/projects/or32-uclinux/include/bits/types.h" 2
765
# 25 "/projects/or32-uclinux/include/sys/time.h" 2
766
 
767
# 1 "/projects/or32-uclinux/include/time.h" 1
768
# 70 "/projects/or32-uclinux/include/time.h"
769
typedef __time_t time_t;
770
# 27 "/projects/or32-uclinux/include/sys/time.h" 2
771
 
772
# 1 "/projects/or32-uclinux/include/bits/time.h" 1
773
# 63 "/projects/or32-uclinux/include/bits/time.h"
774
struct timeval
775
  {
776
    __time_t tv_sec;
777
    __suseconds_t tv_usec;
778
  };
779
# 29 "/projects/or32-uclinux/include/sys/time.h" 2
780
 
781
# 1 "/projects/or32-uclinux/include/sys/select.h" 1
782
# 31 "/projects/or32-uclinux/include/sys/select.h"
783
# 1 "/projects/or32-uclinux/include/bits/select.h" 1
784
# 32 "/projects/or32-uclinux/include/sys/select.h" 2
785
 
786
 
787
# 1 "/projects/or32-uclinux/include/bits/sigset.h" 1
788
# 23 "/projects/or32-uclinux/include/bits/sigset.h"
789
typedef int __sig_atomic_t;
790
 
791
 
792
 
793
 
794
typedef struct
795
  {
796
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
797
  } __sigset_t;
798
# 35 "/projects/or32-uclinux/include/sys/select.h" 2
799
 
800
 
801
 
802
typedef __sigset_t sigset_t;
803
 
804
 
805
 
806
 
807
# 1 "/projects/or32-uclinux/include/time.h" 1
808
# 106 "/projects/or32-uclinux/include/time.h"
809
struct timespec
810
  {
811
    long int tv_sec;
812
    long int tv_nsec;
813
  };
814
# 44 "/projects/or32-uclinux/include/sys/select.h" 2
815
 
816
# 1 "/projects/or32-uclinux/include/bits/time.h" 1
817
# 46 "/projects/or32-uclinux/include/sys/select.h" 2
818
 
819
 
820
 
821
typedef long int __fd_mask;
822
 
823
 
824
 
825
 
826
 
827
 
828
 
829
typedef struct
830
  {
831
 
832
 
833
 
834
 
835
 
836
 
837
    __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];
838
 
839
 
840
  } fd_set;
841
 
842
 
843
 
844
 
845
 
846
 
847
typedef __fd_mask fd_mask;
848
# 89 "/projects/or32-uclinux/include/sys/select.h"
849
 
850
 
851
 
852
 
853
 
854
 
855
 
856
extern int select (int __nfds, fd_set *__restrict __readfds,
857
                   fd_set *__restrict __writefds,
858
                   fd_set *__restrict __exceptfds,
859
                   struct timeval *__restrict __timeout) ;
860
# 112 "/projects/or32-uclinux/include/sys/select.h"
861
 
862
# 31 "/projects/or32-uclinux/include/sys/time.h" 2
863
 
864
 
865
typedef __suseconds_t suseconds_t;
866
 
867
 
868
 
869
 
870
 
871
# 56 "/projects/or32-uclinux/include/sys/time.h"
872
struct timezone
873
  {
874
    int tz_minuteswest;
875
    int tz_dsttime;
876
  };
877
 
878
typedef struct timezone *__restrict __timezone_ptr_t;
879
# 72 "/projects/or32-uclinux/include/sys/time.h"
880
extern int gettimeofday (struct timeval *__restrict __tv,
881
                         __timezone_ptr_t __tz) ;
882
 
883
 
884
 
885
 
886
extern int settimeofday (__const struct timeval *__tv,
887
                         __const struct timezone *__tz) ;
888
 
889
 
890
 
891
 
892
 
893
extern int adjtime (__const struct timeval *__delta,
894
                    struct timeval *__olddelta) ;
895
 
896
 
897
 
898
 
899
enum __itimer_which
900
  {
901
 
902
    ITIMER_REAL = 0,
903
 
904
 
905
    ITIMER_VIRTUAL = 1,
906
 
907
 
908
 
909
    ITIMER_PROF = 2
910
 
911
  };
912
 
913
 
914
 
915
struct itimerval
916
  {
917
 
918
    struct timeval it_interval;
919
 
920
    struct timeval it_value;
921
  };
922
 
923
 
924
 
925
 
926
 
927
 
928
typedef int __itimer_which_t;
929
 
930
 
931
 
932
 
933
extern int getitimer (__itimer_which_t __which,
934
                      struct itimerval *__value) ;
935
 
936
 
937
 
938
 
939
extern int setitimer (__itimer_which_t __which,
940
                      __const struct itimerval *__restrict __new,
941
                      struct itimerval *__restrict __old) ;
942
 
943
 
944
 
945
extern int utimes (__const char *__file, __const struct timeval __tvp[2])
946
     ;
947
# 171 "/projects/or32-uclinux/include/sys/time.h"
948
 
949
# 592 "../include/device.h" 2
950
 
951
typedef void (*MWTIMERCB)(void *);
952
 
953
 
954
 
955
 
956
typedef struct mw_timer MWTIMER;
957
struct mw_timer {
958
        struct timeval timeout;
959
        MWTIMERCB callback;
960
        void *arg;
961
        MWTIMER *next;
962
        MWTIMER *prev;
963
    int type;
964
    MWTIMEOUT period;
965
};
966
 
967
MWTIMER *GdAddTimer(MWTIMEOUT timeout, MWTIMERCB callback, void *arg);
968
MWTIMER *GdAddPeriodicTimer(MWTIMEOUT timeout, MWTIMERCB callback, void *arg);
969
void GdDestroyTimer(MWTIMER *timer);
970
MWTIMER *GdFindTimer(void *arg);
971
MWBOOL GdGetNextTimeout(struct timeval *tv, MWTIMEOUT timeout);
972
MWBOOL GdTimeout(void);
973
 
974
 
975
 
976
 
977
int GdError(const char *format, ...);
978
int GdErrorNull(const char *format, ...);
979
# 23 "vgaplan4.c" 2
980
# 1 "vgaplan4.h" 1
981
# 23 "vgaplan4.h"
982
# 1 "/projects/or32-uclinux/include/sys/io.h" 1
983
# 24 "/projects/or32-uclinux/include/sys/io.h"
984
 
985
 
986
 
987
 
988
 
989
extern int ioperm (unsigned long int __from, unsigned long int __num,
990
                   int __turn_on) ;
991
 
992
 
993
 
994
 
995
extern int iopl (int __level) ;
996
# 49 "/projects/or32-uclinux/include/sys/io.h"
997
extern unsigned char inb (unsigned long int port) ;
998
extern unsigned short int inw (unsigned long int port) ;
999
extern unsigned long int inl (unsigned long int port) ;
1000
 
1001
extern void outb (unsigned char value, unsigned long int port) ;
1002
extern void outw (unsigned short value, unsigned long int port) ;
1003
extern void outl (unsigned long value, unsigned long int port) ;
1004
 
1005
 
1006
 
1007
# 24 "vgaplan4.h" 2
1008
 
1009
 
1010
 
1011
# 1 "/projects/or32-uclinux/include/unistd.h" 1
1012
# 28 "/projects/or32-uclinux/include/unistd.h"
1013
 
1014
# 175 "/projects/or32-uclinux/include/unistd.h"
1015
# 1 "/projects/or32-uclinux/include/bits/posix_opt.h" 1
1016
# 176 "/projects/or32-uclinux/include/unistd.h" 2
1017
# 193 "/projects/or32-uclinux/include/unistd.h"
1018
typedef __ssize_t ssize_t;
1019
 
1020
 
1021
 
1022
 
1023
 
1024
# 1 "/projects/or32-uclinux/lib/gcc-lib/or32-uclinux/3.1/include/stddef.h" 1
1025
# 200 "/projects/or32-uclinux/include/unistd.h" 2
1026
# 240 "/projects/or32-uclinux/include/unistd.h"
1027
typedef __intptr_t intptr_t;
1028
 
1029
 
1030
 
1031
 
1032
 
1033
 
1034
typedef __socklen_t socklen_t;
1035
# 260 "/projects/or32-uclinux/include/unistd.h"
1036
extern int access (__const char *__name, int __type) ;
1037
# 291 "/projects/or32-uclinux/include/unistd.h"
1038
extern __off_t lseek (int __fd, __off_t __offset, int __whence) ;
1039
# 307 "/projects/or32-uclinux/include/unistd.h"
1040
extern int close (int __fd) ;
1041
 
1042
 
1043
 
1044
extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;
1045
 
1046
 
1047
extern ssize_t write (int __fd, __const void *__buf, size_t __n) ;
1048
# 354 "/projects/or32-uclinux/include/unistd.h"
1049
extern int pipe (int __pipedes[2]) ;
1050
# 363 "/projects/or32-uclinux/include/unistd.h"
1051
extern unsigned int alarm (unsigned int __seconds) ;
1052
# 372 "/projects/or32-uclinux/include/unistd.h"
1053
extern unsigned int sleep (unsigned int __seconds) ;
1054
 
1055
 
1056
 
1057
 
1058
 
1059
 
1060
extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
1061
     ;
1062
 
1063
 
1064
 
1065
extern int usleep (__useconds_t __useconds) ;
1066
 
1067
 
1068
 
1069
 
1070
 
1071
extern int pause (void) ;
1072
 
1073
 
1074
 
1075
extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
1076
     ;
1077
 
1078
 
1079
 
1080
extern int fchown (int __fd, __uid_t __owner, __gid_t __group) ;
1081
 
1082
 
1083
 
1084
 
1085
extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
1086
     ;
1087
 
1088
 
1089
 
1090
 
1091
extern int chdir (__const char *__path) ;
1092
 
1093
 
1094
 
1095
extern int fchdir (int __fd) ;
1096
# 424 "/projects/or32-uclinux/include/unistd.h"
1097
extern char *getcwd (char *__buf, size_t __size) ;
1098
# 438 "/projects/or32-uclinux/include/unistd.h"
1099
extern char *getwd (char *__buf) ;
1100
 
1101
 
1102
 
1103
 
1104
extern int dup (int __fd) ;
1105
 
1106
 
1107
extern int dup2 (int __fd, int __fd2) ;
1108
 
1109
 
1110
extern char **__environ;
1111
 
1112
 
1113
 
1114
 
1115
 
1116
 
1117
 
1118
extern int execve (__const char *__path, char *__const __argv[],
1119
                   char *__const __envp[]) ;
1120
# 470 "/projects/or32-uclinux/include/unistd.h"
1121
extern int execv (__const char *__path, char *__const __argv[]) ;
1122
 
1123
 
1124
 
1125
extern int execle (__const char *__path, __const char *__arg, ...) ;
1126
 
1127
 
1128
 
1129
extern int execl (__const char *__path, __const char *__arg, ...) ;
1130
 
1131
 
1132
 
1133
extern int execvp (__const char *__file, char *__const __argv[]) ;
1134
 
1135
 
1136
 
1137
 
1138
extern int execlp (__const char *__file, __const char *__arg, ...) ;
1139
 
1140
 
1141
 
1142
 
1143
extern int nice (int __inc) ;
1144
 
1145
 
1146
 
1147
 
1148
extern void _exit (int __status) __attribute__ ((__noreturn__));
1149
 
1150
 
1151
 
1152
 
1153
 
1154
# 1 "/projects/or32-uclinux/include/bits/confname.h" 1
1155
# 25 "/projects/or32-uclinux/include/bits/confname.h"
1156
enum
1157
  {
1158
    _PC_LINK_MAX,
1159
 
1160
    _PC_MAX_CANON,
1161
 
1162
    _PC_MAX_INPUT,
1163
 
1164
    _PC_NAME_MAX,
1165
 
1166
    _PC_PATH_MAX,
1167
 
1168
    _PC_PIPE_BUF,
1169
 
1170
    _PC_CHOWN_RESTRICTED,
1171
 
1172
    _PC_NO_TRUNC,
1173
 
1174
    _PC_VDISABLE,
1175
 
1176
    _PC_SYNC_IO,
1177
 
1178
    _PC_ASYNC_IO,
1179
 
1180
    _PC_PRIO_IO,
1181
 
1182
    _PC_SOCK_MAXBUF,
1183
 
1184
    _PC_FILESIZEBITS,
1185
 
1186
    _PC_REC_INCR_XFER_SIZE,
1187
 
1188
    _PC_REC_MAX_XFER_SIZE,
1189
 
1190
    _PC_REC_MIN_XFER_SIZE,
1191
 
1192
    _PC_REC_XFER_ALIGN,
1193
 
1194
    _PC_ALLOC_SIZE_MIN,
1195
 
1196
    _PC_SYMLINK_MAX
1197
 
1198
  };
1199
 
1200
 
1201
enum
1202
  {
1203
    _SC_ARG_MAX,
1204
 
1205
    _SC_CHILD_MAX,
1206
 
1207
    _SC_CLK_TCK,
1208
 
1209
    _SC_NGROUPS_MAX,
1210
 
1211
    _SC_OPEN_MAX,
1212
 
1213
    _SC_STREAM_MAX,
1214
 
1215
    _SC_TZNAME_MAX,
1216
 
1217
    _SC_JOB_CONTROL,
1218
 
1219
    _SC_SAVED_IDS,
1220
 
1221
    _SC_REALTIME_SIGNALS,
1222
 
1223
    _SC_PRIORITY_SCHEDULING,
1224
 
1225
    _SC_TIMERS,
1226
 
1227
    _SC_ASYNCHRONOUS_IO,
1228
 
1229
    _SC_PRIORITIZED_IO,
1230
 
1231
    _SC_SYNCHRONIZED_IO,
1232
 
1233
    _SC_FSYNC,
1234
 
1235
    _SC_MAPPED_FILES,
1236
 
1237
    _SC_MEMLOCK,
1238
 
1239
    _SC_MEMLOCK_RANGE,
1240
 
1241
    _SC_MEMORY_PROTECTION,
1242
 
1243
    _SC_MESSAGE_PASSING,
1244
 
1245
    _SC_SEMAPHORES,
1246
 
1247
    _SC_SHARED_MEMORY_OBJECTS,
1248
 
1249
    _SC_AIO_LISTIO_MAX,
1250
 
1251
    _SC_AIO_MAX,
1252
 
1253
    _SC_AIO_PRIO_DELTA_MAX,
1254
 
1255
    _SC_DELAYTIMER_MAX,
1256
 
1257
    _SC_MQ_OPEN_MAX,
1258
 
1259
    _SC_MQ_PRIO_MAX,
1260
 
1261
    _SC_VERSION,
1262
 
1263
    _SC_PAGESIZE,
1264
 
1265
 
1266
    _SC_RTSIG_MAX,
1267
 
1268
    _SC_SEM_NSEMS_MAX,
1269
 
1270
    _SC_SEM_VALUE_MAX,
1271
 
1272
    _SC_SIGQUEUE_MAX,
1273
 
1274
    _SC_TIMER_MAX,
1275
 
1276
 
1277
 
1278
 
1279
    _SC_BC_BASE_MAX,
1280
 
1281
    _SC_BC_DIM_MAX,
1282
 
1283
    _SC_BC_SCALE_MAX,
1284
 
1285
    _SC_BC_STRING_MAX,
1286
 
1287
    _SC_COLL_WEIGHTS_MAX,
1288
 
1289
    _SC_EQUIV_CLASS_MAX,
1290
 
1291
    _SC_EXPR_NEST_MAX,
1292
 
1293
    _SC_LINE_MAX,
1294
 
1295
    _SC_RE_DUP_MAX,
1296
 
1297
    _SC_CHARCLASS_NAME_MAX,
1298
 
1299
 
1300
    _SC_2_VERSION,
1301
 
1302
    _SC_2_C_BIND,
1303
 
1304
    _SC_2_C_DEV,
1305
 
1306
    _SC_2_FORT_DEV,
1307
 
1308
    _SC_2_FORT_RUN,
1309
 
1310
    _SC_2_SW_DEV,
1311
 
1312
    _SC_2_LOCALEDEF,
1313
 
1314
 
1315
    _SC_PII,
1316
 
1317
    _SC_PII_XTI,
1318
 
1319
    _SC_PII_SOCKET,
1320
 
1321
    _SC_PII_INTERNET,
1322
 
1323
    _SC_PII_OSI,
1324
 
1325
    _SC_POLL,
1326
 
1327
    _SC_SELECT,
1328
 
1329
    _SC_UIO_MAXIOV,
1330
 
1331
    _SC_IOV_MAX = _SC_UIO_MAXIOV,
1332
 
1333
    _SC_PII_INTERNET_STREAM,
1334
 
1335
    _SC_PII_INTERNET_DGRAM,
1336
 
1337
    _SC_PII_OSI_COTS,
1338
 
1339
    _SC_PII_OSI_CLTS,
1340
 
1341
    _SC_PII_OSI_M,
1342
 
1343
    _SC_T_IOV_MAX,
1344
 
1345
 
1346
 
1347
    _SC_THREADS,
1348
 
1349
    _SC_THREAD_SAFE_FUNCTIONS,
1350
 
1351
    _SC_GETGR_R_SIZE_MAX,
1352
 
1353
    _SC_GETPW_R_SIZE_MAX,
1354
 
1355
    _SC_LOGIN_NAME_MAX,
1356
 
1357
    _SC_TTY_NAME_MAX,
1358
 
1359
    _SC_THREAD_DESTRUCTOR_ITERATIONS,
1360
 
1361
    _SC_THREAD_KEYS_MAX,
1362
 
1363
    _SC_THREAD_STACK_MIN,
1364
 
1365
    _SC_THREAD_THREADS_MAX,
1366
 
1367
    _SC_THREAD_ATTR_STACKADDR,
1368
 
1369
    _SC_THREAD_ATTR_STACKSIZE,
1370
 
1371
    _SC_THREAD_PRIORITY_SCHEDULING,
1372
 
1373
    _SC_THREAD_PRIO_INHERIT,
1374
 
1375
    _SC_THREAD_PRIO_PROTECT,
1376
 
1377
    _SC_THREAD_PROCESS_SHARED,
1378
 
1379
 
1380
    _SC_NPROCESSORS_CONF,
1381
 
1382
    _SC_NPROCESSORS_ONLN,
1383
 
1384
    _SC_PHYS_PAGES,
1385
 
1386
    _SC_AVPHYS_PAGES,
1387
 
1388
    _SC_ATEXIT_MAX,
1389
 
1390
    _SC_PASS_MAX,
1391
 
1392
 
1393
    _SC_XOPEN_VERSION,
1394
 
1395
    _SC_XOPEN_XCU_VERSION,
1396
 
1397
    _SC_XOPEN_UNIX,
1398
 
1399
    _SC_XOPEN_CRYPT,
1400
 
1401
    _SC_XOPEN_ENH_I18N,
1402
 
1403
    _SC_XOPEN_SHM,
1404
 
1405
 
1406
    _SC_2_CHAR_TERM,
1407
 
1408
    _SC_2_C_VERSION,
1409
 
1410
    _SC_2_UPE,
1411
 
1412
 
1413
    _SC_XOPEN_XPG2,
1414
 
1415
    _SC_XOPEN_XPG3,
1416
 
1417
    _SC_XOPEN_XPG4,
1418
 
1419
 
1420
    _SC_CHAR_BIT,
1421
 
1422
    _SC_CHAR_MAX,
1423
 
1424
    _SC_CHAR_MIN,
1425
 
1426
    _SC_INT_MAX,
1427
 
1428
    _SC_INT_MIN,
1429
 
1430
    _SC_LONG_BIT,
1431
 
1432
    _SC_WORD_BIT,
1433
 
1434
    _SC_MB_LEN_MAX,
1435
 
1436
    _SC_NZERO,
1437
 
1438
    _SC_SSIZE_MAX,
1439
 
1440
    _SC_SCHAR_MAX,
1441
 
1442
    _SC_SCHAR_MIN,
1443
 
1444
    _SC_SHRT_MAX,
1445
 
1446
    _SC_SHRT_MIN,
1447
 
1448
    _SC_UCHAR_MAX,
1449
 
1450
    _SC_UINT_MAX,
1451
 
1452
    _SC_ULONG_MAX,
1453
 
1454
    _SC_USHRT_MAX,
1455
 
1456
 
1457
    _SC_NL_ARGMAX,
1458
 
1459
    _SC_NL_LANGMAX,
1460
 
1461
    _SC_NL_MSGMAX,
1462
 
1463
    _SC_NL_NMAX,
1464
 
1465
    _SC_NL_SETMAX,
1466
 
1467
    _SC_NL_TEXTMAX,
1468
 
1469
 
1470
    _SC_XBS5_ILP32_OFF32,
1471
 
1472
    _SC_XBS5_ILP32_OFFBIG,
1473
 
1474
    _SC_XBS5_LP64_OFF64,
1475
 
1476
    _SC_XBS5_LPBIG_OFFBIG,
1477
 
1478
 
1479
    _SC_XOPEN_LEGACY,
1480
 
1481
    _SC_XOPEN_REALTIME,
1482
 
1483
    _SC_XOPEN_REALTIME_THREADS,
1484
 
1485
 
1486
    _SC_ADVISORY_INFO,
1487
 
1488
    _SC_BARRIERS,
1489
 
1490
    _SC_BASE,
1491
 
1492
    _SC_C_LANG_SUPPORT,
1493
 
1494
    _SC_C_LANG_SUPPORT_R,
1495
 
1496
    _SC_CLOCK_SELECTION,
1497
 
1498
    _SC_CPUTIME,
1499
 
1500
    _SC_THREAD_CPUTIME,
1501
 
1502
    _SC_DEVICE_IO,
1503
 
1504
    _SC_DEVICE_SPECIFIC,
1505
 
1506
    _SC_DEVICE_SPECIFIC_R,
1507
 
1508
    _SC_FD_MGMT,
1509
 
1510
    _SC_FIFO,
1511
 
1512
    _SC_PIPE,
1513
 
1514
    _SC_FILE_ATTRIBUTES,
1515
 
1516
    _SC_FILE_LOCKING,
1517
 
1518
    _SC_FILE_SYSTEM,
1519
 
1520
    _SC_MONOTONIC_CLOCK,
1521
 
1522
    _SC_MULTI_PROCESS,
1523
 
1524
    _SC_SINGLE_PROCESS,
1525
 
1526
    _SC_NETWORKING,
1527
 
1528
    _SC_READER_WRITER_LOCKS,
1529
 
1530
    _SC_SPIN_LOCKS,
1531
 
1532
    _SC_REGEXP,
1533
 
1534
    _SC_REGEX_VERSION,
1535
 
1536
    _SC_SHELL,
1537
 
1538
    _SC_SIGNALS,
1539
 
1540
    _SC_SPAWN,
1541
 
1542
    _SC_SPORADIC_SERVER,
1543
 
1544
    _SC_THREAD_SPORADIC_SERVER,
1545
 
1546
    _SC_SYSTEM_DATABASE,
1547
 
1548
    _SC_SYSTEM_DATABASE_R,
1549
 
1550
    _SC_TIMEOUTS,
1551
 
1552
    _SC_TYPED_MEMORY_OBJECTS,
1553
 
1554
    _SC_USER_GROUPS,
1555
 
1556
    _SC_USER_GROUPS_R,
1557
 
1558
    _SC_2_PBS,
1559
 
1560
    _SC_2_PBS_ACCOUNTING,
1561
 
1562
    _SC_2_PBS_LOCATE,
1563
 
1564
    _SC_2_PBS_MESSAGE,
1565
 
1566
    _SC_2_PBS_TRACK,
1567
 
1568
    _SC_SYMLOOP_MAX,
1569
 
1570
    _SC_STREAMS,
1571
 
1572
    _SC_2_PBS_CHECKPOINT,
1573
 
1574
 
1575
    _SC_V6_ILP32_OFF32,
1576
 
1577
    _SC_V6_ILP32_OFFBIG,
1578
 
1579
    _SC_V6_LP64_OFF64,
1580
 
1581
    _SC_V6_LPBIG_OFFBIG,
1582
 
1583
 
1584
    _SC_HOST_NAME_MAX,
1585
 
1586
    _SC_TRACE,
1587
 
1588
    _SC_TRACE_EVENT_FILTER,
1589
 
1590
    _SC_TRACE_INHERIT,
1591
 
1592
    _SC_TRACE_LOG
1593
 
1594
  };
1595
 
1596
 
1597
 
1598
 
1599
 
1600
enum
1601
  {
1602
    _CS_PATH,
1603
# 563 "/projects/or32-uclinux/include/bits/confname.h"
1604
    _CS_V6_WIDTH_RESTRICTED_ENVS
1605
 
1606
  };
1607
# 504 "/projects/or32-uclinux/include/unistd.h" 2
1608
 
1609
 
1610
extern long int pathconf (__const char *__path, int __name) ;
1611
 
1612
 
1613
extern long int fpathconf (int __fd, int __name) ;
1614
 
1615
 
1616
extern long int sysconf (int __name) __attribute__ ((__const__));
1617
 
1618
 
1619
 
1620
extern size_t confstr (int __name, char *__buf, size_t __len) ;
1621
 
1622
 
1623
 
1624
 
1625
extern __pid_t getpid (void) ;
1626
 
1627
 
1628
extern __pid_t getppid (void) ;
1629
 
1630
 
1631
 
1632
 
1633
extern __pid_t getpgrp (void) ;
1634
# 539 "/projects/or32-uclinux/include/unistd.h"
1635
extern __pid_t __getpgid (__pid_t __pid) ;
1636
# 548 "/projects/or32-uclinux/include/unistd.h"
1637
extern int setpgid (__pid_t __pid, __pid_t __pgid) ;
1638
# 565 "/projects/or32-uclinux/include/unistd.h"
1639
extern int setpgrp (void) ;
1640
# 583 "/projects/or32-uclinux/include/unistd.h"
1641
extern __pid_t setsid (void) ;
1642
 
1643
 
1644
 
1645
 
1646
 
1647
 
1648
 
1649
extern __uid_t getuid (void) ;
1650
 
1651
 
1652
extern __uid_t geteuid (void) ;
1653
 
1654
 
1655
extern __gid_t getgid (void) ;
1656
 
1657
 
1658
extern __gid_t getegid (void) ;
1659
 
1660
 
1661
 
1662
 
1663
extern int getgroups (int __size, __gid_t __list[]) ;
1664
# 617 "/projects/or32-uclinux/include/unistd.h"
1665
extern int setuid (__uid_t __uid) ;
1666
 
1667
 
1668
 
1669
 
1670
extern int setreuid (__uid_t __ruid, __uid_t __euid) ;
1671
 
1672
 
1673
 
1674
 
1675
extern int seteuid (__uid_t __uid) ;
1676
 
1677
 
1678
 
1679
 
1680
 
1681
 
1682
extern int setgid (__gid_t __gid) ;
1683
 
1684
 
1685
 
1686
 
1687
extern int setregid (__gid_t __rgid, __gid_t __egid) ;
1688
 
1689
 
1690
 
1691
 
1692
extern int setegid (__gid_t __gid) ;
1693
 
1694
 
1695
 
1696
 
1697
 
1698
 
1699
extern __pid_t fork (void) ;
1700
 
1701
 
1702
 
1703
 
1704
 
1705
 
1706
extern __pid_t vfork (void) ;
1707
 
1708
 
1709
 
1710
 
1711
 
1712
extern char *ttyname (int __fd) ;
1713
 
1714
 
1715
 
1716
extern int ttyname_r (int __fd, char *__buf, size_t __buflen) ;
1717
 
1718
 
1719
 
1720
extern int isatty (int __fd) ;
1721
 
1722
 
1723
 
1724
 
1725
 
1726
extern int ttyslot (void) ;
1727
 
1728
 
1729
 
1730
 
1731
extern int link (__const char *__from, __const char *__to) ;
1732
 
1733
 
1734
 
1735
extern int symlink (__const char *__from, __const char *__to) ;
1736
 
1737
 
1738
 
1739
 
1740
extern int readlink (__const char *__restrict __path, char *__restrict __buf,
1741
                     size_t __len) ;
1742
 
1743
 
1744
 
1745
extern int unlink (__const char *__name) ;
1746
 
1747
 
1748
extern int rmdir (__const char *__path) ;
1749
 
1750
 
1751
 
1752
extern __pid_t tcgetpgrp (int __fd) ;
1753
 
1754
 
1755
extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) ;
1756
 
1757
 
1758
 
1759
extern char *getlogin (void) ;
1760
# 721 "/projects/or32-uclinux/include/unistd.h"
1761
extern int setlogin (__const char *__name) ;
1762
# 730 "/projects/or32-uclinux/include/unistd.h"
1763
# 1 "/projects/or32-uclinux/include/getopt.h" 1
1764
# 47 "/projects/or32-uclinux/include/getopt.h"
1765
extern char *optarg;
1766
# 61 "/projects/or32-uclinux/include/getopt.h"
1767
extern int optind;
1768
 
1769
 
1770
 
1771
 
1772
extern int opterr;
1773
 
1774
 
1775
 
1776
extern int optopt;
1777
# 145 "/projects/or32-uclinux/include/getopt.h"
1778
extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
1779
# 731 "/projects/or32-uclinux/include/unistd.h" 2
1780
 
1781
 
1782
 
1783
 
1784
 
1785
 
1786
 
1787
extern int gethostname (char *__name, size_t __len) ;
1788
 
1789
 
1790
 
1791
 
1792
 
1793
 
1794
extern int sethostname (__const char *__name, size_t __len) ;
1795
 
1796
 
1797
 
1798
extern int sethostid (long int __id) ;
1799
 
1800
 
1801
 
1802
 
1803
 
1804
extern int getdomainname (char *__name, size_t __len) ;
1805
extern int setdomainname (__const char *__name, size_t __len) ;
1806
 
1807
 
1808
 
1809
 
1810
 
1811
extern int vhangup (void) ;
1812
 
1813
 
1814
extern int revoke (__const char *__file) ;
1815
 
1816
 
1817
 
1818
 
1819
 
1820
 
1821
 
1822
extern int profil (unsigned short int *__sample_buffer, size_t __size,
1823
                   size_t __offset, unsigned int __scale) ;
1824
 
1825
 
1826
 
1827
 
1828
 
1829
extern int acct (__const char *__name) ;
1830
 
1831
 
1832
 
1833
extern char *getusershell (void) ;
1834
extern void endusershell (void) ;
1835
extern void setusershell (void) ;
1836
 
1837
 
1838
 
1839
 
1840
 
1841
extern int daemon (int __nochdir, int __noclose) ;
1842
 
1843
 
1844
 
1845
 
1846
 
1847
 
1848
extern int chroot (__const char *__path) ;
1849
 
1850
 
1851
 
1852
extern char *getpass (__const char *__prompt) ;
1853
 
1854
 
1855
 
1856
 
1857
 
1858
extern int fsync (int __fd) ;
1859
 
1860
 
1861
 
1862
 
1863
 
1864
 
1865
extern long int gethostid (void) ;
1866
 
1867
 
1868
extern void sync (void) ;
1869
 
1870
 
1871
 
1872
 
1873
extern int getpagesize (void) __attribute__ ((__const__));
1874
 
1875
 
1876
 
1877
 
1878
extern int truncate (__const char *__file, __off_t __length) ;
1879
# 845 "/projects/or32-uclinux/include/unistd.h"
1880
extern int ftruncate (int __fd, __off_t __length) ;
1881
# 861 "/projects/or32-uclinux/include/unistd.h"
1882
extern int getdtablesize (void) ;
1883
# 870 "/projects/or32-uclinux/include/unistd.h"
1884
extern int brk (void *__addr) ;
1885
 
1886
 
1887
 
1888
 
1889
 
1890
extern void *sbrk (intptr_t __delta) ;
1891
# 891 "/projects/or32-uclinux/include/unistd.h"
1892
extern long int syscall (long int __sysno, ...) ;
1893
# 911 "/projects/or32-uclinux/include/unistd.h"
1894
extern int lockf (int __fd, int __cmd, __off_t __len) ;
1895
# 942 "/projects/or32-uclinux/include/unistd.h"
1896
extern int fdatasync (int __fildes) ;
1897
# 987 "/projects/or32-uclinux/include/unistd.h"
1898
extern int pthread_atfork (void (*__prepare) (void),
1899
                           void (*__parent) (void),
1900
                           void (*__child) (void)) ;
1901
 
1902
 
1903
 
1904
# 28 "vgaplan4.h" 2
1905
# 59 "vgaplan4.h"
1906
typedef volatile unsigned char * FARADDR;
1907
# 122 "vgaplan4.h"
1908
FARADDR int10(int ax,int bx);
1909
 
1910
 
1911
 
1912
 
1913
int ega_init(PSD psd);
1914
void ega_drawpixel(PSD psd,unsigned int x,unsigned int y,
1915
                        MWPIXELVAL c);
1916
MWPIXELVAL ega_readpixel(PSD psd,unsigned int x,unsigned int y);
1917
void ega_drawhorzline(PSD psd,unsigned int x1,unsigned int x2,
1918
                        unsigned int y,MWPIXELVAL c);
1919
void ega_drawvertline(PSD psd,unsigned int x,unsigned int y1,
1920
                        unsigned int y2, MWPIXELVAL c);
1921
 
1922
 
1923
void ega_blit(PSD dstpsd, MWCOORD dstx, MWCOORD dsty, MWCOORD w,
1924
                        MWCOORD h,PSD srcpsd,MWCOORD srcx,MWCOORD srcy,long op);
1925
 
1926
 
1927
 
1928
void ega_hwinit(void);
1929
void ega_hwterm(void);
1930
# 24 "vgaplan4.c" 2
1931
# 1 "fb.h" 1
1932
# 9 "fb.h"
1933
extern volatile int mwdrawing;
1934
 
1935
 
1936
 
1937
 
1938
 
1939
 
1940
 
1941
typedef unsigned char * ADDR8;
1942
typedef unsigned short * ADDR16;
1943
typedef unsigned long * ADDR32;
1944
# 137 "fb.h"
1945
extern int gr_mode;
1946
 
1947
 
1948
 
1949
void ioctl_getpalette(int start, int len, short *red, short *green,short *blue);
1950
void ioctl_setpalette(int start, int len, short *red, short *green,short *blue);
1951
 
1952
 
1953
void gen_fillrect(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,MWCOORD y2,
1954
                MWPIXELVAL c);
1955
MWBOOL set_subdriver(PSD psd, PSUBDRIVER subdriver, MWBOOL init);
1956
void get_subdriver(PSD psd, PSUBDRIVER subdriver);
1957
 
1958
 
1959
PSUBDRIVER select_fb_subdriver(PSD psd);
1960
# 25 "vgaplan4.c" 2
1961
# 37 "vgaplan4.c"
1962
static unsigned char mode_table[15 + 1] = {
1963
  0x00, 0x18, 0x10, 0x08,
1964
  0x00, 0x00, 0x00, 0x00,
1965
  0x00, 0x00, 0x00, 0x00,
1966
  0x00, 0x00, 0x00, 0x00,
1967
};
1968
 
1969
 
1970
static unsigned char mask[8] = {
1971
        0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01
1972
};
1973
 
1974
 
1975
static int
1976
fbvga_setiopermissions(PSD psd)
1977
{
1978
 
1979
        return ioperm(0x3c0, 0x20, 1);
1980
}
1981
 
1982
 
1983
 
1984
int
1985
ega_init(PSD psd)
1986
{
1987
 
1988
        if(fbvga_setiopermissions(psd) == -1) {
1989
                GdError("Can't set i/o permissions: %m\n");
1990
                return 0;
1991
        }
1992
# 76 "vgaplan4.c"
1993
        psd->SetIOPermissions = fbvga_setiopermissions;
1994
# 89 "vgaplan4.c"
1995
        psd->size = 0x10000;
1996
 
1997
        { outw (1|((0x0f)<<8), 0x3ce); };
1998
        { outw (3|((0)<<8), 0x3ce); };
1999
        { outw (5|((0)<<8), 0x3ce); };
2000
        return 1;
2001
}
2002
 
2003
 
2004
void
2005
ega_drawpixel(PSD psd,unsigned int x, unsigned int y, MWPIXELVAL c)
2006
{
2007
        ((void) ((x >= 0 && x < psd->xres) || (__assert ("x >= 0 && x < psd->xres", "vgaplan4.c", 101, __PRETTY_FUNCTION__), 0)));
2008
        ((void) ((y >= 0 && y < psd->yres) || (__assert ("y >= 0 && y < psd->yres", "vgaplan4.c", 102, __PRETTY_FUNCTION__), 0)));
2009
        ((void) ((c < psd->ncolors) || (__assert ("c < psd->ncolors", "vgaplan4.c", 103, __PRETTY_FUNCTION__), 0)));
2010
 
2011
        ++mwdrawing;
2012
        { outw (3|((mode_table[gr_mode])<<8), 0x3ce); };
2013
        { outw ((c)<<8, 0x3ce); };
2014
        { outw (8|((mask[x&7])<<8), 0x3ce); };
2015
        ((*(FARADDR)((FARADDR)((char *)psd->addr) + (x>>3) + y * (psd->linelen))) |= 1);
2016
        --mwdrawing;
2017
}
2018
 
2019
 
2020
MWPIXELVAL
2021
ega_readpixel(PSD psd,unsigned int x,unsigned int y)
2022
{
2023
        FARADDR src;
2024
        int plane;
2025
        MWPIXELVAL c = 0;
2026
 
2027
        ((void) ((x >= 0 && x < psd->xres) || (__assert ("x >= 0 && x < psd->xres", "vgaplan4.c", 121, __PRETTY_FUNCTION__), 0)));
2028
        ((void) ((y >= 0 && y < psd->yres) || (__assert ("y >= 0 && y < psd->yres", "vgaplan4.c", 122, __PRETTY_FUNCTION__), 0)));
2029
 
2030
        ++mwdrawing;
2031
 
2032
 
2033
 
2034
        src = ((char *)psd->addr) + (x>>3) + y * (psd->linelen);
2035
 
2036
        for(plane=0; plane<4; ++plane) {
2037
                { outw (4|((plane)<<8), 0x3ce); };
2038
                if((*(FARADDR)(src)) & mask[x&7])
2039
                        c |= 1 << plane;
2040
        }
2041
        --mwdrawing;
2042
        return c;
2043
}
2044
 
2045
 
2046
void
2047
ega_drawhorzline(PSD psd, unsigned int x1, unsigned int x2, unsigned int y,
2048
        MWPIXELVAL c)
2049
{
2050
        FARADDR dst, last;
2051
 
2052
        ((void) ((x1 >= 0 && x1 < psd->xres) || (__assert ("x1 >= 0 && x1 < psd->xres", "vgaplan4.c", 146, __PRETTY_FUNCTION__), 0)));
2053
        ((void) ((x2 >= 0 && x2 < psd->xres) || (__assert ("x2 >= 0 && x2 < psd->xres", "vgaplan4.c", 147, __PRETTY_FUNCTION__), 0)));
2054
        ((void) ((x2 >= x1) || (__assert ("x2 >= x1", "vgaplan4.c", 148, __PRETTY_FUNCTION__), 0)));
2055
        ((void) ((y >= 0 && y < psd->yres) || (__assert ("y >= 0 && y < psd->yres", "vgaplan4.c", 149, __PRETTY_FUNCTION__), 0)));
2056
        ((void) ((c < psd->ncolors) || (__assert ("c < psd->ncolors", "vgaplan4.c", 150, __PRETTY_FUNCTION__), 0)));
2057
 
2058
        ++mwdrawing;
2059
        { outw ((c)<<8, 0x3ce); };
2060
        { outw (3|((mode_table[gr_mode])<<8), 0x3ce); };
2061
 
2062
 
2063
 
2064
 
2065
 
2066
        if(gr_mode == 0) {
2067
 
2068
 
2069
 
2070
                dst = ((char *)psd->addr) + (x1>>3) + y * (psd->linelen);
2071
 
2072
                if ((x1>>3) == (x2>>3)) {
2073
                        { outw (8|(((0xff >> (x1 & 7)) & (0xff << (7 - (x2 & 7))))<<8), 0x3ce); };
2074
                        ((*(FARADDR)(dst)) |= 1);
2075
                } else {
2076
                        { outw (8|((0xff >> (x1 & 7))<<8), 0x3ce); };
2077
                        ((*(FARADDR)(dst++)) |= 1);
2078
 
2079
                        { outb (0xff, 0x3cf); };
2080
 
2081
 
2082
 
2083
                        last = ((char *)psd->addr) + (x2>>3) + y * (psd->linelen);
2084
 
2085
                        while (dst < last)
2086
                                ((*(FARADDR)(dst++)) = (1));
2087
 
2088
                        { outb (0xff << (7 - (x2 & 7)), 0x3cf); };
2089
                        ((*(FARADDR)(dst)) |= 1);
2090
                }
2091
        } else {
2092
 
2093
                { outb (8, 0x3ce); };
2094
                while(x1 <= x2) {
2095
                        { outb (mask[x1&7], 0x3cf); };
2096
                        ((*(FARADDR)((FARADDR)((char *)psd->addr) + (x1++>>3) + y * (psd->linelen))) |= 1);
2097
                }
2098
        }
2099
        --mwdrawing;
2100
}
2101
 
2102
 
2103
void
2104
ega_drawvertline(PSD psd,unsigned int x, unsigned int y1, unsigned int y2,
2105
        MWPIXELVAL c)
2106
{
2107
        FARADDR dst, last;
2108
 
2109
        ((void) ((x >= 0 && x < psd->xres) || (__assert ("x >= 0 && x < psd->xres", "vgaplan4.c", 203, __PRETTY_FUNCTION__), 0)));
2110
        ((void) ((y1 >= 0 && y1 < psd->yres) || (__assert ("y1 >= 0 && y1 < psd->yres", "vgaplan4.c", 204, __PRETTY_FUNCTION__), 0)));
2111
        ((void) ((y2 >= 0 && y2 < psd->yres) || (__assert ("y2 >= 0 && y2 < psd->yres", "vgaplan4.c", 205, __PRETTY_FUNCTION__), 0)));
2112
        ((void) ((y2 >= y1) || (__assert ("y2 >= y1", "vgaplan4.c", 206, __PRETTY_FUNCTION__), 0)));
2113
        ((void) ((c < psd->ncolors) || (__assert ("c < psd->ncolors", "vgaplan4.c", 207, __PRETTY_FUNCTION__), 0)));
2114
 
2115
        ++mwdrawing;
2116
        { outw (3|((mode_table[gr_mode])<<8), 0x3ce); };
2117
        { outw ((c)<<8, 0x3ce); };
2118
        { outw (8|((mask[x&7])<<8), 0x3ce); };
2119
 
2120
 
2121
 
2122
 
2123
        dst = ((char *)psd->addr) + (x>>3) + y1 * (psd->linelen);
2124
        last = ((char *)psd->addr) + (x>>3) + y2 * (psd->linelen);
2125
 
2126
        while (dst <= last) {
2127
                ((*(FARADDR)(dst)) |= 1);
2128
                dst += (psd->linelen);
2129
        }
2130
        --mwdrawing;
2131
}
2132
 
2133
 
2134
SUBDRIVER vgaplan4 = {
2135
        (void *)ega_init,
2136
        (void *)ega_drawpixel,
2137
        (void *)ega_readpixel,
2138
        (void *)ega_drawhorzline,
2139
        (void *)ega_drawvertline,
2140
        (void *)gen_fillrect,
2141
        (void *)ega_blit
2142
};

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.