diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2003-10-29 19:17:30 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2003-10-29 19:17:30 +0000 |
commit | 815bc92148939ce369585c59d3af730f69833844 (patch) | |
tree | 2787fe59d0c8b27c6a9cf18e65784cdbd925c9b1 /Src/Zle | |
parent | 026631ab818995ad480a9ea3e5a7ec243c645db1 (diff) | |
download | zsh-815bc92148939ce369585c59d3af730f69833844.tar.gz zsh-815bc92148939ce369585c59d3af730f69833844.tar.xz zsh-815bc92148939ce369585c59d3af730f69833844.zip |
a la 19209: zcalloc -> zshcalloc
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/compcore.c | 14 | ||||
-rw-r--r-- | Src/Zle/compctl.c | 30 | ||||
-rw-r--r-- | Src/Zle/complete.c | 4 | ||||
-rw-r--r-- | Src/Zle/computil.c | 2 | ||||
-rw-r--r-- | Src/Zle/zle_keymap.c | 6 | ||||
-rw-r--r-- | Src/Zle/zle_main.c | 2 | ||||
-rw-r--r-- | Src/Zle/zle_params.c | 4 | ||||
-rw-r--r-- | Src/Zle/zle_refresh.c | 4 | ||||
-rw-r--r-- | Src/Zle/zle_thingy.c | 2 | ||||
-rw-r--r-- | Src/Zle/zle_utils.c | 2 |
10 files changed, 35 insertions, 35 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 5b26ff883..22e5a2436 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -618,14 +618,14 @@ callcompfunc(char *s, char *fn) untokenize(*q = ztrdup(*p)); *q = NULL; } else - compwords = (char **) zcalloc(sizeof(char *)); + compwords = (char **) zshcalloc(sizeof(char *)); if (compredirs) freearray(compredirs); if (rdstrs) compredirs = bld_list_array(rdstrs); else - compredirs = (char **) zcalloc(sizeof(char *)); + compredirs = (char **) zshcalloc(sizeof(char *)); compparameter = ztrdup(compparameter); compredirect = ztrdup(compredirect); @@ -2822,7 +2822,7 @@ dupmatch(Cmatch m, int nbeg, int nend) { Cmatch r; - r = (Cmatch) zcalloc(sizeof(struct cmatch)); + r = (Cmatch) zshcalloc(sizeof(struct cmatch)); r->str = ztrdup(m->str); r->orig = ztrdup(m->orig); @@ -2922,7 +2922,7 @@ permmatches(int last) if (g->mcount > 1) diffmatches = 1; - n = (Cmgroup) zcalloc(sizeof(struct cmgroup)); + n = (Cmgroup) zshcalloc(sizeof(struct cmgroup)); if (g->perm) { g->perm->next = NULL; @@ -2940,7 +2940,7 @@ permmatches(int last) n->num = gn++; n->flags = g->flags; n->mcount = g->mcount; - n->matches = p = (Cmatch *) zcalloc((n->mcount + 1) * sizeof(Cmatch)); + n->matches = p = (Cmatch *) zshcalloc((n->mcount + 1) * sizeof(Cmatch)); n->name = ztrdup(g->name); for (q = g->matches; *q; q++, p++) *p = dupmatch(*q, nbrbeg, nbrend); @@ -2954,9 +2954,9 @@ permmatches(int last) n->ylist = NULL; if ((n->ecount = g->ecount)) { - n->expls = ep = (Cexpl *) zcalloc((n->ecount + 1) * sizeof(Cexpl)); + n->expls = ep = (Cexpl *) zshcalloc((n->ecount + 1) * sizeof(Cexpl)); for (eq = g->expls; (o = *eq); eq++, ep++) { - *ep = e = (Cexpl) zcalloc(sizeof(struct cexpl)); + *ep = e = (Cexpl) zshcalloc(sizeof(struct cexpl)); e->count = (fi ? o->fcount : o->count); e->always = o->always; e->fcount = 0; diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c index 69f742731..f55deff5c 100644 --- a/Src/Zle/compctl.c +++ b/Src/Zle/compctl.c @@ -242,7 +242,7 @@ compctlread(char *name, char **args, Options ops, char *reply) if (OPT_ISSET(ops,'A') && !OPT_ISSET(ops,'e')) { /* the -A option means that one array is specified, instead of many parameters */ - char **p, **b = (char **)zcalloc((clwnum + 1) * sizeof(char *)); + char **p, **b = (char **)zshcalloc((clwnum + 1) * sizeof(char *)); for (i = 0, p = b; i < clwnum; p++, i++) *p = ztrdup(clwords[i]); @@ -893,7 +893,7 @@ get_compctl(char *name, char ***av, Compctl cc, int first, int isdef, int cl) cc->xor = &cc_default; } else { /* more flags follow: prepare to loop again */ - cc->xor = (Compctl) zcalloc(sizeof(*cc)); + cc->xor = (Compctl) zshcalloc(sizeof(*cc)); cc = cc->xor; memset((void *)&cct, 0, sizeof(cct)); cct.mask2 = CC_CCCONT; @@ -930,7 +930,7 @@ get_xcompctl(char *name, char ***av, Compctl cc, int isdef) /* o keeps track of or's, m remembers the starting condition, * c is the current condition being parsed */ - o = m = c = (Compcond) zcalloc(sizeof(*c)); + o = m = c = (Compcond) zshcalloc(sizeof(*c)); /* Loop over each condition: something like 's[...][...], p[...]' */ for (t = *argv; *t;) { while (*t == ' ') @@ -1021,20 +1021,20 @@ get_xcompctl(char *name, char ***av, Compctl cc, int isdef) /* Allocate space for all the arguments of the conditions */ if (c->type == CCT_POS || c->type == CCT_NUMWORDS) { - c->u.r.a = (int *)zcalloc(n * sizeof(int)); - c->u.r.b = (int *)zcalloc(n * sizeof(int)); + c->u.r.a = (int *)zshcalloc(n * sizeof(int)); + c->u.r.b = (int *)zshcalloc(n * sizeof(int)); } else if (c->type == CCT_CURSUF || c->type == CCT_CURPRE || c->type == CCT_QUOTE) - c->u.s.s = (char **)zcalloc(n * sizeof(char *)); + c->u.s.s = (char **)zshcalloc(n * sizeof(char *)); else if (c->type == CCT_RANGESTR || c->type == CCT_RANGEPAT) { - c->u.l.a = (char **)zcalloc(n * sizeof(char *)); - c->u.l.b = (char **)zcalloc(n * sizeof(char *)); + c->u.l.a = (char **)zshcalloc(n * sizeof(char *)); + c->u.l.b = (char **)zshcalloc(n * sizeof(char *)); } else { - c->u.s.p = (int *)zcalloc(n * sizeof(int)); - c->u.s.s = (char **)zcalloc(n * sizeof(char *)); + c->u.s.p = (int *)zshcalloc(n * sizeof(int)); + c->u.s.s = (char **)zshcalloc(n * sizeof(char *)); } /* Now loop over the actual arguments */ for (l = 0; *t == '['; l++, t++) { @@ -1137,17 +1137,17 @@ get_xcompctl(char *name, char ***av, Compctl cc, int isdef) t++; if (*t == ',') { /* Another condition to `or' */ - o->or = c = (Compcond) zcalloc(sizeof(*c)); + o->or = c = (Compcond) zshcalloc(sizeof(*c)); o = c; t++; } else if (*t) { /* Another condition to `and' */ - c->and = (Compcond) zcalloc(sizeof(*c)); + c->and = (Compcond) zshcalloc(sizeof(*c)); c = c->and; } } /* Assign condition to current compctl */ - *next = (Compctl) zcalloc(sizeof(*cc)); + *next = (Compctl) zshcalloc(sizeof(*cc)); (*next)->cond = m; argv++; /* End of the condition; get the flags that go with it. */ @@ -1271,7 +1271,7 @@ cc_reassign(Compctl cc) */ Compctl c2; - c2 = (Compctl) zcalloc(sizeof *cc); + c2 = (Compctl) zshcalloc(sizeof *cc); c2->xor = cc->xor; c2->ext = cc->ext; c2->refc = 1; @@ -1587,7 +1587,7 @@ bin_compctl(char *name, char **argv, Options ops, int func) if ((ret = get_gmatcher(name, argv))) return ret - 1; - cc = (Compctl) zcalloc(sizeof(*cc)); + cc = (Compctl) zshcalloc(sizeof(*cc)); if (get_compctl(name, &argv, cc, 1, 0, 0)) { freecompctl(cc); return 1; diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c index 713ce7f9e..b325b8536 100644 --- a/Src/Zle/complete.c +++ b/Src/Zle/complete.c @@ -707,7 +707,7 @@ restrict_range(int b, int e) e = wl; i = e - b + 1; - p = (char **) zcalloc((i + 1) * sizeof(char *)); + p = (char **) zshcalloc((i + 1) * sizeof(char *)); for (q = p, pp = compwords + b; i; i--, q++, pp++) *q = ztrdup(*pp); @@ -1180,7 +1180,7 @@ compunsetfn(Param pm, int exp) *((char **) pm->u.data) = ztrdup(""); } else if (PM_TYPE(pm->flags) == PM_ARRAY) { freearray(*((char ***) pm->u.data)); - *((char ***) pm->u.data) = zcalloc(sizeof(char *)); + *((char ***) pm->u.data) = zshcalloc(sizeof(char *)); } else if (PM_TYPE(pm->flags) == PM_HASHED) { deleteparamtable(pm->u.hash); pm->u.hash = NULL; diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index 795b2ba50..178101b61 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -458,7 +458,7 @@ cd_init(char *nam, char *hide, char *mlen, char *sep, grp = 1; } while (*args) { - *setp = set = (Cdset) zcalloc(sizeof(*set)); + *setp = set = (Cdset) zshcalloc(sizeof(*set)); setp = &(set->next); *setp = NULL; set->opts = NULL; diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c index 58e5e2175..9f3b9dfd4 100644 --- a/Src/Zle/zle_keymap.c +++ b/Src/Zle/zle_keymap.c @@ -156,7 +156,7 @@ createkeymapnamtab(void) static KeymapName makekeymapnamnode(Keymap keymap) { - KeymapName kmn = (KeymapName) zcalloc(sizeof(*kmn)); + KeymapName kmn = (KeymapName) zshcalloc(sizeof(*kmn)); kmn->keymap = keymap; return kmn; @@ -201,7 +201,7 @@ newkeytab(char *kmname) static Key makekeynode(Thingy t, char *str) { - Key k = (Key) zcalloc(sizeof(*k)); + Key k = (Key) zshcalloc(sizeof(*k)); k->bind = t; k->str = str; @@ -230,7 +230,7 @@ static HashTable copyto; mod_export Keymap newkeymap(Keymap tocopy, char *kmname) { - Keymap km = zcalloc(sizeof(*km)); + Keymap km = zshcalloc(sizeof(*km)); int i; km->rc = 0; diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 1c8b590a8..7309e3763 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -1386,7 +1386,7 @@ setup_(Module m) incompfunc = incompctlfunc = hascompmod = 0; hascompwidgets = 0; - clwords = (char **) zcalloc((clwsize = 16) * sizeof(char *)); + clwords = (char **) zshcalloc((clwsize = 16) * sizeof(char *)); return 0; } diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c index 45df2fa8e..a9fd93450 100644 --- a/Src/Zle/zle_params.c +++ b/Src/Zle/zle_params.c @@ -414,7 +414,7 @@ set_killring(Param pm, char **x) */ int kpos = 0; kringsize = arrlen(x); - kring = (Cutbuffer)zcalloc(kringsize * sizeof(struct cutbuffer)); + kring = (Cutbuffer)zshcalloc(kringsize * sizeof(struct cutbuffer)); for (p = x; *p; p++) { int len = strlen(*p); kptr = kring + kpos; @@ -443,7 +443,7 @@ get_killring(Param pm) /* Supposed to work even if kring is NULL */ if (!kring) { kringsize = KRINGCTDEF; - kring = (Cutbuffer)zcalloc(kringsize * sizeof(struct cutbuffer)); + kring = (Cutbuffer)zshcalloc(kringsize * sizeof(struct cutbuffer)); } p = ret = (char **)zhalloc((kringsize+1) * sizeof(char *)); diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 1d745d4f7..86564eb74 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -148,8 +148,8 @@ resetvideo(void) free(nbuf); free(obuf); } - nbuf = (char **)zcalloc((winh + 1) * sizeof(char *)); - obuf = (char **)zcalloc((winh + 1) * sizeof(char *)); + nbuf = (char **)zshcalloc((winh + 1) * sizeof(char *)); + obuf = (char **)zshcalloc((winh + 1) * sizeof(char *)); nbuf[0] = (char *)zalloc(winw + 2); obuf[0] = (char *)zalloc(winw + 2); diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index 503060d7b..71eab02e7 100644 --- a/Src/Zle/zle_thingy.c +++ b/Src/Zle/zle_thingy.c @@ -107,7 +107,7 @@ scanemptythingies(HashNode hn, int flags) static Thingy makethingynode(void) { - Thingy t = (Thingy) zcalloc(sizeof(*t)); + Thingy t = (Thingy) zshcalloc(sizeof(*t)); t->flags = DISABLED; return t; diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c index 28f5647bd..53fef20e5 100644 --- a/Src/Zle/zle_utils.c +++ b/Src/Zle/zle_utils.c @@ -170,7 +170,7 @@ cut(int i, int ct, int dir) Cutbuffer kptr; if (!kring) { kringsize = KRINGCTDEF; - kring = (Cutbuffer)zcalloc(kringsize * sizeof(struct cutbuffer)); + kring = (Cutbuffer)zshcalloc(kringsize * sizeof(struct cutbuffer)); } else kringnum = (kringnum + 1) % kringsize; kptr = kring + kringnum; |