Subversion Repositories RepoView

Rev

Rev 43 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 43 Rev 72
Line 1... Line 1...
1
/* $Id: check.c 43 2024-08-22 05:51:35Z nishi $ */
1
/* $Id: check.c 72 2024-08-24 08:54:20Z 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_db(void) {
8
int check_db(void) {
8
	int counter = 0;
9
	int counter = 0;
9
	const char* db = "";
10
	const char* db = "";
Line 126... Line 127...
126
	st = 1;
127
	st = 1;
127
#endif
128
#endif
128
	return st;
129
	return st;
129
}
130
}
130
 
131
 
-
 
132
int main(int argc, char** argv) {
131
int main() {
133
	if(argc == 1){
132
	int st;
134
		int st;
133
	st = check_db();
135
		st = check_db();
134
	if(st != 0) goto fail;
136
		if(st != 0) goto fail;
135
	st = check_auth();
137
		st = check_auth();
136
	if(st != 0) goto fail;
138
		if(st != 0) goto fail;
137
	st = check_theme();
139
		st = check_theme();
138
	if(st != 0) goto fail;
140
		if(st != 0) goto fail;
139
	st = check_files();
141
		st = check_files();
140
	if(st != 0) goto fail;
142
		if(st != 0) goto fail;
141
	st = check_mypage();
143
		st = check_mypage();
142
	if(st != 0) goto fail;
144
		if(st != 0) goto fail;
143
	st = check_avatar();
145
		st = check_avatar();
144
	if(st != 0) goto fail;
146
		if(st != 0) goto fail;
145
	printf("Config validation successful.\n");
147
		printf("Config validation successful.\n");
146
	return 0;
148
		return 0;
147
fail:
149
fail:
148
	fprintf(stderr, "Config validation failure.\n");
150
		fprintf(stderr, "Config validation failure.\n");
149
	return st;
151
		return st;
-
 
152
	}
-
 
153
	return 0;
150
}
154
}