AsciiSpc.c 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $TOG: AsciiSpc.c /main/6 1999/02/24 12:04:30 mgreess $ */
  24. /************************************<+>*************************************
  25. ****************************************************************************
  26. **
  27. ** File: AsciiSpc.c
  28. **
  29. ** Project: Cde Help Library
  30. **
  31. ** Description: This file resolves an <spc> spec into an ascii
  32. ** representation of the special character.
  33. **
  34. ** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
  35. **
  36. ** (c) Copyright 1993, 1994 Hewlett-Packard Company
  37. ** (c) Copyright 1993, 1994 International Business Machines Corp.
  38. ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  39. ** (c) Copyright 1993, 1994 Novell, Inc.
  40. ****************************************************************************
  41. ************************************<+>*************************************/
  42. /*
  43. * system includes
  44. */
  45. #include <string.h>
  46. /*
  47. * private includes
  48. */
  49. #include "AsciiSpcI.h"
  50. #ifdef NLS16
  51. #endif
  52. /******** Private Function Declarations ********/
  53. /******** End Public Function Declarations ********/
  54. /******************************************************************************
  55. *
  56. * Private variables and defines.
  57. *
  58. *****************************************************************************/
  59. typedef struct {
  60. const char *symbol;
  61. const char *spc_string;
  62. } SpecialSymbolTable;
  63. static SpecialSymbolTable SpcTable[] =
  64. {
  65. /*
  66. * comment out the entries that map to a blank.
  67. * The last entry will catch them and map them to a blank
  68. * anyway. This will shorten the table by quite a bit.
  69. */
  70. /*{"[aacute]", " " }, *ISOlat1, small a, acute accent */
  71. /*{"[acirc ]", " " }, *ISOlat1, small a, circumflex */
  72. /*{"[aelig ]", " " }, *ISOlat1, small ae diphthong */
  73. /*{"[agrave]", " " }, *ISOlat1, small a, grave accent */
  74. /*{"[alpha ]", " " }, *ISOgrk3, Greek, small alpha */
  75. /*{"[aleph ]", " " }, *ISOtech, aleph, Hebrews */
  76. {"[amp ]", "&" }, /*ISOnum , ampersand */
  77. {"[and ]", "^" }, /*ISOtech, wedge, logical and */
  78. /*{"[ang ]", " " }, *ISOamso, angle */
  79. /*{"[angst ]", " " }, *ISOtech, Angstrom, cap A, ring */
  80. {"[ap ]", "~=" }, /*ISOtech, approximately equal */
  81. {"[apos ]", "'" }, /*ISOnum , apostrophe */
  82. /*{"[aring ]", " " }, *ISOlat1, small a, ring */
  83. {"[ast ]", "*" }, /*ISOnum , asterisk */
  84. /*{"[atilde]", " " }, *ISOlat1, small a, tilde */
  85. /*{"[auml ]", " " }, *ISOlat1, small a, umlaut mark */
  86. /*{"[beta ]", " " }, *ISOgrk3, Greek, small beta */
  87. /*{"[blank ]", " " }, *ISOpub , significant blank */
  88. /*{"[bottom]", " " }, *ISOtech, bottom symbol */
  89. {"[bsol ]", "\\" }, /*ISOnum , backslash, rev solidus*/
  90. {"[bull ]", "*" }, /*ISOpub , round bullet,filled */
  91. /*{"[brvbar]", "|" }, *ISOnum , broken vertical bar */
  92. /*{"[cap ]", " " }, *ISOtech, intersection */
  93. /*{"[ccedil]", " " }, *ISOlat1, small c, cedilla */
  94. /*{"[cent ]", " " }, *ISOnum , cent sign */
  95. /*{"[chi ]", " " }, *ISOgrk3, Greek, small chi */
  96. /*{"[clubs ]", " " }, *ISOpub , clubs suit symbol */
  97. {"[colon ]", ":" }, /*ISOnum , colon */
  98. {"[comma ]", "," }, /*ISOnum , comma */
  99. {"[commat]", "@" }, /*ISOnum , commercial at */
  100. /*{"[cong ]", " " }, *ISOtech, congruent with */
  101. /*{"[copy ]", " " }, *ISOnum , copyright symbol */
  102. {"[cup ]", "U" }, /*ISOtech, union or logical sum */
  103. /*{"[curren]", " " }, *ISOnum , general currency sign */
  104. /*{"[darr ]", " " }, *ISOnum , downward arrow */
  105. /*{"[dArr ]", " " }, *ISOamsa, down double arrow */
  106. {"[dash ]", "-" }, /*ISOpub , dash */
  107. /*{"[deg ]", " " }, *ISOnum , degree sign */
  108. /*{"[delta ]", " " }, *ISOgrk3, Greek, small delta */
  109. /*{"[diams ]", " " }, *ISOpub , diamond suit symbol */
  110. {"[divide]", "/" }, /*ISOnum , divide sign */
  111. {"[dollar]", "$" }, /*ISOnum , dollar sign */
  112. /*{"[eacute]", " " }, *ISOlat1, small e, acute accent */
  113. /*{"[ecirc ]", " " }, *ISOlat1, small e, circumflex */
  114. /*{"[egrave]", " " }, *ISOlat1, small e, grave accent */
  115. /*{"[empty ]", " " }, *ISOamso, empty string, o/slash */
  116. /*{"[epsiv ]", " " }, *ISOgrk3, Greek,sm epsilon, var */
  117. {"[equals]", "=" }, /*ISOnum , equals sign */
  118. /*{"[equiv ]", " " }, *ISOtech, identical with */
  119. /*{"[eta ]", " " }, *ISOgrk3, Greek, small eta */
  120. /*{"[eth ]", " " }, *ISOlat1, small eth, Icelandic */
  121. /*{"[euml ]", " " }, *ISOlat1, small e, umlaut mark */
  122. {"[excl ]", "!" }, /*ISOnum , exclamation mark */
  123. /*{"[exist ]", " " }, *ISOtech, at least one exists */
  124. /*{"[forall]", " " }, *ISOtech, for all */
  125. {"[frac12]", "1/2" }, /*ISOnum , fraction one-half */
  126. {"[frac13]", "1/3" }, /*ISOnum , fraction one-third */
  127. {"[frac14]", "1/4" }, /*ISOnum , fraction one-quarter */
  128. {"[frac15]", "1/5" }, /*ISOnum , fraction one-fifth */
  129. {"[frac16]", "1/6" }, /*ISOnum , fraction one-sixth */
  130. {"[frac18]", "1/8" }, /*ISOnum , fraction one-eight */
  131. {"[frac23]", "2/3" }, /*ISOnum , fraction two-thirds */
  132. {"[frac25]", "2/5" }, /*ISOnum , fraction two-fifths */
  133. {"[frac34]", "3/4" }, /*ISOnum , fraction three-quarter*/
  134. {"[frac35]", "3/5" }, /*ISOnum , fraction three-fifths */
  135. {"[frac38]", "3/8" }, /*ISOnum , fraction three-eights */
  136. {"[frac45]", "4/5" }, /*ISOnum , fraction four-fifths */
  137. {"[frac56]", "5/6" }, /*ISOnum , fraction five-sixths */
  138. {"[frac58]", "5/8" }, /*ISOnum , fraction five-eights */
  139. {"[frac78]", "7/8" }, /*ISOnum , fraction seven-eights */
  140. /*{"[gamma ]", " " }, *ISOgrk3, Greek, small gamma */
  141. {"[ge ]", ">=" }, /*ISOtech, greater-than-or-equal */
  142. {"[gt ]", ">" }, /*ISOnum , greater than sign */
  143. {"[half ]", "1/2" }, /*ISOnum , fraction one-half */
  144. {"[harr ]", "<-->" }, /*ISOamsa, left & right arrow */
  145. {"[hArr ]", "<<==>>" }, /*ISOamsa, l & r double arrow */
  146. /*{"[hearts]", " " }, *ISOpub , hearts suit symbol */
  147. {"[hellip]", "..." }, /*ISOpub , ellipsis(horizontal) */
  148. {"[horbar]", "--" }, /*ISOnum , horizontal bar */
  149. {"[hyphen]", "-" }, /*ISOnum , hyphen */
  150. /*{"[iacute]", " " }, *ISOlat1, small i, acute accent */
  151. /*{"[icirc ]", " " }, *ISOlat1, small i, circumflex */
  152. /*{"[iexcl ]", " " }, *ISOnum , inverted ! mark */
  153. /*{"[igrave]", " " }, *ISOlat1, small i, grave accent */
  154. /*{"[image ]", " " }, *ISOamso,imaginary number symbol*/
  155. /*{"[infin ]", " " }, *ISOtech, infinity */
  156. /*{"[int ]", " " }, *ISOtech, intergral operator */
  157. /*{"[iota ]", " " }, *ISOgrk3, Greek, small iota */
  158. /*{"[iquest]", " " }, *ISOnum , inverted ? mark */
  159. /*{"[isin ]", " " }, *ISOtech, set membership */
  160. /*{"[iuml ]", " " }, *ISOlat1, small i, umlaut mark */
  161. /*{"[kappa ]", " " }, *ISOgrk3, Greek, small kappa */
  162. /*{"[lambda]", " " }, *ISOgrk3, Greek, small lambda */
  163. /*{"[lang ]", " " }, *ISOtech, left angle bracket */
  164. {"[laquo ]", "<<" }, /*ISOnum , left angle quotation */
  165. {"[larr ]", "<--" }, /*ISOnum , leftward arrow */
  166. {"[lArr ]", "<==" }, /*ISOtech, is implied by */
  167. {"[lcub ]", "{" }, /*ISOnum , left curly brace */
  168. {"[ldquo ]", "\"" }, /*ISOnum , left double quote */
  169. {"[le ]", "=<" }, /*ISOtech, less-than-or-equal */
  170. {"[lowbar]", "_" }, /*ISOnum , low line */
  171. {"[lpar ]", "(" }, /*ISOnum , left parenthesis */
  172. {"[lsqb ]", "[" }, /*ISOnum , left square bracket */
  173. {"[lsquo ]", "`" }, /*ISOnum , left single quote */
  174. {"[lsquor]", "," }, /*ISOnum,rising single quote(low)*/
  175. {"[lt ]", "<" }, /*ISOnum , less-than sign */
  176. {"[mdash ]", "--" }, /*ISOpub , em dash(long dash) */
  177. /*{"[micro ]", " " }, *ISOnum , micro */
  178. /*{"[middot]", " " }, *ISOnum , middle dot */
  179. {"[minus ]", "-" }, /*ISOtech, minus sign */
  180. {"[mldr ]", "...." }, /*ISOpub , em leader */
  181. {"[mnplus]", "-/+" }, /*ISOtech, minus-or-plus sign */
  182. /*{"[mu ]", " " }, *ISOgrk3, Greek, small mu */
  183. /*{"[nabla ]", " " }, *ISOtech, del, Hamilton operator*/
  184. {"[nbsp ]", " " }, /*ISOnum , no break space */
  185. {"[ndash ]", "-" }, /*ISOpub , en dash(short dash) */
  186. {"[ne ]", "!=" }, /*ISOtech, not equal */
  187. /*{"[ni ]", " " }, *ISOtech, contains */
  188. {"[nldr ]", ".." }, /*ISOpub , double baseline dot */
  189. /*{"[not ]", " " }, *ISOnum , not */
  190. /*{"[notin ]", " " }, *ISOtech, negated set membership*/
  191. /*{"[ntilde]", " " }, *ISOlat1, small N, tilde */
  192. /*{"[nu ]", " " }, *ISOgrk3, Greek, small nu */
  193. {"[num ]", "#" }, /*ISOnum , number sign */
  194. /*{"[oacute]", " " }, *ISOlat1, small o, acute accent */
  195. /*{"[ocirc ]", " " }, *ISOlat1, small o, circumflex */
  196. /*{"[ograve]", " " }, *ISOlat1, small o, grave accent */
  197. /*{"[ohm ]", " " }, *ISOnum , ohm */
  198. /*{"[omega ]", " " }, *ISOgrk3, Greek, small omega */
  199. /*{"[oplus ]", " " }, *ISOamsb, plus sign in circle */
  200. {"[or ]", "V" }, /*ISOtech, vee, logical or */
  201. /*{"[ordf ]", " " }, *ISOnum , ordinal indicator, fem*/
  202. /*{"[ordm ]", " " }, *ISOnum , ordinal indicator,male*/
  203. /*{"[oslash]", " " }, *ISOlat1, small o, slash */
  204. /*{"[osol ]", " " }, *ISOamsb, slash in circle */
  205. /*{"[otilde]", " " }, *ISOlat1, small o, tilde */
  206. /*{"[otimes]", " " }, *ISOamsb,multiply sign in circle*/
  207. /*{"[ouml ]", " " }, *ISOlat1, small o, umlaut mark */
  208. /*{"[over ]", " " }, *made up, over symbol */
  209. {"[par ]", "||" }, /*ISOtech, parallel */
  210. /*{"[para ]", " " }, *ISOnum , paragraph sign */
  211. /*{"[part ]", " " }, *ISOtech, partial differential */
  212. {"[percnt]", "%" }, /*ISOnum , percent sign */
  213. {"[period]", "." }, /*ISOnum , full stop, period */
  214. /*{"[perp ]", " " }, *ISOtech, perpendicular */
  215. /*{"[phis ]", " " }, *ISOgrk3, Greek, small phi */
  216. /*{"[pi ]", " " }, *ISOgrk3, Greek, small pi */
  217. /*{"[piv ]", " " }, *ISOgrk3, Greek, small pi, var */
  218. {"[plus ]", "+" }, /*ISOnum , plus sign */
  219. {"[plusmn]", "+/-" }, /*ISOnum , plus or minus sign */
  220. {"[pound ]", "#" }, /*ISOnum , pound sign */
  221. {"[prime ]", "\'" }, /*ISOtech, prime or minute */
  222. /*{"[prop ]", " " }, *ISOtech, proportional to */
  223. /*{"[psi ]", " " }, *ISOgrk3, Greek, small psi */
  224. {"[quest ]", "?" }, /*ISOnum , question mark */
  225. {"[quot ]", "'" }, /*ISOnum , quote mark */
  226. /*{"[radic ]", " " }, *ISOtech, radical */
  227. /*{"[rang ]", " " }, *ISOtech, right angle bracket */
  228. {"[raquo ]", ">>" }, /*ISOnum , right angle quotation */
  229. {"[rarr ]", "-->" }, /*ISOnum , rightward arrow */
  230. {"[rArr ]", "==>>" }, /*ISOtech, right double arrow */
  231. {"[rcub ]", "}" }, /*ISOnum , right curly brace */
  232. {"[rdquo ]", "\"" }, /*ISOnum , right double quote */
  233. /*{"[real ]", " " }, *ISOamso, real number symbol */
  234. /*{"[reg ]", " " }, *ISOnum,circledR,registered sign*/
  235. /*{"[rho ]", " " }, *ISOgrk3, Greek, small rho */
  236. {"[rpar ]", ")" }, /*ISOnum , right parenthesis */
  237. {"[rsqb ]", "]" }, /*ISOnum , right square bracket */
  238. {"[rsquo ]", "'" }, /*ISOnum , right single quote */
  239. /*{"[sect ]", " " }, *ISOnum , section sign */
  240. {"[semi ]", ";" }, /*ISOnum , semicolon */
  241. {"[shy ]", "-" }, /*ISOnum , soft hypen */
  242. /*{"[sigma ]", " " }, *ISOgrk3, Greek, small sigma */
  243. {"[sim ]", "~" }, /*ISOtech, similar to */
  244. {"[sime ]", "~=" }, /*ISOtech, similar, equals */
  245. {"[sol ]", "/" }, /*ISOnum , solidus */
  246. /*{"[spades]", " " }, *ISOpub , spades suit symbol */
  247. /*{"[sub ]", " " }, *ISOtech, subset/is implied by */
  248. /*{"[sung ]", " " }, *ISOnum , musical note(sung txt)*/
  249. /*{"[sube ]", " " }, *ISOtech, subset, equals */
  250. /*{"[sup ]", " " }, *ISOtech, superset or implies */
  251. /*{"[sup1 ]", " " }, *ISOnum , superscript one */
  252. /*{"[sup2 ]", " " }, *ISOnum , superscript two */
  253. /*{"[sup3 ]", " " }, *ISOnum , superscript three */
  254. /*{"[supe ]", " " }, *ISOtech, superset, equals */
  255. /*{"[szlig ]", " " }, *ISOlat1, small sharp s, German */
  256. /*{"[tau ]", " " }, *ISOgrk3, Greek, small tau */
  257. /*{"[there4]", " " }, *ISOtech, therefore */
  258. /*{"[thetas]", " " }, *ISOgrk3, Greek, small theta */
  259. /*{"[thetav]", " " }, *ISOgrk3, Greek, small theta,var*/
  260. /*{"[thorn ]", " " }, *ISOlat1, small thorn, Icelandic*/
  261. {"[times ]", "x" }, /*ISOnum , multipy sign */
  262. {"[tprime]", "'''" }, /*ISOtech, triple prime */
  263. /*{"[trade ]", " " }, *ISOnum , trade mark sign */
  264. /*{"[uacute]", " " }, *ISOlat1, small u, acute accent */
  265. /*{"[ucirc ]", " " }, *ISOlat1, small u, circumflex */
  266. /*{"[ugrave]", " " }, *ISOlat1, small u, grave accent */
  267. /*{"[uarr ]", " " }, *ISOnum , upward arrow */
  268. /*{"[uArr ]", " " }, *ISOamsa, up double arrow */
  269. /*{"[upsi ]", " " }, *ISOgrk3, Greek, small upsilon */
  270. /*{"[uuml ]", " " }, *ISOlat1, small u, umlaut mark */
  271. {"[vellip]", ".\n.\n.\n" }, /*ISOpub , vertical ellipsis */
  272. {"[verbar]", "|" }, /*ISOnum , vertical bar */
  273. /*{"[weierp]", " " }, *ISOamso, Weierstrass p */
  274. /*{"[xi ]", " " }, *ISOgrk3, Greek, small xi */
  275. /*{"[yacute]", " " }, *ISOlat1, small y, acute accent */
  276. /*{"[yen ]", " " }, *ISOnum , yen sign */
  277. /*{"[yuml ]", " " }, *ISOlat1, small y, umlaut mark */
  278. /*{"[zeta ]", " " }, *ISOgrk3, Greek, small zeta */
  279. /*{"[Aacute]", " " }, *ISOlat1, capital a,acute accent*/
  280. /*{"[Acirc ]", " " }, *ISOlat1, capital a,circumflex */
  281. /*{"[AElig ]", " " }, *ISOlat1, capital ae diphthong */
  282. /*{"[Agrave]", " " }, *ISOlat1, capital a,grave accent*/
  283. /*{"[Aring ]", " " }, *ISOlat1, capital a,ring */
  284. /*{"[Atilde]", " " }, *ISOlat1, capital a,tilde */
  285. /*{"[Auml ]", " " }, *ISOlat1, capital a,umlaut mark */
  286. /*{"[Ccedil]", " " }, *ISOlat1, capital c, cedilla */
  287. /*{"[Delta ]", " " }, *ISOgrk3, Greek, large delta */
  288. /*{"[Dot ]", " " }, *ISOtech, dieresis or umlaut mrk*/
  289. /*{"[DotDot]", " " }, *ISOtech, four dots above */
  290. /*{"[Eacute]", " " }, *ISOlat1, capital E,acute accent*/
  291. /*{"[Ecirc ]", " " }, *ISOlat1, capital E,circumflex */
  292. /*{"[Egrave]", " " }, *ISOlat1, capital E,grave accent*/
  293. /*{"[ETH ]", " " }, *ISOlat1, capital Eth, Icelandic*/
  294. /*{"[Euml ]", " " }, *ISOlat1, capital E,umlaut mark */
  295. /*{"[Gamma ]", " " }, *ISOgrk3, Greek, large gamma */
  296. /*{"[Iacute]", " " }, *ISOlat1, capital I,acute accent*/
  297. /*{"[Icirc ]", " " }, *ISOlat1, capital I,circumflex */
  298. /*{"[Igrave]", " " }, *ISOlat1, capital I,grave accent*/
  299. /*{"[Iuml ]", " " }, *ISOlat1, capital I,umlaut mark */
  300. /*{"[Lambda]", " " }, *ISOgrk3, Greek, large lambda */
  301. /*{"[Ntilde]", " " }, *ISOlat1, capital N, tilde */
  302. /*{"[Oacute]", " " }, *ISOlat1, capital O,acute accent*/
  303. /*{"[Ocirc ]", " " }, *ISOlat1, capital O,circumflex */
  304. /*{"[Ograve]", " " }, *ISOlat1, capital O,grave accent*/
  305. /*{"[Omega ]", " " }, *ISOgrk3, Greek, large omega */
  306. /*{"[Oslash]", " " }, *ISOlat1, capital O, slash */
  307. /*{"[Otilde]", " " }, *ISOlat1, capital O, tilde */
  308. /*{"[Ouml ]", " " }, *ISOlat1, capital O,umlaut mark */
  309. /*{"[Pi ]", " " }, *ISOgrk3, Greek, large pi */
  310. {"[Prime ]", "\"" }, /*ISOtech, double prime/second */
  311. /*{"[Phi ]", " " }, *ISOgrk3, Greek, large phi */
  312. /*{"[Psi ]", " " }, *ISOgrk3, Greek, large psi */
  313. /*{"[Sigma ]", " " }, *ISOgrk3, Greek, large sigma */
  314. /*{"[Theta ]", " " }, *ISOgrk3, Greek, large theta */
  315. /*{"[THORN ]", " " }, *ISOlat1,capital THORN,Icelandic*/
  316. /*{"[Uacute]", " " }, *ISOgrk3, Greek, large theta */
  317. /*{"[Ucirc ]", " " }, *ISOlat1, capital U,acute accent*/
  318. /*{"[Ugrave]", " " }, *ISOlat1, capital U,circumflex */
  319. /*{"[Upsi ]", " " }, *ISOgrk3, Greek, large upsilon */
  320. /*{"[Uuml ]", " " }, *ISOlat1, capital U,umlaut mark */
  321. {"[Verbar]", "||" }, /*ISOtech, dbl vertical bar */
  322. /*{"[Xi ]", " " }, *ISOgrk3, Greek, large xi */
  323. /*{"[Yacute]", " " }, *ISOlat1, capital Y,acute accent*/
  324. { NULL , " " }, /* default character to use */
  325. };
  326. /******************************************************************************
  327. *
  328. * Semi Public functions
  329. *
  330. ******************************************************************************/
  331. /*****************************************************************************
  332. * Function: const char *_DtHelpCeResolveSpcToAscii ();
  333. *
  334. * Parameters:
  335. *
  336. * Returns:
  337. *
  338. * Purpose:
  339. *
  340. *****************************************************************************/
  341. const char *
  342. _DtHelpCeResolveSpcToAscii (
  343. const char *spc_symbol)
  344. {
  345. int i = 0;
  346. if (NULL == spc_symbol)
  347. return NULL;
  348. while (NULL != SpcTable[i].symbol &&
  349. 0 != strcmp(SpcTable[i].symbol, spc_symbol))
  350. i++;
  351. if (SpcTable[i].symbol != NULL)
  352. return (SpcTable[i].spc_string);
  353. return NULL;
  354. }