Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

RegexKitLite 3.0 Release

git-svn-id: https://regexkit.svn.sourceforge.net/svnroot/regexkit/RegexKitLite@49 83f0d1e4-963b-0410-a2a1-d3bd3f33e299
  • Loading branch information...
commit 79c443fb4c4f3c0979f02304b82d2d4383b528f5 1 parent 23d3a79
jengelhart authored
783 RegexKitLite.html
502 additions, 281 deletions not shown
22 examples/compiledRegexCache.d
... ... @@ -0,0 +1,22 @@
  1 +#!/usr/sbin/dtrace -s
  2 +
  3 +RegexKitLite*:::compiledRegexCache {
  4 + this->eventID = (unsigned long)arg0;
  5 + this->regexUTF8 = copyinstr(arg1);
  6 + this->options = (unsigned int)arg2;
  7 + this->captures = (int)arg3;
  8 + this->hitMiss = (int)arg4;
  9 + this->icuStatusCode = (int)arg5;
  10 + this->icuErrorMessage = (arg6 == 0) ? "" : copyinstr(arg6);
  11 + this->hitRate = (double *)copyin(arg7, sizeof(double));
  12 +
  13 + printf("%5d: %-60.60s Opt: %#8.8x Cap: %2d Hit: %2d Rate: %6.2f%% code: %5d msg: %s\n",
  14 + this->eventID,
  15 + this->regexUTF8,
  16 + this->options,
  17 + this->captures,
  18 + this->hitMiss,
  19 + *this->hitRate,
  20 + this->icuStatusCode,
  21 + this->icuErrorMessage);
  22 +}
33 examples/utf16ConversionCache.d
... ... @@ -0,0 +1,33 @@
  1 +#!/usr/sbin/dtrace -s
  2 +
  3 +enum {
  4 + RKLCacheHitLookupFlag = 1 << 0,
  5 + RKLConversionRequiredLookupFlag = 1 << 1,
  6 + RKLSetTextLookupFlag = 1 << 2,
  7 + RKLDynamicBufferLookupFlag = 1 << 3,
  8 + RKLErrorLookupFlag = 1 << 4
  9 +};
  10 +
  11 +RegexKitLite*:::utf16ConversionCache {
  12 + this->eventID = (unsigned long)arg0;
  13 + this->lookupResultFlags = (unsigned int)arg1;
  14 + this->hitRate = (double *)copyin(arg2, sizeof(double));
  15 + this->stringPtr = (void *)arg3;
  16 + this->NSRange_location = (unsigned long)arg4;
  17 + this->NSRange_length = (unsigned long)arg5;
  18 + this->length = (long)arg6;
  19 +
  20 + printf("%5lu: flags: %#8.8x {Hit: %d Conv: %d SetText: %d Dyn: %d Error: %d} rate: %6.2f%% string: %#8.8p NSRange {%6lu, %6lu} length: %ld\n",
  21 + this->eventID,
  22 + this->lookupResultFlags,
  23 + (this->lookupResultFlags & RKLCacheHitLookupFlag) != 0,
  24 + (this->lookupResultFlags & RKLConversionRequiredLookupFlag) != 0,
  25 + (this->lookupResultFlags & RKLSetTextLookupFlag) != 0,
  26 + (this->lookupResultFlags & RKLDynamicBufferLookupFlag) != 0,
  27 + (this->lookupResultFlags & RKLErrorLookupFlag) != 0,
  28 + *this->hitRate,
  29 + this->stringPtr,
  30 + this->NSRange_location,
  31 + this->NSRange_length,
  32 + this->length);
  33 +}

0 comments on commit 79c443f

Please sign in to comment.
Something went wrong with that request. Please try again.