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

@ -20,6 +20,7 @@
#include "libc/assert.h"
#include "third_party/zip/crc32.h"
#endif
#include "third_party/zip/crc32.h"
/* for realloc 2/6/2005 EG */
#include "libc/calls/calls.h"
@ -72,6 +73,8 @@
#include "libc/nt/winsock.h"
#endif
unsigned _Cz_crc32(unsigned crc, const unsigned char *buf, unsigned len);
/*
* XXX start of zipfile.h
*/
@ -865,7 +868,7 @@ local void read_Unicode_Path_entry(pZipListEntry)
}
strcpy(iname, pZipListEntry->iname);
chksum = crc32(chksum, (uch *)(iname), strlen(iname));
chksum = _Cz_crc32(chksum, (uch *)(iname), strlen(iname));
free(iname);
@ -970,7 +973,7 @@ local void read_Unicode_Path_local_entry(pZipListEntry)
}
strcpy(iname, pZipListEntry->iname);
chksum = crc32(chksum, (uch *)(iname), strlen(iname));
chksum = _Cz_crc32(chksum, (uch *)(iname), strlen(iname));
free(iname);
@ -1556,7 +1559,7 @@ local int add_Unicode_Path_local_extra_field(pZEntry)
# define inameLocal (pZEntry->iname)
#endif
chksum = crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
chksum = _Cz_crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
#ifdef WIN32_OEM
free(inameLocal);
@ -1683,7 +1686,7 @@ local int add_Unicode_Path_cen_extra_field(pZEntry)
# define inameLocal (pZEntry->iname)
#endif
chksum = crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
chksum = _Cz_crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
#ifdef WIN32_OEM
free(inameLocal);

View file

@ -24,7 +24,6 @@
#include "third_party/zip/zipup.h"
#include "third_party/bzip2/bzlib.h"
#include "libc/calls/typedef/u.h"
#include "third_party/zlib/zconf.h"
#include "libc/runtime/sysconf.h"
#include "libc/errno.h"