ref: 1062888a6f9f2da0d490d98e0d86555315e3042e
parent: 38d0fc17fb75403524e1ea054a6cf9469b25f816
author: rrt <rrt>
date: Sat Nov 25 18:50:23 EST 2006
Check for shorten-compressed enabled, as effect start returning EOF now causes abort.
--- a/src/sphere.c
+++ b/src/sphere.c
@@ -1,4 +1,8 @@
/*
+ * NIST Sphere file format handler.
+ */
+
+/*
* August 7, 2000
*
* Copyright (C) 2000 Chris Bagwell (cbagwell@sprynet.com)
@@ -5,10 +9,6 @@
*
*/
-/*
- * NIST Sphere file format handler.
- */
-
#include "st_i.h"
#include <math.h>
@@ -168,20 +168,17 @@
sphere->shorten_check[0] = 0;
- /* TODO: Check first four bytes of data to see if its shorten
- * compressed or not. This data will need to be written to
- * buffer during first st_sphereread().
+ /* Check first four bytes of data to see if it's shorten
+ * compressed or not.
*/
-#if 0
st_reads(ft, sphere->shorten_check, 4);
if (!strcmp(sphere->shorten_check,"ajkg"))
{
- st_fail_errno(ft,ST_EFMT,"File uses shorten compression, can not handle this.");
+ st_fail_errno(ft,ST_EFMT,"File uses shorten compression, cannot handle this.");
free(buf);
return(ST_EOF);
}
-#endif
free(buf);
return (ST_SUCCESS);