/[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 363 by ph10, Thu Jul 10 16:24:33 2008 UTC revision 376 by ph10, Sun Mar 1 12:00:59 2009 UTC
# Line 925  while (argc > 1 && argv[op][0] == '-') Line 925  while (argc > 1 && argv[op][0] == '-')
925    else if (strcmp(argv[op], "-C") == 0)    else if (strcmp(argv[op], "-C") == 0)
926      {      {
927      int rc;      int rc;
928        unsigned long int lrc;
929      printf("PCRE version %s\n", pcre_version());      printf("PCRE version %s\n", pcre_version());
930      printf("Compiled with\n");      printf("Compiled with\n");
931      (void)pcre_config(PCRE_CONFIG_UTF8, &rc);      (void)pcre_config(PCRE_CONFIG_UTF8, &rc);
# Line 943  while (argc > 1 && argv[op][0] == '-') Line 944  while (argc > 1 && argv[op][0] == '-')
944      printf("  Internal link size = %d\n", rc);      printf("  Internal link size = %d\n", rc);
945      (void)pcre_config(PCRE_CONFIG_POSIX_MALLOC_THRESHOLD, &rc);      (void)pcre_config(PCRE_CONFIG_POSIX_MALLOC_THRESHOLD, &rc);
946      printf("  POSIX malloc threshold = %d\n", rc);      printf("  POSIX malloc threshold = %d\n", rc);
947      (void)pcre_config(PCRE_CONFIG_MATCH_LIMIT, &rc);      (void)pcre_config(PCRE_CONFIG_MATCH_LIMIT, &lrc);
948      printf("  Default match limit = %d\n", rc);      printf("  Default match limit = %ld\n", lrc);
949      (void)pcre_config(PCRE_CONFIG_MATCH_LIMIT_RECURSION, &rc);      (void)pcre_config(PCRE_CONFIG_MATCH_LIMIT_RECURSION, &lrc);
950      printf("  Default recursion depth limit = %d\n", rc);      printf("  Default recursion depth limit = %ld\n", lrc);
951      (void)pcre_config(PCRE_CONFIG_STACKRECURSE, &rc);      (void)pcre_config(PCRE_CONFIG_STACKRECURSE, &rc);
952      printf("  Match recursion uses %s\n", rc? "stack" : "heap");      printf("  Match recursion uses %s\n", rc? "stack" : "heap");
953      goto EXIT;      goto EXIT;
# Line 2027  while (!done) Line 2028  while (!done)
2028        }        }
2029      *q = 0;      *q = 0;
2030      len = q - dbuffer;      len = q - dbuffer;
2031    
2032      /* Move the data to the end of the buffer so that a read over the end of      /* Move the data to the end of the buffer so that a read over the end of
2033      the buffer will be seen by valgrind, even if it doesn't cause a crash. If      the buffer will be seen by valgrind, even if it doesn't cause a crash. If
2034      we are using the POSIX interface, we must include the terminating zero. */      we are using the POSIX interface, we must include the terminating zero. */
2035    
2036  #if !defined NOPOSIX  #if !defined NOPOSIX
2037      if (posix || do_posix)      if (posix || do_posix)
2038        {        {
2039        memmove(bptr + buffer_size - len - 1, bptr, len + 1);        memmove(bptr + buffer_size - len - 1, bptr, len + 1);
2040        bptr += buffer_size - len - 1;        bptr += buffer_size - len - 1;
2041        }        }
2042      else      else
2043  #endif  #endif
2044        {        {
2045        memmove(bptr + buffer_size - len, bptr, len);        memmove(bptr + buffer_size - len, bptr, len);
2046        bptr += buffer_size - len;        bptr += buffer_size - len;
2047        }        }
2048    
2049      if ((all_use_dfa || use_dfa) && find_match_limit)      if ((all_use_dfa || use_dfa) && find_match_limit)
2050        {        {

Legend:
Removed from v.363  
changed lines
  Added in v.376

  ViewVC Help
Powered by ViewVC 1.1.5