mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-30 06:47:48 +00:00
Replace C types by stdint.h types
Not all occurrences have been replaced, in some cases they have been left as they were before (like in rgbgfx and when they are in the interface of a C standard library function). Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -7,14 +7,14 @@
|
||||
#define CHARMAPLENGTH 16
|
||||
|
||||
struct Charmap {
|
||||
int count;
|
||||
int32_t count;
|
||||
char input[MAXCHARMAPS][CHARMAPLENGTH + 1];
|
||||
char output[MAXCHARMAPS];
|
||||
};
|
||||
|
||||
int readUTF8Char(char *destination, char *source);
|
||||
int32_t readUTF8Char(char *destination, char *source);
|
||||
void charmap_Sort();
|
||||
int charmap_Add(char *input, uint8_t output);
|
||||
int charmap_Convert(char **input);
|
||||
int32_t charmap_Add(char *input, uint8_t output);
|
||||
int32_t charmap_Convert(char **input);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,19 +31,15 @@ struct sContext {
|
||||
uint32_t nREPTBlockSize;
|
||||
};
|
||||
|
||||
void
|
||||
fstk_RunInclude(char *);
|
||||
void fstk_RunInclude(char *);
|
||||
extern void fstk_RunMacroArg(int32_t s);
|
||||
void
|
||||
fstk_Init(char *);
|
||||
void fstk_Init(char *);
|
||||
extern void fstk_Dump(void);
|
||||
extern void fstk_AddIncludePath(char *s);
|
||||
extern uint32_t fstk_RunMacro(char *s);
|
||||
extern void fstk_RunRept(uint32_t count);
|
||||
FILE *
|
||||
fstk_FindFile(char *);
|
||||
|
||||
int fstk_GetLine(void);
|
||||
FILE * fstk_FindFile(char *);
|
||||
int32_t fstk_GetLine(void);
|
||||
|
||||
extern int yywrap(void);
|
||||
|
||||
|
||||
@@ -23,13 +23,13 @@ void out_SetFileName(char *s);
|
||||
void out_NewSection(char *pzName, uint32_t secttype);
|
||||
void out_NewAbsSection(char *pzName, uint32_t secttype, int32_t org, int32_t bank);
|
||||
void out_NewAlignedSection(char *pzName, uint32_t secttype, int32_t alignment, int32_t bank);
|
||||
void out_AbsByte(int b);
|
||||
void out_AbsByteGroup(char *s, int length);
|
||||
void out_AbsByte(int32_t b);
|
||||
void out_AbsByteGroup(char *s, int32_t length);
|
||||
void out_RelByte(struct Expression * expr);
|
||||
void out_RelWord(struct Expression * expr);
|
||||
void out_PCRelByte(struct Expression * expr);
|
||||
void out_WriteObject(void);
|
||||
void out_Skip(int skip);
|
||||
void out_Skip(int32_t skip);
|
||||
void out_BinaryFile(char *s);
|
||||
void out_BinaryFileSlice(char *s, int32_t start_pos, int32_t length);
|
||||
void out_String(char *s);
|
||||
|
||||
@@ -17,60 +17,24 @@ uint32_t rpn_isPCRelative(struct Expression * expr);
|
||||
void rpn_Symbol(struct Expression * expr, char *tzSym);
|
||||
void rpn_Number(struct Expression * expr, uint32_t i);
|
||||
void rpn_LOGNOT(struct Expression * expr, struct Expression * src1);
|
||||
void
|
||||
rpn_LOGOR(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_LOGAND(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_LOGEQU(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_LOGGT(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_LOGLT(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_LOGGE(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_LOGLE(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_LOGNE(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_ADD(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_SUB(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_XOR(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_OR(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_AND(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_SHL(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_SHR(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_MUL(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_DIV(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void
|
||||
rpn_MOD(struct Expression * expr, struct Expression * src1,
|
||||
struct Expression * src2);
|
||||
void rpn_LOGOR(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_LOGAND(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_LOGEQU(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_LOGGT(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_LOGLT(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_LOGGE(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_LOGLE(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_LOGNE(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_ADD(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_SUB(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_XOR(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_OR(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_AND(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_SHL(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_SHR(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_MUL(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_DIV(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_MOD(struct Expression * expr, struct Expression * src1, struct Expression * src2);
|
||||
void rpn_HIGH(struct Expression * expr, struct Expression * src);
|
||||
void rpn_LOW(struct Expression * expr, struct Expression * src);
|
||||
void rpn_UNNEG(struct Expression * expr, struct Expression * src);
|
||||
|
||||
@@ -74,6 +74,6 @@ uint32_t sym_GetDefinedValue(char *s);
|
||||
uint32_t sym_isDefined(char *tzName);
|
||||
void sym_Purge(char *tzName);
|
||||
uint32_t sym_isConstDefined(char *tzName);
|
||||
int sym_IsRelocDiffDefined(char *tzSym1, char *tzSym2);
|
||||
int32_t sym_IsRelocDiffDefined(char *tzSym1, char *tzSym2);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,22 +30,23 @@ enum eBankDefine {
|
||||
#define MAXBANKS (BANK_COUNT_ROM0 + BANK_COUNT_ROMX + BANK_COUNT_WRAM0 + BANK_COUNT_WRAMX \
|
||||
+ BANK_COUNT_VRAM + BANK_COUNT_OAM + BANK_COUNT_HRAM + BANK_COUNT_SRAM)
|
||||
|
||||
extern int32_t area_Avail(int32_t bank);
|
||||
extern void AssignSections(void);
|
||||
extern void CreateSymbolTable(void);
|
||||
extern int32_t MaxBankUsed;
|
||||
extern int32_t MaxAvail[MAXBANKS];
|
||||
|
||||
int
|
||||
int32_t area_Avail(int32_t bank);
|
||||
void AssignSections(void);
|
||||
void CreateSymbolTable(void);
|
||||
|
||||
int32_t
|
||||
IsSectionNameInUse(const char *name);
|
||||
|
||||
void
|
||||
SetLinkerscriptName(char *tzLinkerscriptFile);
|
||||
|
||||
int
|
||||
IsSectionSameTypeBankAndFloating(const char *name, enum eSectionType type, int bank);
|
||||
int32_t
|
||||
IsSectionSameTypeBankAndFloating(const char *name, enum eSectionType type, int32_t bank);
|
||||
|
||||
unsigned int
|
||||
AssignSectionAddressAndBankByName(const char *name, unsigned int address, int bank);
|
||||
uint32_t
|
||||
AssignSectionAddressAndBankByName(const char *name, uint32_t address, int32_t bank);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef RGBDS_LINK_LIBRARY_H
|
||||
#define RGBDS_LINK_LIBRARY_H
|
||||
|
||||
extern void AddNeededModules(void);
|
||||
void AddNeededModules(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern void SetMapfileName(char *name);
|
||||
extern void SetSymfileName(char *name);
|
||||
extern void CloseMapfile(void);
|
||||
extern void MapfileWriteSection(struct sSection * pSect);
|
||||
extern void MapfileInitBank(int32_t bank);
|
||||
extern void MapfileCloseBank(int32_t slack);
|
||||
void SetMapfileName(char *name);
|
||||
void SetSymfileName(char *name);
|
||||
void CloseMapfile(void);
|
||||
void MapfileWriteSection(struct sSection * pSect);
|
||||
void MapfileInitBank(int32_t bank);
|
||||
void MapfileCloseBank(int32_t slack);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef RGBDS_LINK_OBJECT_H
|
||||
#define RGBDS_LINK_OBJECT_H
|
||||
|
||||
extern void obj_Readfile(char *tzObjectfile);
|
||||
void obj_Readfile(char *tzObjectfile);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#ifndef RGBDS_LINK_SCRIPT_H
|
||||
#define RGBDS_LINK_SCRIPT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "extern/stdnoreturn.h"
|
||||
|
||||
noreturn void script_fatalerror(const char *fmt, ...);
|
||||
@@ -24,13 +26,13 @@ noreturn void script_fatalerror(const char *fmt, ...);
|
||||
void script_Parse(const char *path);
|
||||
|
||||
void script_IncludeFile(const char *path);
|
||||
int script_IncludeDepthGet(void);
|
||||
int32_t script_IncludeDepthGet(void);
|
||||
void script_IncludePop(void);
|
||||
|
||||
void script_InitSections(void);
|
||||
void script_SetCurrentSectionType(const char *type, unsigned int bank);
|
||||
void script_SetAddress(unsigned int addr);
|
||||
void script_SetAlignment(unsigned int alignment);
|
||||
void script_SetCurrentSectionType(const char *type, uint32_t bank);
|
||||
void script_SetAddress(uint32_t addr);
|
||||
void script_SetAlignment(uint32_t alignment);
|
||||
void script_OutputSection(const char *section_name);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user