wip
This commit is contained in:
parent
16eb6aa523
commit
8ac44bd509
11
c/assert.h
Normal file
11
c/assert.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(__linux__)
|
||||
#include "assert_hosted.h"
|
||||
#elif defined(_WIN32)
|
||||
#include "assert_hosted.h"
|
||||
#elif defined(__APPLE__)
|
||||
#include "assert_hosted.h"
|
||||
#else
|
||||
#include "assert_dreamcast.h"
|
||||
#endif
|
3
c/assert_dreamcast.h
Normal file
3
c/assert_dreamcast.h
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define assert(b)
|
3
c/assert_hosted.h
Normal file
3
c/assert_hosted.h
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include <assert.h>
|
@ -1,4 +1,3 @@
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
11
c/printf.h
Normal file
11
c/printf.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(__linux__)
|
||||
#include "printf_hosted.h"
|
||||
#elif defined(_WIN32)
|
||||
#include "printf_hosted.h"
|
||||
#elif defined(__APPLE__)
|
||||
#include "printf_hosted.h"
|
||||
#else
|
||||
#include "printf_dreamcast.h"
|
||||
#endif
|
0
c/printf_dreamcast.c
Normal file
0
c/printf_dreamcast.c
Normal file
6
c/printf_hosted.h
Normal file
6
c/printf_hosted.h
Normal file
@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define debugf(fmt, ...) printf((fmt), __VA_ARGS__);
|
||||
#define debugc(c) putc(stdout, c);
|
11
p/Fields.java
Normal file
11
p/Fields.java
Normal file
@ -0,0 +1,11 @@
|
||||
package p;
|
||||
|
||||
class Fields {
|
||||
int foo;
|
||||
long bar;
|
||||
int[] spam;
|
||||
static float baz;
|
||||
static float bleh;
|
||||
static double qux;
|
||||
static Object eggs;
|
||||
}
|
22
p/Generic.java
Normal file
22
p/Generic.java
Normal file
@ -0,0 +1,22 @@
|
||||
package p;
|
||||
|
||||
class Generic<T, U>
|
||||
{
|
||||
T obj1; // An object of type T
|
||||
U obj2; // An object of type U
|
||||
|
||||
// constructor
|
||||
Generic(T obj1, U obj2)
|
||||
{
|
||||
this.obj1 = obj1;
|
||||
this.obj2 = obj2;
|
||||
}
|
||||
|
||||
// To print objects of T and U
|
||||
public static void print()
|
||||
{
|
||||
float ff = 1.0f;
|
||||
Float f = new Float(f);
|
||||
Generic<Integer, Float> g = new Generic<Integer, Float>(1, f);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user