src/chxj_chtml50.c
static int
s_chtml50_search_emoji(chtml50_t *chtml50, char *txt, char **rslt)
{
  emoji_t       *ee;
  request_rec   *r;
  device_table  *spec;
  int           len;

  spec = chtml50->spec;

  len = strlen(txt);
  r   = chtml50->doc->r;

  if (!spec) {
    DBG(r,"spec is NULL");
  }

  for (ee = chtml50->conf->emoji;
       ee;
       ee = ee->next) {
    if (ee->imode == NULL) {
      DBG(r, "emoji->imode is NULL");
      continue;
    }

    if (ee->imode->string != NULL
    &&  strlen(ee->imode->string) > 0
    &&  strncasecmp(ee->imode->string, txt, strlen(ee->imode->string)) == 0) {

      if (spec == NULL || spec->emoji_type == NULL) {
        *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. 
 * The substitution character string is stored in the rslt pointer if agreeing.
 *
 * @param chtml50   [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 chtml50   [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 chtml50 [ 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_chtml50_search_emoji(chtml50_t *chtml50, char *txt, char **rslt)
{
  emoji_t       *ee;
  request_rec   *r;
  device_table  *spec;
  int           len;
  spec = chtml50->spec;
  len = strlen(txt);
  r   = chtml50->doc->r;
  if (!spec) {
    DBG(r,"spec is NULL");
  }
  for (ee = chtml50->conf->emoji;
       ee;
       ee = ee->next) {
    if (ee->imode == NULL) {
      DBG(r, "emoji->imode is NULL");
      continue;
    }
    if (ee->imode->string != NULL
    &&  strlen(ee->imode->string) > 0
    &&  strncasecmp(ee->imode->string, txt, strlen(ee->imode->string)) == 0) {
      if (spec == NULL || spec->emoji_type == NULL) {
        *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_chtml50_search_emoji ( chtml50_t * chtml50 , char * txt , char * * rslt ) { emoji_t * ee ; request_rec * r ; device_table * spec ; int len ; spec = chtml50 -> spec ; len = strlen ( txt ) ; r = chtml50 -> doc -> r ; if ( ! spec ) { DBG ( r , " " ) ; } for ( ee = chtml50 -> conf -> emoji ; ee ; ee = ee -> next ) { if ( ee -> imode == NULL ) { DBG ( r , " " ) ; continue ; } if ( ee -> imode -> string != NULL && strlen ( ee -> imode -> string ) > 0 && strncasecmp ( ee -> imode -> string , txt , strlen ( ee -> imode -> string ) ) == 0 ) { if ( spec == NULL || spec -> emoji_type == NULL ) { * 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 .