Lines Matching +defs:mode +defs:name
97 FILE *search_path::open_file(const char *name, char **pathp)
99 assert(name != 0);
100 if (IS_ABSOLUTE(name) || *dirs == '\0') {
101 FILE *fp = fopen(name, "r");
104 *pathp = strsave(name);
110 unsigned namelen = strlen(name);
121 strcpy(origpath + (end - p) + need_slash, name);
146 FILE *search_path::open_file_cautious(const char *name, char **pathp,
147 const char *mode)
149 if (!mode)
150 mode = "r";
151 bool reading = (strchr(mode, 'r') != 0);
152 if (name == 0 || strcmp(name, "-") == 0) {
157 if (!reading || IS_ABSOLUTE(name) || *dirs == '\0') {
158 FILE *fp = fopen(name, mode);
161 *pathp = strsave(name);
167 unsigned namelen = strlen(name);
178 strcpy(origpath + (end - p) + need_slash, name);
187 FILE *fp = fopen(path, mode);