Skip to content

finwo/endian.h

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

endian.h

Basic handling of endianness between host and known orientations

This library makes use of dep to manage it's dependencies and exports.

Installation

This package is in the main repository for the dep package manager, so you should be able to install it using dep add finwo/endian

API

These macros are defined in src/endian.h:

htobe16(x)
htole16(x)
be16toh(x)
le16toh(x)

htobe32(x)
htole32(x)
be32toh(x)
le32toh(x)

htobe64(x)
htole64(x)
be64toh(x)
le64toh(x)

And as a C11 extension, the following macros are defined as well in src/endian-c11.h to not have to think about the type being passed to the maco:

htobe(x)
htole(x)
betoh(x)
letoh(x)

About

Small cross-platform endian header for C

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy