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

Diff of /code/trunk/pcretest.c

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

revision 667 by ph10, Mon Aug 22 14:57:32 2011 UTC revision 674 by ph10, Fri Aug 26 18:17:51 2011 UTC
# Line 1050  if ((rc = pcre_fullinfo(re, study, optio Line 1050  if ((rc = pcre_fullinfo(re, study, optio
1050    
1051    
1052  /*************************************************  /*************************************************
1053    *      Check for supported JIT architecture      *
1054    *************************************************/
1055    
1056    /* If it won't JIT-compile a very simple regex, return FALSE. */
1057    
1058    static int check_jit_arch(void)
1059    {
1060    const char *error;
1061    int erroffset, rc;
1062    pcre *re = pcre_compile("abc", 0, &error, &erroffset, NULL);
1063    pcre_extra *extra = pcre_study(re, PCRE_STUDY_JIT_COMPILE, &error);
1064    rc = extra != NULL && (extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
1065      extra->executable_jit != NULL;
1066    pcre_free_study(extra);
1067    free(re);
1068    return rc;
1069    }
1070    
1071    
1072    /*************************************************
1073  *         Byte flipping function                 *  *         Byte flipping function                 *
1074  *************************************************/  *************************************************/
1075    
# Line 1358  while (argc > 1 && argv[op][0] == '-') Line 1378  while (argc > 1 && argv[op][0] == '-')
1378      (void)pcre_config(PCRE_CONFIG_UNICODE_PROPERTIES, &rc);      (void)pcre_config(PCRE_CONFIG_UNICODE_PROPERTIES, &rc);
1379      printf("  %sUnicode properties support\n", rc? "" : "No ");      printf("  %sUnicode properties support\n", rc? "" : "No ");
1380      (void)pcre_config(PCRE_CONFIG_JIT, &rc);      (void)pcre_config(PCRE_CONFIG_JIT, &rc);
1381      printf("  %sJust-in-time compiler support\n", rc? "" : "No ");      if (rc)
1382          printf("  Just-in-time compiler support%s\n", check_jit_arch()?
1383            "" : " (but this architecture is unsupported)");
1384        else
1385          printf("  No just-in-time compiler support\n");
1386      (void)pcre_config(PCRE_CONFIG_NEWLINE, &rc);      (void)pcre_config(PCRE_CONFIG_NEWLINE, &rc);
1387      /* Note that these values are always the ASCII values, even      /* Note that these values are always the ASCII values, even
1388      in EBCDIC environments. CR is 13 and NL is 10. */      in EBCDIC environments. CR is 13 and NL is 10. */

Legend:
Removed from v.667  
changed lines
  Added in v.674

  ViewVC Help
Powered by ViewVC 1.1.5