mirror of
https://github.com/thepigeongenerator/mcaselector-lite
synced 2026-02-08 07:33:35 +01:00
Move more of the utility headers into /include/mcaselector-lite.
These headers have no associated C files, and are mainly used for utility logic. Having them in `/include` makes them more easily located, and more globally used. We are using "classic" header guards here over `#pragma once` for better support. Since `#pragma once` is defined by the compiler, rather than standard C. Why isn't it used across the project? I have no idea.
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
|
||||
#include <archive.h>
|
||||
#include <assert.h>
|
||||
#include <endian.h>
|
||||
#include <mcaselector-lite/endian.h>
|
||||
#include <mcaselector-lite/types.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "../types.h"
|
||||
#include "../util/error.h"
|
||||
|
||||
#define SECTOR 0x1000 // sector size
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
* at: www.github.com/thepigeongenerator/mcaselector-lite */
|
||||
#pragma once
|
||||
|
||||
#include <mcaselector-lite/atrb.h>
|
||||
#include <mcaselector-lite/types.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../types.h"
|
||||
#include "../util/atrb.h"
|
||||
|
||||
/* contains chunk metadata */
|
||||
struct mcx_chunk {
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
#include "nbt.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <endian.h>
|
||||
#include <mcaselector-lite/endian.h>
|
||||
#include <mcaselector-lite/types.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../types.h"
|
||||
|
||||
#define MAX_DEPTH 512
|
||||
|
||||
/* Extracts a big endian 16 bit integer from address `buf`, converts it to host byte size if needed and returns. */
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <assert.h>
|
||||
#include <endian.h>
|
||||
#include <mcaselector-lite/atrb.h>
|
||||
#include <mcaselector-lite/endian.h>
|
||||
#include <mcaselector-lite/types.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../types.h"
|
||||
#include "../util/atrb.h"
|
||||
|
||||
/* NBT (named binary tag) is a tree data structure. Tags have a numeric type ID, name and a payload.
|
||||
* NBT files are a compressed `compound` tag. GZip is the compression used in most cases,
|
||||
|
||||
Reference in New Issue
Block a user