/[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 1359 by ph10, Tue Sep 3 10:10:59 2013 UTC revision 1363 by ph10, Tue Oct 1 16:54:40 2013 UTC
# Line 2893  printf("  -help    show usage informatio Line 2893  printf("  -help    show usage informatio
2893  printf("  -i       show information about compiled patterns\n"  printf("  -i       show information about compiled patterns\n"
2894         "  -M       find MATCH_LIMIT minimum for each subject\n"         "  -M       find MATCH_LIMIT minimum for each subject\n"
2895         "  -m       output memory used information\n"         "  -m       output memory used information\n"
2896           "  -O       set PCRE_NO_AUTO_POSSESSIFY on each pattern\n"
2897         "  -o <n>   set size of offsets vector to <n>\n");         "  -o <n>   set size of offsets vector to <n>\n");
2898  #if !defined NOPOSIX  #if !defined NOPOSIX
2899  printf("  -p       use POSIX interface\n");  printf("  -p       use POSIX interface\n");
# Line 2930  const char *version; Line 2931  const char *version;
2931  int options = 0;  int options = 0;
2932  int study_options = 0;  int study_options = 0;
2933  int default_find_match_limit = FALSE;  int default_find_match_limit = FALSE;
2934    pcre_uint32 default_options = 0;
2935  int op = 1;  int op = 1;
2936  int timeit = 0;  int timeit = 0;
2937  int timeitm = 0;  int timeitm = 0;
# Line 3075  while (argc > 1 && argv[op][0] == '-') Line 3077  while (argc > 1 && argv[op][0] == '-')
3077    else if (strcmp(arg, "-i") == 0) showinfo = 1;    else if (strcmp(arg, "-i") == 0) showinfo = 1;
3078    else if (strcmp(arg, "-d") == 0) showinfo = debug = 1;    else if (strcmp(arg, "-d") == 0) showinfo = debug = 1;
3079    else if (strcmp(arg, "-M") == 0) default_find_match_limit = TRUE;    else if (strcmp(arg, "-M") == 0) default_find_match_limit = TRUE;
3080      else if (strcmp(arg, "-O") == 0) default_options = PCRE_NO_AUTO_POSSESSIFY;
3081  #if !defined NODFA  #if !defined NODFA
3082    else if (strcmp(arg, "-dfa") == 0) all_use_dfa = 1;    else if (strcmp(arg, "-dfa") == 0) all_use_dfa = 1;
3083  #endif  #endif
# Line 3615  while (!done) Line 3618  while (!done)
3618    
3619    /* Look for options after final delimiter */    /* Look for options after final delimiter */
3620    
3621    options = 0;    options = default_options;
3622    study_options = force_study_options;    study_options = force_study_options;
3623    log_store = showstore;  /* default from command line */    log_store = showstore;  /* default from command line */
3624    
# Line 3647  while (!done) Line 3650  while (!done)
3650        case 'K': do_mark = 1; break;        case 'K': do_mark = 1; break;
3651        case 'M': log_store = 1; break;        case 'M': log_store = 1; break;
3652        case 'N': options |= PCRE_NO_AUTO_CAPTURE; break;        case 'N': options |= PCRE_NO_AUTO_CAPTURE; break;
3653          case 'O': options |= PCRE_NO_AUTO_POSSESSIFY; break;
3654    
3655  #if !defined NOPOSIX  #if !defined NOPOSIX
3656        case 'P': do_posix = 1; break;        case 'P': do_posix = 1; break;
# Line 4087  while (!done) Line 4091  while (!done)
4091        if (do_flip) all_options = swap_uint32(all_options);        if (do_flip) all_options = swap_uint32(all_options);
4092    
4093        if (get_options == 0) fprintf(outfile, "No options\n");        if (get_options == 0) fprintf(outfile, "No options\n");
4094          else fprintf(outfile, "Options:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",          else fprintf(outfile, "Options:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
4095            ((get_options & PCRE_ANCHORED) != 0)? " anchored" : "",            ((get_options & PCRE_ANCHORED) != 0)? " anchored" : "",
4096            ((get_options & PCRE_CASELESS) != 0)? " caseless" : "",            ((get_options & PCRE_CASELESS) != 0)? " caseless" : "",
4097            ((get_options & PCRE_EXTENDED) != 0)? " extended" : "",            ((get_options & PCRE_EXTENDED) != 0)? " extended" : "",
# Line 4100  while (!done) Line 4104  while (!done)
4104            ((get_options & PCRE_EXTRA) != 0)? " extra" : "",            ((get_options & PCRE_EXTRA) != 0)? " extra" : "",
4105            ((get_options & PCRE_UNGREEDY) != 0)? " ungreedy" : "",            ((get_options & PCRE_UNGREEDY) != 0)? " ungreedy" : "",
4106            ((get_options & PCRE_NO_AUTO_CAPTURE) != 0)? " no_auto_capture" : "",            ((get_options & PCRE_NO_AUTO_CAPTURE) != 0)? " no_auto_capture" : "",
4107              ((get_options & PCRE_NO_AUTO_POSSESSIFY) != 0)? " no_auto_possessify" : "",
4108            ((get_options & PCRE_UTF8) != 0)? " utf" : "",            ((get_options & PCRE_UTF8) != 0)? " utf" : "",
4109            ((get_options & PCRE_UCP) != 0)? " ucp" : "",            ((get_options & PCRE_UCP) != 0)? " ucp" : "",
4110            ((get_options & PCRE_NO_UTF8_CHECK) != 0)? " no_utf_check" : "",            ((get_options & PCRE_NO_UTF8_CHECK) != 0)? " no_utf_check" : "",

Legend:
Removed from v.1359  
changed lines
  Added in v.1363

  ViewVC Help
Powered by ViewVC 1.1.5