Lines Matching defs:s

221 freeelem(Cell *ap, uchar *s)		/* free elem s from ap (i.e., ap["s"] */
229 h = hash(s, tp->size);
231 if (strcmp((char *)s, (char *)p->nval) == 0) {
246 setsymtab(uchar *n, uchar *s, Awkfloat f, unsigned int t, Array *tp)
252 dprintf(("setsymtab found %p: n=%s", (void *)p, p->nval));
253 dprintf((" s=\"%s\" f=%g t=%p\n",
259 ERROR "symbol table overflow at %s", n FATAL;
261 p->sval = s ? tostring(s) : tostring((uchar *)"");
272 dprintf(("setsymtab set %p: n=%s", (void *)p, p->nval));
273 dprintf((" s=\"%s\" f=%g t=%p\n", p->sval, p->fval, (void *)p->tval));
278 hash(uchar *s, int n) /* form hash value for string s */
282 for (hashval = 0; *s != '\0'; s++)
283 hashval = (*s + 31 * hashval);
311 lookup(uchar *s, Array *tp) /* look for s in tp */
316 h = hash(s, tp->size);
318 if (strcmp((char *)s, (char *)p->nval) == 0)
343 dprintf(("setfval %p: %s = %g, t=%p\n", (void *)vp,
353 ERROR "can't %s %s; it's an array name.", rw, vp->nval FATAL;
355 ERROR "can't %s %s; it's a function.", rw, vp->nval FATAL;
356 ERROR "funny variable %o: n=%s s=\"%s\" f=%g t=%o",
361 setsval(Cell *vp, uchar *s)
372 dprintf(("setting field %d to %s\n", i, s));
382 dprintf(("setsval %p: %s = \"%s\", t=%p\n",
385 s,
387 return (vp->sval = tostring(s));
404 dprintf(("getfval %p: %s = %g, t=%p\n",
412 uchar s[256];
424 (void) snprintf((char *)s, sizeof (s),
428 (void) snprintf((char *)s, sizeof (s),
431 vp->sval = tostring(s);
435 dprintf(("getsval %p: %s = \"%s\", t=%p\n",
444 tostring(uchar *s)
448 p = (uchar *)malloc(strlen((char *)s)+1);
450 ERROR "out of space in tostring on %s", s FATAL;
451 (void) strcpy((char *)p, (char *)s);
456 qstring(uchar *s, int delim) /* collect string up to delim */
464 for (cnt = 0; (c = *s) != delim; s++) {
466 ERROR "newline in string %.10s...", cbuf SYNTAX;
472 switch (c = *++s) {
485 if (isdigit(s[1])) {
486 n = 8 * n + *++s - '0';
487 if (isdigit(s[1]))
488 n = 8 * n + *++s - '0';