summaryrefslogtreecommitdiffstats
path: root/Source/cmcldeps.cxx
diff options
context:
space:
mode:
authorPeter Kuemmel <syntheticpp@gmx.net>2012-06-10 13:31:06 (GMT)
committerPeter Kuemmel <syntheticpp@gmx.net>2012-06-10 13:31:06 (GMT)
commit343ff7a72e7c08f3a63dde25bd1f06c8c3854f56 (patch)
treea4c862a5d3df833518c4f7486a75844149f4a255 /Source/cmcldeps.cxx
parent1a38a5d65fa33f8ff06104b23f9bd38110387ddc (diff)
downloadCMake-343ff7a72e7c08f3a63dde25bd1f06c8c3854f56.zip
CMake-343ff7a72e7c08f3a63dde25bd1f06c8c3854f56.tar.gz
CMake-343ff7a72e7c08f3a63dde25bd1f06c8c3854f56.tar.bz2
Ninja: fix line length
Diffstat (limited to 'Source/cmcldeps.cxx')
-rw-r--r--Source/cmcldeps.cxx26
1 files changed, 19 insertions, 7 deletions
diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx
index 0b9a2fc..9aa94d3 100644
--- a/Source/cmcldeps.cxx
+++ b/Source/cmcldeps.cxx
@@ -192,7 +192,8 @@ void Win32Fatal(const char* function) {
} // anonymous namespace
-Subprocess::Subprocess() : child_(NULL) , overlapped_(), is_reading_(false), exit_code_(1) {
+Subprocess::Subprocess() : child_(NULL) , overlapped_(), is_reading_(false),
+ exit_code_(1) {
}
Subprocess::~Subprocess() {
@@ -273,14 +274,17 @@ bool Subprocess::Start(SubprocessSet* set, const string& command) {
NULL, NULL,
&startup_info, &process_info)) {
DWORD error = GetLastError();
- if (error == ERROR_FILE_NOT_FOUND) { // file (program) not found error is treated as a normal build action failure
+ if (error == ERROR_FILE_NOT_FOUND) {
+ // file (program) not found error is treated
+ // as a normal build action failure
if (child_pipe)
CloseHandle(child_pipe);
CloseHandle(pipe_);
CloseHandle(nul);
pipe_ = NULL;
// child_ is already NULL;
- buf_ = "CreateProcess failed: The system cannot find the file specified.\n";
+ buf_ =
+ "CreateProcess failed: The system cannot find the file specified.\n";
return true;
} else {
Win32Fatal("CreateProcess"); // pass all other errors to Win32Fatal
@@ -436,7 +440,8 @@ void SubprocessSet::Clear() {
for (vector<Subprocess*>::iterator i = running_.begin();
i != running_.end(); ++i) {
if ((*i)->child_)
- if (!GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, GetProcessId((*i)->child_)))
+ if (!GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT,
+ GetProcessId((*i)->child_)))
Win32Fatal("GenerateConsoleCtrlEvent");
}
for (vector<Subprocess*>::iterator i = running_.begin();
@@ -530,7 +535,12 @@ static string getArg(string& cmdline) {
}
static void parseCommandLine(LPTSTR wincmdline,
- string& srcfile, string& dfile, string& objfile, string& prefix, string& clpath, string& rest) {
+ string& srcfile,
+ string& dfile,
+ string& objfile,
+ string& prefix,
+ string& clpath,
+ string& rest) {
string cmdline(wincmdline);
/* self */ getArg(cmdline);
srcfile = getArg(cmdline);
@@ -595,7 +605,8 @@ int main() {
// the same command line verbatim.
string srcfile, dfile, objfile, prefix, clpath, rest;
- parseCommandLine(GetCommandLine(), srcfile, dfile, objfile, prefix, clpath, rest);
+ parseCommandLine(GetCommandLine(), srcfile, dfile, objfile,
+ prefix, clpath, rest);
#if 0
fprintf(stderr, "\n\ncmcldebug:\n");
@@ -630,7 +641,8 @@ int main() {
std::string sysHeadersLower = "program files (x86)\\microsoft ";
while (getline(ss, line)) {
if (startsWith(line, prefix)) {
- if (!contains(line, sysHeadersCamel) && !contains(line, sysHeadersLower)) {
+ if (!contains(line, sysHeadersCamel)
+ && !contains(line, sysHeadersLower)) {
string inc = trimLeadingSpace(line.substr(prefix.size()).c_str());
if (inc[inc.size() - 1] == '\r') // blech, stupid \r\n
inc = inc.substr(0, inc.size() - 1);