Subversion Repositories RepoView

Rev

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

Rev 10 Rev 27
Line 1... Line 1...
1
/* $Id: check.c 10 2024-08-21 02:13:48Z nishi $ */
1
/* $Id: check.c 27 2024-08-21 17:26:30Z nishi $ */
2
 
2
 
3
#include "config.h"
3
#include "config.h"
4
 
4
 
5
#include <stdio.h>
5
#include <stdio.h>
6
 
6
 
Line 88... Line 88...
88
	st = 1;
88
	st = 1;
89
#endif
89
#endif
90
	return st;
90
	return st;
91
}
91
}
92
 
92
 
-
 
93
int check_mypage(void) {
-
 
94
	int st = 0;
-
 
95
#if defined(USE_MYPAGE) && !defined(USE_GRAPHICSMAGICK)
-
 
96
	fprintf(stderr, "USE_MYPAGE is defined, but USE_GRAPHICSMAGICK is not defined.\n");
-
 
97
	st = 1;
-
 
98
#endif
-
 
99
#if defined(USE_MYPAGE) && !defined(USE_LIBPNG)
-
 
100
	fprintf(stderr, "USE_MYPAGE is defined, but USE_LIBPNG is not defined.\n");
-
 
101
	st = 1;
-
 
102
#endif
-
 
103
	return st;
-
 
104
}
-
 
105
 
93
int main() {
106
int main() {
94
	int st;
107
	int st;
95
	st = check_db();
108
	st = check_db();
96
	if(st != 0) goto fail;
109
	if(st != 0) goto fail;
97
	st = check_auth();
110
	st = check_auth();
98
	if(st != 0) goto fail;
111
	if(st != 0) goto fail;
99
	st = check_theme();
112
	st = check_theme();
100
	if(st != 0) goto fail;
113
	if(st != 0) goto fail;
101
	st = check_files();
114
	st = check_files();
102
	if(st != 0) goto fail;
115
	if(st != 0) goto fail;
-
 
116
	st = check_mypage();
-
 
117
	if(st != 0) goto fail;
103
	printf("Config validation successful.\n");
118
	printf("Config validation successful.\n");
104
	return 0;
119
	return 0;
105
fail:
120
fail:
106
	fprintf(stderr, "Config validation failure.\n");
121
	fprintf(stderr, "Config validation failure.\n");
107
	return st;
122
	return st;