src/chxj_hdml.c
/**
 * It is a handler who processes the DIV tag.
 *
 * @param pdoc   [i/o] The pointer to the HDML structure at the output
 *                     destination is specified.
 * @param node   [i]   The DIV tag node is specified.
 * @return The conversion result is returned.
 */
It is a handler who processes the DIV tag.
@param pdoc   [i/o] The pointer to the HDML structure at the output
destination is specified.
@param node   [i]   The DIV tag node is specified.
@return The conversion result is returned.
It is a handler who processes the DIV tag . @param pdoc [ i / o ] The pointer to the HDML structure at the output destination is specified . @param node [ i ] The DIV tag node is specified . @return The conversion result is returned .
static char *
s_hdml_start_div_tag(void *pdoc, Node *node) 
{
  hdml_t *hdml;
  Doc    *doc;
  Attr   *attr;
  hdml = GET_HDML(pdoc);
  doc  = hdml->doc;
  if (hdml->hdml_br_flag == 0) {
    hdml->hdml_br_flag = 1;
    s_output_to_hdml_out(hdml, "<BR>\r\n");
  }
  for (attr = qs_get_attr(doc,node); 
       attr; 
       attr = qs_get_next_attr(doc,attr)) {
    char *name  = qs_get_attr_name(doc,attr);
    char *value = qs_get_attr_value(doc,attr);
    if (STRCASEEQ('a','A',"align",name)) {
      if (STRCASEEQ('r','R',"right",value)) {
        hdml->div_right_flag = 1;
        s_output_to_hdml_out(hdml, "<RIGHT>");
        hdml->hdml_br_flag = 0;
        break;
      }
      else if (STRCASEEQ('c','C',"center",value)) {
        hdml->div_center_flag = 1;
        s_output_to_hdml_out(hdml, "<CENTER>");
        hdml->hdml_br_flag = 0;
        break;
      }
    }
  }
  hdml->hdml_br_flag = 0;
  return hdml->out;
}
static char * s_hdml_start_div_tag ( void * pdoc , Node * node ) { hdml_t * hdml ; Doc * doc ; Attr * attr ; hdml = GET_HDML ( pdoc ) ; doc = hdml -> doc ; if ( hdml -> hdml_br_flag == 0 ) { hdml -> hdml_br_flag = 1 ; s_output_to_hdml_out ( hdml , " \r \n " ) ; } for ( attr = qs_get_attr ( doc , node ) ; attr ; attr = qs_get_next_attr ( doc , attr ) ) { char * name = qs_get_attr_name ( doc , attr ) ; char * value = qs_get_attr_value ( doc , attr ) ; if ( STRCASEEQ ( ' ' , ' ' , " " , name ) ) { if ( STRCASEEQ ( ' ' , ' ' , " " , value ) ) { hdml -> div_right_flag = 1 ; s_output_to_hdml_out ( hdml , " " ) ; hdml -> hdml_br_flag = 0 ; break ; } else if ( STRCASEEQ ( ' ' , ' ' , " " , value ) ) { hdml -> div_center_flag = 1 ; s_output_to_hdml_out ( hdml , " " ) ; hdml -> hdml_br_flag = 0 ; break ; } } } hdml -> hdml_br_flag = 0 ; return hdml -> out ; }
It is a handler who processes the DIV tag.
It is a handler who processes the DIV tag .
/*--------------------------------------------------------------------------*/ /* If the br tag is not output immediately before the div tag appears, the  */ /* br tag is output.                                                        */ /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* The object tag node is scanned.                                          */ /*--------------------------------------------------------------------------*/