From: Keith Packard Date: Wed, 5 Mar 2003 05:52:51 +0000 (+0000) Subject: Add FcLangSetPrint X-Git-Tag: fc-2_1_92~29 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=55ef7dac64d9202217c6f42e53ddf1549c2da385;p=fontconfig.git Add FcLangSetPrint --- diff --git a/src/fcdbg.c b/src/fcdbg.c index 6732045..1b6ca41 100644 --- a/src/fcdbg.c +++ b/src/fcdbg.c @@ -1,7 +1,7 @@ /* - * $XFree86: xc/lib/fontconfig/src/fcdbg.c,v 1.10 2002/08/22 18:53:22 keithp Exp $ + * $RCSId: xc/lib/fontconfig/src/fcdbg.c,v 1.10 2002/08/22 18:53:22 keithp Exp $ * - * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + * Copyright © 2000 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -29,9 +29,6 @@ void FcValuePrint (const FcValue v) { - FcStrBuf buf; - FcChar8 init_buf[1024]; - switch (v.type) { case FcTypeVoid: printf (" "); @@ -55,12 +52,8 @@ FcValuePrint (const FcValue v) printf (" set"); break; case FcTypeLangSet: - FcStrBufInit (&buf, init_buf, sizeof (init_buf)); - if (FcNameUnparseLangSet (&buf, v.u.l) && FcStrBufChar (&buf,'\0')) - printf (" %s", buf.buf); - else - printf ("langset (alloc error)"); - FcStrBufDestroy (&buf); + printf (" "); + FcLangSetPrint (v.u.l); break; case FcTypeFTFace: printf (" face"); @@ -88,6 +81,20 @@ FcValueListPrint (const FcValueList *l) } } +void +FcLangSetPrint (const FcLangSet *ls) +{ + FcStrBuf buf; + FcChar8 init_buf[1024]; + + FcStrBufInit (&buf, init_buf, sizeof (init_buf)); + if (FcNameUnparseLangSet (&buf, ls) && FcStrBufChar (&buf,'\0')) + printf ("%s", buf.buf); + else + printf ("langset (alloc error)"); + FcStrBufDestroy (&buf); +} + void FcPatternPrint (const FcPattern *p) {