Changeset 7 for trunk/markup_stats.cxx


Ignore:
Timestamp:
Dec 22, 2007, 11:08:10 AM (12 years ago)
Author:
cameron
Message:

Reference extraction; checking ]]> in text; < in atts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/markup_stats.cxx

    r4 r7  
    4545  int end_tag_count = 0;
    4646  int end_tag_length = 0;
     47  int reference_count = 0;
     48  int reference_length = 0;
    4749  int text_item_count = 0;
    4850  int text_item_length = 0;
     51  int error_item_count = 0;
     52  int error_item_length = 0;
    4953  int nesting_depth = 0;
    5054  int max_nesting_depth = 0;
     
    98102/* Action routine for an error item */
    99103static inline void Error_action(int start_pos, int end_pos) {
     104  error_item_count +=1;
     105  error_item_length += end_pos - start_pos;
    100106}
    101107
     
    104110  text_item_count +=1;
    105111  text_item_length += end_pos - start_pos;
     112}
     113
     114static inline void Reference_action(int start_pos, int end_pos) {
     115  reference_count +=1;
     116  reference_length += end_pos - start_pos;
    106117}
    107118
     
    191202  print_stats("end tag", end_tag_count, end_tag_length);
    192203  print_stats("text item", text_item_count, text_item_length);
     204  print_stats("reference", reference_count, reference_length);
     205  print_stats("error item", error_item_count, error_item_length);
    193206  printf("Maximum nesting depth = %i\n", max_nesting_depth);
    194207
Note: See TracChangeset for help on using the changeset viewer.