Lines Matching +defs:val +defs:file

57 static void put_time(Namval_t* np, const char* val, int flag, Namfun_t* nfp)
61 if(val)
67 t = *(Sfdouble_t*)val;
69 t = *(double*)val;
73 t = tmdate(val, &last, (time_t*)0);
75 errormsg(SH_DICT, ERROR_exit(1),"%s: invalid date/time string", val);
83 nv_putv(np, val, flag, nfp);
130 static void put_mode(Namval_t* np, const char* val, int flag, Namfun_t* nfp)
132 if(val)
139 mode = *(Sfdouble_t*)val;
141 mode = *(double*)val;
145 mode = strperm(val, &last,0);
147 errormsg(SH_DICT, ERROR_exit(1),"%s: invalid mode string", val);
152 nv_putv(np,val,flag,nfp);
226 char *val = np->nvalue + fp->offset;
234 val = *(char**)val;
235 nv_putval(nq,val,fp->flags|NV_NOFREE);
352 static void put_classval(Namval_t* np, const char* val, int flag, Namfun_t* nfp)
361 if(val)
362 nv_putval(np,val,flag);
389 * ====================from here down is file class specific
431 "[+NAME? open - create a shell variable correspnding to a file]"
433 "to the file given by the pathname \afile\a. The elements of \avar\a "
437 "\avar\a\b.fd\b is the file descriptor.]"
462 "[S:sync?Write I/O operations on the file descriptor complete as "
463 "defined by synchronized I/O file integrity completion"
468 "[T:trunc?If the file exists and is a regular file, and the file "
472 "files. Its effect on other file types is "
480 "\nvar file\n"
594 "[+NAME? close - close a file descriptor]"
595 "[+DESCRIPTION?\bclose\b closes the file descriptor specified by fd.]"
643 "[+NAME? tmpfile - create a shell variable correspnding to a temporary file]"
645 "to a temporary file. The elements of \avar\a "
668 FILE *file = NULL;
690 file = tmpfile();
691 if(!file)
693 ffd = fileno(file);
697 fclose(file);
718 "[+NAME? dup - duplicate an open file descriptor]"
719 "[+DESCRIPTION?The \bdup\b commands returns a new file descriptor having the "
720 "following in common with the original open file descriptor "
721 "fd: same open file (or pipe), same file pointer (that is, both file descriptors "
722 "share one file pointer) same access mode (read, write or read/write). "
723 "The file descriptor returned is the lowest one available.]"
794 "[+NAME? stat - get file status]"
796 "to the file given by the pathname \afile\a. The elements of \avar\a "
799 "[l:lstat?If the the named file is a symbolic link returns information about "
802 "\nvar file\n"
865 "[+NAME? rewind - reset file position indicator in a stream]"
866 "[+DESCRIPTION?The \brewind\b command will move the file pointer of fd to position 0.]"