Subversion Repositories Tewi

Rev

Rev 324 | Rev 349 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 324 Rev 347
Line 1... Line 1...
1
/* $Id: main.c 324 2024-10-14 17:43:25Z nishi $ */
1
/* $Id: main.c 347 2024-10-15 16:33:28Z nishi $ */
2
 
2
 
3
#define SOURCE
3
#define SOURCE
4
 
4
 
5
#include "../config.h"
5
#include "../config.h"
6
 
6
 
Line 35... Line 35...
35
#include "tw_version.h"
35
#include "tw_version.h"
36
 
36
 
37
#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
37
#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
38
#include <windows.h>
38
#include <windows.h>
39
#elif defined(__NETWARE__)
39
#elif defined(__NETWARE__)
40
#include <nwconio.h>
40
#include <nks/thread.h>
41
#include <nwthread.h>
41
#include <screen.h>
42
#endif
42
#endif
43
 
43
 
44
#ifdef _PSP
44
#ifdef _PSP
45
#include <pspkernel.h>
45
#include <pspkernel.h>
46
#include <pspdebug.h>
46
#include <pspdebug.h>
Line 546... Line 546...
546
	int st;
546
	int st;
547
#ifdef __NETWARE__
547
#ifdef __NETWARE__
548
	struct arg_struct* parg = malloc(sizeof(*parg));
548
	struct arg_struct* parg = malloc(sizeof(*parg));
549
	parg->argc = argc;
549
	parg->argc = argc;
550
	parg->argv = argv;
550
	parg->argv = argv;
551
	DestroyScreen(GetCurrentScreen());
-
 
552
	SetCurrentScreen(CreateScreen("Tewi Console", 0));
-
 
553
	BeginThread(thread_stuff, NULL, 0, parg);
-
 
554
	ThreadSwitch();
551
	thread_stuff(parg);
555
	ExitThread(EXIT_THREAD, 0);
-
 
556
	return 0;
552
	return 0;
557
}
553
}
558
 
554
 
559
#ifdef __NETWARE__
-
 
560
void __WATCOM_Prelude(void){return;}
-
 
561
#endif
-
 
562
 
-
 
563
void thread_stuff(void* pargs) {
555
void thread_stuff(void* pargs) {
564
	int st;
556
	int st;
565
	int argc = ((struct arg_struct*)pargs)->argc;
557
	int argc = ((struct arg_struct*)pargs)->argc;
566
	char** argv = ((struct arg_struct*)pargs)->argv;
558
	char** argv = ((struct arg_struct*)pargs)->argv;
567
#endif
559
#endif