/[pcre]/code/trunk/pcre_byte_order.c
ViewVC logotype

Diff of /code/trunk/pcre_byte_order.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

code/trunk/pcre_try_flipped.c revision 200 by ph10, Wed Aug 1 09:10:40 2007 UTC code/branches/pcre16/pcre_try_flipped.c revision 774 by zherczeg, Thu Dec 1 06:08:45 2011 UTC
# Line 6  Line 6 
6  and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
7    
8                         Written by Philip Hazel                         Written by Philip Hazel
9             Copyright (c) 1997-2007 University of Cambridge             Copyright (c) 1997-2009 University of Cambridge
10    
11  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
12  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 44  auxiliary local function to flip the app Line 44  auxiliary local function to flip the app
44    
45    
46  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
47  #include <config.h>  #include "config.h"
48  #endif  #endif
49    
50  #include "pcre_internal.h"  #include "pcre_internal.h"
# Line 99  Returns: the new block if is i Line 99  Returns: the new block if is i
99  */  */
100    
101  real_pcre *  real_pcre *
102  _pcre_try_flipped(const real_pcre *re, real_pcre *internal_re,  PRIV(try_flipped)(const real_pcre *re, real_pcre *internal_re,
103    const pcre_study_data *study, pcre_study_data *internal_study)    const pcre_study_data *study, pcre_study_data *internal_study)
104  {  {
105  if (byteflip(re->magic_number, sizeof(re->magic_number)) != MAGIC_NUMBER)  if (byteflip(re->magic_number, sizeof(re->magic_number)) != MAGIC_NUMBER)
# Line 108  if (byteflip(re->magic_number, sizeof(re Line 108  if (byteflip(re->magic_number, sizeof(re
108  *internal_re = *re;           /* To copy other fields */  *internal_re = *re;           /* To copy other fields */
109  internal_re->size = byteflip(re->size, sizeof(re->size));  internal_re->size = byteflip(re->size, sizeof(re->size));
110  internal_re->options = byteflip(re->options, sizeof(re->options));  internal_re->options = byteflip(re->options, sizeof(re->options));
111    internal_re->flags = (pcre_uint16)byteflip(re->flags, sizeof(re->flags));
112  internal_re->top_bracket =  internal_re->top_bracket =
113    (pcre_uint16)byteflip(re->top_bracket, sizeof(re->top_bracket));    (pcre_uint16)byteflip(re->top_bracket, sizeof(re->top_bracket));
114  internal_re->top_backref =  internal_re->top_backref =
115    (pcre_uint16)byteflip(re->top_backref, sizeof(re->top_backref));    (pcre_uint16)byteflip(re->top_backref, sizeof(re->top_backref));
116  internal_re->first_byte =  internal_re->first_char =
117    (pcre_uint16)byteflip(re->first_byte, sizeof(re->first_byte));    (pcre_uint16)byteflip(re->first_char, sizeof(re->first_char));
118  internal_re->req_byte =  internal_re->req_char =
119    (pcre_uint16)byteflip(re->req_byte, sizeof(re->req_byte));    (pcre_uint16)byteflip(re->req_char, sizeof(re->req_char));
120  internal_re->name_table_offset =  internal_re->name_table_offset =
121    (pcre_uint16)byteflip(re->name_table_offset, sizeof(re->name_table_offset));    (pcre_uint16)byteflip(re->name_table_offset, sizeof(re->name_table_offset));
122  internal_re->name_entry_size =  internal_re->name_entry_size =
# Line 127  if (study != NULL) Line 128  if (study != NULL)
128    {    {
129    *internal_study = *study;   /* To copy other fields */    *internal_study = *study;   /* To copy other fields */
130    internal_study->size = byteflip(study->size, sizeof(study->size));    internal_study->size = byteflip(study->size, sizeof(study->size));
131    internal_study->options = byteflip(study->options, sizeof(study->options));    internal_study->flags = byteflip(study->flags, sizeof(study->flags));
132      internal_study->minlength = byteflip(study->minlength,
133        sizeof(study->minlength));
134    }    }
135    
136  return internal_re;  return internal_re;

Legend:
Removed from v.200  
changed lines
  Added in v.774

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12