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:
Antonio Niño Díaz
2017-12-31 13:59:17 +01:00
parent 13c0684497
commit 87c9d819a1
28 changed files with 247 additions and 232 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;

View File

@@ -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

View File

@@ -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);

View File

@@ -4,7 +4,7 @@
#include <stdint.h>
struct Expression {
SLONG nVal;
int32_t nVal;
uint8_t tRPN[256];
ULONG nRPNLength;
ULONG nRPNOut;

View File

@@ -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);