A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/mikepb/endian.h below:

mikepb/endian.h: Portable endian conversion functions for C

This provides the endian conversion functions form endian.h on Windows, Linux, *BSD, and Mac OS X. You still need to use -std=gnu99 instead of -std=c99 for gcc. The functions might actually be macros. Functions: htobe16, htole16, be16toh, le16toh, htobe32, htole32, be32toh, le32toh, htobe64, htole64, be64toh, le64toh.

The implementation was written by Mathias Panzenböck and published in this Gist.

Install with [clib(1)]:

clib install mikepb/endian.h
#include <stdint.h>
#include "endian.h"

uint32_t endian32(const uint32_t i) {
    return be32toh(i);
}

Public Domain


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4