Subversion Repositories RepoView

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: main.c 3 2024-08-20 21:05:24Z nishi $ */
1
/* $Id: main.c 5 2024-08-20 22:43:56Z nishi $ */
2
 
2
 
3
#include <stdio.h>
3
#include <stdio.h>
4
 
4
 
5
#include "../config.h"
5
#include "../config.h"
6
 
6
 
Line 10... Line 10...
10
#include "rv_util.h"
10
#include "rv_util.h"
11
#include "rv_db.h"
11
#include "rv_db.h"
12
#include "rv_auth.h"
12
#include "rv_auth.h"
13
 
13
 
14
#include <stdlib.h>
14
#include <stdlib.h>
-
 
15
#include <time.h>
15
 
16
 
16
char* postdata;
17
char* postdata;
17
 
18
 
18
int main() {
19
int main() {
-
 
20
	srand(time(NULL));
19
	rv_check_sanity();
21
	rv_check_sanity();
20
	rv_init_db();
22
	rv_init_db();
21
	rv_parse_query(getenv("QUERY_STRING"));
23
	rv_parse_query(getenv("QUERY_STRING"));
22
	rv_save_query('Q');
24
	rv_save_query('Q');
23
	postdata = malloc(1);
25
	postdata = malloc(1);
Line 31... Line 33...
31
		postdata = rv_strcat(tmp, cbuf);
33
		postdata = rv_strcat(tmp, cbuf);
32
		free(tmp);
34
		free(tmp);
33
	}
35
	}
34
	rv_parse_query(postdata);
36
	rv_parse_query(postdata);
35
	rv_save_query('P');
37
	rv_save_query('P');
-
 
38
	rv_init_auth();
36
	rv_process_page();
39
	rv_process_page();
37
	printf("Content-Type: text/html\r\n");
40
	printf("Content-Type: text/html\r\n");
38
	printf("\r\n");
41
	printf("\r\n");
39
	rv_print_page();
42
	rv_print_page();
40
	rv_logged_in();
43
	rv_logged_in();