-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow
myank -l
when there are no measure numbers
- Loading branch information
1 parent
8310dab
commit 83d17e1
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// | ||
// Programmer: Craig Stuart Sapp <[email protected]> | ||
// Creation Date: Sat Aug 8 12:24:49 PDT 2015 | ||
// Last Modified: Do 30 Nov 2023 08:29:32 CET | ||
// Last Modified: Do 30 Nov 2023 12:59:09 CET | ||
// Filename: min/humlib.cpp | ||
// URL: https://github.com/craigsapp/humlib/blob/master/min/humlib.cpp | ||
// Syntax: C++11 | ||
|
@@ -106021,6 +106021,15 @@ void Tool_myank::getMeasureStartStop(vector<MeasureInfo>& measurelist, HumdrumFi | |
measurelist.push_back(current); | ||
} | ||
|
||
// allow "myank -l" when there are no measure numbers | ||
if (getBoolean("lines") && measurelist.size() == 0) { | ||
current.clear(); | ||
current.num = 0; | ||
current.start = 0; | ||
current.stop = dataend; | ||
current.file = &infile; | ||
measurelist.push_back(current); | ||
} | ||
|
||
} | ||
|
||
|
@@ -106189,7 +106198,7 @@ void Tool_myank::expandMeasureOutList(vector<MeasureInfo>& measureout, | |
minmeasure = measurein[i].num; | ||
} | ||
} | ||
if (maxmeasure <= 0) { | ||
if (maxmeasure <= 0 && !getBoolean("lines")) { | ||
cerr << "Error: There are no measure numbers present in the data" << endl; | ||
exit(1); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// | ||
// Programmer: Craig Stuart Sapp <[email protected]> | ||
// Creation Date: Sat Aug 8 12:24:49 PDT 2015 | ||
// Last Modified: Do 30 Nov 2023 08:29:32 CET | ||
// Last Modified: Do 30 Nov 2023 12:59:09 CET | ||
// Filename: min/humlib.h | ||
// URL: https://github.com/craigsapp/humlib/blob/master/min/humlib.h | ||
// Syntax: C++11 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters