CE Implement line editing
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m8s

This commit is contained in:
2026-03-04 02:02:05 +01:00
parent 95ea80cee9
commit 81704d7df8
20 changed files with 464 additions and 229 deletions

View File

@@ -118,3 +118,25 @@ int isxdigit (int c) { return isdigit (c) || (c >= 'A' && c <= 'F') || (c >= 'a'
int isascii (int c) { return (c >= 0 && c <= 127); }
int isblank (int c) { return (c == ' ' || c == '\t'); }
/* SOURCE: https://aticleworld.com/memmove-function-implementation-in-c/ */
void* memmove (void* dest, const void* src, unsigned int n) {
unsigned char isCopyRequire = 0; // flag bit
char* pcSource = (char*)src;
char* pcDstn = (char*)dest;
// return if pcDstn and pcSource is NULL
if ((pcSource == NULL) || (pcDstn == NULL)) {
return NULL;
}
// overlap buffer
if ((pcSource < pcDstn) && (pcDstn < pcSource + n)) {
for (pcDstn += n, pcSource += n; n--;) {
*--pcDstn = *--pcSource;
}
} else {
while (n--) {
*pcDstn++ = *pcSource++;
}
}
return dest;
}

View File

@@ -57,4 +57,6 @@ int isascii (int c);
int isblank (int c);
void* memmove (void* dest, const void* src, unsigned int n);
#endif // _LIBSTRING_STRING_H