mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Give Emacs another performance boost
This commit is contained in:
parent
5b42c810a5
commit
9c7b81ee0f
30 changed files with 253 additions and 102 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue