| 84 |
*************************************************/ |
*************************************************/ |
| 85 |
|
|
| 86 |
/* This function swaps the bytes of a compiled pattern usually |
/* This function swaps the bytes of a compiled pattern usually |
| 87 |
loaeded form the disk. It also sets the tables pointer, which |
loaded form the disk. It also sets the tables pointer, which |
| 88 |
is likely an invalid pointer after reload. |
is likely an invalid pointer after reload. |
| 89 |
|
|
| 90 |
Arguments: |
Arguments: |
| 123 |
} |
} |
| 124 |
|
|
| 125 |
if (re->magic_number != REVERSED_MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC; |
if (re->magic_number != REVERSED_MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC; |
| 126 |
if ((swap_uint16(re->flags) & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE; |
if ((swap_uint16(re->flags) & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE; |
| 127 |
|
|
| 128 |
re->magic_number = MAGIC_NUMBER; |
re->magic_number = MAGIC_NUMBER; |
| 129 |
re->size = swap_uint32(re->size); |
re->size = swap_uint32(re->size); |
| 137 |
re->name_entry_size = swap_uint16(re->name_entry_size); |
re->name_entry_size = swap_uint16(re->name_entry_size); |
| 138 |
re->name_count = swap_uint16(re->name_count); |
re->name_count = swap_uint16(re->name_count); |
| 139 |
re->ref_count = swap_uint16(re->ref_count); |
re->ref_count = swap_uint16(re->ref_count); |
| 140 |
|
re->tables = tables; |
| 141 |
|
|
| 142 |
if (extra_data != NULL && (re->flags & PCRE_EXTRA_STUDY_DATA) != 0) |
if (extra_data != NULL && (re->flags & PCRE_EXTRA_STUDY_DATA) != 0) |
| 143 |
{ |
{ |