/* * gcov-pull - Request gcov data from server and write it to gcda files * Author: Anton Kuijsten */ #include #include #include #include #include #include #include #include #include #define BUFF_SZ (4 * 1024 * 1024) /* 4MB */ int read_int(void); char *buff_p; /* helper function to read int from the buffer */ int read_int(void) { int res; memcpy(&res, buff_p, sizeof(int)); buff_p += sizeof(int); return res; } int main(int argc, char *argv[]) { FILE *fd = NULL; int server_nr, command, size, result; static char buff[BUFF_SZ]; /* Buffer for all the metadata and file data */ if (argc != 2) { fprintf(stderr, "Usage: %s