Subversion Repositories RepoView

Rev

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

Rev 43 Rev 44
Line 1... Line 1...
1
/* $Id: modern.c 43 2024-08-22 05:51:35Z nishi $ */
1
/* $Id: modern.c 44 2024-08-22 05:52:32Z nishi $ */
2
 
2
 
3
#include "rv_query.h"
3
#include "rv_query.h"
4
 
4
 
5
#include "rv_util.h"
5
#include "rv_util.h"
6
#include "rv_version.h"
6
#include "rv_version.h"
Line 45... Line 45...
45
bool invalid_char(char c) {
45
bool invalid_char(char c) {
46
	if(c >= '0' && c <= '9') return false;
46
	if(c >= '0' && c <= '9') return false;
47
	if(c >= 'a' && c <= 'z') return false;
47
	if(c >= 'a' && c <= 'z') return false;
48
	if(c >= 'A' && c <= 'Z') return false;
48
	if(c >= 'A' && c <= 'Z') return false;
49
	if(c == '_' && c == '-' && c == '.') return false;
49
	if(c == '_' && c == '-' && c == '.') return false;
-
 
50
	return true;
50
}
51
}
51
 
52
 
52
char* url_escape(const char* input) {
53
char* url_escape(const char* input) {
53
	const char hex[] = "0123456789ABCDEF";
54
	const char hex[] = "0123456789ABCDEF";
54
	char* r = malloc(1);
55
	char* r = malloc(1);