summaryrefslogtreecommitdiff
path: root/parttypes.cc
diff options
context:
space:
mode:
authorRoderick W. Smith <allura@localhost>2020-02-15 21:10:03 +0000
committerRoderick W. Smith <allura@localhost>2020-02-15 21:10:03 +0000
commit01725eae7d3cf20b54fddfa7d84ec05645be4cf0 (patch)
treeca98e7bab63373c68a463f5720150869ff35b862 /parttypes.cc
parentbbd6b4cc67ffcdf7b2a6bd5008d28006cb147393 (diff)
parent6a2b5acdcf9511bf3b50508910b718e369a028f1 (diff)
downloadsgdisk-01725eae7d3cf20b54fddfa7d84ec05645be4cf0.tar.gz
Merge /u/morisgi/gptfdisk/ branch enhancements into master
https://sourceforge.net/p/gptfdisk/code/merge-requests/15/
Diffstat (limited to 'parttypes.cc')
-rw-r--r--parttypes.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/parttypes.cc b/parttypes.cc
index 4c25da3..38a49ff 100644
--- a/parttypes.cc
+++ b/parttypes.cc
@@ -19,6 +19,7 @@ using namespace std;
int PartType::numInstances = 0;
AType* PartType::allTypes = NULL;
AType* PartType::lastType = NULL;
+const PartType PartType::unusedPartType = (GUIDData) "00000000-0000-0000-0000-000000000000";
#define SCREEN_WIDTH 80
#define NUM_COLUMNS 2
@@ -530,10 +531,10 @@ void PartType::ShowAllTypes(int maxLines) const {
cout.unsetf(ios::uppercase);
if (maxLines > 0) {
cout << "Type search string, or <Enter> to show all codes: ";
- matchString = ReadString();
+ matchString = ToLower(ReadString());
} // if
while (thisType != NULL) {
- found = thisType->name.find(matchString);
+ found = ToLower(thisType->name).find(matchString);
if ((thisType->display == 1) && (found != string::npos)) { // show it
cout.fill('0');
cout.width(4);
@@ -545,8 +546,10 @@ void PartType::ShowAllTypes(int maxLines) const {
if (thisType->next) {
cout << "\n";
if ((maxLines > 0) && (lineCount++ % maxLines) == 0) {
- cout << "Press the <Enter> key to see more codes: ";
+ cout << "Press the <Enter> key to see more codes, q to quit: ";
getline(cin, line);
+ if ((line[0] =='q') || (line[0] =='Q'))
+ break;
} // if reached screen line limit
} // if there's another entry following this one
} else {