-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscheme.txt
113 lines (93 loc) · 1.47 KB
/
scheme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
%%
#pragma optimize 79
#pragma noroot
#include <Types.h>
#include "url.h"
void parse_scheme(const char *cp, unsigned size, URLComponents *c)
{
unsigned *wp;
unsigned h;
if (!c) return;
if (!cp || !size)
{
c->portNumber = 0;
c->schemeType = SCHEME_NONE;
return;
}
wp = (unsigned *)cp;
h = ((*cp | 0x20) ^ size) & 0x0f;
switch(h)
{
// --- begin auto-generated --
%%
// --- end auto-generated --
}
c->portNumber = 0;
c->schemeType = SCHEME_UNKNOWN;
}
%%
'file' ->
c->schemeType = SCHEME_FILE;
c->portNumber = 0;
return;
.
'ftp' ->
c->schemeType = SCHEME_FTP;
c->portNumber = 21;
return;
.
'ssh' ->
c->schemeType = SCHEME_SSH;
c->portNumber = 22;
return;
.
'telnet' ->
c->schemeType = SCHEME_TELNET;
c->portNumber = 23;
return;
.
'gopher' ->
c->schemeType = SCHEME_GOPHER;
c->portNumber = 70;
return;
.
'http' ->
c->schemeType = SCHEME_HTTP;
c->portNumber = 80;
return;
.
'sftp' ->
c->schemeType = SCHEME_SFTP;
c->portNumber = 115;
return;
.
'nntp' ->
c->schemeType = SCHEME_NNTP;
c->portNumber = 119;
return;
.
'https' ->
c->schemeType = SCHEME_HTTPS;
c->portNumber = 443;
return;
.
'afp' ->
c->schemeType = SCHEME_AFP;
c->portNumber = 548;
return;
.
'nfs' ->
c->schemeType = SCHEME_NFS;
c->portNumber = 2049;
return;
.
'dict' ->
c->schemeType = SCHEME_DICT;
c->portNumber = 2628;
return;
.
'smb' ->
c->schemeType = SCHEME_SMB;
c->portNumber = 445;
return;
.