mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Standardize on "east const" (type const * not const type *)
Avoid "WARNING: Move const after static - use 'static const char'"
This commit is contained in:
@@ -11,9 +11,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct Charmap *charmap_New(const char *name, const char *baseName);
|
||||
struct Charmap *charmap_New(char const *name, char const *baseName);
|
||||
void charmap_Delete(struct Charmap *charmap);
|
||||
void charmap_Set(const char *name);
|
||||
void charmap_Set(char const *name);
|
||||
void charmap_Push(void);
|
||||
void charmap_Pop(void);
|
||||
void charmap_Add(char *mapping, uint8_t value);
|
||||
|
||||
@@ -43,7 +43,7 @@ struct SectionSpec {
|
||||
|
||||
extern struct Section *currentSection;
|
||||
|
||||
struct Section *sect_FindSectionByName(const char *name);
|
||||
struct Section *sect_FindSectionByName(char const *name);
|
||||
void sect_NewSection(char const *name, uint32_t secttype, uint32_t org,
|
||||
struct SectionSpec const *attributes, enum SectionModifier mod);
|
||||
void sect_SetLoadSection(char const *name, uint32_t secttype, uint32_t org,
|
||||
|
||||
@@ -71,7 +71,7 @@ void processWarningFlag(char *flag);
|
||||
* Used to warn the user about problems that don't prevent the generation of
|
||||
* valid code.
|
||||
*/
|
||||
void warning(enum WarningID id, const char *fmt, ...) format_(printf, 2, 3);
|
||||
void warning(enum WarningID id, char const *fmt, ...) format_(printf, 2, 3);
|
||||
|
||||
/*
|
||||
* Used for errors that compromise the whole assembly process by affecting the
|
||||
@@ -80,7 +80,7 @@ void warning(enum WarningID id, const char *fmt, ...) format_(printf, 2, 3);
|
||||
* It is also used when the assembler goes into an invalid state (for example,
|
||||
* when it fails to allocate memory).
|
||||
*/
|
||||
_Noreturn void fatalerror(const char *fmt, ...) format_(printf, 1, 2);
|
||||
_Noreturn void fatalerror(char const *fmt, ...) format_(printf, 1, 2);
|
||||
|
||||
/*
|
||||
* Used for errors that make it impossible to assemble correctly, but don't
|
||||
@@ -88,6 +88,6 @@ _Noreturn void fatalerror(const char *fmt, ...) format_(printf, 1, 2);
|
||||
* get a list of all errors at the end, making it easier to fix all of them at
|
||||
* once.
|
||||
*/
|
||||
void error(const char *fmt, ...) format_(printf, 1, 2);
|
||||
void error(char const *fmt, ...) format_(printf, 1, 2);
|
||||
|
||||
#endif
|
||||
|
||||
16
include/extern/err.h
vendored
16
include/extern/err.h
vendored
@@ -29,15 +29,15 @@
|
||||
#define errx rgbds_errx
|
||||
#define verrx rgbds_verrx
|
||||
|
||||
void warn(const char *fmt, ...) format_(printf, 1, 2);
|
||||
void vwarn(const char *fmt, va_list ap) format_(printf, 1, 0);
|
||||
void warnx(const char *fmt, ...) format_(printf, 1, 2);
|
||||
void vwarnx(const char *fmt, va_list ap) format_(printf, 1, 0);
|
||||
void warn(char const *fmt, ...) format_(printf, 1, 2);
|
||||
void vwarn(char const *fmt, va_list ap) format_(printf, 1, 0);
|
||||
void warnx(char const *fmt, ...) format_(printf, 1, 2);
|
||||
void vwarnx(char const *fmt, va_list ap) format_(printf, 1, 0);
|
||||
|
||||
_Noreturn void err(int status, const char *fmt, ...) format_(printf, 2, 3);
|
||||
_Noreturn void verr(int status, const char *fmt, va_list ap) format_(printf, 2, 0);
|
||||
_Noreturn void errx(int status, const char *fmt, ...) format_(printf, 2, 3);
|
||||
_Noreturn void verrx(int status, const char *fmt, va_list ap) format_(printf, 2, 0);
|
||||
_Noreturn void err(int status, char const *fmt, ...) format_(printf, 2, 3);
|
||||
_Noreturn void verr(int status, char const *fmt, va_list ap) format_(printf, 2, 0);
|
||||
_Noreturn void errx(int status, char const *fmt, ...) format_(printf, 2, 3);
|
||||
_Noreturn void verrx(int status, char const *fmt, va_list ap) format_(printf, 2, 0);
|
||||
|
||||
#endif /* ERR_IN_LIBC */
|
||||
|
||||
|
||||
5
include/extern/getopt.h
vendored
5
include/extern/getopt.h
vendored
@@ -30,13 +30,14 @@ extern char *musl_optarg;
|
||||
extern int musl_optind, musl_opterr, musl_optopt, musl_optreset;
|
||||
|
||||
struct option {
|
||||
const char *name;
|
||||
char const *name;
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
int musl_getopt_long_only(int, char **, const char *, const struct option *, int *);
|
||||
int musl_getopt_long_only(int argc, char **argv, char const *optstring,
|
||||
const struct option *longopts, int *idx);
|
||||
|
||||
#define no_argument 0
|
||||
#define required_argument 1
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
#define PACKAGE_VERSION_MINOR 5
|
||||
#define PACKAGE_VERSION_PATCH 1
|
||||
|
||||
const char *get_package_version_string(void);
|
||||
char const *get_package_version_string(void);
|
||||
|
||||
#endif /* EXTERN_VERSION_H */
|
||||
|
||||
Reference in New Issue
Block a user