From 4552fc306e2376b7cc68b4e327fb0fe7250fcb44 Mon Sep 17 00:00:00 2001 From: relnev Date: Mon, 27 May 2002 04:04:43 +0000 Subject: [PATCH] 155 undefined references left --- Makefile | 5 ++- include/unix.h | 1 + src/freespace2/unixmain.cpp | 6 +++ src/network/psnet2.cpp | 10 +++++ src/osapi/osregistry-unix.cpp | 38 +++++++++++++++++++ src/platform/unix.cpp | 69 +++++++++++++++++++++++++++++++++++ src/sound/rtvoice.cpp | 13 +++++++ 7 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 src/freespace2/unixmain.cpp create mode 100644 src/osapi/osregistry-unix.cpp diff --git a/Makefile b/Makefile index f1f8353..fcc6c99 100644 --- a/Makefile +++ b/Makefile @@ -135,10 +135,12 @@ CODE_SOURCES =./src/anim/animplay.cpp \ ./src/object/objectsort.cpp \ ./src/observer/observer.cpp \ ./src/osapi/os_unix.cpp \ + ./src/osapi/osregistry-unix.cpp \ ./src/palman/palman.cpp \ ./src/parse/encrypt.cpp \ ./src/parse/parselo.cpp \ ./src/parse/sexp.cpp \ + ./src/sound/rtvoice.cpp \ ./src/sound/sound.cpp \ ./src/particle/particle.cpp \ ./src/pcxutils/pcxutils.cpp \ @@ -236,7 +238,8 @@ CODE_SOURCES =./src/anim/animplay.cpp \ # ./src/network/stand_gui.cpp FS_SOURCES=./src/freespace2/freespace.cpp \ - ./src/freespace2/levelpaging.cpp + ./src/freespace2/levelpaging.cpp \ + src/freespace2/unixmain.cpp CODE_OBJECTS=$(CODE_SOURCES:.cpp=.o) diff --git a/include/unix.h b/include/unix.h index d21d713..b1b9093 100644 --- a/include/unix.h +++ b/include/unix.h @@ -39,6 +39,7 @@ #define __except catch #define LPSTR char * #define PASCAL +#define CALLBACK extern void strlwr (char *str); extern int filelength (int fd); diff --git a/src/freespace2/unixmain.cpp b/src/freespace2/unixmain.cpp new file mode 100644 index 0000000..1ffb29e --- /dev/null +++ b/src/freespace2/unixmain.cpp @@ -0,0 +1,6 @@ +#include "unix.h" + +int main(int argc, char **argv) +{ + STUB_FUNCTION; +} diff --git a/src/network/psnet2.cpp b/src/network/psnet2.cpp index c94f855..696cbef 100644 --- a/src/network/psnet2.cpp +++ b/src/network/psnet2.cpp @@ -7,6 +7,9 @@ * C file containing application level network-interface. * * $Log$ + * Revision 1.5 2002/05/27 04:04:43 relnev + * 155 undefined references left + * * Revision 1.4 2002/05/26 21:27:53 theoddone33 * More progress (I hate psnet2) * @@ -2455,6 +2458,13 @@ unsigned int psnet_ras_status() //The ip of the RAS connection return rasip; } +#else +unsigned int psnet_ras_status() +{ + STUB_FUNCTION; + + return INADDR_ANY; +} #endif // functions to get the status of a RAS connection diff --git a/src/osapi/osregistry-unix.cpp b/src/osapi/osregistry-unix.cpp new file mode 100644 index 0000000..a6d8e4a --- /dev/null +++ b/src/osapi/osregistry-unix.cpp @@ -0,0 +1,38 @@ +#include "pstypes.h" + +char *Osreg_company_name = "Volition"; +char *Osreg_class_name = "Freespace2Class"; +#if defined(FS2_DEMO) +char *Osreg_app_name = "FreeSpace2Demo"; +char *Osreg_title = "Freespace 2 Demo"; +#elif defined(OEM_BUILD) +char *Osreg_app_name = "FreeSpace2OEM"; +char *Osreg_title = "Freespace 2 OEM"; +#else +char *Osreg_app_name = "FreeSpace2"; +char *Osreg_title = "Freespace 2"; +#endif + +char *os_config_read_string(char *section, char *name, char *default_value) +{ + STUB_FUNCTION; + + return ""; +} + +unsigned int os_config_read_uint(char *section, char *name, unsigned int default_value) +{ + STUB_FUNCTION; + + return 0; +} + +void os_config_write_string(char *section, char *name, char *value) +{ + STUB_FUNCTION; +} + +void os_config_write_uint(char *section, char *name, unsigned int value) +{ + STUB_FUNCTION; +} diff --git a/src/platform/unix.cpp b/src/platform/unix.cpp index fec9283..b5c7f36 100644 --- a/src/platform/unix.cpp +++ b/src/platform/unix.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -20,6 +21,13 @@ int filelength (int fd) return len; } +unsigned long _beginthread (void (*pfuncStart)(void *), unsigned unStackSize, void* pArgList) +{ + STUB_FUNCTION; + + return 0; +} + void Sleep (int mili) { usleep (mili * 1000); @@ -49,3 +57,64 @@ int MulDiv(int a, int b, int c) return retr; } + +/* mem debug junk */ +int TotalRam = 0; + +void vm_free(void* ptr, char*, int) +{ + free(ptr); +} + +void *vm_malloc(int size, char*, int) +{ + return malloc(size); +} + +char *vm_strdup(char const* str, char*, int) +{ + return strdup(str); +} + +void windebug_memwatch_init() +{ + TotalRam = 0; +} + +/* error message debugging junk */ +int Log_debug_output_to_file = 0; + +void load_filter_info(void) +{ + STUB_FUNCTION; +} + +void outwnd_printf(char*, char*, ...) +{ + STUB_FUNCTION; +} + +void outwnd_printf2(char*, ...) +{ + STUB_FUNCTION; +} + +void outwnd_close() +{ + STUB_FUNCTION; +} + +void Warning( char * filename, int line, char * format, ... ) +{ + STUB_FUNCTION; +} + +void Error( char * filename, int line, char * format, ... ) +{ + STUB_FUNCTION; +} + +void WinAssert(char * text,char *filename, int line) +{ + STUB_FUNCTION; +} diff --git a/src/sound/rtvoice.cpp b/src/sound/rtvoice.cpp index 2c06f57..e0b2f2c 100644 --- a/src/sound/rtvoice.cpp +++ b/src/sound/rtvoice.cpp @@ -7,6 +7,9 @@ * C module file for real-time voice * * $Log$ + * Revision 1.3 2002/05/27 04:04:43 relnev + * 155 undefined references left + * * Revision 1.2 2002/05/07 03:16:52 theoddone33 * The Great Newline Fix * @@ -271,7 +274,11 @@ void rtvoice_stop_recording() dscap_stop_record(); if ( Rtv_record_timer_id ) { +#ifndef PLAT_UNIX timeKillEvent(Rtv_record_timer_id); +#else + STUB_FUNCTION; +#endif Rtv_record_timer_id = 0; } @@ -328,7 +335,13 @@ int rtvoice_start_recording( void (*user_callback)(), int callback_time ) } if ( user_callback ) { +#ifndef PLAT_UNIX Rtv_record_timer_id = timeSetEvent(callback_time, callback_time, TimeProc, 0, TIME_PERIODIC); +#else + STUB_FUNCTION; + + return -1; +#endif if ( !Rtv_record_timer_id ) { dscap_stop_record(); return -1; -- 2.39.2