-typedef struct S_PCRS_SUBSTITUTE {
- char *text;
- int backrefs;
- int block_offset[PCRS_MAX_SUBMATCHES];
- int block_length[PCRS_MAX_SUBMATCHES];
- int backref[PCRS_MAX_SUBMATCHES];
- int backref_count[PCRS_MAX_SUBMATCHES];
+/* Flags */
+#define PCRS_GLOBAL 1 /* Job should be applied globally, as with perl's g option */
+#define PCRS_SUCCESS 2 /* Job did previously match */
+#define PCRS_TRIVIAL 4 /* Backreferences in the substitute are ignored */
+
+/*
+ * Data types:
+ */
+
+/* A compiled substitute */
+typedef struct PCRS_SUBSTITUTE {
+ 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]; /* Array with the number of reference to each backref index */