X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Funictype%2Fbidi_name.c;h=275005269ee3ec44c542988aa6cfe754b37f8bb0;hb=96f023c5e537dd4afbdb294de7065f65effe3eb2;hp=1e8fab8c80800147e92721a946f41fc159472918;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/lib/unictype/bidi_name.c b/lib/unictype/bidi_name.c index 1e8fab8c8..275005269 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-2011 Free Software Foundation, Inc. +/* Bidi classes of Unicode characters. + Copyright (C) 2002, 2006, 2011-2012 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); +}