1 /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 /* generate a apr_table_t of 256 values, where certain characters are
20 * marked "interesting"... for the uri parsing process.
23 int main(int argc, char *argv[])
28 printf("/* this file is automatically generated by "
29 "gen_uri_delims, do not edit */\n");
30 printf("static const unsigned char uri_delims[256] = {");
31 for (i = 0; i < 256; ++i) {
35 case ':': value = "T_COLON"; break;
36 case '/': value = "T_SLASH"; break;
37 case '?': value = "T_QUESTION"; break;
38 case '#': value = "T_HASH"; break;
39 case '\0': value = "T_NUL"; break;
40 default: value = "0"; break;
42 printf("%s%c", value, (i < 255) ? ',' : ' ');