~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to Puma/gen-release/step2/src/CScanBuffer.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
namespace Puma {
22
22
 
23
23
void CScanBuffer::check () {
24
 
  while (next_buffer->state () == ScanBuffer::STATE_OK) {
 
24
  do {
25
25
    bool restore_state = true;
26
 
    int curr_len = next_buffer->len ();
27
 
    char lookahead;
28
 
 
29
 
    lookahead = next_buffer->next ();
30
 
    if (lookahead == '\\' && next_buffer->state () == ScanBuffer::STATE_OK) {
31
 
      lookahead = next_buffer->next ();
 
26
    int curr_len = ScanBuffer::len ();
 
27
    char lookahead = ScanBuffer::next ();
 
28
    if (ScanBuffer::state () == ScanBuffer::STATE_OK) {
 
29
      lookahead = ScanBuffer::next ();
32
30
      if (lookahead == '\x0d') // DOS!
33
 
        lookahead = next_buffer->next ();
 
31
        lookahead = ScanBuffer::next ();
34
32
      if (lookahead == '\n') {
 
33
        if (_new_line_pos == -1)
 
34
          _new_line_pos = len ();
35
35
        restore_state = false;
36
36
      }
37
37
    }
38
38
 
39
39
    if (restore_state) {
40
 
      next_buffer->more (curr_len);
 
40
      ScanBuffer::more (curr_len);
41
41
      break;
42
42
    }
43
43
  }
 
44
  while (ScanBuffer::state () == ScanBuffer::STATE_OK &&
 
45
      ScanBuffer::lookahead () == '\\');
44
46
}
45
47
 
46
48
} // namespace Puma