Lines Matching defs:file
25 * return Sfio_t stream pointer to host info file
26 * if line!=0 then it points to current line number in file
32 csinfo(register Cs_t* state, const char* file, int* line)
40 messagef((state->id, NiL, -8, "info(%s) call", file));
41 if (!file || streq(file, "-")) file = CS_SVC_INFO;
42 if (strmatch(file, "*[ \t\n=]*")) sp = tokline(file, SF_STRING, line);
43 else if (!strchr(file, '/') || stat(file, &st) || S_ISDIR(st.st_mode) || !(sp = tokline(file, SF_READ, line)))
46 sfsprintf(tmp, sizeof(tmp), "%s/%s", n ? csvar(state, CS_VAR_SHARE, 0) : CS_SVC_DIR, file);
53 if (!sp) messagef((state->id, NiL, -1, "info: %s: not found", file));
58 _cs_info(const char* file, int* line)
60 return csinfo(&cs, file, line);