<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi.<br>
<br>
I'm coding in C on Linux, using the sacio.a library.&nbsp; How can I tell
the length of the data section of a sac file?&nbsp; I thought it was
supposed to be in the NPTS header, but if I try to read with an
undersize array, NPTS returns the array size, not the data size.<br>
<br>
Example:&nbsp; I have a file with 25000 data points.&nbsp; Not knowing the size
in advance, I size the array as float&nbsp; fData[10000].&nbsp; Using the syntax
on the web site to call <font color="#000000"> rsac1( kname, yarray,
&amp;nlen, &amp;beg, &amp;del, &amp;max, &amp;nerr, strlen( kname ) ) ;
I provide fData[10000] as yarray and 10000 as max.&nbsp; When I read the
NPTS header, it is 10000, as is the nlen and max variables.&nbsp; nerr
returns 0, not -803 as documented for "number of points in file is
greater than max."&nbsp; <br>
<br>
This gives me no way I can find to actually determine the size of the
data segment.&nbsp; What am I doing wrong, and/or how do I work around this
problem?<br>
<br>
Thanks!</font>
<pre class="moz-signature" cols="72">     -- John

</pre>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>