Commit 1f6a3c67 authored by Brad King's avatar Brad King

ENH: Added reference to Copyright.txt. Removed old reference to ITK...

ENH: Added reference to Copyright.txt.  Removed old reference to ITK copyright.  Changed program name to CMake instead of Insight in source file header.  Also removed tabs.
parent 48b74fd0
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -40,7 +40,7 @@ void onsig(int)
noecho(); /* Echo off */
cbreak(); /* nl- or cr not needed */
keypad(stdscr,TRUE); /* Use key symbols as
KEY_DOWN*/
KEY_DOWN*/
refresh();
int x,y;
getmaxyx(stdscr, y, x);
......@@ -117,9 +117,9 @@ int main(int argc, char** argv)
{
endwin();
std::cerr << "Window is too small. A size of at least "
<< cmCursesMainForm::MIN_WIDTH << " x "
<< cmCursesMainForm::MIN_HEIGHT
<< " is required to run ccmake." << std::endl;
<< cmCursesMainForm::MIN_WIDTH << " x "
<< cmCursesMainForm::MIN_HEIGHT
<< " is required to run ccmake." << std::endl;
return 1;
}
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -18,7 +18,7 @@
#include "cmCursesMainForm.h"
cmCursesBoolWidget::cmCursesBoolWidget(int width, int height,
int left, int top) :
int left, int top) :
cmCursesWidget(width, height, left, top)
{
m_Type = cmCacheManager::BOOL;
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -24,8 +24,8 @@
#include "../cmSystemTools.h"
cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(const char* key,
int labelwidth,
int entrywidth) :
int labelwidth,
int entrywidth) :
m_Key(key), m_LabelWidth(labelwidth), m_EntryWidth(entrywidth)
{
m_Label = new cmCursesLabelWidget(m_LabelWidth, 1, 1, 1, key);
......@@ -54,28 +54,28 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
case cmCacheManager::BOOL:
m_Entry = new cmCursesBoolWidget(m_EntryWidth, 1, 1, 1);
if (cmSystemTools::IsOn(it.GetValue()))
{
static_cast<cmCursesBoolWidget*>(m_Entry)->SetValueAsBool(true);
}
{
static_cast<cmCursesBoolWidget*>(m_Entry)->SetValueAsBool(true);
}
else
{
static_cast<cmCursesBoolWidget*>(m_Entry)->SetValueAsBool(false);
}
{
static_cast<cmCursesBoolWidget*>(m_Entry)->SetValueAsBool(false);
}
break;
case cmCacheManager::PATH:
m_Entry = new cmCursesPathWidget(m_EntryWidth, 1, 1, 1);
static_cast<cmCursesPathWidget*>(m_Entry)->SetString(
it.GetValue());
it.GetValue());
break;
case cmCacheManager::FILEPATH:
m_Entry = new cmCursesFilePathWidget(m_EntryWidth, 1, 1, 1);
static_cast<cmCursesFilePathWidget*>(m_Entry)->SetString(
it.GetValue());
it.GetValue());
break;
case cmCacheManager::STRING:
m_Entry = new cmCursesStringWidget(m_EntryWidth, 1, 1, 1);
static_cast<cmCursesStringWidget*>(m_Entry)->SetString(
it.GetValue());
it.GetValue());
break;
case cmCacheManager::UNINITIALIZED:
cmSystemTools::Error("Found an undefined variable: ", it.GetName());
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -25,8 +25,8 @@ class cmCursesCacheEntryComposite
public:
cmCursesCacheEntryComposite(const char* key, int labelwidth, int entrywidth);
cmCursesCacheEntryComposite(const char* key,
const cmCacheManager::CacheIterator& it,
bool isNew, int labelwidth, int entrywidth);
const cmCacheManager::CacheIterator& it,
bool isNew, int labelwidth, int entrywidth);
~cmCursesCacheEntryComposite();
const char* GetValue();
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -17,7 +17,7 @@
#include "cmCursesDummyWidget.h"
cmCursesDummyWidget::cmCursesDummyWidget(int width, int height,
int left, int top) :
int left, int top) :
cmCursesWidget(width, height, left, top)
{
m_Type = cmCacheManager::INTERNAL;
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -17,7 +17,7 @@
#include "cmCursesFilePathWidget.h"
cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height,
int left, int top) :
int left, int top) :
cmCursesStringWidget(width, height, left, top)
{
m_Type = cmCacheManager::FILEPATH;
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -17,8 +17,8 @@
#include "cmCursesLabelWidget.h"
cmCursesLabelWidget::cmCursesLabelWidget(int width, int height,
int left, int top,
const std::string& name) :
int left, int top,
const std::string& name) :
cmCursesWidget(width, height, left, top)
{
field_opts_off(m_Field, O_EDIT);
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -26,7 +26,7 @@ class cmCursesLabelWidget : public cmCursesWidget
{
public:
cmCursesLabelWidget(int width, int height, int left, int top,
const std::string& name);
const std::string& name);
virtual ~cmCursesLabelWidget();
// Description:
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -26,8 +26,8 @@ inline int ctrl(int z)
}
cmCursesLongMessageForm::cmCursesLongMessageForm(std::vector<std::string>
const& messages, const char*
title)
const& messages, const char*
title)
{
// Append all messages into on big string
std::vector<std::string>::const_iterator it;
......@@ -80,7 +80,7 @@ void cmCursesLongMessageForm::UpdateStatusBar()
char version[cmCursesMainForm::MAX_WIDTH];
char vertmp[128];
sprintf(vertmp,"CMake Version %d.%d - %s", cmake::GetMajorVersion(),
cmake::GetMinorVersion(),cmake::GetReleaseVersion());
cmake::GetMinorVersion(),cmake::GetReleaseVersion());
int sideSpace = (width-strlen(vertmp));
for(int i=0; i<sideSpace; i++) { version[i] = ' '; }
sprintf(version+sideSpace, "%s", vertmp);
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -27,7 +27,7 @@ class cmCursesLongMessageForm : public cmCursesForm
{
public:
cmCursesLongMessageForm(std::vector<std::string> const& messages,
const char* title);
const char* title);
virtual ~cmCursesLongMessageForm();
// Description:
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -17,7 +17,7 @@
#include "cmCursesPathWidget.h"
cmCursesPathWidget::cmCursesPathWidget(int width, int height,
int left, int top) :
int left, int top) :
cmCursesStringWidget(width, height, left, top)
{
m_Type = cmCacheManager::PATH;
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
......@@ -23,7 +23,7 @@ inline int ctrl(int z)
}
cmCursesStringWidget::cmCursesStringWidget(int width, int height,
int left, int top) :
int left, int top) :
cmCursesWidget(width, height, left, top)
{
m_InEdit = false;
......@@ -35,7 +35,7 @@ cmCursesStringWidget::cmCursesStringWidget(int width, int height,
bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
WINDOW* w)
WINDOW* w)
{
int x,y;
......@@ -61,18 +61,18 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
getmaxyx(stdscr, y, x);
// If window too small, handle 'q' only
if ( x < cmCursesMainForm::MIN_WIDTH ||
y < cmCursesMainForm::MIN_HEIGHT )
y < cmCursesMainForm::MIN_HEIGHT )
{
// quit
if ( key == 'q' )
{
return false;
}
{
return false;
}
else
{
key=getch();
continue;
}
{
key=getch();
continue;
}
}
// If resize occured during edit, move out of edit mode
......@@ -84,33 +84,33 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
if (key == 10 || key == KEY_ENTER)
{
if (m_InEdit)
{
cmCursesForm::LogMessage("String widget leaving edit.");
m_InEdit = false;
fm->PrintKeys();
delete[] originalStr;
// trick to force forms to update the field buffer
form_driver(form, REQ_NEXT_FIELD);
form_driver(form, REQ_PREV_FIELD);
return true;
}
{
cmCursesForm::LogMessage("String widget leaving edit.");
m_InEdit = false;
fm->PrintKeys();
delete[] originalStr;
// trick to force forms to update the field buffer
form_driver(form, REQ_NEXT_FIELD);
form_driver(form, REQ_PREV_FIELD);
return true;
}
else
{
cmCursesForm::LogMessage("String widget entering edit.");
m_InEdit = true;
fm->PrintKeys();
char* buf = field_buffer(m_Field, 0);
originalStr = new char[strlen(buf)+1];
strcpy(originalStr, buf);
}
{
cmCursesForm::LogMessage("String widget entering edit.");
m_InEdit = true;
fm->PrintKeys();
char* buf = field_buffer(m_Field, 0);
originalStr = new char[strlen(buf)+1];
strcpy(originalStr, buf);
}
}
else if ( key == KEY_DOWN || key == ctrl('n') ||
key == KEY_UP || key == ctrl('p') ||
key == KEY_NPAGE || key == ctrl('d') ||
key == KEY_PPAGE || key == ctrl('u'))
key == KEY_UP || key == ctrl('p') ||
key == KEY_NPAGE || key == ctrl('d') ||
key == KEY_PPAGE || key == ctrl('u'))
{
m_InEdit = false;