Lines Matching defs:currlen
229 static void fmtstr(char *buffer, size_t *currlen, size_t maxlen,
231 static void fmtint(char *buffer, size_t *currlen, size_t maxlen,
233 static void fmtfp(char *buffer, size_t *currlen, size_t maxlen,
235 static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c);
247 size_t currlen;
657 currlen = 0;
670 if (maxlen != 0 && maxlen > currlen) {
671 if (maxlen > (currlen + cnk->len)) len = cnk->len;
672 else len = maxlen - currlen;
674 memcpy(&(buffer[currlen]), &(base[cnk->start]), len);
676 currlen += cnk->len;
682 fmtint (buffer, &currlen, maxlen, cnk->value, 10, min, max, cnk->flags);
686 fmtint (buffer, &currlen, maxlen, cnk->value, 8, min, max, cnk->flags);
690 fmtint (buffer, &currlen, maxlen, cnk->value, 16, min, max, cnk->flags);
694 fmtfp (buffer, &currlen, maxlen, cnk->fvalue, min, max, cnk->flags);
698 dopr_outch (buffer, &currlen, maxlen, cnk->value);
705 fmtstr (buffer, &currlen, maxlen, cnk->strvalue, cnk->flags, min, max);
709 fmtint (buffer, &currlen, maxlen, (long)(cnk->strvalue), 16, min, max, cnk->flags);
714 *((char *)(cnk->pnum)) = (char)currlen;
716 *((short int *)(cnk->pnum)) = (short int)currlen;
718 *((long int *)(cnk->pnum)) = (long int)currlen;
720 *((LLONG *)(cnk->pnum)) = (LLONG)currlen;
722 *((ssize_t *)(cnk->pnum)) = (ssize_t)currlen;
724 *((int *)(cnk->pnum)) = (int)currlen;
728 dopr_outch (buffer, &currlen, maxlen, '%');
738 if (currlen < maxlen - 1)
739 buffer[currlen] = '\0';
743 ret = currlen;
762 static void fmtstr(char *buffer, size_t *currlen, size_t maxlen,
783 dopr_outch (buffer, currlen, maxlen, ' ');
787 dopr_outch (buffer, currlen, maxlen, *value++);
791 dopr_outch (buffer, currlen, maxlen, ' ');
798 static void fmtint(char *buffer, size_t *currlen, size_t maxlen,
855 dopr_outch (buffer, currlen, maxlen, ' ');
861 dopr_outch (buffer, currlen, maxlen, signvalue);
866 dopr_outch (buffer, currlen, maxlen, '0');
873 dopr_outch (buffer, currlen, maxlen, convert[--place]);
877 dopr_outch (buffer, currlen, maxlen, ' ');
951 static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
1058 dopr_outch (buffer, currlen, maxlen, signvalue);
1063 dopr_outch (buffer, currlen, maxlen, '0');
1068 dopr_outch (buffer, currlen, maxlen, ' ');
1072 dopr_outch (buffer, currlen, maxlen, signvalue);
1075 dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
1086 dopr_outch (buffer, currlen, maxlen, '.');
1089 dopr_outch (buffer, currlen, maxlen, '0');
1094 dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
1098 dopr_outch (buffer, currlen, maxlen, ' ');
1103 static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
1105 if (*currlen < maxlen) {
1106 buffer[(*currlen)] = c;
1108 (*currlen)++;