Skip to content

Commit 9461384

Browse files
committed
Remove public ASCII functions that can now be static
1 parent 1532814 commit 9461384

File tree

2 files changed

+3
-36
lines changed

2 files changed

+3
-36
lines changed

include/prism/encoding.h

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -78,39 +78,6 @@ typedef struct {
7878
*/
7979
#define PRISM_ENCODING_UPPERCASE_BIT 1 << 2
8080

81-
/**
82-
* Return the size of the next character in the ASCII encoding if it is an
83-
* alphabetical character.
84-
*
85-
* @param b The bytes to read.
86-
* @param n The number of bytes that can be read.
87-
* @returns The number of bytes that the next character takes if it is valid in
88-
* the encoding, or 0 if it is not.
89-
*/
90-
size_t pm_encoding_ascii_alpha_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n);
91-
92-
/**
93-
* Return the size of the next character in the ASCII encoding if it is an
94-
* alphanumeric character.
95-
*
96-
* @param b The bytes to read.
97-
* @param n The number of bytes that can be read.
98-
* @returns The number of bytes that the next character takes if it is valid in
99-
* the encoding, or 0 if it is not.
100-
*/
101-
size_t pm_encoding_ascii_alnum_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n);
102-
103-
/**
104-
* Return true if the next character in the ASCII encoding if it is an uppercase
105-
* character.
106-
*
107-
* @param b The bytes to read.
108-
* @param n The number of bytes that can be read.
109-
* @returns True if the next character is valid in the encoding and is an
110-
* uppercase character, or false if it is not.
111-
*/
112-
bool pm_encoding_ascii_isupper_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n);
113-
11481
/**
11582
* Return the size of the next character in the UTF-8 encoding if it is an
11683
* alphabetical character.

src/encoding.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3918,7 +3918,7 @@ pm_encoding_ascii_char_width(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t
39183918
* Return the size of the next character in the ASCII encoding if it is an
39193919
* alphabetical character.
39203920
*/
3921-
size_t
3921+
static size_t
39223922
pm_encoding_ascii_alpha_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) {
39233923
return (pm_encoding_ascii_table[*b] & PRISM_ENCODING_ALPHABETIC_BIT);
39243924
}
@@ -3937,7 +3937,7 @@ pm_encoding_ascii_alpha_char_7bit(const uint8_t *b, ptrdiff_t n) {
39373937
* Return the size of the next character in the ASCII encoding if it is an
39383938
* alphanumeric character.
39393939
*/
3940-
size_t
3940+
static size_t
39413941
pm_encoding_ascii_alnum_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) {
39423942
return (pm_encoding_ascii_table[*b] & PRISM_ENCODING_ALPHANUMERIC_BIT) ? 1 : 0;
39433943
}
@@ -3956,7 +3956,7 @@ pm_encoding_ascii_alnum_char_7bit(const uint8_t *b, ptrdiff_t n) {
39563956
* Return true if the next character in the ASCII encoding if it is an uppercase
39573957
* character.
39583958
*/
3959-
bool
3959+
static bool
39603960
pm_encoding_ascii_isupper_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) {
39613961
return (pm_encoding_ascii_table[*b] & PRISM_ENCODING_UPPERCASE_BIT);
39623962
}

0 commit comments

Comments
 (0)