/*************************************************************** * * 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 reads_(char *data, int *error, int *fd) { char header; header = (char) malloc (sizeof(char)); *error = 0; *error = read(*fd,&header,sizeof(char)) == sizeof(char) ? 0 : -1; // printf("%X\n",*data); if (*error) { /* printf ("%d \n", *error); */ free (header); return; } *data = header ; /* printf ("%d \n", *data); */ *error = 0; }