

/* This version of UCSCU is becoming obsolute.
   If you wish to use UCSCU in the development of new applications,
   try my new version.

   The new version offers the following features:

   Hundreds of new characters.
   Better support for TeX representations.
   You can process a whole file, or a given string.
*/

#ifndef char_8bit
#ifdef __BCPLUSPLUS__
#define char_8bit  char
#else
#define char_8bit unsigned char
#endif
#endif

#ifdef __cplusplus
#define const_char const char
#else
#define const_char char
#endif

#define UCSCU_END_TABLE  0


enum symbols{

A_acute = 257,
a_acute,
A_breve,
a_breve,
A_tail,
a_tail,
A_circle,
a_circle,
A_circumflex,
a_circumflex,
A_diaeresis,
a_diaeresis,
A_E,
a_e,
A_grave,
a_grave,
A_macron,
a_macron,
A_tilde,
a_tilde,
a_underlined,

B_german_S,

C_acute,
c_acute,
C_backwards,
C_chz,
c_chz,
C_cedilla,
c_cedilla,

D_bar,
d_bar,
D_chz,
d_chz,

E_acute,
e_acute,
E_breve,
e_breve,
E_chz,
e_chz,
E_tail,
e_tail,
E_circumflex,
e_circumflex,
E_diaeresis,
e_diaeresis,
E_grave,
e_grave,
E_macron,
e_macron,

I_acute,
i_acute,
I_circumflex,
i_circumflex,
I_diaeresis,
i_diaeresis,
I_grave,
i_grave,

I_P,
I_p,
i_j,

J_circumflex,
j_circumflex,

H_circumflex,
h_circumflex,

L_acute,
l_acute,
L_chz,
l_chz,
L_slash,
l_slash,
L_dot,
l_dot,

N_acute,
n_acute,
N_chz,
n_chz,
N_tilde,
n_tilde,


O_acuteacute,
o_acuteacute,
O_acute,
o_acute,
O_circumflex,
o_circumflex,
O_diaeresis,
o_diaeresis,
O_E,
o_e,
O_grave,
o_grave,
O_slash,
o_slash,
O_tilde,
o_tilde,
o_underlined,

R_acute,
r_acute,
R_chz,
r_chz,

S_acute,
s_acute,
S_cedilla,
s_cedilla,
S_tail,
s_tail,
S_circumflex,
s_circumflex,
S_breve,
s_breve,
S_chz,
s_chz,

T_cedilla,
t_cedilla,
T_chz,
t_chz,

U_acute,
u_acute,
U_acuteacute,
u_acuteacute,
U_breve,
u_breve,
U_circle,
u_circle,
U_circumflex,
u_circumflex,
U_diaeresis,
u_diaeresis,
U_grave,
u_grave,

Y_acute,
y_acute,
Y_diaeresis,
y_diaeresis,

Z_acute,
z_acute,
Z_chz,
z_chz,
Z_plus,
z_plus,

/* Diacritical marks */

DM_macron,
DM_center_bar,
DM_under_bar,
DM_circumflex,
DM_breve,
DM_chz,
DM_tilde,
DM_diaeresis,
DM_cedilla,
DM_tail,
DM_acute,
DM_grave,
DM_virgule,
DM_parallels,
DM_circle,
DM_plus,
DM_acuteacute,

/* Text symbols */
SYM_daggar,
SYM_double_daggar,
SYM_paragraph,
SYM_section,
SYM_big_asterisk,
SYM_house,

/* Buisness */
SYM_copyright,
SYM_registered,
SYM_pounds,
SYM_yen,
SYM_cents,
SYM_trade_mark,
SYM_francs,
SYM_Tx,
SYM_Pt,
SYM_degrees_C,
SYM_degrees_F,
SYM_degrees,
SYM_X_circle,

/* Punctuation */
SYM_UD_question,
SYM_UD_exclamation,
SYM_double_exclamation,
SYM_french_begin_quote,
SYM_french_end_quote,
SYM_bar_left,
SYM_bar_right,
SYM_split_vert_bar,
SYM_vert_bar,

/* directional */

SYM_arrow_left,
SYM_arrow_right,
SYM_arrow_leftright,
SYM_arrow_down,
SYM_arrow_up,
SYM_arrow_updown,
SYM_arrow_updown_under,
SYM_triangle_left,
SYM_triangle_right,
SYM_triangle_up,
SYM_triangle_down,
SYM_triangle_left_solid,
SYM_triangle_right_solid,
SYM_triangle_up_solid,
SYM_triangle_down_solid,

TRIANGLE_ULC,
TRIANGLE_LLC,
TRIANGLE_URC,
TRIANGLE_LRC,

/* Graphics */

SYM_bar,
SYM_diamond_open,
SYM_square,
SYM_filled_square,
SYM_small_circle,
SYM_small_circle_rvrsd,
SYM_circle,
SYM_filled_circle,
SYM_largedot_rvrsd,
SYM_largedot,
SYM_cdot,
SYM_cpoint,

SYM_smiley_white,
SYM_smiley_black,
SYM_heart,
SYM_diamond,
SYM_club,
SYM_spade,
SYM_male,
SYM_female,

/* 12  Quarter Block graphics,
   34                         */

QBG_1,
QBG_2,
QBG_3,
QBG_4,
QBG_12,
QBG_13,
QBG_14,
QBG_23,
QBG_24,
QBG_34,
QBG_123,
QBG_134,
QBG_124,
QBG_234,
QBG_1234,

/* circle quarters */

CQ_1,
CQ_2,
CQ_3,
CQ_4,

/* checker board */

CB_low,
CB_med,
CB_high,


/* Line graphics */
/* V   vertical,
   H   Horizontal,
   T   Tee,
   B   Bar,
   C   Corner,
   I   Intersection,
   L   Left,
   R   Right,
   U   Up,
   D   Down,
   s   single,
   d   double,
*/

LG_sVB,
LG_sLT,
LG_dLsT,
LG_sLdT,
LG_sLdDC,
LG_dLsDC,
LG_dLT,
LG_dVB,
LG_dLDC,
LG_dLUC,
LG_sLdUC,
LG_dLsUC,
LG_sLDC,
LG_sUsRC,
LG_sUT,
LG_sDT,
LG_sRT,
LG_sHB,
LG_sUDLRI,
LG_dRsT,
LG_sRdT,
LG_dURC,
LG_dDRC,
LG_dUT,  
LG_dDT,
LG_dRT,
LG_dHB,
LG_dUDLRI,
LG_sUdT,
LG_dUsT,
LG_sDdT,
LG_dDsT,
LG_dUsRC,
LG_sUdRC,
LG_sDdRC,
LG_dDsRC,
LG_dUDsLRI,
LG_sUDdLRI,
LG_sULC,
LG_sDRC,

/* Math */

SYM_one_half,
SYM_one_quarter,
SYM_three_quarters,
SYM_exponent_1,
SYM_exponent_2,
SYM_exponent_3,
SYM_exponent_n,
SYM_GTE,
SYM_LTE,
SYM_plus_minus,
SYM_infinity,
SYM_equivelence,
SYM_intersection,
SYM_union,
SYM_approximate,
SYM_root,
SYM_times,
SYM_overline_x,
SYM_division,

/* Music */

SYM_quaver,
SYM_quaverquaver,

/* Greek */

GRK_alpha,
GRK_beta,
GRK_gamma,
GRK_delta,
GRK_epsilon,
GRK_zeta,
GRK_eta,
GRK_theta,
GRK_iota,
GRK_kappa,
GRK_lambda,
GRK_mu,
GRK_nu,
GRK_xi,
GRK_pi,
GRK_omicron,
GRK_rho,
GRK_sigma,
GRK_tau,
GRK_upsilon,
GRK_phi,
GRK_chi,
GRK_psi,
GRK_omega,

GRK_Alpha,
GRK_Beta,
GRK_Gamma,
GRK_Delta,
GRK_Epsilon,
GRK_Zeta,
GRK_Eta,
GRK_Theta,
GRK_Iota,
GRK_Kappa,
GRK_Lambda,
GRK_Mu,
GRK_Nu,
GRK_Xi,
GRK_Pi,
GRK_Omicron,
GRK_Rho,
GRK_Sigma,
GRK_Tau,
GRK_Upsilon,
GRK_Phi,
GRK_Chi,
GRK_Psi,
GRK_Omega,

GRK_UDOmega
};


struct UCSCU_TeX_layout
{
  char *TeX;
  int symbol;
};

extern struct UCSCU_TeX_layout UCSCU_TeX_table[];

struct UCSCU_HTML_layout
{
  char *HTML;
  int symbol;
};
extern struct UCSCU_HTML_layout UCSCU_HTML_table[];



#ifndef UCSCU_STANDALONE

#if defined(__STDC__) || defined(__cplusplus)
char *UCSCU_string(char *instr,char *outstr);
char_8bit *UCSCU_char(int cs_code);
int UCSCU_file(char *input_filename, char *output_filename);
void UCSCU_prompt_input_options(void);
void UCSCU_prompt_output_options(void);
void UCSCU_prompt_options(void);
void UCSCU_parse_command_line(int argc,char *argv[]);
void UCSCU_show_usage(void);
char *UCSCU_lookup_code_HTML(int symbol);

#else
extern char *UCSCU_string();
extern char_8bit *UCSCU_char();
extern void UCSCU_prompt_input_options();
extern void UCSCU_prompt_output_options();
extern void UCSCU_prompt_options();
extern int  UCSCU_file();
extern void UCSCU_parse_command_line();
extern void UCSCU_show_usage();
char *UCSCU_lookup_code_HTML();

#endif
#endif
