Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / src / urlglob.h
blobb6b1f74a71b6ab3554c787f0e139196e8f8d215d
1 #ifndef __URLGLOB_H
2 #define __URLGLOB_H
3 /***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
10 * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
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.
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.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 * $Id: urlglob.h,v 1.1.1.1 2008-09-23 16:32:06 hoffman Exp $
24 ***************************************************************************/
25 typedef enum {
26 UPTSet=1,
27 UPTCharRange,
28 UPTNumRange
29 } URLPatternType;
31 typedef struct {
32 URLPatternType type;
33 union {
34 struct {
35 char **elements;
36 short size;
37 short ptr_s;
38 } Set;
39 struct {
40 char min_c, max_c;
41 char ptr_c;
42 int step;
43 } CharRange;
44 struct {
45 int min_n, max_n;
46 short padlength;
47 int ptr_n;
48 int step;
49 } NumRange ;
50 } content;
51 } URLPattern;
53 typedef struct {
54 char* literal[10];
55 URLPattern pattern[9];
56 size_t size;
57 size_t urllen;
58 char *glob_buffer;
59 char beenhere;
60 char errormsg[80]; /* error message buffer */
61 } URLGlob;
63 int glob_url(URLGlob**, char*, int *, FILE *);
64 char* glob_next_url(URLGlob*);
65 char* glob_match_url(char*, URLGlob *);
66 void glob_cleanup(URLGlob* glob);
68 #endif