]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/curl/src/urlglob.h
hello world
[icculus/iodoom3.git] / neo / curl / src / urlglob.h
1 #ifndef __URLGLOB_H
2 #define __URLGLOB_H
3 /***************************************************************************
4  *                                  _   _ ____  _     
5  *  Project                     ___| | | |  _ \| |    
6  *                             / __| | | | |_) | |    
7  *                            | (__| |_| |  _ <| |___ 
8  *                             \___|\___/|_| \_\_____|
9  *
10  * Copyright (C) 1998 - 2004, 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  * $Id: urlglob.h,v 1.15 2004/03/08 12:51:33 bagder Exp $
24  ***************************************************************************/
25 typedef enum {
26   UPTSet=1,
27   UPTCharRange,
28   UPTNumRange
29 } URLPatternType;
30
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     } CharRange;
43     struct {
44       int min_n, max_n;
45       short padlength;
46       int ptr_n;
47     } NumRange ;
48   } content;
49 } URLPattern;
50
51 typedef struct {
52   char* literal[10];
53   URLPattern pattern[9];
54   int size;
55   int urllen;
56   char *glob_buffer;
57   char beenhere;
58   char errormsg[80]; /* error message buffer */
59 } URLGlob;
60
61 int glob_url(URLGlob**, char*, int *, FILE *);
62 char* glob_next_url(URLGlob*);
63 char* glob_match_url(char*, URLGlob *); 
64 void glob_cleanup(URLGlob* glob);
65
66 #endif