mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-28 22:07:49 +00:00
Replace SLONG by int32_t
All affected `printf` have been fixed. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#define RGBDS_ASM_ASM_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -22,7 +23,7 @@
|
||||
#define MAXMACROARGS 256
|
||||
#define MAXINCPATHS 128
|
||||
|
||||
extern SLONG nLineNo;
|
||||
extern int32_t nLineNo;
|
||||
extern ULONG nTotalLines;
|
||||
extern ULONG nPC;
|
||||
extern ULONG nPass;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#ifndef RGBDS_ASM_FSTACK_H
|
||||
#define RGBDS_ASM_FSTACK_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "asm/asm.h"
|
||||
@@ -21,7 +22,7 @@ struct sContext {
|
||||
struct sContext *pNext;
|
||||
char tzFileName[_MAX_PATH + 1];
|
||||
char *tzMacroArgs[MAXMACROARGS + 1];
|
||||
SLONG nLine;
|
||||
int32_t nLine;
|
||||
ULONG nStatus;
|
||||
FILE *pFile;
|
||||
char *pREPTBlock;
|
||||
@@ -31,7 +32,7 @@ struct sContext {
|
||||
|
||||
void
|
||||
fstk_RunInclude(char *);
|
||||
extern void fstk_RunMacroArg(SLONG s);
|
||||
extern void fstk_RunMacroArg(int32_t s);
|
||||
void
|
||||
fstk_Init(char *);
|
||||
extern void fstk_Dump(void);
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
#ifndef RGBDS_MAIN_H
|
||||
#define RGBDS_MAIN_H
|
||||
#ifndef RGBDS_MAIN_H
|
||||
#define RGBDS_MAIN_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "extern/stdnoreturn.h"
|
||||
|
||||
struct sOptions {
|
||||
char gbgfx[4];
|
||||
char binary[2];
|
||||
SLONG fillchar;
|
||||
int32_t fillchar;
|
||||
bool verbose;
|
||||
bool haltnop;
|
||||
bool exportall;
|
||||
@@ -17,8 +18,8 @@ struct sOptions {
|
||||
|
||||
extern char *tzNewMacro;
|
||||
extern ULONG ulNewMacroSize;
|
||||
extern SLONG nGBGfxID;
|
||||
extern SLONG nBinaryID;
|
||||
extern int32_t nGBGfxID;
|
||||
extern int32_t nBinaryID;
|
||||
|
||||
extern struct sOptions DefaultOptions;
|
||||
extern struct sOptions CurrentOptions;
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
#ifndef RGBDS_ASM_MATH_H
|
||||
#define RGBDS_ASM_MATH_H
|
||||
|
||||
#include "types.h"
|
||||
#include <stdint.h>
|
||||
|
||||
void math_DefinePI(void);
|
||||
void math_Print(SLONG i);
|
||||
SLONG math_Sin(SLONG i);
|
||||
SLONG math_Cos(SLONG i);
|
||||
SLONG math_Tan(SLONG i);
|
||||
SLONG math_ASin(SLONG i);
|
||||
SLONG math_ACos(SLONG i);
|
||||
SLONG math_ATan(SLONG i);
|
||||
SLONG math_ATan2(SLONG i, SLONG j);
|
||||
SLONG math_Mul(SLONG i, SLONG j);
|
||||
SLONG math_Div(SLONG i, SLONG j);
|
||||
SLONG math_Round(SLONG i);
|
||||
SLONG math_Ceil(SLONG i);
|
||||
SLONG math_Floor(SLONG i);
|
||||
void math_Print(int32_t i);
|
||||
int32_t math_Sin(int32_t i);
|
||||
int32_t math_Cos(int32_t i);
|
||||
int32_t math_Tan(int32_t i);
|
||||
int32_t math_ASin(int32_t i);
|
||||
int32_t math_ACos(int32_t i);
|
||||
int32_t math_ATan(int32_t i);
|
||||
int32_t math_ATan2(int32_t i, int32_t j);
|
||||
int32_t math_Mul(int32_t i, int32_t j);
|
||||
int32_t math_Div(int32_t i, int32_t j);
|
||||
int32_t math_Round(int32_t i);
|
||||
int32_t math_Ceil(int32_t i);
|
||||
int32_t math_Floor(int32_t i);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,8 +22,8 @@ struct Section {
|
||||
void out_PrepPass2(void);
|
||||
void out_SetFileName(char *s);
|
||||
void out_NewSection(char *pzName, ULONG secttype);
|
||||
void out_NewAbsSection(char *pzName, ULONG secttype, SLONG org, SLONG bank);
|
||||
void out_NewAlignedSection(char *pzName, ULONG secttype, SLONG alignment, SLONG bank);
|
||||
void out_NewAbsSection(char *pzName, ULONG secttype, int32_t org, int32_t bank);
|
||||
void out_NewAlignedSection(char *pzName, ULONG secttype, int32_t alignment, int32_t bank);
|
||||
void out_AbsByte(int b);
|
||||
void out_AbsByteGroup(char *s, int length);
|
||||
void out_RelByte(struct Expression * expr);
|
||||
@@ -32,9 +32,9 @@ void out_PCRelByte(struct Expression * expr);
|
||||
void out_WriteObject(void);
|
||||
void out_Skip(int skip);
|
||||
void out_BinaryFile(char *s);
|
||||
void out_BinaryFileSlice(char *s, SLONG start_pos, SLONG length);
|
||||
void out_BinaryFileSlice(char *s, int32_t start_pos, int32_t length);
|
||||
void out_String(char *s);
|
||||
void out_AbsLong(SLONG b);
|
||||
void out_AbsLong(int32_t b);
|
||||
void out_RelLong(struct Expression * expr);
|
||||
void out_PushSection(void);
|
||||
void out_PopSection(void);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
struct Expression {
|
||||
SLONG nVal;
|
||||
int32_t nVal;
|
||||
uint8_t tRPN[256];
|
||||
ULONG nRPNLength;
|
||||
ULONG nRPNOut;
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
|
||||
struct sSymbol {
|
||||
char tzName[MAXSYMLEN + 1];
|
||||
SLONG nValue;
|
||||
int32_t nValue;
|
||||
ULONG nType;
|
||||
struct sSymbol *pScope;
|
||||
struct sSymbol *pNext;
|
||||
struct Section *pSection;
|
||||
ULONG ulMacroSize;
|
||||
char *pMacro;
|
||||
SLONG(*Callback) (struct sSymbol *);
|
||||
int32_t(*Callback) (struct sSymbol *);
|
||||
char tzFileName[_MAX_PATH + 1]; /* File where the symbol was defined. */
|
||||
ULONG nFileLine; /* Line where the symbol was defined. */
|
||||
};
|
||||
@@ -54,14 +54,14 @@ void sym_SaveCurrentMacroArgs(char *save[]);
|
||||
void sym_RestoreCurrentMacroArgs(char *save[]);
|
||||
void sym_UseNewMacroArgs(void);
|
||||
void sym_FreeCurrentMacroArgs(void);
|
||||
void sym_AddEqu(char *tzSym, SLONG value);
|
||||
void sym_AddSet(char *tzSym, SLONG value);
|
||||
void sym_AddEqu(char *tzSym, int32_t value);
|
||||
void sym_AddSet(char *tzSym, int32_t value);
|
||||
void sym_Init(void);
|
||||
ULONG sym_GetConstantValue(char *s);
|
||||
ULONG sym_isConstant(char *s);
|
||||
struct sSymbol *sym_FindSymbol(char *tzName);
|
||||
void sym_Global(char *tzSym);
|
||||
char *sym_FindMacroArg(SLONG i);
|
||||
char *sym_FindMacroArg(int32_t i);
|
||||
char *sym_GetStringValue(char *tzSym);
|
||||
void sym_UseCurrentMacroArgs(void);
|
||||
void sym_SetMacroArgID(ULONG nMacroCount);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef RGBDS_LINK_ASSIGN_H
|
||||
#define RGBDS_LINK_ASSIGN_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "mylink.h"
|
||||
#include "types.h"
|
||||
|
||||
@@ -29,11 +31,11 @@ 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 SLONG area_Avail(SLONG bank);
|
||||
extern int32_t area_Avail(int32_t bank);
|
||||
extern void AssignSections(void);
|
||||
extern void CreateSymbolTable(void);
|
||||
extern SLONG MaxBankUsed;
|
||||
extern SLONG MaxAvail[MAXBANKS];
|
||||
extern int32_t MaxBankUsed;
|
||||
extern int32_t MaxAvail[MAXBANKS];
|
||||
|
||||
int
|
||||
IsSectionNameInUse(const char *name);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef RGBDS_LINK_LIBRARY_H
|
||||
#define RGBDS_LINK_LIBRARY_H
|
||||
#ifndef RGBDS_LINK_LIBRARY_H
|
||||
#define RGBDS_LINK_LIBRARY_H
|
||||
|
||||
extern void AddNeededModules(void);
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef RGBDS_LINK_MAIN_H
|
||||
#define RGBDS_LINK_MAIN_H
|
||||
|
||||
#include "types.h"
|
||||
#include <stdint.h>
|
||||
|
||||
extern SLONG fillchar;
|
||||
extern int32_t fillchar;
|
||||
extern char *smartlinkstartsymbol;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#ifndef RGBDS_LINK_MAPFILE_H
|
||||
#define RGBDS_LINK_MAPFILE_H
|
||||
#ifndef RGBDS_LINK_MAPFILE_H
|
||||
#define RGBDS_LINK_MAPFILE_H
|
||||
|
||||
#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(SLONG bank);
|
||||
extern void MapfileCloseBank(SLONG slack);
|
||||
extern void MapfileInitBank(int32_t bank);
|
||||
extern void MapfileCloseBank(int32_t slack);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
extern SLONG options;
|
||||
extern int32_t options;
|
||||
#define OPT_TINY 0x01
|
||||
#define OPT_SMART_C_LINK 0x02
|
||||
#define OPT_OVERLAY 0x04
|
||||
@@ -63,16 +63,16 @@ enum eSectionType {
|
||||
};
|
||||
|
||||
struct sSection {
|
||||
SLONG nBank;
|
||||
SLONG nOrg;
|
||||
SLONG nAlign;
|
||||
int32_t nBank;
|
||||
int32_t nOrg;
|
||||
int32_t nAlign;
|
||||
uint8_t oAssigned;
|
||||
|
||||
char *pzName;
|
||||
SLONG nByteSize;
|
||||
int32_t nByteSize;
|
||||
enum eSectionType Type;
|
||||
uint8_t *pData;
|
||||
SLONG nNumberOfSymbols;
|
||||
int32_t nNumberOfSymbols;
|
||||
struct sSymbol **tSymbols;
|
||||
struct sPatch *pPatches;
|
||||
struct sSection *pNext;
|
||||
@@ -88,9 +88,9 @@ struct sSymbol {
|
||||
char *pzName;
|
||||
enum eSymbolType Type;
|
||||
/* the following 3 items only valid when Type!=SYM_IMPORT */
|
||||
SLONG nSectionID; /* internal to object.c */
|
||||
int32_t nSectionID; /* internal to object.c */
|
||||
struct sSection *pSection;
|
||||
SLONG nOffset;
|
||||
int32_t nOffset;
|
||||
char *pzObjFileName; /* Object file where the symbol is located. */
|
||||
char *pzFileName; /* Source file where the symbol was defined. */
|
||||
ULONG nFileLine; /* Line where the symbol was defined. */
|
||||
@@ -104,10 +104,10 @@ enum ePatchType {
|
||||
|
||||
struct sPatch {
|
||||
char *pzFilename;
|
||||
SLONG nLineNo;
|
||||
SLONG nOffset;
|
||||
int32_t nLineNo;
|
||||
int32_t nOffset;
|
||||
enum ePatchType Type;
|
||||
SLONG nRPNSize;
|
||||
int32_t nRPNSize;
|
||||
uint8_t *pRPN;
|
||||
struct sPatch *pNext;
|
||||
uint8_t oRelocPatch;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifndef RGBDS_LINK_PATCH_H
|
||||
#define RGBDS_LINK_PATCH_H
|
||||
|
||||
#include "types.h"
|
||||
#include <stdint.h>
|
||||
|
||||
void Patch(void);
|
||||
extern SLONG nPC;
|
||||
extern int32_t nPC;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
#ifndef RGBDS_LINK_SYMBOL_H
|
||||
#define RGBDS_LINK_SYMBOL_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
void sym_Init(void);
|
||||
void sym_CreateSymbol(char *tzName, SLONG nValue, SLONG nBank,
|
||||
void sym_CreateSymbol(char *tzName, int32_t nValue, int32_t nBank,
|
||||
char *tzObjFileName, char *tzFileName, ULONG nFileLine);
|
||||
SLONG sym_GetValue(char *tzName);
|
||||
SLONG sym_GetBank(char *tzName);
|
||||
int32_t sym_GetValue(char *tzName);
|
||||
int32_t sym_GetBank(char *tzName);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,6 +6,5 @@
|
||||
#endif
|
||||
|
||||
typedef unsigned long ULONG;
|
||||
typedef signed long SLONG;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user