cleanup
authorAndy Spencer <andy753421@gmail.com>
Mon, 29 Jun 2009 02:47:04 +0000 (02:47 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 29 Jun 2009 02:47:04 +0000 (02:47 +0000)
ChangeLog [new file with mode: 0644]
Makefile.am
TODO
src/data.c
src/wsr88ddec.c

diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..934dcd1
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,9 @@
+See the subversion log for detailed information
+http://lug.rose-hulman.edu/svn/proj-aweather/
+
+v0.1 (2009/06/29):
+  * Initial release
+  * Ridge overlays
+  * Level II radar
+  * Pan/zoom
+  * Offline mode
index c784619..e2baf2f 100644 (file)
@@ -5,3 +5,12 @@ MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.h.in gtk-doc.make
 
 test: all
        (cd src && make test)
+
+post: all dist
+       echo svn cp \
+               https://lug.rose-hulman.edu/svn/proj-aweather/trunk \
+               https://lug.rose-hulman.edu/svn/proj-aweather/tags/$(VERSION)
+       echo $(VERSION) > LATEST
+       scp LATEST plotter-$(VERSION).tar.* \
+               "root@$(SERVER):/home/plotter/htdocs/files"; \
+       echo rm -f LATEST
diff --git a/TODO b/TODO
index ee0770a..1821e46 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,15 +1,12 @@
 Road plan
 ---------
-0.1
-  * Cancel partial downloads when switching radars
-
 0.x - Misc
-  * Configuration file
-    * Default site
-    * Keybindings?
   * Fix all memory leaks
   * Pre-load textures and polys in OpenGL
   * Fetch radar list aysnc
+  * Configuration file
+    * Default site
+    * Keybindings?
 
 0.x - Volume scans
   * Display iso surfaces of volume scans
index c75ef07..9def903 100644 (file)
@@ -71,7 +71,8 @@ void chunk_cb(SoupMessage *message, SoupBuffer *chunk, gpointer _info)
        if (!SOUP_STATUS_IS_SUCCESSFUL(message->status_code))
                return;
 
-       fwrite(chunk->data, chunk->length, 1, info->fp);
+       if (!fwrite(chunk->data, chunk->length, 1, info->fp))
+               g_error("data: chunk_cb - Unable to write data");
        goffset cur   = ftell(info->fp);
        //goffset total = soup_message_headers_get_range(message->response_headers);
        goffset start=0, end=0, total=0;
index 12adaa1..5015272 100644 (file)
@@ -84,8 +84,10 @@ int main(int argc, char **argv)
 
        /* Clear header */
        //debug("reading header\n");
-       fread (buf, 1, 24, input);
-       fwrite(buf, 1, 24, output);
+       if (!fread (buf, 24, 1, input))
+               err(1, "error reading header");
+       if (!fwrite(buf, 24, 1, output))
+               err(1, "error writing header");
 
        //debug("reading body\n");
        while ((st = fread(&size, 1, 4, input))) {
@@ -99,13 +101,15 @@ int main(int argc, char **argv)
                if (size > 20*1024*1024)
                        err(1, "sanity check failed, buf is to big: %d", size);
                buf = realloc(buf, size);
-               fread (buf, 1, size, input);
+               if (!fread(buf, size, 1, input))
+                       err(1, "error reading data");
                //fwrite(buf, 1, size, output); // DEBUG
 
                int dec_len;
                char *dec = bunzip2(buf, size, &dec_len);
                // debug("decompressed %u bytes\n", dec_len);
-               fwrite(dec, 1, dec_len, output);
+               if (!fwrite(dec, 1, dec_len, output))
+                       err(1, "error writing data");
                free(dec);
        }