Give Emacs another performance boost

This commit is contained in:
Justine Tunney 2023-08-18 09:34:14 -07:00
parent 5b42c810a5
commit 9c7b81ee0f
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
30 changed files with 253 additions and 102 deletions

View file

@ -9,8 +9,6 @@
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
#define __ToUpper(c) ((c) >= 'a' && (c) <= 'z' ? (c) - 'a' + 'A' : (c))
__funline int __strcmp(const char *l, const char *r) {
size_t i = 0;
while (l[i] == r[i] && r[i]) ++i;
@ -132,26 +130,6 @@ __funline char16_t *__strstr16(const char16_t *haystack,
return 0;
}
__funline char *__getenv(char **p, const char *s) {
size_t i, j;
if (p) {
for (i = 0; p[i]; ++i) {
for (j = 0;; ++j) {
if (!s[j]) {
if (p[i][j] == '=') {
return p[i] + j + 1;
}
break;
}
if ((s[j] & 255) != __ToUpper(p[i][j] & 255)) {
break;
}
}
}
}
return 0;
}
__funline const char *__strchr(const char *s, unsigned char c) {
char *r;
for (;; ++s) {