mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-14 08:17:35 +02:00
Remove obsolete function
This commit is contained in:
parent
6aaa600ebc
commit
8289eca02a
2 changed files with 7 additions and 8 deletions
|
@ -727,7 +727,6 @@ uint32_t Cyc_utf8_decode(uint32_t* state, uint32_t* codep, uint32_t byte);
|
||||||
int Cyc_utf8_count_code_points(uint8_t* s);
|
int Cyc_utf8_count_code_points(uint8_t* s);
|
||||||
uint32_t Cyc_utf8_validate_stream(uint32_t *state, char *str, size_t len);
|
uint32_t Cyc_utf8_validate_stream(uint32_t *state, char *str, size_t len);
|
||||||
uint32_t Cyc_utf8_validate(char *str, size_t len);
|
uint32_t Cyc_utf8_validate(char *str, size_t len);
|
||||||
int uint32_num_bytes(uint32_t val);
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
#endif /* CYCLONE_RUNTIME_H */
|
#endif /* CYCLONE_RUNTIME_H */
|
||||||
|
|
14
runtime.c
14
runtime.c
|
@ -6586,13 +6586,13 @@ uint32_t Cyc_utf8_validate(char *str, size_t len) {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
int uint32_num_bytes(uint32_t x) {
|
//int uint32_num_bytes(uint32_t x) {
|
||||||
// TODO: could compute log(val) / log(256)
|
// // TODO: could compute log(val) / log(256)
|
||||||
if (x < 0x100) return 1;
|
// if (x < 0x100) return 1;
|
||||||
if (x < 0x10000) return 2;
|
// if (x < 0x10000) return 2;
|
||||||
if (x < 0x1000000) return 3;
|
// if (x < 0x1000000) return 3;
|
||||||
return 4;
|
// return 4;
|
||||||
}
|
//}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function takes one or more 32-bit chars and encodes them
|
* This function takes one or more 32-bit chars and encodes them
|
||||||
|
|
Loading…
Add table
Reference in a new issue