|
|
|
@ -73,7 +73,7 @@ int display(FILE *file) {
@@ -73,7 +73,7 @@ int display(FILE *file) {
|
|
|
|
|
int end; |
|
|
|
|
int counter = 0; |
|
|
|
|
if (frequency)
|
|
|
|
|
end = num_colours / frequency - 1; |
|
|
|
|
end = (num_colours / frequency); |
|
|
|
|
else { |
|
|
|
|
end = 0; |
|
|
|
|
counter = num_colours; // so that print starts at reverse=true
|
|
|
|
@ -82,7 +82,7 @@ int display(FILE *file) {
@@ -82,7 +82,7 @@ int display(FILE *file) {
|
|
|
|
|
bool vert_reverse = false; |
|
|
|
|
while (c != EOF) { |
|
|
|
|
if (c == '\n') { |
|
|
|
|
if (frequency) { |
|
|
|
|
if (frequency && end) { |
|
|
|
|
if (counter % (end) == 0) { |
|
|
|
|
vert_reverse = !vert_reverse; |
|
|
|
|
} |
|
|
|
|