<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">John<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks for the reporting of this.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Which version of the SAC are you using ?</DIV><DIV>And would you send me an example code of the problem </DIV><DIV>so I can track down the bug.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Cheers,</DIV><DIV>Brian</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On Aug 1, 2007, at  11:53 PM , John D. West wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"> Hi.<BR> <BR> I'm coding in C on Linux, using the sacio.a library.  How can I tell the length of the data section of a sac file?  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:  I have a file with 25000 data points.  Not knowing the size in advance, I size the array as float  fData[10000].  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.  When I read the NPTS header, it is 10000, as is the nlen and max variables.  nerr returns 0, not -803 as documented for "number of points in file is greater than max."  <BR> <BR> This gives me no way I can find to actually determine the size of the data segment.  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><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">sac-help mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:sac-help@iris.washington.edu">sac-help@iris.washington.edu</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.iris.washington.edu/mailman/listinfo/sac-help">http://www.iris.washington.edu/mailman/listinfo/sac-help</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>