1
0
mirror of https://github.com/fumiama/base16384.git synced 2026-06-06 02:30:31 +08:00

add Cosmopolitan

This commit is contained in:
源文雨
2022-03-29 21:11:12 +08:00
parent 4418c2ac06
commit 2138d8f7ed
2 changed files with 8 additions and 1 deletions

View File

@@ -1,4 +1,6 @@
# base16384
> **Note**: This project used the awesome cross-patfrom binary compiling tool [cosmopolitan](https://github.com/jart/cosmopolitan)
Encode binary file to printable utf16be, and vise versa.
# Description 说明

View File

@@ -1,6 +1,11 @@
// base1432.c
// fumiama 20220319
#ifndef __cosmopolitan // always le
#ifdef __cosmopolitan // always le
# define be16toh(x) bswap_16(x)
# define be32toh(x) bswap_32(x)
# define htobe16(x) bswap_16(x)
# define htobe32(x) bswap_32(x)
#else
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>