1.1 --- a/src/share/vm/adlc/filebuff.hpp Mon Mar 09 13:34:00 2009 -0700 1.2 +++ b/src/share/vm/adlc/filebuff.hpp Thu Mar 12 18:16:36 2009 -0700 1.3 @@ -26,6 +26,7 @@ 1.4 #include <iostream> 1.5 1.6 using namespace std; 1.7 + 1.8 // STRUCTURE FOR HANDLING INPUT AND OUTPUT FILES 1.9 typedef struct { 1.10 const char *_name; 1.11 @@ -36,7 +37,7 @@ 1.12 1.13 //------------------------------FileBuff-------------------------------------- 1.14 // This class defines a nicely behaved buffer of text. Entire file of text 1.15 -// is read into buffer at creation, with sentinals at start and end. 1.16 +// is read into buffer at creation, with sentinels at start and end. 1.17 class FileBuff { 1.18 friend class FileBuffRegion; 1.19 private: 1.20 @@ -45,8 +46,8 @@ 1.21 long _bufoff; // Start of buffer file offset 1.22 1.23 char *_buf; // The buffer itself. 1.24 - char *_bigbuf; // The buffer plus sentinals; actual heap area 1.25 - char *_bufmax; // A pointer to the buffer end sentinal 1.26 + char *_bigbuf; // The buffer plus sentinels; actual heap area 1.27 + char *_bufmax; // A pointer to the buffer end sentinel 1.28 char *_bufeol; // A pointer to the last complete line end 1.29 1.30 int _err; // Error flag for file seek/read operations 1.31 @@ -72,7 +73,7 @@ 1.32 1.33 // This converts a pointer into the buffer to a file offset. It only works 1.34 // when the pointer is valid (i.e. just obtained from getline()). 1.35 - int getoff(const char *s) { return _bufoff+(int)(s-_buf); } 1.36 + long getoff(const char* s) { return _bufoff + (s - _buf); } 1.37 }; 1.38 1.39 //------------------------------FileBuffRegion--------------------------------- 1.40 @@ -95,8 +96,6 @@ 1.41 FileBuffRegion *copy(); // Deep copy 1.42 FileBuffRegion *merge(FileBuffRegion*); // Merge 2 regions; delete input 1.43 1.44 -// void print(std::ostream&); 1.45 -// friend std::ostream& operator<< (std::ostream&, FileBuffRegion&); 1.46 void print(ostream&); 1.47 friend ostream& operator<< (ostream&, FileBuffRegion&); 1.48 };