BUG: can not mix cout and fgets on hp
This commit is contained in:
parent
6c4375309c
commit
6dda0c976f
|
@ -31,11 +31,11 @@ cmakewizard::cmakewizard()
|
||||||
|
|
||||||
void cmakewizard::AskUser(const char* key, cmCacheManager::CacheIterator& iter)
|
void cmakewizard::AskUser(const char* key, cmCacheManager::CacheIterator& iter)
|
||||||
{
|
{
|
||||||
std::cout << "Variable Name: " << key << "\n";
|
printf("Variable Name: %s\n", key);
|
||||||
const char* helpstring = iter.GetProperty("HELPSTRING");
|
const char* helpstring = iter.GetProperty("HELPSTRING");
|
||||||
std::cout << "Description: " << (helpstring?helpstring:"(none)") << "\n";
|
printf("Description: %s\n", (helpstring?helpstring:"(none)"));
|
||||||
std::cout << "Current Value: " << iter.GetValue() << "\n";
|
printf("Current Value: %s\n", iter.GetValue());
|
||||||
std::cout << "New Value (Enter to keep current value): ";
|
printf("New Value (Enter to keep current value): ");
|
||||||
char buffer[4096];
|
char buffer[4096];
|
||||||
buffer[0] = 0;
|
buffer[0] = 0;
|
||||||
fgets(buffer, sizeof(buffer)-1, stdin);
|
fgets(buffer, sizeof(buffer)-1, stdin);
|
||||||
|
@ -67,12 +67,12 @@ void cmakewizard::AskUser(const char* key, cmCacheManager::CacheIterator& iter)
|
||||||
iter.SetValue(value.c_str());
|
iter.SetValue(value.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::cout << "\n";
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmakewizard::AskAdvanced()
|
bool cmakewizard::AskAdvanced()
|
||||||
{
|
{
|
||||||
std::cout << "Would you like to see advanced options? [No]:";
|
printf("Would you like to see advanced options? [No]:");
|
||||||
char buffer[4096];
|
char buffer[4096];
|
||||||
buffer[0] = 0;
|
buffer[0] = 0;
|
||||||
fgets(buffer, sizeof(buffer)-1, stdin);
|
fgets(buffer, sizeof(buffer)-1, stdin);
|
||||||
|
@ -89,7 +89,7 @@ bool cmakewizard::AskAdvanced()
|
||||||
|
|
||||||
void cmakewizard::ShowMessage(const char* m)
|
void cmakewizard::ShowMessage(const char* m)
|
||||||
{
|
{
|
||||||
std::cout << m << "\n";
|
printf("%s\n", m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue