Searched refs:file (Results 1 - 25 of 285) sorted by relevance

1234567891011>>

/ast/src/lib/libdss/
H A Ddssfile.c22 * dss file support
38 noreadf(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
41 (*disc->errorf)(NiL, disc, ERROR_SYSTEM|2, "%s: not open for read", file->path);
50 nullreadf(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
60 nowritef(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
63 (*disc->errorf)(NiL, disc, ERROR_SYSTEM|2, "%s: not open for write", file->path);
68 * file open
74 Dssfile_t* file; local
144 if (!(file = vmnewof(vm, 0, Dssfile_t, 1, strlen(path) + 1)))
153 strcpy(file
247 dssfclose(Dssfile_t* file) argument
280 dssfread(Dssfile_t* file) argument
302 dssfwrite(Dssfile_t* file, Dssrecord_t* record) argument
312 dssftell(Dssfile_t* file) argument
322 dssfseek(Dssfile_t* file, Sfoff_t offset) argument
352 dss_no_fread(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
360 dss_no_fwrite(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
368 dss_no_fseek(Dssfile_t* file, Sfoff_t offset, Dssdisc_t* disc) argument
[all...]
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...]
/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);
/ast/src/cmd/3d/
H A Ddup3d.c33 if (nfd >= 0 && ofd >= 0 && ofd < elementsof(state.file))
37 if (!(state.file[ofd].flags & FILE_OPEN))
39 state.file[nfd] = state.file[ofd];
40 state.file[nfd].flags &= ~FILE_CLOEXEC;
41 state.file[nfd].reserved = 0;
46 if (mp = state.file[nfd].mount)
53 if (state.file[nfd].dir)
55 free(state.file[nfd].dir);
56 state.file[nf
[all...]
H A Dclose3d.c30 if (fd >= 0 && fd < elementsof(state.file))
39 if (state.file[fd].dir)
41 free(state.file[fd].dir);
42 state.file[fd].dir = 0;
45 if (rp = state.file[fd].reserved)
53 state.file[nfd].reserved = rp;
54 state.file[nfd].flags = FILE_LOCK;
55 state.file[fd].reserved = 0;
59 if ((mp = state.file[fd].mount) && fssys(mp, MSG_close))
68 if ((state.file[f
[all...]
H A Ddup23d.c32 if (r >= 0 && r < elementsof(state.file) && state.file[r].reserved) close(r);
35 if (r >= 0 && r < elementsof(state.file))
H A Dfcntl3d.c43 if (op == F_DUPFD && state.file[n].reserved)
47 if (r >= 0 && r < elementsof(state.file))
57 state.file[fd].flags &= ~FILE_CLOEXEC;
58 else if (!(state.file[fd].flags & FILE_OPEN))
61 state.file[fd].flags |= FILE_CLOEXEC;
/ast/src/cmd/dsslib/netflow/
H A Dflow-fixed.c53 fixedident(Dssfile_t* file, void* buf, size_t n, Dssdisc_t* disc) argument
65 file->skip = sizeof(Netflow_t);
66 file->ident = swap;
77 fixedopen(Dssfile_t* file, Dssdisc_t* disc) argument
79 if (file->flags & DSS_FILE_READ)
81 if (!sfreserve(file->io, file->skip, 0))
87 if (!(file->data = (void*)vmnewof(file->dss->vm, 0, State_t, 1, 0)))
93 ((State_t*)file
115 fixedread(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
143 fixedwrite(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
159 fixedclose(Dssfile_t* file, Dssdisc_t* disc) argument
[all...]
/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/ksh93/tests/
H A Dbracket.sh38 file=$tmp/original
40 if [[ -z $file ]]
41 then err_exit "-z: $file string should not be of zero length"
43 if [[ -a $file ]]
44 then err_exit "-a: $file shouldn't exist"
46 if [[ -e $file ]]
47 then err_exit "-e: $file shouldn't exist"
49 > $file
50 if [[ ! -a $file ]]
51 then err_exit "-a: $file shoul
[all...]
H A Dreturn.sh39 file=$tmp/test
43 trap "foo=EXIT;rm -f $file" EXIT
44 > $file
67 if [[ -f $file ]]
68 then rm -r $file
69 err_exit "foo $@: doesn't remove $file"
114 cat > $file <<!
118 ( . $file )
123 chmod 755 $file
124 ( $file )
[all...]
/ast/src/lib/libtk/library/demos/
H A Dbrowse22 # The procedure below is invoked to open a browser on a given file; if the
23 # file is a directory then another instance of this program is invoked; if
24 # the file is a regular file then the Mx editor is invoked to display
25 # the file.
27 proc browse {dir file} {
29 if {[string compare $dir "."] != 0} {set file $dir/$file}
30 if [file isdirectory $file] {
[all...]
/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/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);
/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);
/ast/src/cmd/dsslib/bgp/
H A Dbgp-fixed.c52 fixedident(Dssfile_t* file, void* buf, size_t n, Dssdisc_t* disc) argument
64 file->skip = sizeof(Bgproute_t);
65 file->ident = swap;
72 * fixed file openf
76 fixedopen(Dssfile_t* file, Dssdisc_t* disc) argument
78 if (file->flags & DSS_FILE_READ)
80 if (!sfreserve(file->io, file->skip, 0))
86 if (!(file->data = (void*)vmnewof(file
114 fixedread(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
153 fixedwrite(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
169 fixedclose(Dssfile_t* file, Dssdisc_t* disc) argument
[all...]
/ast/src/cmd/proto/
H A Dproto.c72 " that should be placed in a \b.h\b file shared by \b*.c\b and then"
80 " be:]:[file]{"
138 "[v:verbose?List each file as it is processed.]"
144 "[L:list?Input file names are read one per line from \afile\a.]:[file]"
291 proto(char* file, char* license, char* options, char* package, char* copy, char* comment, int flags) argument
302 if (file && access(file, 4))
303 proto_error(NiL, 2, file, "not found");
304 else if (b = pppopen(file,
452 type(register char* file, char* comment) argument
475 char* file; local
[all...]
/ast/src/cmd/std/
H A Dshar.sh63 [l:whole-size-limit]#[size?Limit the output file size to \asize\a
80 [t:tty?Write errors and the name of each file to \b/dev/tty\b as it is
82 [w:no-character-count?Do NOT check each file with \bwc -c\b after
89 [L:split-size-limit]#[size?Limit the output file size to \asize\a
97 [S:stdin-file-list?Read list of files to be packed from the standard
127 exists=$"'(file already exists)'"
130 uncomp=$"uncompressing file"
165 typeset file=$1
166 if [[ $flags == *p* && $file == -[zBTZ] ]]
167 then mode=${file#
[all...]
H A Dtouch.c25 * touch -- touch file times
31 "[+NAME?touch - change file access, modification and status change "
36 "member. On most systems the file status change time is always set to "
67 "current time.]:[file]"
68 "[s|n:change|ctime|neither?Change only the file status change time "
81 "[+access|atime|use?The access time of the reference file.]"
82 "[+change|ctime?The change time of the reference file.]"
84 "file.]"
89 "file ...\n\n"
90 "[+CAVEATS?Some systems or file syste
115 register char* file; local
[all...]
/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;
/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/cmd/dsslib/text/
H A Dtext.c30 " field-delimited text file data. The method schema is a \bscanf\b(3)"
34 "file data.]"
69 textident(Dssfile_t* file, void* buf, size_t n, Dssdisc_t* disc) argument
79 textfopen(Dssfile_t* file, Dssdisc_t* disc) argument
81 if (!(file->data = vmnewof(file->dss->vm, 0, Cxvalue_t, ((Text_t*)file->dss->meth->data)->vars, 0)))
95 textfclose(Dssfile_t* file, Dssdisc_t* disc) argument
97 if (!file || !file
191 textread(register Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
331 textwrite(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
[all...]
/ast/src/cmd/dsslib/opaque/
H A Dopaque.c56 opaqueident(Dssfile_t* file, void* buf, size_t size, Dssdisc_t* disc) argument
58 register Opaque_t* opaque = (Opaque_t*)file->dss->meth->data;
75 file->skip = opaque->magic.size;
85 opaquefopen(Dssfile_t* file, Dssdisc_t* disc) argument
87 file->data = &((Opaque_t*)file->dss->meth->data)->magic.size;
88 if (file->skip && !sfreserve(file->io, file->skip, 0))
102 opaquefclose(Dssfile_t* file, Dssdisc_ argument
114 opaqueread(register Dssfile_t* file, register Dssrecord_t* record, Dssdisc_t* disc) argument
130 opaquewrite(Dssfile_t* file, Dssrecord_t* record, Dssdisc_t* disc) argument
[all...]
/ast/src/lib/libz/
H A Dminigzip.c9 * full-featured gzip. No attempt is made to deal with file systems
12 * real thing. On ZLIB_MSDOS, use only on file names without extension
35 # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
37 # define SET_BINARY_MODE(file)
47 # define fileno(file) file->__file
80 void file_compress OF((char *file, char *mode));
81 void file_uncompress OF((char *file));
128 /* Try compressing the input file a
274 gzFile file; local
[all...]

Completed in 278 milliseconds

1234567891011>>