text: /*
   * Warning: Do not edit!
   * This file is generated from a transliteration definition table with the name
   * "hebrew_transliterate.tr".
   */
  #include "translit_types.h"
  
  static unsigned char hebrew_transliterate_jump_map_5[256] = {
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  	0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 
  	3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 
  	3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 3, 1, 3, 
  	1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
  	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 
  	2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  };
  
  static unsigned short hebrew_transliterate_replace_map_5[256] = {
  	  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	  0, 101,  97, 111, 105, 101, 101,  97, 101, 111,   0, 117,   0,   0,  39,   0, 
  	124,   0,   0,  58,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, 
  	 39,  98, 103, 100, 104, 111, 122, 104, 116, 121, 107, 107, 108, 109, 109, 110, 
  	110, 115,  39, 112, 112, 122, 122, 113, 114, 115, 116,   0,   0,   0,   0,   0, 
  	  0,   0,   0,  39,  34,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0
  };
  
  static us2 hebrew_transliterate_expand_map_5[256] = {
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 2, 119, 119}, { 2, 119, 121}, { 2, 121, 121}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, 
  	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}
  };
  
  static unsigned char *hebrew_transliterate_jump_table[1] = {
  	hebrew_transliterate_jump_map_5,
  };
  static unsigned short *hebrew_transliterate_map_table[1] = {
  	hebrew_transliterate_replace_map_5,
  };
  static us2 *hebrew_transliterate_expand_table[1] = {
  	hebrew_transliterate_expand_map_5,
  };
  
  
  int hebrew_transliterate_convert(unsigned short *in, unsigned int in_length, unsigned short **out, unsigned int *out_length)
  {
  	unsigned int i, j, no_jump, jump, out_idx;
  	unsigned char block, cp;
  	unsigned char *jump_map;
  	unsigned short *replace_map, *transpose_map;
  	us2 *expand_map;
  	unsigned short *tmp_out = NULL;
  	unsigned int    str_length;
  
  	/* Init table pointers */
  	jump_map = NULL;
  	replace_map = NULL;
  	transpose_map = NULL;
  	expand_map = NULL;
  	j = 0;
  
  	/* Determine initial string length */
  	str_length = in_length;
  	tmp_out = (unsigned short *) malloc((str_length * sizeof(unsigned short)) + 8);
  	out_idx = 0;
  
  	/* Loop over input array */
  	for (i = 0; i < in_length; i++) {
  		if (out_idx >= str_length) {
  			str_length += 128;
  			tmp_out = (unsigned short *) realloc(tmp_out, str_length * sizeof(unsigned short));
  		}
  		
  		block = in[i] / 256;
  		cp    = in[i] % 256;
  
  		no_jump = 0;
  		switch (block) {
  			case 5: jump_map = hebrew_transliterate_jump_table[0]; replace_map = hebrew_transliterate_map_table[0]; expand_map = hebrew_transliterate_expand_table[0]; break;
  			default: no_jump = 1;
  		}
  		if (no_jump) {
  			jump = 0;
  		} else {
  			jump = jump_map[cp];
  		}
  
  		switch (jump) {
  			case 0: /* No changes */
  				tmp_out[out_idx] = in[i];
  				out_idx++;
  				break;
  			case 1: /* Simple mapping */
  				tmp_out[out_idx] = replace_map[cp];
  				out_idx++;
  				break;
  			case 2: /* Expand to more than one char */
  				for (j = 1; j <= expand_map[cp][0]; j++) {
  					tmp_out[out_idx] = expand_map[cp][j];
  					out_idx++;
  
  					if (out_idx >= str_length) {
  						str_length += 128;
  						tmp_out = (unsigned short *) realloc(tmp_out, str_length * sizeof(unsigned short));
  					}
  				}
  				break;
  			case 3: /* Skip */
  				break;
  		}
  	}
  	*out_length = out_idx;
  	*out = tmp_out;
  	return 0;
  }
  