]> rtime.felk.cvut.cz Git - hornmich/skoda-qr-demo.git/blob - QRScanner/mobile/jni/thirdparty/curl/src/tool_urlglob.h
Add MuPDF native source codes
[hornmich/skoda-qr-demo.git] / QRScanner / mobile / jni / thirdparty / curl / src / tool_urlglob.h
1 #ifndef HEADER_CURL_TOOL_URLGLOB_H
2 #define HEADER_CURL_TOOL_URLGLOB_H
3 /***************************************************************************
4  *                                  _   _ ____  _
5  *  Project                     ___| | | |  _ \| |
6  *                             / __| | | | |_) | |
7  *                            | (__| |_| |  _ <| |___
8  *                             \___|\___/|_| \_\_____|
9  *
10  * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
11  *
12  * This software is licensed as described in the file COPYING, which
13  * you should have received as part of this distribution. The terms
14  * are also available at http://curl.haxx.se/docs/copyright.html.
15  *
16  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17  * copies of the Software, and permit persons to whom the Software is
18  * furnished to do so, under the terms of the COPYING file.
19  *
20  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21  * KIND, either express or implied.
22  *
23  ***************************************************************************/
24 #include "tool_setup.h"
25
26 typedef enum {
27   UPTSet = 1,
28   UPTCharRange,
29   UPTNumRange
30 } URLPatternType;
31
32 typedef struct {
33   URLPatternType type;
34   union {
35     struct {
36       char **elements;
37       short size;
38       short ptr_s;
39     } Set;
40     struct {
41       char min_c;
42       char max_c;
43       char ptr_c;
44       int step;
45     } CharRange;
46     struct {
47       int min_n;
48       int max_n;
49       short padlength;
50       int ptr_n;
51       int step;
52     } NumRange ;
53   } content;
54 } URLPattern;
55
56 /* the total number of globs supported */
57 #define GLOB_PATTERN_NUM 9
58
59 typedef struct {
60   char *literal[10];
61   URLPattern pattern[GLOB_PATTERN_NUM+1];
62   size_t size;
63   size_t urllen;
64   char *glob_buffer;
65   char beenhere;
66   char errormsg[80]; /* error message buffer */
67 } URLGlob;
68
69 int glob_url(URLGlob**, char*, int *, FILE *);
70 int glob_next_url(char **, URLGlob *);
71 int glob_match_url(char **, char*, URLGlob *);
72 void glob_cleanup(URLGlob* glob);
73
74 #endif /* HEADER_CURL_TOOL_URLGLOB_H */
75