Lines Matching refs:stl
91 orec_free_stl(rec_stl *stl)
95 for (i = 0; i < stl->nstrs; i++) {
96 if (stl->lens[i] > 2)
97 free(stl->strs[i]);
100 free(stl->lens);
101 free(stl->strs);
102 free(stl);
578 rec_stl *stl;
583 if ((stl = calloc(1, sizeof(rec_stl))) == NULL)
586 if ((stl->lens = malloc(sizeof(unsigned char) * count)) == NULL) {
587 free(stl);
591 if ((stl->strs = malloc(sizeof(char*) * count)) == NULL) {
592 free(stl->lens);
593 free(stl);
598 free(stl->strs);
599 free(stl->lens);
600 free(stl);
604 pat->data.stl = stl;
606 stl->type = str ? Resl_StringList : Resl_CaseStringList;
622 stl->lens[i] = len;
625 stl->strs[i] = ptr->pat->data.str;
628 stl->strs[i] = (void*)(long)(ptr->pat->data.str[0]);
630 stl->strs[i] = (void*)(long)
638 stl->strs[i] = (void*)(long)ptr->pat->data.chr;
640 stl->strs[i] = (void*)(long)
649 stl->tlen = tlen;
650 stl->nstrs = count;
663 li = stl->lens[i];
664 ci = li > 2 ? stl->strs[i][0] : (long)stl->strs[i] & 0xff;
666 lj = stl->lens[j];
667 cj = lj > 2 ? stl->strs[j][0] : (long)stl->strs[j] & 0xff;
672 str = stl->strs[j];
673 stl->strs[j] = stl->strs[i];
674 stl->strs[i] = str;
675 stl->lens[j] = li;
676 stl->lens[i] = lj;