Cleanup code of rgbasm

Follow Linux kernel coding style.

Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
Antonio Niño Díaz
2018-01-02 03:04:26 +01:00
parent 2ffaf72e39
commit 72f801283d
22 changed files with 2852 additions and 2678 deletions

View File

@@ -1,8 +1,9 @@
#ifndef RGBDS_MAIN_H
#define RGBDS_MAIN_H
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include "extern/stdnoreturn.h"
struct sOptions {
@@ -12,8 +13,7 @@ struct sOptions {
bool verbose;
bool haltnop;
bool exportall;
bool warnings; /* true to enable warnings, false to disable them. */
//-1 == random
bool warnings; /* True to enable warnings, false to disable them. */
};
extern char *tzNewMacro;
@@ -23,9 +23,10 @@ extern int32_t nBinaryID;
extern struct sOptions DefaultOptions;
extern struct sOptions CurrentOptions;
extern void opt_Push(void);
extern void opt_Pop(void);
extern void opt_Parse(char *s);
void opt_Push(void);
void opt_Pop(void);
void opt_Parse(char *s);
/*
* Used for errors that compromise the whole assembly process by affecting the
@@ -35,6 +36,7 @@ extern void opt_Parse(char *s);
* when it fails to allocate memory).
*/
noreturn void fatalerror(const char *fmt, ...);
/*
* Used for errors that make it impossible to assemble correctly, but don't
* affect the following code. The code will fail to assemble but the user will
@@ -42,17 +44,18 @@ noreturn void fatalerror(const char *fmt, ...);
* once.
*/
void yyerror(const char *fmt, ...);
/*
* Used to warn the user about problems that don't prevent the generation of
* valid code.
*/
void warning(const char *fmt, ...);
#define YY_FATAL_ERROR fatalerror
#define YY_FATAL_ERROR fatalerror
#ifdef YYLMAX
#undef YYLMAX
#ifdef YYLMAX
#undef YYLMAX
#endif
#define YYLMAX 65536
#endif
#endif /* RGBDS_MAIN_H */