Lines Matching defs:num

277 		mc->num = sfgetu(ip);
288 if (!(mc->set = vmnewof(vm, 0, Mcset_t, mc->num + 1, 0)))
292 if (!(mp = vmnewof(vm, 0, char*, mc->nmsgs + mc->num + 1, 0)))
303 if (i > mc->num)
306 mc->set[i].num = n;
315 for (i = 1; i <= mc->num; i++)
316 for (j = 1; j <= mc->set[i].num; j++)
341 * return the <set,num> message in mc
347 mcget(register Mc_t* mc, int set, int num, const char* msg)
353 if (!mc || set < 0 || set > mc->num || num < 1 || num > mc->set[set].num || !(s = mc->set[set].msg[num]))
368 * set message <set,num> to msg
375 mcput(register Mc_t* mc, int set, int num, const char* msg)
386 if (!mc || set > MC_SET_MAX || num > MC_NUM_MAX)
395 if (set <= mc->num && num <= mc->set[set].num && (s = mc->set[set].msg[num]))
401 mc->set[set].msg[num] = 0;
403 if (mc->set[set].num == num)
406 * decrease the max msg num
409 mp = mc->set[set].msg + num;
410 while (num && !mp[--num]);
411 mc->nmsgs -= mc->set[set].num - num;
412 if (!(mc->set[set].num = num) && mc->num == set)
415 * decrease the max set num
418 while (num && !mc->set[--num].num);
419 mc->num = num;
430 if (set > mc->num)
438 for (i = 1; i <= mc->num; i++)
442 mc->num = set;
450 if (num > sp->num)
452 if (num > sp->gen)
457 if (i <= num)
458 i = 2 * num;
465 for (i = 1; i <= sp->num; i++)
479 mc->nmsgs += num - sp->num;
480 sp->num = num;
487 if (s = sp->msg[num])
504 sp->msg[num] = s;
550 sfputu(op, mc->num);
556 for (i = 1; i <= mc->num; i++)
557 if (mc->set[i].num)
560 sfputu(op, mc->set[i].num);
568 for (i = 1; i <= mc->num; i++)
569 if (mc->set[i].num)
572 for (j = 1; j <= sp->num; j++)
583 for (i = 1; i <= mc->num; i++)
584 if (mc->set[i].num)
587 for (j = 1; j <= sp->num; j++)