projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
50466af
)
Move parsers structure definition from project.h to parsers.h.
author
Fabian Keil
<fk@fabiankeil.de>
Tue, 20 May 2008 16:05:09 +0000
(16:05 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Tue, 20 May 2008 16:05:09 +0000
(16:05 +0000)
parsers.h
patch
|
blob
|
history
project.h
patch
|
blob
|
history
diff --git
a/parsers.h
b/parsers.h
index
ac3d339
..
afd3ea0
100644
(file)
--- a/
parsers.h
+++ b/
parsers.h
@@
-1,6
+1,6
@@
#ifndef PARSERS_H_INCLUDED
#define PARSERS_H_INCLUDED
#ifndef PARSERS_H_INCLUDED
#define PARSERS_H_INCLUDED
-#define PARSERS_H_VERSION "$Id: parsers.h,v 1.4
2 2008/04/17 14:40:49
fabiankeil Exp $"
+#define PARSERS_H_VERSION "$Id: parsers.h,v 1.4
3 2008/05/10 13:23:38
fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.h,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.h,v $
@@
-43,6
+43,10
@@
*
* Revisions :
* $Log: parsers.h,v $
*
* Revisions :
* $Log: parsers.h,v $
+ * Revision 1.43 2008/05/10 13:23:38 fabiankeil
+ * Don't provide get_header() with the whole client state
+ * structure when it only needs access to csp->iob.
+ *
* Revision 1.42 2008/04/17 14:40:49 fabiankeil
* Provide get_http_time() with the buffer size so it doesn't
* have to blindly assume that the buffer is big enough.
* Revision 1.42 2008/04/17 14:40:49 fabiankeil
* Provide get_http_time() with the buffer size so it doesn't
* have to blindly assume that the buffer is big enough.
@@
-262,6
+266,22
@@
extern "C" {
#endif
extern "C" {
#endif
+/**
+ * List of functions to run on a list of headers.
+ * XXX: make parsers local to parsers.c.
+ */
+struct parsers
+{
+ /** The header prefix to match */
+ const char *str;
+
+ /** The length of the prefix to match */
+ const size_t len;
+
+ /** The function to apply to this line */
+ const parser_func_ptr parser;
+};
+
extern const struct parsers client_patterns[];
extern const struct parsers server_patterns[];
extern const struct parsers server_patterns_light[];
extern const struct parsers client_patterns[];
extern const struct parsers server_patterns[];
extern const struct parsers server_patterns_light[];
diff --git
a/project.h
b/project.h
index
0b503b1
..
d87e4ef
100644
(file)
--- a/
project.h
+++ b/
project.h
@@
-1,7
+1,7
@@
#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
/** Version string. */
#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
/** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.11
4 2008/04/11 16:35:39
fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.11
5 2008/05/19 16:57:20
fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
@@
-37,6
+37,9
@@
*
* Revisions :
* $Log: project.h,v $
*
* Revisions :
* $Log: project.h,v $
+ * Revision 1.115 2008/05/19 16:57:20 fabiankeil
+ * Declare all members of the parsers structure immutable.
+ *
* Revision 1.114 2008/04/11 16:35:39 fabiankeil
* Oops, I forgot to shorten the URL_SPEC_INITIALIZER in my last commit.
*
* Revision 1.114 2008/04/11 16:35:39 fabiankeil
* Oops, I forgot to shorten the URL_SPEC_INITIALIZER in my last commit.
*
@@
-1407,22
+1410,6
@@
typedef jb_err (*add_header_func_ptr)(struct client_state *);
typedef jb_err (*parser_func_ptr )(struct client_state *, char **);
typedef jb_err (*parser_func_ptr )(struct client_state *, char **);
-/**
- * List of functions to run on a list of headers
- */
-struct parsers
-{
- /** The header prefix to match */
- const char *str;
-
- /** The length of the prefix to match */
- const size_t len;
-
- /** The function to apply to this line */
- const parser_func_ptr parser;
-};
-
-
/**
* List of available CGI functions.
*/
/**
* List of available CGI functions.
*/