Subversion Repositories RepoView

Rev

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

Rev 27 Rev 37
Line 1... Line 1...
1
/* $Id: check.c 27 2024-08-21 17:26:30Z nishi $ */
1
/* $Id: check.c 37 2024-08-22 03:02:58Z nishi $ */
2
 
2
 
3
#include "config.h"
3
#include "config.h"
4
 
4
 
5
#include <stdio.h>
5
#include <stdio.h>
6
 
6
 
Line 98... Line 98...
98
#endif
98
#endif
99
#if defined(USE_MYPAGE) && !defined(USE_LIBPNG)
99
#if defined(USE_MYPAGE) && !defined(USE_LIBPNG)
100
	fprintf(stderr, "USE_MYPAGE is defined, but USE_LIBPNG is not defined.\n");
100
	fprintf(stderr, "USE_MYPAGE is defined, but USE_LIBPNG is not defined.\n");
101
	st = 1;
101
	st = 1;
102
#endif
102
#endif
-
 
103
#if defined(USE_MYPAGE) && !defined(USE_AVATAR)
-
 
104
	fprintf(stderr, "USE_MYPAGE is defined, but USE_AVATAR is not defined.\n");
-
 
105
	st = 1;
-
 
106
#endif
-
 
107
	return st;
-
 
108
}
-
 
109
 
-
 
110
int check_avatar(void) {
-
 
111
	int st = 0;
-
 
112
#if defined(USE_AVATAR) && !defined(USE_LIBPNG)
-
 
113
	fprintf(stderr, "USE_AVATAR is defined, but USE_LIBPNG is not defined.\n");
-
 
114
	st = 1;
-
 
115
#endif
103
	return st;
116
	return st;
104
}
117
}
105
 
118
 
106
int main() {
119
int main() {
107
	int st;
120
	int st;
Line 113... Line 126...
113
	if(st != 0) goto fail;
126
	if(st != 0) goto fail;
114
	st = check_files();
127
	st = check_files();
115
	if(st != 0) goto fail;
128
	if(st != 0) goto fail;
116
	st = check_mypage();
129
	st = check_mypage();
117
	if(st != 0) goto fail;
130
	if(st != 0) goto fail;
-
 
131
	st = check_avatar();
-
 
132
	if(st != 0) goto fail;
118
	printf("Config validation successful.\n");
133
	printf("Config validation successful.\n");
119
	return 0;
134
	return 0;
120
fail:
135
fail:
121
	fprintf(stderr, "Config validation failure.\n");
136
	fprintf(stderr, "Config validation failure.\n");
122
	return st;
137
	return st;