Subversion Repositories Tewi

Rev

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

Rev 187 Rev 189
Line 1... Line 1...
1
/* $Id: main.c 187 2024-09-28 00:07:34Z nishi $ */
1
/* $Id: main.c 189 2024-09-29 00:37:00Z nishi $ */
2
 
2
 
3
#define SOURCE
3
#define SOURCE
4
 
4
 
5
#include "../config.h"
5
#include "../config.h"
6
 
6
 
-
 
7
#include <unistd.h>
7
#include <stdio.h>
8
#include <stdio.h>
8
#include <stdbool.h>
9
#include <stdbool.h>
9
#include <string.h>
10
#include <string.h>
10
#include <signal.h>
11
#include <signal.h>
11
#include <stdlib.h>
12
#include <stdlib.h>
Line 37... Line 38...
37
PSP_MODULE_INFO("Tewi HTTPd", PSP_MODULE_USER, 1, 1);
38
PSP_MODULE_INFO("Tewi HTTPd", PSP_MODULE_USER, 1, 1);
38
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
39
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
39
 
40
 
40
#define printf(...) pspDebugScreenPrintf(__VA_ARGS__)
41
#define printf(...) pspDebugScreenPrintf(__VA_ARGS__)
41
#define STDERR_LOG(...) pspDebugScreenPrintf(__VA_ARGS__)
42
#define STDERR_LOG(...) pspDebugScreenPrintf(__VA_ARGS__)
-
 
43
#elif defined(__ps2sdk__)
-
 
44
#include <debug.h>
-
 
45
#include <sifrpc.h>
-
 
46
 
-
 
47
#define printf(...) scr_printf(__VA_ARGS__)
-
 
48
#define STDERR_LOG(...) scr_printf(__VA_ARGS__)
42
#else
49
#else
43
#define STDERR_LOG(...) fprintf(stderr, __VA_ARGS__)
50
#define STDERR_LOG(...) fprintf(stderr, __VA_ARGS__)
44
#endif
51
#endif
45
 
52
 
46
extern bool cm_do_log;
53
extern bool cm_do_log;
Line 241... Line 248...
241
	}
248
	}
242
	printf("Connected, My IP is %s\n", info.ip);
249
	printf("Connected, My IP is %s\n", info.ip);
243
#elif defined(__PPU__)
250
#elif defined(__PPU__)
244
	printf("PS3 Bootstrap, Tewi/%s\n", tw_get_version());
251
	printf("PS3 Bootstrap, Tewi/%s\n", tw_get_version());
245
	netInitialize();
252
	netInitialize();
-
 
253
#elif defined(__ps2sdk__)
-
 
254
	SifInitRpc(0);
-
 
255
	init_scr();
-
 
256
	scr_printf("PS2 Bootstrap, Tewi/%s\n", tw_get_version());
-
 
257
	while(1)
-
 
258
		;
246
#endif
259
#endif
247
	int st = startup(argc, argv);
260
	int st = startup(argc, argv);
248
	if(st != -1) {
261
	if(st != -1) {
249
#ifdef _PSP
262
#ifdef _PSP
250
		printf("Error code %d\n", st);
263
		printf("Error code %d\n", st);