Searched defs:file (Results 1 - 25 of 153) sorted by relevance

1234567

/ast/src/lib/libast/sfio/
H A Dsfopen.c31 Sfio_t* sfopen(Sfio_t* f, const char* file, const char* mode) argument
33 Sfio_t* sfopen(f,file,mode)
35 char* file; /* file/string to be opened */
39 return _sfopen(f, file, mode);
H A Dsfnew.c32 Sfio_t* sfnew(Sfio_t* oldf, Void_t* buf, size_t size, int file, int flags) argument
34 Sfio_t* sfnew(oldf,buf,size,file,flags)
38 int file; /* file descriptor to read/write from */
39 int flags; /* type of file stream */
85 if(!(flags&SF_STRING) && file >= 0 && file <= 2)
86 { f = file == 0 ? sfstdin : file == 1 ? sfstdout : sfstderr;
111 f->file
[all...]
H A D_sfopen.c24 /* Open a file/string for IO.
38 Sfio_t* _sfopen(Sfio_t* f, const char* file, const char* mode) argument
40 Sfio_t* _sfopen(f,file,mode)
42 char* file; /* file/string to be opened */
54 if(f && !file && !((f->flags|sflags)&SF_STRING) )
77 if(f->file >= 0 )
79 { /* set file access control */
80 int ctl = sysfcntlf(f->file, F_GETFL, 0);
82 sysfcntlf(f->file, F_SETF
[all...]
/ast/src/lib/libpp/
H A Dppline.c31 ppline(int line, char* file) argument
41 ppline(1, file);
42 file = error_info.file;
47 else if (file != pp.lastfile)
50 pp.firstfile = file;
51 type[1] = ((pp.flags & PP_linetype) && !*pp.lineid && pp.lastfile) ? (line <= 1 ? (file == pp.firstfile ? PP_sync : PP_sync_push) : PP_sync_pop) : PP_sync;
52 pp.lastfile = file;
57 file = 0;
80 if (file)
[all...]
H A Dppincref.c32 ppincref(char* parent, char* file, int line, int type) argument
47 error(0, "%-*s%s", level * 4, "", file);
H A Dppmacref.c31 ppmacref(struct ppsymbol* sym, char* file, int line, int type, unsigned long sum) argument
35 NoP(file);
/ast/src/lib/libardir/
H A Dtestar.c30 char* file; local
33 while (file = *++argv)
35 if (!strcmp(file, "-t") && *(argv + 1))
37 else if (dir = ardiropen(file, NiL, touch ? ARDIR_UPDATE : 0))
39 sfprintf(sfstdout, "%s: type=%s truncate=%d%s\n", file, dir->meth->name, dir->truncate, (dir->flags & ARDIR_RANLIB) ? " ranlib" : "");
52 error(2, "%s: archive read error", file);
55 error(ERROR_SYSTEM|2, "%s: not an archive", file);
H A Dardir.c30 ardiropen(const char* file, Ardirmeth_t* meth, int flags) argument
38 if (!(ar = newof(0, Ardir_t, 1, strlen(file) + 1)))
40 strcpy(ar->path = (char*)(ar + 1), file);
42 if (((ar->fd = open(file, (flags & ARDIR_CREATE) ? (O_CREAT|O_TRUNC|O_RDWR|O_BINARY|O_cloexec) : (flags & ARDIR_UPDATE) ? (O_RDWR|O_BINARY|O_cloexec) : (O_RDONLY|O_BINARY|O_cloexec))) < 0 || fstat(ar->fd, &ar->st) || !S_ISREG(ar->st.st_mode)) && (!meth || !(flags & ARDIR_FORCE)))
/ast/src/lib/libast/comp/
H A Drealpath.c45 realpath(const char* file, char* path) argument
47 return resolvepath(file, path, PATH_MAX) > 0 ? path : (char*)0;
H A Dresolvepath.c44 resolvepath(const char* file, char* path, size_t size) argument
50 r = *file != '/';
51 n = strlen(file) + r + 1;
70 strlcpy(s, file, size - (s - path));
/ast/src/lib/libast/misc/
H A Dmimetype.c47 * return mime type for file
51 mimetype(Mime_t* mp, Sfio_t* fp, const char* file, struct stat* st) argument
68 return magictype(mp->magic, fp, file, st);
H A Ddebug.c32 debug_fatal(const char* file, int line) argument
34 error(2, "%s:%d: debug error", file, line);
/ast/src/lib/libast/vec/
H A Dvecfile.c35 * load a string vector from lines in file
39 vecfile(const char* file) argument
48 if ((fd = open(file, O_RDONLY|O_cloexec)) >= 0)
/ast/src/cmd/mailx/port/
H A Dmimetype.c93 * return mime type for file
97 mimetype(Mime_t* mp, Sfio_t* fp, const char* file, struct stat* st) argument
114 return magictype(mp->magic, fp, file, st);
/ast/src/lib/libcs/
H A Dcsinfo.c25 * 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) argument
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, '/') || sta
58 _cs_info(const char* file, int* line) argument
[all...]
/ast/src/cmd/pzip/
H A Dfunzip.c40 "\n[ file ]\n"
50 char* file; local
75 if (!(file = *argv))
77 file = "/dev/stdin";
80 else if (!(sp = sfopen(NiL, file, "r")))
81 error(ERROR_SYSTEM|3, "%s: cannot read", file);
85 error(3, "input not a gzip file");
/ast/src/lib/libcoshell/
H A Dcosync.c25 * sync all outstanding file operations for file opened on fd
26 * if file==0 then fd used
27 * if fd<0 then file used
40 cosync(Coshell_t* co, const char* file, int fd, int mode) argument
47 if (file && *file)
59 s = file;
75 if ((td = open(file, mode|O_cloexec)) < 0)
90 if (!file || mod
[all...]
/ast/src/lib/libdss/
H A Ddss-scan.h34 "\n [ file ... ] \n"
43 char* file; local
68 if (file = *argv)
74 if (file = *argv)
83 if (!(file = sfgetr(sp, '\n', 1)))
90 else if (file && *file == '<')
92 while (isspace(*++file));
93 if (!(sp = sfopen(NiL, file, "r")))
96 (*disc->errorf)(NiL, disc, ERROR_SYSTEM|2, "%s: cannot read file lis
[all...]
H A Ddssmisc.c36 char* file; local
45 (*dss->disc->errorf)(dss, dss->disc, 2, "%s: cannot read expression file", s);
48 file = (char*)s;
52 file = 0;
53 if (!(pop = cxpush(dss->cx, file, sp, s, -1, CX_INCLUDE)))
126 if (cxcast(record->file->dss->cx, &ret, variable, type, record, details))
/ast/src/cmd/dsslib/ip_t/
H A Dtestptv.c33 "[+DESCRIPTION?\btestptv\b loads the ipv6 prefixes in \aprefix-file\a "
35 "\aaddress-file\a. If \aaddress-file\a is omitted or \b-\b then the "
39 "[+?\aprefix-file\a must contain a sequence of lines with the \bipv6\b "
40 "prefix in the first space separated field. Each \aaddress-file\a must "
46 "\nprefix-file [ address-file ... ]\n"
55 char* file; local
86 if (!(file = *argv++))
88 if (!(sp = sfopen(0, file, "
[all...]
/ast/src/cmd/3d/
H A Dtouch.c34 * touch file access and modify times of file
35 * if force>0 then file will be created if it doesn't exist
73 touch(const char* file, time_t atime, time_t mtime, int force) argument
92 if (stat(file, &st)) st.st_atime = st.st_mtime = 0;
110 n = utime(file, (force < 0 || atime || mtime) ? &ut : (struct utimbuf*)0);
112 n = utime(file, &ut);
117 n = utime(file, ut);
137 if (access(file, F_OK))
143 if ((fd = open(file, O_WRONL
[all...]
/ast/src/lib/libjcl/
H A Dopen.c39 jclopen(Jcl_t* scope, const char* file, unsigned long flags, Jcldisc_t* disc) argument
101 if (!file || streq(file, "-") || streq(file, "/dev/stdin"))
103 file = 0;
106 else if (!(file = jclfind(jcl, file, flags, 2, &sp)))
108 if (jclpush(jcl, sp, file, 0))
168 * push an include file
172 jclpush(register Jcl_t* jcl, Sfio_t* sp, const char* file, lon argument
[all...]
/ast/src/cmd/dsslib/netflow/
H A Dflow-flat.c40 flatident(Dssfile_t* file, void* buf, size_t n, Dssdisc_t* disc) argument
69 flatopen(Dssfile_t* file, Dssdisc_t* disc) argument
71 if ((file->flags & DSS_FILE_READ) && !(file->data = (void*)vmnewof(file->dss->vm, 0, State_t, 1, 0)))
85 flatread(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
87 register Netflow_t* rp = &((State_t*)file->data)->record;
92 if (!(a = s = sfgetr(file->io, '\n', 0)))
94 if (sfvalue(file->io))
97 (*disc->errorf)(NiL, disc, 2, "%slast record incomplete", cxlocation(file
181 flatwrite(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
220 flatclose(Dssfile_t* file, Dssdisc_t* disc) argument
[all...]
/ast/src/lib/libast/astsa/
H A Derror.h38 char* file; member in struct:Error_info_s
/ast/src/lib/libpz/
H A Dpzopen.c60 * find and open file with optional suffix and sfio mode
64 pzfind(Pz_t* pz, const char* file, const char* suffix, const char* mode) argument
69 if (!(sp = sfopen(NiL, file, mode)))
71 if (!pathfind(file, pz->disc->lib ? pz->disc->lib : pz->id, suffix, buf, sizeof(buf)))
74 (*pz->disc->errorf)(pz, pz->disc, ERROR_SYSTEM|2, "%s: cannot find %s file", file, suffix ? suffix : "data"); local

Completed in 636 milliseconds

1234567