Added ctx.c to gitignore + some runtime import fixes

This commit is contained in:
elijah-thomas774
2023-12-21 10:44:16 -05:00
parent 5b754f0567
commit 065c25b986
6 changed files with 29 additions and 26 deletions
+7 -7
View File
@@ -2,18 +2,18 @@
#define MSL_COMMON_SRC_PRINTF_H
#include "MSL_C/MSL_Common/Src/ansi_files.h"
#include "Runtime.PPCEABI.H/__va_arg.h"
#include "Runtime/__va_arg.h"
#ifdef __cplusplus
extern "C" {
#endif
int fprintf(FILE* stream, const char* format, ...);
int printf(const char* format, ...);
int sprintf(const char* str, const char* format, ...);
int snprintf(const char* str, size_t n, const char* format, ...);
int vsnprintf(char* str, size_t n, const char* format, va_list arg);
int vprintf(const char* format, va_list arg);
int fprintf(FILE *stream, const char *format, ...);
int printf(const char *format, ...);
int sprintf(const char *str, const char *format, ...);
int snprintf(const char *str, size_t n, const char *format, ...);
int vsnprintf(char *str, size_t n, const char *format, va_list arg);
int vprintf(const char *format, va_list arg);
#ifdef __cplusplus
}
+1 -1
View File
@@ -18,7 +18,7 @@ extern "C" void *__va_arg(_va_list_struct *, int);
void *__va_arg(_va_list_struct *, int);
#endif
#if IN_VSCODE_EDITOR
#if __INTELLISENSE__
#define __builtin_va_info(...)
#define _var_arg_typeof(...)
#endif
+17 -15
View File
@@ -1,16 +1,14 @@
#pragma once
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MAX(x, y) ((x) >= (y) ? (x) : (y))
#define MIN(x, y) ((x) <= (y) ? (x) : (y))
#define CLAMP(low, high, x) \
((x) > (high) ? (high) : ((x) < (low) ? (low) : (x)))
#define CLAMP(low, high, x) ((x) > (high) ? (high) : ((x) < (low) ? (low) : (x)))
#define ROUND_UP(x, align) (((x) + (align)-1) & (-(align)))
#define ROUND_UP_PTR(x, align) \
((void*)((((u32)(x)) + (align)-1) & (~((align)-1))))
#define ROUND_UP_PTR(x, align) ((void *)((((u32)(x)) + (align)-1) & (~((align)-1))))
#define ROUND_DOWN(x, align) ((x) & (-(align)))
#define ROUND_DOWN_PTR(x, align) ((void*)(((u32)(x)) & (~((align)-1))))
#define ROUND_DOWN_PTR(x, align) ((void *)(((u32)(x)) & (~((align)-1))))
#define ARRAY_LENGTH(x) (sizeof((x)) / sizeof((x)[0]))
@@ -25,15 +23,19 @@
// (Functions are given prototypes for -requireprotos)
#ifdef __MWERKS__
// Force BSS order
#define CW_FORCE_BSS(module, ...) \
void fake_function(...); \
void FORCE_BSS##module##x(void); \
void FORCE_BSS##module##x(void) { fake_function(__VA_ARGS__); }
#define CW_FORCE_BSS(module, ...) \
void fake_function(...); \
void FORCE_BSS##module##x(void); \
void FORCE_BSS##module##x(void) { \
fake_function(__VA_ARGS__); \
}
// Force strings into pool
#define CW_FORCE_STRINGS(module, ...) \
void fake_function(...); \
void FORCE_STRINGS##module(void); \
void FORCE_STRINGS##module(void) { fake_function(__VA_ARGS__); }
#define CW_FORCE_STRINGS(module, ...) \
void fake_function(...); \
void FORCE_STRINGS##module(void); \
void FORCE_STRINGS##module(void) { \
fake_function(__VA_ARGS__); \
}
#else
#define CW_FORCE_BSS(module, ...)
#define CW_FORCE_STRINGS(module, ...)