SunOS can rot in hell.

This commit is contained in:
rsc 2004-03-26 01:59:35 +00:00
parent 4e3a2cc1f9
commit be22ae2d07
52 changed files with 211 additions and 160 deletions

View file

@ -834,7 +834,7 @@ _drawmsgwrite(Display *d, void *v, int n)
err = "image parameters incompatibile with screen";
goto error;
}
reffn = nil;
reffn = 0;
switch(refresh){
case Refbackup:
break;
@ -985,9 +985,9 @@ _drawmsgwrite(Display *d, void *v, int n)
oy = BGLONG(a+41);
op = drawclientop(client);
/* high bit indicates arc angles are present */
if(ox & (1<<31)){
if((ox & (1<<30)) == 0)
ox &= ~(1<<31);
if(ox & ((ulong)1<<31)){
if((ox & ((ulong)1<<30)) == 0)
ox &= ~((ulong)1<<31);
memarc(dst, p, e0, e1, c, src, sp, ox, oy, op);
}else
memellipse(dst, p, e0, e1, c, src, sp, op);

View file

@ -56,27 +56,27 @@ fillellipseop(Image *dst, Point c, int a, int b, Image *src, Point sp, Drawop op
void
arc(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp, int alpha, int phi)
{
alpha |= 1<<31;
alpha |= ((ulong)1)<<31;
doellipse('e', dst, &c, a, b, thick, src, &sp, alpha, phi, SoverD);
}
void
arcop(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp, int alpha, int phi, Drawop op)
{
alpha |= 1<<31;
alpha |= (ulong)1<<31;
doellipse('e', dst, &c, a, b, thick, src, &sp, alpha, phi, op);
}
void
fillarc(Image *dst, Point c, int a, int b, Image *src, Point sp, int alpha, int phi)
{
alpha |= 1<<31;
alpha |= (ulong)1<<31;
doellipse('E', dst, &c, a, b, 0, src, &sp, alpha, phi, SoverD);
}
void
fillarcop(Image *dst, Point c, int a, int b, Image *src, Point sp, int alpha, int phi, Drawop op)
{
alpha |= 1<<31;
alpha |= (ulong)1<<31;
doellipse('E', dst, &c, a, b, 0, src, &sp, alpha, phi, op);
}

View file

@ -1906,7 +1906,7 @@ boolcopyfn(Memimage *img, Memimage *mask)
default:
assert(0 /* boolcopyfn */);
}
return nil;
return 0;
}
/*

View file

@ -29,7 +29,7 @@ memlsetrefresh(Memimage *i, Refreshfn fn, void *ptr)
return 0;
/* easiest way is just to update the entire save area */
l->refreshfn(i, i->r, l->refreshptr);
l->refreshfn = nil;
l->refreshfn = 0;
l->refreshptr = nil;
return 1;
}

View file

@ -1,6 +1,5 @@
#include <sys/stat.h>
#include <u.h>
#include <sys/stat.h>
#include <libc.h>
#include <draw.h>

View file

@ -1,6 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <memdraw.h>

View file

@ -1,6 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <memdraw.h>

View file

@ -1,6 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <memdraw.h>

View file

@ -1,6 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <cursor.h>

View file

@ -1,6 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <memdraw.h>

View file

@ -1,6 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <memdraw.h>

View file

@ -1,8 +1,8 @@
/*
* Some of the stuff in this file is not X-dependent and should be elsewhere.
*/
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <memdraw.h>
@ -69,7 +69,8 @@ _initdisplay(void (*error)(Display*, char*), char *label)
static Image*
getimage0(Display *d)
{
char *a, info[12*12+1];
char info[12*12+1];
uchar *a;
int n;
Image *image;
@ -323,7 +324,7 @@ xattach(char *label)
name.value = (uchar*)label;
name.encoding = XA_STRING;
name.format = 8;
name.nitems = strlen(name.value);
name.nitems = strlen((char*)name.value);
memset(&normalhint, 0, sizeof normalhint);
normalhint.flags = USSize|PMaxSize;
@ -435,7 +436,7 @@ drawsetlabel(Display *d, char *label)
name.value = (uchar*)label;
name.encoding = XA_STRING;
name.format = 8;
name.nitems = strlen(name.value);
name.nitems = strlen((char*)name.value);
memset(&classhint, 0, sizeof classhint);
classhint.res_name = label;

View file

@ -1,8 +1,7 @@
/* input event and data structure translation */
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <memdraw.h>
@ -318,8 +317,8 @@ _xsetcursor(Cursor *c)
fg = _x.map[0];
bg = _x.map[255];
xsrc = XCreateBitmapFromData(_x.display, _x.drawable, src, 16, 16);
xmask = XCreateBitmapFromData(_x.display, _x.drawable, mask, 16, 16);
xsrc = XCreateBitmapFromData(_x.display, _x.drawable, (char*)src, 16, 16);
xmask = XCreateBitmapFromData(_x.display, _x.drawable, (char*)mask, 16, 16);
xc = XCreatePixmapCursor(_x.display, xsrc, xmask, &fg, &bg, -c->offset.x, -c->offset.y);
if(xc != 0) {
XDefineCursor(_x.display, _x.drawable, xc);
@ -412,14 +411,14 @@ _xgetsnarf(XDisplay *xd)
data = nil;
}else{
if(xdata){
data = strdup((char*)xdata);
data = (uchar*)strdup((char*)xdata);
XFree(xdata);
}else
data = nil;
}
out:
qunlock(&clip.lk);
return data;
return (char*)data;
}
void

View file

@ -1,5 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <thread.h>

View file

@ -1,6 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <memdraw.h>

View file

@ -1,5 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <thread.h>

View file

@ -1,6 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <memdraw.h>

View file

@ -1,6 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <memdraw.h>

View file

@ -1,5 +1,5 @@
#include "x11-inc.h"
#include <u.h>
#include "x11-inc.h"
#include <libc.h>
#include <draw.h>
#include <memdraw.h>