THE code: #include #include #include "hdfi.h" #include "cris.h" #include "level1.h" int main(int argc, char *argv[]) { struct L1CrisEventCycle *pEventCycle; /* testing getEventCycleStruct_c */ uint32 secondsSince1996 = 54605302; int autoFreeMemoryFlag = 1; printf("\ntesting getEventCycleStruct_c\n"); printf("secondsSince1996 = %ld\n", secondsSince1996); pEventCycle = getEventCycleStruct_c(secondsSince1996, autoFreeMemoryFlag); while (pEventCycle->Second1996 != 0) { printf("pEventCycle->Second1996 = %ld\n", pEventCycle->Second1996); pEventCycle++; } return 0; } ------------------------------------------------------------------------ THE run: % setenv L1_CRIS_DATA_BASE_DIRECTORY /home/idunn1/ACEdata/level1/data/cris4 % test testing getEventCycleStruct_c secondsSince1996 = 54605302 pEventCycle->Second1996 = 54605047 [ Note that the time stamp 54605047 for the struct returned is valid between 54605047 and (54605047 + 255 = 54605302). Note what is returned if we increase the requested time by 1 second: % crisTest testing getEventCycleStruct_c secondsSince1996 = 54605303 pEventCycle->Second1996 = 54605303 and by one again: testing getEventCycleStruct_c secondsSince1996 = 54605304 pEventCycle->Second1996 = 54605303 ] ------------------------------------------------------------------------ THE Makefile: # where is your base directory? (ACE_WARE must be defined in your environment.) BASE_DIR = ${ACE_WARE} INCLUDE_DIR = ${BASE_DIR}/include LIBRARY_DIR = ${BASE_DIR}/lib # which compiler are you using? # setenv CC gcc (CC can be defined in your environment.) # CC = gcc (or not.) # code optimization and warnings flags FLAGS = -O2 -Wall # include files needed here are found in these directories: # # include/hdf: declarations for HDF types used throughout ACEware # include/structures: declarations for CRIS/SIS data structs # include/level1: level1 routine declarations INCLUDE_HEADER_DIRS = -I${INCLUDE_DIR}/hdf \ -I${INCLUDE_DIR}/structures \ -I${INCLUDE_DIR}/level1 INCLUDE_LIB_DIRS = -L${LIBRARY_DIR} INCLUDE_LIBRARIES = -llevel1 all: ${CC} ${FLAGS} test.c -o test \ ${INCLUDE_HEADER_DIRS} \ ${INCLUDE_LIB_DIRS} \ ${INCLUDE_LIBRARIES} clean: rm -rf *.o test ------------------------------------------------------------------------ THE make: % make gcc -O2 -Wall test.c -o test \ -I/home/idunn1/ACEware/include/hdf -I/home/idunn1/ACEware/include/structures -I/home/idunn1/ACEware/include/level1 \ -L/home/idunn1/ACEware/lib \ -llevel1 % ------------------------------------------------------------------------