X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Funictype%2Fbidi_name.c;h=d1a01da50b9c823a8cce89cc12afdac48dd2b253;hb=6a8461af29d6ce87d891ca8e1433848f5f4c45b8;hp=28bb4baa0d7a77da6f3e594961d4a337735092ec;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/lib/unictype/bidi_name.c b/lib/unictype/bidi_name.c index 28bb4baa0..d1a01da50 100644 --- a/lib/unictype/bidi_name.c +++ b/lib/unictype/bidi_name.c @@ -1,5 +1,5 @@ -/* Bidi categories of Unicode characters. - Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc. +/* Bidi classes of Unicode characters. + Copyright (C) 2002, 2006, 2011-2013 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software: you can redistribute it and/or modify it @@ -20,16 +20,22 @@ /* Specification. */ #include "unictype.h" -static const char u_bidi_category_name[19][4] = +static const char u_bidi_class_name[19][4] = { "L", "LRE", "LRO", "R", "AL", "RLE", "RLO", "PDF", "EN", "ES", "ET", "AN", "CS", "NSM", "BN", "B", "S", "WS", "ON" }; const char * -uc_bidi_category_name (int category) +uc_bidi_class_name (int bidi_class) { - if (category >= 0 && category < sizeof (u_bidi_category_name) / sizeof (u_bidi_category_name[0])) - return u_bidi_category_name[category]; + if (bidi_class >= 0 && bidi_class < sizeof (u_bidi_class_name) / sizeof (u_bidi_class_name[0])) + return u_bidi_class_name[bidi_class]; return NULL; } + +const char * +uc_bidi_category_name (int category) +{ + return uc_bidi_class_name (category); +}