/*************************************************************** * * routine read_ev: routine to extract an event information * from file acquired with Pamela acquisition programs * * June 2002 * ***************************************************************/ /* * include needed system headers */ #include /* include standard i/o library */ #include /* include standard library */ #include /* include string library */ #include /* include unix standard library */ #include /* */ #include /* */ #include /* */ #include /* error simbol definitions */ #include /* system time definitions */ #include /* math library */ void readev_(unsigned long *data, int *error, int *fd) { long header; header = (long) malloc (sizeof(long)); *error = 0; *error = read(*fd,&header,sizeof(long)) == sizeof(long) ? 0 : -1; if (*error) { /* printf ("%d \n", *error); */ free (header); return; } *data = header ; /* printf ("%d \n", *data); */ *error = 0; }