tool_urlglob.h
Go to the documentation of this file.
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 - 2016, 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 https://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,
31 
32 typedef struct {
34  int globindex; /* the number of this particular glob or -1 if not used
35  within {} or [] */
36  union {
37  struct {
38  char **elements;
39  int size;
40  int ptr_s;
41  } Set;
42  struct {
43  char min_c;
44  char max_c;
45  char ptr_c;
46  int step;
47  } CharRange;
48  struct {
49  unsigned long min_n;
50  unsigned long max_n;
51  int padlength;
52  unsigned long ptr_n;
53  unsigned long step;
54  } NumRange;
55  } content;
56 } URLPattern;
57 
58 /* the total number of globs supported */
59 #define GLOB_PATTERN_NUM 100
60 
61 typedef struct {
63  size_t size;
64  size_t urllen;
65  char *glob_buffer;
66  char beenhere;
67  const char *error; /* error message */
68  size_t pos; /* column position of error or 0 */
69 } URLGlob;
70 
71 CURLcode glob_url(URLGlob**, char *, unsigned long *, FILE *);
72 CURLcode glob_next_url(char **, URLGlob *);
73 CURLcode glob_match_url(char **, char *, URLGlob *);
74 void glob_cleanup(URLGlob* glob);
75 
76 #endif /* HEADER_CURL_TOOL_URLGLOB_H */
77 
unsigned long min_n
Definition: tool_urlglob.h:49
CURLcode glob_next_url(char **, URLGlob *)
Definition: tool_urlglob.c:505
CURLcode glob_match_url(char **, char *, URLGlob *)
Definition: tool_urlglob.c:600
size_t size
Definition: tool_urlglob.h:63
CURLcode
Definition: curl.h:454
CURLcode glob_url(URLGlob **, char *, unsigned long *, FILE *)
Definition: tool_urlglob.c:430
size_t urllen
Definition: tool_urlglob.h:64
char beenhere
Definition: tool_urlglob.h:66
URLPatternType
Definition: tool_urlglob.h:26
URLPatternType type
Definition: tool_urlglob.h:33
#define GLOB_PATTERN_NUM
Definition: tool_urlglob.h:59
size_t pos
Definition: tool_urlglob.h:68
const char * error
Definition: tool_urlglob.h:67
void glob_cleanup(URLGlob *glob)
Definition: tool_urlglob.c:485
unsigned long max_n
Definition: tool_urlglob.h:50
unsigned long ptr_n
Definition: tool_urlglob.h:52
unsigned long step
Definition: tool_urlglob.h:53
char * glob_buffer
Definition: tool_urlglob.h:65
char ** elements
Definition: tool_urlglob.h:38


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:16