src/chxj_chtml10.c
/**
 * Corresponding EMOJI to a current character-code is retrieved. 
 * The substitution character string is stored in the rslt pointer if agreeing.
 *
 * @param chtml10   [i]   The pointer to the CHTML structure is specified. 
 * @param txt     [i]   The character string to want to examine whether it is 
 *                      EMOJI is specified. 
 * @param rslt    [o]   The pointer to the pointer that stores the result is 
 *                      specified. 
 * @return When corresponding EMOJI exists, it returns it excluding 0. 
 */
Corresponding EMOJI to a current character-code is retrieved.
The substitution character string is stored in the rslt pointer if agreeing.

@param chtml10   [i]   The pointer to the CHTML structure is specified.
@param txt     [i]   The character string to want to examine whether it is
EMOJI is specified.
@param rslt    [o]   The pointer to the pointer that stores the result is
specified.
@return When corresponding EMOJI exists, it returns it excluding 0.
Corresponding EMOJI to a current character - code is retrieved . The substitution character string is stored in the rslt pointer if agreeing . @param chtml10 [ i ] The pointer to the CHTML structure is specified . @param txt [ i ] The character string to want to examine whether it is EMOJI is specified . @param rslt [ o ] The pointer to the pointer that stores the result is specified . @return When corresponding EMOJI exists it returns it excluding 0 .
static int
s_chtml10_search_emoji(chtml10_t *chtml10, char *txt, char **rslt)
{
  emoji_t       *ee;
  request_rec   *r;
  device_table  *spec;
  int           len;
  spec = chtml10->spec;
  len = strlen(txt);
  r = chtml10->doc->r;
  if (!spec) {
    DBG(r,"spec is NULL");
  }
  for (ee = chtml10->conf->emoji;
       ee;
       ee = ee->next) {
    if (!ee->imode) {
      DBG(r,"emoji->imode is NULL");
      continue;
    }
    if (ee->imode->string
    &&  txt
    &&  strlen(ee->imode->string) > 0
    &&  *ee->imode->string == *txt
    &&  strncasecmp(ee->imode->string, txt, strlen(ee->imode->string)) == 0) {
      if (!spec || !spec->emoji_type) {
        *rslt = apr_palloc(r->pool, 3);
        (*rslt)[0] = ee->imode->hex1byte & 0xff;
        (*rslt)[1] = ee->imode->hex2byte & 0xff;
        (*rslt)[2] = 0;
        return strlen(ee->imode->string);
      }
      return 0;
    }
  }
  return 0;
}
static int s_chtml10_search_emoji ( chtml10_t * chtml10 , char * txt , char * * rslt ) { emoji_t * ee ; request_rec * r ; device_table * spec ; int len ; spec = chtml10 -> spec ; len = strlen ( txt ) ; r = chtml10 -> doc -> r ; if ( ! spec ) { DBG ( r , " " ) ; } for ( ee = chtml10 -> conf -> emoji ; ee ; ee = ee -> next ) { if ( ! ee -> imode ) { DBG ( r , " " ) ; continue ; } if ( ee -> imode -> string && txt && strlen ( ee -> imode -> string ) > 0 && * ee -> imode -> string == * txt && strncasecmp ( ee -> imode -> string , txt , strlen ( ee -> imode -> string ) ) == 0 ) { if ( ! spec || ! spec -> emoji_type ) { * rslt = apr_palloc ( r -> pool , 3 ) ; ( * rslt ) [ 0 ] = ee -> imode -> hex1byte & 0xff ; ( * rslt ) [ 1 ] = ee -> imode -> hex2byte & 0xff ; ( * rslt ) [ 2 ] = 0 ; return strlen ( ee -> imode -> string ) ; } return 0 ; } } return 0 ; }
Corresponding EMOJI to a current character-code is retrieved.
Corresponding EMOJI to a current character - code is retrieved .