All pastes #721109 Raw Edit

Someone

public c v1 · immutable
#721109 ·published 2007-09-30 23:15 UTC
rendered paste body
int readFile(int fd1, int fd2) {  char inputBuf[R_LEN]; memset(inputBuf, 0, R_LEN);  ssize_t r1;    //Read in Data  while((r1 = read(fd1, inputBuf, R_LEN)) > 0) {    //printf("STRING %s", inputBuf);    char *temp;        allLines[countLines++] = strtok(inputBuf, "\n");        while((temp = strtok(NULL, "\n")) != NULL) {      allLines[countLines++] = temp;    }  }  char inputBuf2[R_LEN]; memset(inputBuf2, 0, R_LEN);  ssize_t r2;    //Read in Data  while((r2 = read(fd2, inputBuf2, R_LEN)) > 0) {        char *temp;        allLines[countLines++] = strtok(inputBuf2, "\n");        while((temp = strtok(NULL, "\n")) != NULL) {      allLines[countLines++] = temp;    }  }}