~ubuntu-branches/ubuntu/raring/codeblocks/raring-proposed

« back to all changes in this revision

Viewing changes to src/sdk/wxscintilla/src/scintilla/src/LexMPT.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Cosme Domínguez Díaz
  • Date: 2010-08-09 04:38:38 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100809043838-a59ygguym4eg0jgw
Tags: 10.05-0ubuntu1
* New upstream release. Closes (LP: #322350)
 - Switch to dpkg-source 3.0 (quilt) format
 - Remove unneeded README.source
 - Add debian/get-source-orig script that removes all
   Windows prebuilt binaries
* Bump Standards-Version to 3.9.1
 - Stop shipping *.la files
* debian/control
 - Add cdbs package as Build-Depend
 - Add libbz2-dev and zlib1g-dev packages as
   Build-Depends (needed by libhelp_plugin.so)
 - Remove dpatch package of Build-Depends
 - Add codeblocks-contrib-debug package
 - Split architecture-independent files of codeblocks
   package in codeblocks-common package
* debian/rules
 - Switch to CDBS rules system
 - Add parallel build support
 - Add a call to debian/get-source-orig script
 - Use lzma compression (saves 23,5 MB of free space)
* debian/patches
 - Refresh 01_codeblocks_plugin_path
 - Add 02_no_Makefiles_in_debian_dir to remove any link
   in codeblocks build system to deleted Makefiles of debian directory
 - Drop 02_ftbfs_gcc44 and 03_ftbfs_glib221 (merged in upstream)
* debian/watch
 - Update to use the new host (berlios.de)

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
#include <stdio.h>
12
12
#include <ctype.h>
13
13
#include <stdlib.h>
 
14
 
 
15
#include <string>
 
16
 
14
17
#include "Platform.h"
15
18
 
16
19
#include "PropSet.h"
18
21
#include "KeyWords.h"
19
22
#include "Scintilla.h"
20
23
#include "SciLexer.h"
21
 
#include "SString.h"
22
 
 
23
 
static int GetLotLineState(SString &line) {
 
24
 
 
25
#ifdef SCI_NAMESPACE
 
26
using namespace Scintilla;
 
27
#endif
 
28
 
 
29
static int GetLotLineState(std::string &line) {
24
30
        if (line.length()) {
25
31
                // Most of the time the first non-blank character in line determines that line's type
26
32
                // Now finds the first non-blank character
50
56
 
51
57
                default:  // Any other line
52
58
                        // Checks for message at the end of lot file
53
 
                        if (line.contains("PASSED")) {
 
59
                        if (line.find("PASSED") != std::string::npos) {
54
60
                                return SCE_LOT_PASS;
55
61
                        }
56
 
                        else if (line.contains("FAILED")) {
 
62
                        else if (line.find("FAILED") != std::string::npos) {
57
63
                                return SCE_LOT_FAIL;
58
64
                        }
59
 
                        else if (line.contains("ABORTED")) {
 
65
                        else if (line.find("ABORTED") != std::string::npos) {
60
66
                                return SCE_LOT_ABORT;
61
67
                        }
62
68
                        else {
74
80
        styler.StartSegment(startPos);
75
81
        bool atLineStart = true;// Arms the 'at line start' flag
76
82
        char chNext = styler.SafeGetCharAt(startPos);
77
 
        SString line("");
78
 
        line.setsizegrowth(256);        // Lot lines are less than 256 chars long most of the time. This should avoid reallocations
 
83
        std::string line("");
 
84
        line.reserve(256);      // Lot lines are less than 256 chars long most of the time. This should avoid reallocations
79
85
 
80
86
        // Styles LOT document
81
87
        unsigned int i;                 // Declared here because it's used after the for loop