Skip to content

Commit fdfb390

Browse files
committed
Remove unused php_mbX_int_to_char() functions
1 parent 5be772a commit fdfb390

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

ext/standard/html.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -494,47 +494,6 @@ static inline size_t php_utf32_utf8(unsigned char *buf, unsigned k)
494494
}
495495
/* }}} */
496496

497-
/* {{{ php_mb2_int_to_char
498-
* Convert back big endian int representation of sequence of one or two 8-bit code units. */
499-
static inline size_t php_mb2_int_to_char(unsigned char *buf, unsigned k)
500-
{
501-
assert(k <= 0xFFFFU);
502-
/* one or two bytes */
503-
if (k <= 0xFFU) { /* 1 */
504-
buf[0] = k;
505-
return 1U;
506-
} else { /* 2 */
507-
buf[0] = k >> 8;
508-
buf[1] = k & 0xFFU;
509-
return 2U;
510-
}
511-
}
512-
/* }}} */
513-
514-
/* {{{ php_mb3_int_to_char
515-
* Convert back big endian int representation of sequence of one to three 8-bit code units.
516-
* For EUC-JP. */
517-
static inline size_t php_mb3_int_to_char(unsigned char *buf, unsigned k)
518-
{
519-
assert(k <= 0xFFFFFFU);
520-
/* one to three bytes */
521-
if (k <= 0xFFU) { /* 1 */
522-
buf[0] = k;
523-
return 1U;
524-
} else if (k <= 0xFFFFU) { /* 2 */
525-
buf[0] = k >> 8;
526-
buf[1] = k & 0xFFU;
527-
return 2U;
528-
} else {
529-
buf[0] = k >> 16;
530-
buf[1] = (k >> 8) & 0xFFU;
531-
buf[2] = k & 0xFFU;
532-
return 3U;
533-
}
534-
}
535-
/* }}} */
536-
537-
538497
/* {{{ unimap_bsearc_cmp
539498
* Binary search of unicode code points in unicode <--> charset mapping.
540499
* Returns the code point in the target charset (whose mapping table was given) or 0 if

0 commit comments

Comments
 (0)