Skip to content

Commit

Permalink
add Cosmopolitan
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Mar 29, 2022
1 parent 4418c2a commit 2138d8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 说明
Expand Down
7 changes: 6 additions & 1 deletion base1432.c
Original file line number Diff line number Diff line change
@@ -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>
Expand Down

0 comments on commit 2138d8f

Please sign in to comment.