42 struct inclist *file_red,
int recursion,
52 register struct inclist *newfile;
59 if (newfile ==
NULL) {
63 warning(
"%s (reading %s, line %d): ",
67 warning1(
"cannot find include file \"%s\"\n", include);
77 if (strncmp(newfile->
i_file,
"/usr/include/", 13)) {
88 static char *lastfile;
89 static int current_len;
95 len = strlen(ip->
i_file) + 1;
97 if (len > 2 && ip->
i_file[1] ==
':') {
98 if (getenv(
"OSTYPE") && !strcmp(getenv(
"OSTYPE"),
"msys")) {
101 strcpy(ipifile, ip->
i_file);
102 ipifile[1] = ipifile[0];
108 strcpy(ipifile, ip->
i_file);
111 ipifile =
malloc(len + 11);
112 strcpy(ipifile,
"/cygdrive/");
113 ipifile[10] = ip->
i_file[0];
114 strcpy(ipifile + 11, ip->
i_file + 2);
118 }
else ipifile = ip->
i_file;
120 if (current_len + len >
width ||
file != lastfile) {
128 sprintf(buf,
"\n%s: %s", dep,
131 len = current_len = strlen(buf);
134 strcpy(buf + 1, ipifile);
137 if (len > 2 && ip->
i_file[1] ==
':')
143 if (fwrite(buf, len, 1, stdout) != 1)
144 fprintf(stderr,
"pr: fwrite error\n");
166 pr(head,
file, base, dep);
struct inclist * inc_path(char *, char *, boolean)
void warning1(char *,...)
struct filepointer * getfile(char *)
printf("Client 0: bytes recv = %d, bytes sent = %d\n", s0->GetBytesRecv(), s0->GetBytesSent())
struct inclist * inclistp
void add_include(struct filepointer *filep, struct inclist *file, struct inclist *file_red, char *include, boolean dot, boolean failOK)
void freefile(struct filepointer *fp)
void pr(register struct inclist *ip, char *file, char *base, char *dep)
void ROOT_adddep(char *buf, size_t len)
void included_by(struct inclist *ip, struct inclist *newfile)
void recursive_pr_include(register struct inclist *head, register char *file, register char *base, register char *dep)
int find_includes(struct filepointer *filep, struct inclist *file, struct inclist *file_red, int recursion, boolean failOK)