Lines Matching defs:tmpfd
327 char *ReadLine(FILE *tmpfd, const char *tmpfname);
347 void CleanCppOutput(FILE *tmpfd, const char *tmpfname);
373 FILE *tmpfd = NULL;
395 if ((tmpfd = fopen(tmpMakefile, "w+")) == NULL)
402 (tmpfd = fopen(tmpMakefileName, "w+")) == NULL) {
408 if (fd == -1 || (tmpfd = fdopen(fd, "w+")) == NULL) {
425 cppit(cleanedImakefile, Template, ImakefileC, tmpfd, tmpMakefile);
429 showit(tmpfd);
971 int tmpfd;
972 if ((tmpfd = mkstemp(aout)) == -1) {
976 close(tmpfd);
1820 CleanCppOutput(FILE *tmpfd, const char *tmpfname)
1825 while((input = ReadLine(tmpfd, tmpfname))) {
1843 writetmpfile(tmpfd, input, strlen(input), tmpfname);
1845 writetmpfile(tmpfd, "\n", 1, tmpfname);
1847 fflush(tmpfd);
1854 ftruncate (fileno(tmpfd), (off_t)ftell(tmpfd));
1942 ReadLine(FILE *tmpfd, const char *tmpfname)
1950 FILE *fp = tmpfd;
1958 fseek(tmpfd, 0, SEEK_SET);
1959 if (fstat(fileno(tmpfd), &st) < 0)
1962 total_red = fread(buf, 1, st.st_size, tmpfd);
1967 fseek(tmpfd, 0, SEEK_SET);
1969 tmpfd = freopen(tmpfname, "w+", tmpfd);
1971 if (! tmpfd) /* if failed try again */
1972 tmpfd = freopen(tmpfname, "w+", fp);
1974 if (! tmpfd)
1977 ftruncate(fileno(tmpfd), (off_t) 0);
1980 fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n");