Added up to 10 retries to DNS resolver getaddrinfo() if EAI_AGAIN (timeout)
[privoxy.git] / pcrs.h
diff --git a/pcrs.h b/pcrs.h
index 527c8c9..6d97f9c 100644 (file)
--- a/pcrs.h
+++ b/pcrs.h
@@ -3,7 +3,7 @@
 
 /*********************************************************************
  *
- * File        :  $Source: /cvsroot/ijbswa/current/pcrs.h,v $
+ * File        :  $Source: /cvsroot/ijbswa/current/Attic/pcrs.h,v $
  *
  * Purpose     :  Header file for pcrs.c
  *
  *
  * Revisions   :
  *    $Log: pcrs.h,v $
+ *    Revision 1.11  2002/03/08 14:18:23  oes
+ *    Fixing -Wconversion warnings
+ *
+ *    Revision 1.10  2002/03/08 13:44:48  oes
+ *    Hiding internal functions, preventing double inclusion of pcre.h
+ *
+ *    Revision 1.9  2001/08/18 11:35:29  oes
+ *    - Introduced pcrs_strerror()
+ *    - added pcrs_execute_list()
+ *
  *    Revision 1.8  2001/08/15 15:32:50  oes
  *    Replaced the hard limit for the maximum number of matches
  *    by dynamic reallocation
  *
  *********************************************************************/
 
-#define PCRS_H_VERSION "$Id: pcrs.h,v 1.8 2001/08/15 15:32:50 oes Exp $"
+#define PCRS_H_VERSION "$Id: pcrs.h,v 1.11 2002/03/08 14:18:23 oes Exp $"
 \f
 
+#ifndef _PCRE_H
 #include <pcre.h>
+#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -93,14 +105,15 @@ extern "C" {
 /* A compiled substitute */
 
 typedef struct {
-  char *text;                                 /* The plaintext part of the substitute, with all backreferences stripped */
-  int backrefs;                               /* The number of backreferences */
-  int block_offset[PCRS_MAX_SUBMATCHES];      /* Array with the offsets of all plaintext blocks in text */
-  int block_length[PCRS_MAX_SUBMATCHES];      /* Array with the lengths of all plaintext blocks in text */
-  int backref[PCRS_MAX_SUBMATCHES];           /* Array with the backref number for all plaintext block borders */
-  int backref_count[PCRS_MAX_SUBMATCHES + 2]; /* Array with the number of references to each backref index */
+  char  *text;                                   /* The plaintext part of the substitute, with all backreferences stripped */
+  int    backrefs;                               /* The number of backreferences */
+  int    block_offset[PCRS_MAX_SUBMATCHES];      /* Array with the offsets of all plaintext blocks in text */
+  size_t block_length[PCRS_MAX_SUBMATCHES];      /* Array with the lengths of all plaintext blocks in text */
+  int    backref[PCRS_MAX_SUBMATCHES];           /* Array with the backref number for all plaintext block borders */
+  int    backref_count[PCRS_MAX_SUBMATCHES + 2]; /* Array with the number of references to each backref index */
 } pcrs_substitute;
 
+
 /*
  * A match, including all captured subpatterns (submatches)
  * Note: The zeroth is the whole match, the PCRS_MAX_SUBMATCHES + 0th
@@ -109,12 +122,13 @@ typedef struct {
  */
 
 typedef struct {
-  int submatches;                               /* Number of captured subpatterns */
-  int submatch_offset[PCRS_MAX_SUBMATCHES + 2]; /* Offset for each submatch in the subject */
-  int submatch_length[PCRS_MAX_SUBMATCHES + 2]; /* Length of each submatch in the subject */
+  int    submatches;                               /* Number of captured subpatterns */
+  int    submatch_offset[PCRS_MAX_SUBMATCHES + 2]; /* Offset for each submatch in the subject */
+  size_t submatch_length[PCRS_MAX_SUBMATCHES + 2]; /* Length of each submatch in the subject */
 } pcrs_match;
 
-/* A pcrs job */
+
+/* A PCRS job */
 
 typedef struct PCRS_JOB {
   pcre *pattern;                            /* The compiled pcre pattern */
@@ -143,10 +157,6 @@ extern void             pcrs_free_joblist(pcrs_job *joblist);
 /* Info on errors: */
 extern const char *pcrs_strerror(const int error);
 
-/* Expert usage */
-extern int              pcrs_parse_perl_options(const char *optstring, int *flags);
-extern pcrs_substitute *pcrs_compile_replacement(const char *replacement, int trivialflag, int capturecount, int *errptr);
-
 
 #ifdef __cplusplus
 } /* extern "C" */