aboutsummaryrefslogtreecommitdiff
path: root/src/tool_urlglob.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-14 00:05:04 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-15 08:54:42 +0200
commit8df455479f8801bbebad8839fc96abbffa711603 (patch)
treead0fcac278779ef75726f8aec6a061453c043282 /src/tool_urlglob.h
parent5d54b5e6971cf26b35d11980d6953bf436419752 (diff)
source cleanup: remove all custom typedef structs
- Stick to a single unified way to use structs - Make checksrc complain on 'typedef struct {' - Allow them in tests, public headers and examples - Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually typedef different types/structs depending on build conditions. Closes #5338
Diffstat (limited to 'src/tool_urlglob.h')
-rw-r--r--src/tool_urlglob.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/tool_urlglob.h b/src/tool_urlglob.h
index 82326c0a0..5ed76671e 100644
--- a/src/tool_urlglob.h
+++ b/src/tool_urlglob.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -29,7 +29,7 @@ typedef enum {
UPTNumRange
} URLPatternType;
-typedef struct {
+struct URLPattern {
URLPatternType type;
int globindex; /* the number of this particular glob or -1 if not used
within {} or [] */
@@ -53,24 +53,24 @@ typedef struct {
unsigned long step;
} NumRange;
} content;
-} URLPattern;
+};
/* the total number of globs supported */
#define GLOB_PATTERN_NUM 100
-typedef struct {
- URLPattern pattern[GLOB_PATTERN_NUM];
+struct URLGlob {
+ struct URLPattern pattern[GLOB_PATTERN_NUM];
size_t size;
size_t urllen;
char *glob_buffer;
char beenhere;
const char *error; /* error message */
size_t pos; /* column position of error or 0 */
-} URLGlob;
+};
-CURLcode glob_url(URLGlob**, char *, unsigned long *, FILE *);
-CURLcode glob_next_url(char **, URLGlob *);
-CURLcode glob_match_url(char **, char *, URLGlob *);
-void glob_cleanup(URLGlob* glob);
+CURLcode glob_url(struct URLGlob**, char *, unsigned long *, FILE *);
+CURLcode glob_next_url(char **, struct URLGlob *);
+CURLcode glob_match_url(char **, char *, struct URLGlob *);
+void glob_cleanup(struct URLGlob *glob);
#endif /* HEADER_CURL_TOOL_URLGLOB_H */