/[pcre]/code/tags/pcre-8.10/pcre_scanner.cc
ViewVC logotype

Diff of /code/tags/pcre-8.10/pcre_scanner.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

code/trunk/pcre_scanner.cc revision 93 by nigel, Sat Feb 24 21:41:42 2007 UTC code/tags/pcre-8.10/pcre_scanner.cc revision 549 by ph10, Fri Jun 25 14:43:53 2010 UTC
# Line 29  Line 29 
29  //  //
30  // Author: Sanjay Ghemawat  // Author: Sanjay Ghemawat
31    
32    #ifdef HAVE_CONFIG_H
33    #include "config.h"
34    #endif
35    
36  #include <vector>  #include <vector>
37  #include <assert.h>  #include <assert.h>
38  #include "config.h"  
39    #include "pcrecpp_internal.h"
40  #include "pcre_scanner.h"  #include "pcre_scanner.h"
41    
42  using std::vector;  using std::vector;
# Line 116  int Scanner::LineNumber() const { Line 121  int Scanner::LineNumber() const {
121  }  }
122    
123  int Scanner::Offset() const {  int Scanner::Offset() const {
124    return input_.data() - data_.c_str();    return (int)(input_.data() - data_.c_str());
125  }  }
126    
127  bool Scanner::LookingAt(const RE& re) const {  bool Scanner::LookingAt(const RE& re) const {
# Line 148  void Scanner::ConsumeSkip() { Line 153  void Scanner::ConsumeSkip() {
153        comments_ = new vector<StringPiece>;        comments_ = new vector<StringPiece>;
154      }      }
155      // already pointing one past end, so no need to +1      // already pointing one past end, so no need to +1
156      int length = input_.data() - start_data;      int length = (int)(input_.data() - start_data);
157      if (length > 0) {      if (length > 0) {
158        comments_->push_back(StringPiece(start_data, length));        comments_->push_back(StringPiece(start_data, length));
159      }      }

Legend:
Removed from v.93  
changed lines
  Added in v.549

  ViewVC Help
Powered by ViewVC 1.1.5