libdraw: get rid of _drawdebug variable

This commit is contained in:
cinap_lenrek 2017-04-29 21:03:52 +02:00
parent ca2fa9596b
commit d4a6dc8910
3 changed files with 2 additions and 7 deletions

View file

@ -509,7 +509,6 @@ extern Font *font;
extern Image *screen;
extern Screen *_screen;
extern int _cursorfd;
extern int _drawdebug; /* set to 1 to see errors from flushimage */
extern void _setdrawop(Display*, Drawop);
#define BGSHORT(p) ((p)[0]|((p)[1]<<8))

View file

@ -502,7 +502,6 @@ extern Font *font;
extern Image *screen;
extern Screen *_screen;
extern int _cursorfd;
extern int _drawdebug; /* set to 1 to see errors from flushimage */
extern void _setdrawop(Display*, Drawop);
#define BGSHORT(p) ((p)[0]|((p)[1]<<8))

View file

@ -5,7 +5,6 @@
Display *display;
Font *font;
Image *screen;
int _drawdebug = 0;
static char deffontname[] = "*default*";
Screen *_screen;
@ -411,15 +410,13 @@ static
int
doflush(Display *d)
{
int n, nn;
int n;
n = d->bufp-d->buf;
if(n <= 0)
return 1;
if((nn=write(d->fd, d->buf, n)) != n){
if(_drawdebug)
fprint(2, "flushimage fail: d=%p: n=%d nn=%d %r\n", d, n, nn); /**/
if(write(d->fd, d->buf, n) != n){
d->bufp = d->buf; /* might as well; chance of continuing */
return -1;
}