Ignore:
Timestamp:
Jun 23, 2015, 4:08:57 PM (4 years ago)
Author:
nmedfort
Message:

Temporary check-in

Location:
icGREP/icgrep-devel/icgrep/UCD
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/UCD/CaseFolding_txt.cpp

    r4612 r4615  
    99#include <algorithm>
    1010
    11 int findFoldEntry(codepoint_t cp) {
     11using namespace re;
     12
     13int findFoldEntry(const codepoint_t cp) {
    1214    int lo = 0;
    1315    int hi = foldTableSize;
     
    2426}
    2527
    26 void caseInsensitiveInsert(re::CC * cc, codepoint_t cp) {
    27     caseInsensitiveInsertRange(cc, cp, cp);
    28 }
    29 
    30 void caseInsensitiveInsertRange(re::CC * cc, codepoint_t lo, codepoint_t hi) {
     28void caseInsensitiveInsertRange(CC * cc, const codepoint_t lo, const codepoint_t hi) {
    3129    cc->insert_range(lo, hi);
    3230    // Find the first foldTable entry overlapping the (lo, hi) range.
  • icGREP/icgrep-devel/icgrep/UCD/CaseFolding_txt.h

    r4316 r4615  
    1414#include "re/re_cc.h"
    1515
    16 typedef unsigned codepoint_t;
    17 
    1816struct FoldEntry {
    19     codepoint_t range_lo;
     17    re::codepoint_t range_lo;
    2018    int fold_offset;
    21     std::vector<std::pair<codepoint_t, codepoint_t> > fold_pairs;
     19    std::vector<std::pair<re::codepoint_t, re::codepoint_t> > fold_pairs;
    2220};
    2321
    24 void caseInsensitiveInsert(re::CC * cc, codepoint_t cp);
    25 
    26 void caseInsensitiveInsertRange(re::CC * cc, codepoint_t lo, codepoint_t hi);
    27    
     22void caseInsensitiveInsertRange(re::CC * cc, const re::codepoint_t lo, const re::codepoint_t hi);
     23
     24inline void caseInsensitiveInsert(re::CC * cc, const re::codepoint_t cp) {
     25    caseInsensitiveInsertRange(cc, cp, cp);
     26}
    2827
    2928const int foldTableSize = 216;
Note: See TracChangeset for help on using the changeset viewer.