1 /* Copyright (c) 2002-2006 Lucent Technologies; see LICENSE */
8 /* format the output into f->to and return the number of characters fmted */
10 /* BUG: THIS FILE IS NOT UPDATED TO THE NEW SPEC */
12 dorfmt(Fmt *f, const Rune *fmt)
24 while((r = *fmt++) && r != '%'){
25 FMTRCHAR(f, rt, rs, r);
27 f->nfmt += rt - (Rune *)f->to;
30 return f->nfmt - nfmt;
35 while((r = *fmt++) && r != '%'){
36 FMTRUNE(f, t, f->stop, r);
38 f->nfmt += t - (char *)f->to;
41 return f->nfmt - nfmt;
45 fmt = (Rune*)__fmtdispatch(f, (Rune*)fmt, 1);
49 return 0; /* not reached */