printf("%c%c", f_string_eol, f_string_eol);
+ printf(" When ");
+ fl_color_print(f_standard_output, data.context.notable, data.context.reset, "--%s", byte_dump_long_last);
+ printf(" is used, any UTF-8 sequences will still be printed in full should any part is found within the requested range.");
+
+ printf("%c%c", f_string_eol, f_string_eol);
+
return f_none;
}
#endif // _di_byte_dump_print_help_
}
// Process the UTF-8 character.
else if (width_utf > 1) {
- position++;
-
- if (data.last > 0 && position > data.last) break;
-
continue;
}
}
// UTF-8 character fragments must have a width of 1 (and ASCII characters can only be the first character in a sequence).
if (width_current == 1) {
// Grab the next UTF-8 character fragment if the entire sequence is not collected yet.
- if (width_count < width_utf) {
- position++;
-
- if (data.last > 0 && position > data.last) break;
-
- continue;
- }
+ if (width_count < width_utf) continue;
}
else {
found_invalid_utf = f_true;
}
}
}
+
+ if (data.last) {
+ position += width_utf;
+
+ if (position >= data.last) break;
+ }
}
+ else if (data.last) {
+ position++;
- width_utf = -1;
- position++;
+ if (position >= data.last) break;
+ }
- if (data.last > 0 && position > data.last) break;
+ width_utf = -1;
} // while
// Print placeholders to fill out the remaining line and then optionally print the text block.