feat: rename core types to scc prefix for consistency

Updated type names from `core_*` to `scc_*` across lex_parser and stream modules to maintain naming consistency within the SCC codebase. This includes changes to function signatures and internal usage of types like `core_probe_stream_t`, `core_pos_t`, and `cstring_t` to their `scc_*` counterparts.
This commit is contained in:
zzy
2025-12-11 13:00:29 +08:00
parent 35c13ee30a
commit d88fa3b8d3
33 changed files with 741 additions and 745 deletions

View File

@@ -1,12 +1,12 @@
#ifndef __SMCC_CORE_MEM_H__
#define __SMCC_CORE_MEM_H__
#ifndef __SCC_CORE_MEM_H__
#define __SCC_CORE_MEM_H__
#include "core_type.h"
void *smcc_memcpy(void *dest, const void *src, usize n);
void *smcc_memmove(void *dest, const void *src, usize n);
void *smcc_memset(void *s, int c, usize n);
int smcc_memcmp(const void *s1, const void *s2, usize n);
void *scc_memcpy(void *dest, const void *src, usize n);
void *scc_memmove(void *dest, const void *src, usize n);
void *scc_memset(void *s, int c, usize n);
int scc_memcmp(const void *s1, const void *s2, usize n);
/**
* @brief 使用FNV-1a进行 C 字符串哈希
@@ -14,7 +14,7 @@ int smcc_memcmp(const void *s1, const void *s2, usize n);
* @param s
* @return u32
*/
static inline u32 smcc_strhash32(const char *s) {
static inline u32 scc_strhash32(const char *s) {
u32 hash = 2166136261u; // FNV-1a偏移基础值
while (*s) {
hash ^= *s++;
@@ -29,7 +29,7 @@ static inline u32 smcc_strhash32(const char *s) {
* @param str
* @return usize
*/
static inline usize smcc_strlen(const char *str) {
static inline usize scc_strlen(const char *str) {
usize len = 0;
while (*str) {
len++;
@@ -45,7 +45,7 @@ static inline usize smcc_strlen(const char *str) {
* @param s2
* @return int
*/
static inline int smcc_strcmp(const char *s1, const char *s2) {
static inline int scc_strcmp(const char *s1, const char *s2) {
while (*s1 && *s2 && *s1 == *s2) {
s1++;
s2++;
@@ -53,4 +53,4 @@ static inline int smcc_strcmp(const char *s1, const char *s2) {
return *s1 - *s2;
}
#endif /* __SMCC_CORE_MEM_H__ */
#endif /* __SCC_CORE_MEM_H__ */