This commit is contained in:
2026-05-12 20:32:13 -05:00
parent 2485cee537
commit 72ac62fe3e
5 changed files with 20 additions and 8 deletions

View File

@@ -40,10 +40,12 @@ SOFTWARE.
#define _CRT_SECURE_NO_WARNINGS // No c warnings
#define _CRT_RAND_S
#define OEMRESOURCE // GUI
// Now we define our system types for unix and windows.
// Now we define our system types for unix and windows.
#include <windows.h>
typedef HANDLE ci2_fd;
typedef wchar_t ci2_sys_char;
#define main wmain
typedef wchar_t ci2_sys_char;
typedef HANDLE ci2_fd;
#else // UNIX:
typedef int ci2_fd;
typedef char ci2_sys_char;

View File

@@ -25,8 +25,11 @@ SOFTWARE.
#include <stdlib.h>
#include <limits.h> /* INT_MAX, CHAR_BIT — C standard */
#include <float.h> /* FLT_MANT_DIG — C standard */
#include <stdint.h>
int main(void){
int main(int argc, ci2_sys_char *argv[]){
UNUSED(argc);
UNUSED(argv);
/* Fundamental type sizes that almost all C code silently assumes. */
CI2_STATIC_ASSERT(CHAR_BIT == 8);
CI2_STATIC_ASSERT(sizeof(char) == 1);

View File

@@ -40,8 +40,10 @@ static int test_assert_failing(void){
#endif
}
int main(void)
{
int main(int argc, ci2_sys_char *argv[])
{
UNUSED(argc);
UNUSED(argv);
int result = -1;
CI2_ASSERT(ci2_true);

View File

@@ -66,8 +66,11 @@ static int test_uncaught_exception(void){
return EXIT_SUCCESS;
}
int main(void)
int main(int argc, ci2_sys_char *argv[])
{
UNUSED(argc);
UNUSED(argv);
int result = -1;
result = test_uncaught_exception();
result = test_caught_exception();

View File

@@ -69,8 +69,10 @@ static int test_uncaught_exception(void){
return EXIT_SUCCESS;
}
int main(void)
int main(int argc, ci2_sys_char *argv[])
{
UNUSED(argc);
UNUSED(argv);
int result = -1;
result = test_uncaught_exception();
result = test_caught_exception();