Home
last modified time | relevance | path

Searched refs:newof (Results 1 – 25 of 120) sorted by relevance

12345

/illumos-gate/usr/src/contrib/ast/src/lib/libast/misc/
H A Dstack.c43 if (!(stack = newof(0, struct stacktable, 1, 0))) return(0); in stackalloc()
44 if (!(b = newof(0, struct stackblock, 1, 0))) in stackalloc()
49 if (!(b->stack = newof(0, void*, size, 0))) in stackalloc()
122 if (!(b->next = newof(0, struct stackblock, 1, 0))) in stackpush()
125 if (!(b->stack = newof(0, void*, stack->size, 0))) in stackpush()
H A Dgetcwd.c59 if (!(buf = newof(buf, char, n, 0)))
63 if ((r = strlen(buf) + len + 1) != n && !(buf = newof(buf, char, r, 0)))
130 if (!(p = newof(0, struct dirlist, 1, 0)) || chdir(dots))
196 else if (!(buf = newof(0, char, namlen, len))) ERROR(ENOMEM);
220 if (!(buf = newof(0, char, len, extra))) ERROR(ENOMEM);
258 if (extra >= 0 && !(buf = newof(buf, char, len, extra))) ERROR(ENOMEM);
303 if (extra < 0 || !(buf = newof(buf, char, len += PATH_MAX, extra))) ERROR(ERANGE);
H A Dsetenviron.c87 if (!(p = newof(p, char*, n, 0))) in setenviron()
110 if (!(p = newof(p, char*, n, 0))) in setenviron()
H A Doptctx.c64 else if (!(o = newof(0, Opt_t, 1, 0))) in optctx()
/illumos-gate/usr/src/contrib/ast/src/lib/libsum/
H A Dsum-lmd.c128 if (lmd = newof(0, Md4_t, 1, 0)) in md4_open()
168 if (lmd = newof(0, Md5_t, 1, 0)) in md5_open()
209 if (lmd = newof(0, Sha1_t, 1, 0)) in sha1_open()
249 if (lmd = newof(0, Sha256_t, 1, 0)) in sha256_open()
283 if (lmd = newof(0, Sha384_t, 1, 0)) in sha384_open()
317 if (lmd = newof(0, Sha512_t, 1, 0)) in sha512_open()
/illumos-gate/usr/src/contrib/ast/src/lib/libast/regex/
H A Dregcache.c99 if (matchstate.cache = newof(matchstate.cache, Cache_t*, reflags, 0)) in regcache()
113 if (!(matchstate.cache = newof(0, Cache_t*, CACHE, 0))) in regcache()
158 …if (!(cp = matchstate.cache[unused]) && !(cp = matchstate.cache[unused] = newof(0, Cache_t, 1, 0))) in regcache()
172 if (!(cp->pattern = newof(cp->pattern, char, cp->size, 0))) in regcache()
/illumos-gate/usr/src/contrib/ast/src/lib/libast/hash/
H A Dhashalloc.c69 else if (!(tab = newof(0, Hash_table_t, 1, 0))) in hashalloc()
86 else if (!(tab->root = newof(0, Hash_root_t, 1, 0))) in hashalloc()
88 if (!(tab->root->local = newof(0, Hash_local_t, 1, 0))) in hashalloc()
176 else if (!(tab->table = newof(0, Hash_bucket_t*, tab->size, 0))) goto out; in hashalloc()
/illumos-gate/usr/src/contrib/ast/src/lib/libast/astsa/
H A Dast.c55 if (!(buf = newof(0, char, siz, 0))) in sfgetr()
67 if (!(buf = newof(buf, char, siz, 0))) in sfgetr()
H A Dvmalloc.c38 if (vp = newof(0, Vmalloc_t, 1, 0)) in _vm_open()
79 if (!(vp->current->next = newof(0, Vmchunk_t, 1, n))) in _vm_resize()
H A Dstrdup.c36 return (s && (t = newof(0, char, n = strlen(s) + 1, 0))) ? (char*)memcpy(t, s, n) : (char*)0; in strdup()
/illumos-gate/usr/src/contrib/ast/src/lib/libast/dir/
H A Dopendir.c63 newof(0, DIR, 1, DIRBLKSIZ)
65 newof(0, DIR, 1, 0)
/illumos-gate/usr/src/contrib/ast/src/lib/libast/port/
H A Dlcgen.c130 #define newof(p,t,n,x) ((t*)malloc(sizeof(t)*(n)+(x))) macro
421 if (!(cp = newof(0, Charset_t, 1, s - b + 1)))
437 if (!(tp = newof(0, Territory_t, 1, s - b + 1)))
459 if (!(ll = newof(0, Language_list_t, 1, 0)))
491 if (!(lp = newof(0, Language_t, 1, s - b + 1)))
527 if (!(ap = newof(0, Attribute_t, 1, 0)))
534 if (!(al = newof(0, Attribute_list_t, 1, 0)))
560 if (!(mp = newof(0, Map_t, 1, s - b + 1)))
H A Dlc.c462 else if (al = newof(0, Lc_attribute_list_t, 1, 0)) in lcmake()
613 if (!(lp = newof(0, Lc_language_t, 1, z))) in lcmake()
714 if (ai = newof(0, Lc_attribute_list_t, 1, 0)) in lcmake()
722 …if (i >= elementsof(lp->attributes) && (ap = newof(0, Lc_attribute_t, 1, sizeof(Lc_attribute_list_… in lcmake()
777 if (!(lc = newof(0, Lc_t, 1, n + z))) in lcmake()
839 if (!(ls = newof(0, Lc_scan_t, 1, 0))) in lcscan()
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/sh/
H A Denv.c140 else if(vp = newof((Evar_t*)0,Evar_t,2,0)) in env_add()
195 if(!(ep = newof((Env_t*)0,Env_t,1,0))) in env_open()
211 ep->freelist = vp = newof((Evar_t*)0,Evar_t,n,0); in env_open()
/illumos-gate/usr/src/contrib/ast/src/lib/libcmd/
H A Djoin.c191 if (jp = newof(0, Join_t, 1, 0)) in init()
200 if (!(jp->file[0].fields = newof(0, Field_t, NFIELD + 1, 0)) || in init()
201 !(jp->file[1].fields = newof(0, Field_t, NFIELD + 1, 0))) in init()
224 outptr = jp->outlist = newof(0, int, NFIELD + 1, 0); in getolist()
249 jp->outlist = newof(jp->outlist, int, 2 * nfield + 1, 0); in getolist()
280 jp->outlist = newof(jp->outlist, int, 2 * nfield + 1, 0); in getolist()
331 fp->fields = newof(fp->fields, Field_t, n + 1, 0); in getrec()
705 if (!(jp->same = newof(jp->same, char, jp->samesize, 0))) in join()
H A Dfts_fix.c48 if ((oe = _ast_fts_read(fts)) && ast.version < 20100102L && (ne || (ne = newof(0, FTSENT, 1, 0)))) in _fts_read()
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/bltins/
H A Dmkservice.c265 file_list = newof(NULL,short,n,0); in service_init()
266 poll_list = newof(NULL,Sfio_t*,n,0); in service_init()
267 service_list = newof(NULL,Service_t*,n,0); in service_init()
435 if (!(sp = newof(0, Service_t, 1, 0))) in b_mkservice()
/illumos-gate/usr/src/contrib/ast/src/lib/libpp/
H A Dpplib.h383 #undef newof
384 #define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x… macro
546 pp.in->next = newof(0, struct ppinstk, 1, 0); \
627 error_info.file = cur->buffer = newof(0, char, n, 0); \
734 #define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x… macro
848 #undef newof
849 #define newof(p,t,n,x) vmnewof(Vmregion,p,t,n,x) macro
H A Dppcontrol.c102 p = newof(0, struct pplist, 1, 0); in assert()
177 if (!sym->macro) sym->macro = newof(0, struct ppmacro, 1, 0); in macsym()
478 if (!(p = pp.hdrbuf) && !(p = pp.hdrbuf = newof(0, char, MAXTOKEN, 0))) in ppcontrol()
1177 mac->formkeys = newof(0, struct ppkeyarg, n, p1 - p0 + 1); in ppcontrol()
1345 if (!(tp = newof(0, struct pptuple, 1, strlen(pp.token)))) in ppcontrol()
1383 tp = newof(0, struct pptuple, 1, n); in ppcontrol()
1755 if (!sym->hidden && !(sym->hidden = newof(0, struct pphide, 1, 0))) in ppcontrol()
1899 map = newof(0, struct map, 1, 0); in ppcontrol()
1926 edit = edit->next = newof(0, struct edit, 1, 0); in ppcontrol()
1928 edit = map->edit = newof(0, struct edit, 1, 0); in ppcontrol()
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/path/
H A Dpathexists.c78 if (!(t = newof(0, Tree_t, 1, strlen(s)))) in pathexists()
104 if (!(p = newof(0, Tree_t, 1, strlen(s)))) in pathexists()
H A Dpathtemp.c198 if (!(tmp.vec = newof(0, char*, n, strlen(x) + 1))) in pathtemp()
218 if (!(tmp.vec = newof(0, char*, 2, d ? (strlen(d) + 1) : 0))) in pathtemp()
236 if (!(b = buf) && !(b = newof(0, char, len, 1))) in pathtemp()
/illumos-gate/usr/src/contrib/ast/src/lib/libast/string/
H A Dmemdup.c41 return((t = (void*)newof(0, char, n, 0)) ? memcpy(t, s, n) : 0);
H A Dfmtbuf.c54 if (!(big = newof(big, char, bigsiz, 0))) in fmtbuf()
/illumos-gate/usr/src/contrib/ast/src/lib/libast/vec/
H A Dvecfile.c50 …if (!fstat(fd, &st) && S_ISREG(st.st_mode) && (n = st.st_size) > 0 && (buf = newof(0, char, n + 1,… in vecfile()
H A Dvecargs.c56 if (!(argv = newof(0, char*, num + *argcp + 1, 0))) in vecargs()

12345