Subversion Repositories IRCServ

Rev

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

Rev 3 Rev 5
Line 1... Line 1...
1
/* $Id: check.c 3 2024-08-25 10:23:36Z nishi $ */
1
/* $Id: check.c 5 2024-08-25 11:58:10Z nishi $ */
2
 
2
 
3
#include "config.h"
3
#include "config.h"
4
 
4
 
-
 
5
#include <string.h>
5
#include <stdio.h>
6
#include <stdio.h>
6
 
7
 
7
int check_log(void) {
8
int check_log(void) {
8
	int count = 0;
9
	int count = 0;
9
	const char* name = "";
10
	const char* name = "";
Line 25... Line 26...
25
		printf("Using %s for logging\n", name);
26
		printf("Using %s for logging\n", name);
26
		return 0;
27
		return 0;
27
	}
28
	}
28
}
29
}
29
 
30
 
30
int check_irc(void){
31
int check_irc(void) {
31
	int st = 0;
32
	int st = 0;
32
#ifndef IRC_SERVER
33
#ifndef IRC_SERVER
33
	fprintf(stderr, "Set a server IP\n");
34
	fprintf(stderr, "Set a server IP\n");
34
	st = 1;
35
	st = 1;
35
#endif
36
#endif
Line 46... Line 47...
46
	st = 1;
47
	st = 1;
47
#endif
48
#endif
48
	return st;
49
	return st;
49
}
50
}
50
 
51
 
-
 
52
int main(int argc, char** argv) {
51
int main() {
53
	if(argc == 1) {
52
	int st = 0;
54
		int st = 0;
53
	st = check_log();
55
		st = check_log();
54
	if(st != 0) goto cleanup;
56
		if(st != 0) goto cleanup;
55
	st = check_irc();
57
		st = check_irc();
56
	if(st != 0) goto cleanup;
58
		if(st != 0) goto cleanup;
57
cleanup:
59
	cleanup:
58
	return st;
60
		return st;
-
 
61
	} else if(strcmp(argv[1], "objs") == 0) {
-
 
62
#if defined(USE_SYSLOG)
-
 
63
		printf("log/syslog.o");
-
 
64
#elif defined(USE_STDERR)
-
 
65
		printf("log/stderr.o");
-
 
66
#endif
-
 
67
		printf("\n");
-
 
68
	}
59
}
69
}