AxWin3 - Heaps of bugfixes to RichText renderer
[tpg/acess2.git] / AcessNative / acesskernel_src / helpers.c
index ef5f1db..3cf273e 100644 (file)
@@ -4,11 +4,13 @@
  *
  * Kernel Main
  */
-#include <acess.h>
+#include <arch.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdarg.h>
 #include <sys/time.h>
 
+#if 0
 void LogF(const char *Fmt, ...)
 {
        va_list args;
@@ -50,7 +52,25 @@ void Panic(const char *Format, ...)
 
 void Debug_SetKTerminal(const char *Path)
 {
-       // Ignored, kernel debug goes to stdout
+       // Ignored, kernel debug goes to stdout instead of a virtual terminal
+}
+#endif
+
+void KernelPanic_SetMode(void)
+{
+       // NOP - No need
+}
+void KernelPanic_PutChar(char ch)
+{
+       fprintf(stderr, "%c", ch);
+}
+void Debug_PutCharDebug(char ch)
+{
+       printf("%c", ch);
+}
+void Debug_PutStringDebug(const char *String)
+{
+       printf("%s", String);
 }
 
 void *Heap_Allocate(const char *File, int Line, int ByteCount)
@@ -58,11 +78,35 @@ void *Heap_Allocate(const char *File, int Line, int ByteCount)
        return malloc(ByteCount);
 }
 
+void *Heap_AllocateZero(const char *File, int Line, int ByteCount)
+{
+       return calloc(ByteCount, 1);
+}
+
+void *Heap_Reallocate(const char *File, int Line, void *Ptr, int Bytes)
+{
+       return realloc(Ptr, Bytes);
+}
+
+void Heap_Deallocate(void *Ptr)
+{
+       free(Ptr);
+}
+
+void Heap_Dump(void)
+{
+}
+
 tPAddr MM_GetPhysAddr(tVAddr VAddr)
 {
        return VAddr;   // HACK!
 }
 
+int MM_IsValidBuffer(tVAddr Base, int Size)
+{
+       return 1;
+}
+
 Uint MM_GetFlags(tVAddr VAddr)
 {
        return 0;
@@ -81,3 +125,8 @@ Sint64 now(void)
        return tv.tv_sec * 1000 + tv.tv_usec/1000;
 }
 
+void IPStack_SendDebugText(const char *str)
+{
+       // nop
+}
+

UCC git Repository :: git.ucc.asn.au