mirror of
https://gitlab.com/80486DX2-66/gists
synced 2025-05-31 08:31:41 +05:30
C: categorize files, update .gitignore
This commit is contained in:
32
c-programming/io/fwrite_le.h
Normal file
32
c-programming/io/fwrite_le.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* fwrite_le.h
|
||||
*
|
||||
* Author: Intel A80486DX2-66
|
||||
* License: Creative Commons Zero 1.0 Universal
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef _FWRITE_LE_H
|
||||
#define _FWRITE_LE_H
|
||||
|
||||
#define FWRITE_LE_NO_MODIFICATION 0
|
||||
|
||||
#define DETECTED_LITTLE_ENDIAN 0
|
||||
#define DETECTED_BIG_ENDIAN 1
|
||||
#define UNSUPPORTED_ENDIANNESS -1
|
||||
|
||||
int detect_endianness(void);
|
||||
size_t fwrite_le(void* ptr, size_t size, size_t count, FILE* stream);
|
||||
void reorder_le_be(
|
||||
#if FWRITE_LE_NO_MODIFICATION
|
||||
uint8_t* dest, uint8_t* src,
|
||||
#else
|
||||
uint8_t* bytes,
|
||||
#endif
|
||||
size_t count, size_t step);
|
||||
|
||||
#endif /* _FWRITE_LE_H */
|
Reference in New Issue
Block a user