mac warnings
This commit is contained in:
parent
494adeed0b
commit
537f761602
|
@ -1,14 +1,16 @@
|
||||||
# Unix
|
# Unix
|
||||||
|
PTHREAD=
|
||||||
|
#PTHREAD=-pthread
|
||||||
AR=ar
|
AR=ar
|
||||||
AS=as
|
AS=as
|
||||||
CC=gcc -Wall -Wno-missing-braces
|
|
||||||
RANLIB=ranlib
|
RANLIB=ranlib
|
||||||
CFLAGS=-I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -ggdb -D_THREAD_SAFE -pthread # not ready for this yet: -Wall
|
CC=gcc
|
||||||
|
CFLAGS=-Wall -Wno-missing-braces -ggdb -I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -D_THREAD_SAFE $(PTHREAD)
|
||||||
O=o
|
O=o
|
||||||
OS=posix
|
OS=posix
|
||||||
GUI=x11
|
GUI=x11
|
||||||
LDADD=-L/usr/X11R6/lib -lX11 -ggdb
|
LDADD=-L/usr/X11R6/lib -lX11 -ggdb
|
||||||
LDFLAGS=-pthread
|
LDFLAGS=$(PTHREAD)
|
||||||
TARG=drawterm
|
TARG=drawterm
|
||||||
|
|
||||||
all: default
|
all: default
|
||||||
|
|
3
README
3
README
|
@ -27,9 +27,6 @@ On the web at http://cvs.pdos.csail.mit.edu/cvs/drawterm
|
||||||
TO DO:
|
TO DO:
|
||||||
------
|
------
|
||||||
|
|
||||||
- Should clean up the code so that gcc -Wall doesn't print
|
|
||||||
any warnings.
|
|
||||||
|
|
||||||
- Should import latest /dev/draw to allow resize of window
|
- Should import latest /dev/draw to allow resize of window
|
||||||
|
|
||||||
- Should copy 9term code and make console window a real
|
- Should copy 9term code and make console window a real
|
||||||
|
|
|
@ -191,8 +191,8 @@ setcursor(void)
|
||||||
drawqlock();
|
drawqlock();
|
||||||
fg = map[0];
|
fg = map[0];
|
||||||
bg = map[255];
|
bg = map[255];
|
||||||
xsrc = XCreateBitmapFromData(xdisplay, xdrawable, src, 16, 16);
|
xsrc = XCreateBitmapFromData(xdisplay, xdrawable, (char*)src, 16, 16);
|
||||||
xmask = XCreateBitmapFromData(xdisplay, xdrawable, mask, 16, 16);
|
xmask = XCreateBitmapFromData(xdisplay, xdrawable, (char*)mask, 16, 16);
|
||||||
xc = XCreatePixmapCursor(xdisplay, xsrc, xmask, &fg, &bg, -cursor.offset.x, -cursor.offset.y);
|
xc = XCreatePixmapCursor(xdisplay, xsrc, xmask, &fg, &bg, -cursor.offset.x, -cursor.offset.y);
|
||||||
if(xc != 0) {
|
if(xc != 0) {
|
||||||
XDefineCursor(xdisplay, xdrawable, xc);
|
XDefineCursor(xdisplay, xdrawable, xc);
|
||||||
|
@ -403,7 +403,7 @@ xinitscreen(void)
|
||||||
name.value = (uchar*)"drawterm";
|
name.value = (uchar*)"drawterm";
|
||||||
name.encoding = XA_STRING;
|
name.encoding = XA_STRING;
|
||||||
name.format = 8;
|
name.format = 8;
|
||||||
name.nitems = strlen(name.value);
|
name.nitems = strlen((char*)name.value);
|
||||||
normalhints.flags = USSize|PMaxSize;
|
normalhints.flags = USSize|PMaxSize;
|
||||||
normalhints.max_width = Dx(r);
|
normalhints.max_width = Dx(r);
|
||||||
normalhints.max_height = Dy(r);
|
normalhints.max_height = Dy(r);
|
||||||
|
|
|
@ -13,7 +13,7 @@ Queue* kbdq; /* unprocessed console input */
|
||||||
Queue* lineq; /* processed console input */
|
Queue* lineq; /* processed console input */
|
||||||
Queue* serialoq; /* serial console output */
|
Queue* serialoq; /* serial console output */
|
||||||
Queue* kprintoq; /* console output, for /dev/kprint */
|
Queue* kprintoq; /* console output, for /dev/kprint */
|
||||||
ulong kprintinuse; /* test and set whether /dev/kprint is open */
|
long kprintinuse; /* test and set whether /dev/kprint is open */
|
||||||
int iprintscreenputs = 0;
|
int iprintscreenputs = 0;
|
||||||
|
|
||||||
int panicking;
|
int panicking;
|
||||||
|
|
|
@ -585,7 +585,7 @@ fsdirread(Chan *c, uchar *va, int count, ulong offset)
|
||||||
d.length = stbuf.st_size;
|
d.length = stbuf.st_size;
|
||||||
d.type = 'U';
|
d.type = 'U';
|
||||||
d.dev = c->dev;
|
d.dev = c->dev;
|
||||||
n = convD2M(&d, (char*)va+i, count-i);
|
n = convD2M(&d, (uchar*)va+i, count-i);
|
||||||
if(n == BIT16SZ){
|
if(n == BIT16SZ){
|
||||||
strcpy(uif->nextname, de);
|
strcpy(uif->nextname, de);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -72,7 +72,7 @@ so_connect(int fd, unsigned long raddr, unsigned short rport)
|
||||||
void
|
void
|
||||||
so_getsockname(int fd, unsigned long *laddr, unsigned short *lport)
|
so_getsockname(int fd, unsigned long *laddr, unsigned short *lport)
|
||||||
{
|
{
|
||||||
int len;
|
uint len;
|
||||||
struct sockaddr_in sin;
|
struct sockaddr_in sin;
|
||||||
|
|
||||||
len = sizeof(sin);
|
len = sizeof(sin);
|
||||||
|
@ -96,7 +96,8 @@ so_listen(int fd)
|
||||||
int
|
int
|
||||||
so_accept(int fd, unsigned long *raddr, unsigned short *rport)
|
so_accept(int fd, unsigned long *raddr, unsigned short *rport)
|
||||||
{
|
{
|
||||||
int nfd, len;
|
int nfd;
|
||||||
|
uint len;
|
||||||
struct sockaddr_in sin;
|
struct sockaddr_in sin;
|
||||||
|
|
||||||
len = sizeof(sin);
|
len = sizeof(sin);
|
||||||
|
|
|
@ -31,7 +31,7 @@ chantostr(char *buf, ulong cc)
|
||||||
|
|
||||||
/* avoid pulling in ctype when using with drawterm etc. */
|
/* avoid pulling in ctype when using with drawterm etc. */
|
||||||
static int
|
static int
|
||||||
isspace(char c)
|
xisspace(char c)
|
||||||
{
|
{
|
||||||
return c==' ' || c== '\t' || c=='\r' || c=='\n';
|
return c==' ' || c== '\t' || c=='\r' || c=='\n';
|
||||||
}
|
}
|
||||||
|
@ -45,10 +45,10 @@ strtochan(char *s)
|
||||||
|
|
||||||
c = 0;
|
c = 0;
|
||||||
p=s;
|
p=s;
|
||||||
while(*p && isspace(*p))
|
while(*p && xisspace(*p))
|
||||||
p++;
|
p++;
|
||||||
|
|
||||||
while(*p && !isspace(*p)){
|
while(*p && !xisspace(*p)){
|
||||||
if((q = strchr(channames, p[0])) == nil)
|
if((q = strchr(channames, p[0])) == nil)
|
||||||
return 0;
|
return 0;
|
||||||
t = q-channames;
|
t = q-channames;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "os.h"
|
#include <u.h>
|
||||||
|
#include <libc.h>
|
||||||
#include <libsec.h>
|
#include <libsec.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#include "os.h"
|
#include <u.h>
|
||||||
|
#include <libc.h>
|
||||||
|
#include <libsec.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
_sha1block(uchar *p, ulong len, u32int *s)
|
_sha1block(uchar *p, ulong len, u32int *s)
|
||||||
|
|
Loading…
Reference in New Issue