• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/ksh-23/ksh/src/lib/libast/vmalloc/

Lines Matching +defs:file +defs:local +defs:copy

9 *                A copy of the License is available at                 *
111 ** Vmregion==Vmprofile then profile info printed to file f
114 ** trace=f enables tracing to file f
116 ** Vmregion==Vmdebug then warnings printed to file f
121 ** the file descriptor n which must be open for writing. The pattern %p
122 ** in a file name is replaced by the process ID.
251 char* file;
257 VMFLF(Vmregion,file,line,func);
262 /* reset file and line number to correct values for the call */
263 Vmregion->file = file;
414 static Vmalloc_t* getregion(int* local)
426 *local = 1;
432 *local = 1;
442 { *local = 1;
466 *local = 1;
476 { *local = 1;
480 { *local = 0;
496 int local = 0;
499 vm = getregion(&local);
500 addr = (*vm->meth.resizef)(vm, NIL(Void_t*), n_obj*s_obj, VM_RSZERO, local);
501 if(local)
517 int local = 0;
520 vm = getregion(&local);
521 addr = (*vm->meth.allocf)(vm, size, local);
522 if(local)
537 ssize_t copy;
555 { if((copy = SIZE(BLOCK(data))&~BITS) > size )
556 copy = size;
557 memcpy(addr, data, copy);
636 int local = 0;
639 vm = getregion(&local);
641 addr = (*vm->meth.alignf)(vm, size, align, local);
642 if(local)
743 char* file;
752 VMFLF(Vmregion,file,line,func); /* save info before freeing frames */
765 Vmregion->file = file; /* restore file/line info before allocation */
1190 static int createfile(char* file)
1192 static int createfile(file)
1193 char* file;
1202 while(*file)
1203 { if(*file == '%')
1204 { switch(file[1])
1209 file += 2;
1212 goto copy;
1216 { copy:
1217 *next++ = *file++;
1225 file = buf;
1226 if (*file == '&' && *(file += 1) || strncmp(file, "/dev/fd/", 8) == 0 && *(file += 8))
1227 fd = dup((int)atou(&file));
1228 else if (*file)
1231 fd = open(file, O_WRONLY|O_CREAT|O_TRUNC, CREAT_MODE);
1233 fd = creat(file, CREAT_MODE);