Introduce #include <cosmo.h> to toolchain users

This change improves the way internal APIs are being hidden behind the
`COSMO` define. The cosmo.h header will take care of defining that, so
that a separate define statement isn't needed. This change also does a
lot more to define which APIs are standard, and which belong to Cosmo.
This commit is contained in:
Justine Tunney 2023-06-09 18:02:06 -07:00
parent 9b55dbe417
commit 4a59210008
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
115 changed files with 699 additions and 422 deletions

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Returns comment of zip central directory.

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Returns comment of zip central directory.

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Returns offset of zip central directory.

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Returns number of records in zip central directory.

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Returns size of zip central directory.

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Returns compressed size in bytes from zip central directory header.

View file

@ -18,7 +18,7 @@
*/
#include "libc/nt/enum/fileflagandattributes.h"
#include "libc/sysv/consts/s.h"
#include "libc/zip.h"
#include "libc/zip.internal.h"
static int ConvertWindowsToUnixMode(int x) {
int m;

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Returns offset of local file header.

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/fmt/conv.h"
#include "libc/zip.h"
#include "libc/zip.internal.h"
static inline int pop(int x) {
return !!(x & 1) + !!(x & 2) + !!(x & 4);

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Returns uncompressed size in bytes from zip central directory header.

View file

@ -17,7 +17,7 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/intrin/bits.h"
#include "libc/zip.h"
#include "libc/zip.internal.h"
typedef char v16qi __attribute__((__vector_size__(16)));
typedef short v8hi __attribute__((__vector_size__(16)));

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Returns compressed size in bytes from zip local file header.

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Returns uncompressed size in bytes from zip local file header.

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Determines if ZIP EOCD record seems legit.

View file

@ -16,7 +16,7 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/zip.h"
#include "libc/zip.internal.h"
/**
* Returns kZipOk if zip64 end of central directory header seems legit.