Search
lxdream.org :: lxdream/src/util.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/util.c
changeset 481:3b2d6c5a19ad
prev477:9a373f2ff009
next495:4db4702b0778
author nkeynes
date Wed Oct 31 12:05:23 2007 +0000 (14 years ago)
permissions -rw-r--r--
last change Fix miscellaneous warnings
file annotate diff log raw
1.1 --- a/src/util.c Wed Oct 31 09:10:23 2007 +0000
1.2 +++ b/src/util.c Wed Oct 31 12:05:23 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: util.c,v 1.11 2007-10-31 09:10:23 nkeynes Exp $
1.6 + * $Id: util.c,v 1.12 2007-10-31 12:05:23 nkeynes Exp $
1.7 *
1.8 * Miscellaneous utility functions.
1.9 *
1.10 @@ -27,6 +27,7 @@
1.11 #include <png.h>
1.12 #include "dream.h"
1.13 #include "display.h"
1.14 +#include "gui.h"
1.15 #include "sh4/sh4core.h"
1.16
1.17 char *msg_levels[] = { "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" };
1.18 @@ -170,13 +171,13 @@
1.19 }
1.20 png_set_bgr(png_ptr);
1.21 if( buffer->inverted ) {
1.22 - p = buffer->data + (buffer->height*buffer->rowstride) - buffer->rowstride;
1.23 + p = (png_bytep)(buffer->data + (buffer->height*buffer->rowstride) - buffer->rowstride);
1.24 for(i=0; i<buffer->height; i++ ) {
1.25 png_write_row(png_ptr, p);
1.26 p-=buffer->rowstride;
1.27 }
1.28 } else {
1.29 - p = buffer->data;
1.30 + p = (png_bytep)buffer->data;
1.31 for(i=0; i<buffer->height; i++ ) {
1.32 png_write_row(png_ptr, p);
1.33 p+=buffer->rowstride;
1.34 @@ -240,7 +241,7 @@
1.35 buffer->colour_format = COLFMT_RGB888;
1.36 }
1.37
1.38 - p = buffer->data;
1.39 + p = (png_bytep)buffer->data;
1.40 for( i=0; i<height; i++ ) {
1.41 png_read_row(png_ptr, p, NULL );
1.42 p += rowbytes;
1.43 @@ -253,9 +254,7 @@
1.44
1.45 void log_message( void *ptr, int level, const gchar *source, const char *msg, ... )
1.46 {
1.47 - char buf[20], addr[10] = "", *p;
1.48 - const gchar *arr[4] = {buf, source, addr};
1.49 - int posn;
1.50 + char buf[20];
1.51 time_t tm = time(NULL);
1.52 va_list ap;
1.53
.