]> Pileus Git - aweather/commitdiff
Misc win32 fixes
authorAndy Spencer <andy753421@gmail.com>
Tue, 24 May 2011 06:11:28 +0000 (06:11 +0000)
committerAndy Spencer <andy753421@gmail.com>
Tue, 24 May 2011 06:11:28 +0000 (06:11 +0000)
data/Makefile.am
src/Makefile.am
src/main.c
src/plugins/Makefile.am
src/plugins/radar.c

index 9a6dd0055f9eabf8c44fdacef1196fdc2f3a39f4..ba5e93e46871f584e942f0179ed4785a933d9684 100644 (file)
@@ -4,8 +4,8 @@ dist_gtkbuilder_DATA = main.ui
 configdir = $(datadir)/aweather/
 dist_config_DATA = defaults.ini
 
-colordir = $(datadir)/aweather/
-dist_color_DATA = colors/
+colordir = $(datadir)/aweather/colors/
+dist_color_DATA = colors/*
 
 if WIN32
 noinst_DATA = aweather.ico
index 9b8803785585c36284ce8c85f3be4e7d05f398f0..ca40656920c4ae030e5d3e3cbd96a490eaad9091 100644 (file)
@@ -23,6 +23,8 @@ wsr88ddec_LDFLAGS     = -mwindows
 
 aweather_SOURCES     += resource.rc
 aweather_LDFLAGS      = -mwindows
+aweather_CPPFLAGS    += -I$(top_srcdir)/lib
+aweather_LDADD       += $(top_srcdir)/lib/libgnu.la
 
 bin_PROGRAMS         += aweather-dbg
 aweather_dbg_SOURCES  = $(aweather_SOURCES)
index a398e7818c038e8161efddde591aafd312fee93b..94cf0c7909df880f7506c0b0d0e721b81a13c570 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#define _XOPEN_SOURCE
+#include <sys/time.h>
 #include <config.h>
 #include <gtk/gtk.h>
 #include <gtk/gtkgl.h>
 #include <glib/gstdio.h>
-#include <time.h>
 
 #include <grits.h>
 
index 9755b8c66cb180e9d0df7661d3c5208c81755814..9fe42ae02e40999b00a58974531a908cb2bf89c8 100644 (file)
@@ -16,11 +16,16 @@ radar_la_SOURCES = \
        ../aweather-location.c \
        ../aweather-location.h
 radar_la_CPPFLAGS = \
-       -DPKGDATADIR="\"$(dots)$(pkgdatadir)\""
+       -DPKGDATADIR="\"$(dots)$(pkgdatadir)\"" \
+       -I$(top_srcdir)/src -I$(top_srcdir)/lib
 radar_la_LIBADD  = $(RSL_LIBS) $(GRITS_LIBS) \
                   $(addprefix $(top_srcdir)/lib/,$(gl_LTLIBOBJS))
 endif
 
+if WIN32
+dots = ..
+endif
+
 test:
        ( cd ../; make test )
 
index 17794e2fdd1a9ed92bddca32b32608fc71aa49ec..1f34fb34ba276330a317341769076dccde8bbb16 100644 (file)
@@ -632,9 +632,14 @@ static void _load_colormap(gchar *filename, AWeatherColormap *cm)
        fgets(cm->name, sizeof(cm->name), file);
        fscanf(file, "%f\n", &cm->scale);
        fscanf(file, "%f\n", &cm->shift);
-       while (fscanf(file, "%hhd %hhd %hhd %hhd\n",
-                       &color[0], &color[1], &color[2], &color[3]) == 4)
+       int r, g, b, a;
+       while (fscanf(file, "%d %d %d %d\n", &r, &g, &b, &a) == 4) {
+               color[0] = r;
+               color[1] = g;
+               color[2] = b;
+               color[3] = a;
                g_array_append_val(array, color);
+       }
        cm->len  = (gint )array->len;
        cm->data = (void*)array->data;
        g_array_free(array, FALSE);