--- /dev/null
+--- hdf-4.2.9/hdf/util/writehdf.c.orig 2013-02-08 05:44:54.000000000 +0100
++++ hdf-4.2.9/hdf/util/writehdf.c 2013-03-02 21:21:51.253874517 +0100
+@@ -75,15 +75,13 @@
+ /*Start HDF file*/
+ file_id = Hopen(HDFName, DFACC_CREATE, 0);
+ if(file_id == -1) {
+- printf("Unable to create HDF file");
+ status = HEvalue(1);
+- printf(HEstring(status));
++ printf("Unable to create HDF file: %s", HEstring(status));
+ exit(0);
+ }
+
+ if ((status = Vstart(file_id)) == -1) {
+- printf("Could not start VGroup interface\n");
+- printf(HEstring(HEvalue(1)));
++ printf("Could not start VGroup interface\n%s", HEstring(HEvalue(1)));
+ exit(-1);
+ }
+
+@@ -98,8 +96,7 @@
+ if (gifHead.PackedField & 0x80) {
+ status = Vsetattr (vgroup_id, "Global Palette" , DFNT_UINT8, 3 * gifHead.TableSize , (VOIDP)gifHead.HDFPalette);
+ if (status) {
+- printf("Could not add global palette.\n");
+- printf(HEstring(HEvalue(1)));
++ printf("Could not add global palette.\n%s", HEstring(HEvalue(1)));
+ }
+ }
+ for (i = 0 ; i < CommentCount ; i++) {
+@@ -143,15 +140,13 @@
+
+ /* GRSetCompress */
+ if ((status = GRsetcompress(ri_id, comp_type, &c_info)) == -1) {
+- printf("Error occured while setting compression\n");
+- printf(HEstring(HEvalue(1)));
++ printf("Error occured while setting compression\n%s", HEstring(HEvalue(1)));
+ exit(-1);
+ }
+
+ /* Write the GR Image */
+ if ((status = GRwriteimage(ri_id, start, NULL, edges, (VOIDP)gifImageDesc.Image)) == -1) {
+- printf("Error occured while trying to write GR image\n");
+- printf(HEstring(HEvalue(1)));
++ printf("Error occured while trying to write GR image\n%s", HEstring(HEvalue(1)));
+ exit(-1);
+ }
+
+@@ -159,8 +154,7 @@
+ pal_id = GRgetlutid (ri_id , 0);
+
+ if ((status = GRwritelut (pal_id , 3, DFNT_UINT8, interlace_mode, 256, (VOIDP)gifImageDesc.HDFPalette)) == -1) {
+- printf("Could not write palette\n");
+- printf(HEstring(HEvalue(1)));
++ printf("Could not write palette\n%s", HEstring(HEvalue(1)));
+ exit(-1);
+ }
+
+@@ -168,8 +162,7 @@
+ gr_ref = GRidtoref(ri_id);
+
+ if ((status = GRendaccess(ri_id)) == -1) {
+- printf("Could not terminate GR access\n");
+- printf(HEstring(HEvalue(1)));
++ printf("Could not terminate GR access\n%s", HEstring(HEvalue(1)));
+ exit(-1);
+ }
+
+@@ -177,8 +170,7 @@
+
+ /* Adding GR to vgroup */
+ if((status = Vaddtagref(vgroup_id,(int32)1965,gr_ref))==-1) {
+- printf("Could not add tag to Vgroup");
+- printf(HEstring(HEvalue(1)));
++ printf("Could not add tag to Vgroup: %s", HEstring(HEvalue(1)));
+ }
+
+
+@@ -186,29 +178,25 @@
+
+ /* Terminate GR access */
+ if ((status = GRend (gr_id))==-1) {
+- printf("Could not end GR access\n");
+- printf(HEstring(HEvalue(1)));
++ printf("Could not end GR access\n%s", HEstring(HEvalue(1)));
+ printf("Trying to continue (file may be corrupt)...\n");
+ }
+
+ /* Terminate access to the VGroup */
+ if ((status = Vdetach(vgroup_id))==-1) {
+- printf("Could not detach Vgroup\n");
+- printf(HEstring(HEvalue(1)));
++ printf("Could not detach Vgroup\n%s", HEstring(HEvalue(1)));
+ printf("Trying to continure (file may be corrupt)...\n");
+ }
+
+ /* Terminate access to the V interface */
+ if ((status = Vend(file_id))==-1) {
+- printf("Could not end VGroup access\n");
+- printf(HEstring(HEvalue(1)));
++ printf("Could not end VGroup access\n%s", HEstring(HEvalue(1)));
+ printf("Trying to continure (file may be corrupt)... \n");
+ }
+
+ /* Close the HDF file */
+ if ((status = Hclose (file_id))==-1) {
+- printf("Could not close HDF file. Fatal Error");
+- printf(HEstring(HEvalue(1)));
++ printf("Could not close HDF file. Fatal Error: %s", HEstring(HEvalue(1)));
+ return(-1);
+ }
+ return(0);
+--- hdf-4.2.9/hdf/util/hdf2gif.c.orig 2013-02-08 05:44:54.000000000 +0100
++++ hdf-4.2.9/hdf/util/hdf2gif.c 2013-03-02 21:23:06.247339787 +0100
+@@ -141,9 +141,8 @@
+ /*Start HDF file*/
+ file_id = Hopen(HDFName, DFACC_READ, 0);
+ if(file_id == -1) {
+- printf("Unable to open HDF file");
+ status = HEvalue(1);
+- printf(HEstring(status));
++ printf("Unable to open HDF file: %s", HEstring(status));
+ exit(0);
+ }
+
+@@ -162,7 +161,7 @@
+
+ if ((status = GRfileinfo(gr_id , &n_images , &n_fileattributes)) == -1) {
+ status = HEvalue(1);
+- printf(HEstring(status));
++ fputs(HEstring(status), stdout);
+ exit(0);
+ }
+