new
[libcurl.git] / src / urlglob.h
blob8e802493b98baa5c53a1f7440258f3bb6ff7c53f
1 #ifndef __URLGLOB_H
2 #define __URLGLOB_H
3 /*****************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
10 * The contents of this file are subject to the Mozilla Public License
11 * Version 1.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
17 * License for the specific language governing rights and limitations
18 * under the License.
20 * The Original Code is Curl.
22 * The Initial Developer of the Original Code is Daniel Stenberg.
24 * Portions created by the Initial Developer are Copyright (C) 1998.
25 * All Rights Reserved.
27 * ------------------------------------------------------------
28 * Main author:
29 * - Daniel Stenberg <Daniel.Stenberg@haxx.nu>
31 * http://curl.haxx.nu
33 * $Source: /cvsroot/curl/curl/src/urlglob.h,v $
34 * $Revision: 1.1.1.1 $
35 * $Date: 1999-12-29 14:22:31 $
36 * $Author: bagder $
37 * $State: Exp $
38 * $Locker: $
40 * ------------------------------------------------------------
41 ****************************************************************************/
42 typedef enum {UPTSet=1,UPTCharRange,UPTNumRange} URLPatternType;
44 typedef struct {
45 URLPatternType type;
46 union {
47 struct {
48 char **elements;
49 short size;
50 short ptr_s;
51 } Set;
52 struct {
53 char min_c, max_c;
54 char ptr_c;
55 } CharRange;
56 struct {
57 int min_n, max_n;
58 short padlength;
59 int ptr_n;
60 } NumRange ;
61 } content;
62 } URLPattern;
64 typedef struct {
65 char* literal[10];
66 URLPattern pattern[9];
67 int size;
68 } URLGlob;
70 int glob_url(URLGlob**, char*);
71 char* next_url(URLGlob*);
72 char* match_url(char*, URLGlob);
74 #endif