[Antelope] trace table record length
Phil Cummins
phil.cummins at gmail.com
Tue May 5 07:36:13 CDT 2009
Hi,
When I use dbhelp to find out the length of records in a trace table, it
says "408". but when I use the program below to get a record and print its
length, the length is only 391. Can anyone tell me why that is? Is it just
missing the last field, dbptr?
- Phil
% ./dbtst
0, record length = 391
dbtst.c:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include "coords.h"
#include "db.h"
#include "stock.h"
#include "tr.h"
Dbptr trloadchan ( Dbptr, double, double, char *, char * );
int main (int argc, char **argv)
{
int i;
Dbptr db,tr;
char rec[512];
dbopen_database ( "smtra_2007", "r+", &db );
tr = trloadchan(db,1189595947.17310,1189599797.07310,"ADK","BHE_00");
tr.record = 0;
i = dbget(tr,rec);
printf("%d, record length = %d\n",i,strlen(rec));
exit(0);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://brtt.net/pipermail/antelope_brtt.net/attachments/20090505/cf37079a/attachment.html>
More information about the Antelope
mailing list