casa
5.7.0-16
|
#include <optionparser.h>
Classes | |
struct | FunctionWriter |
struct | IStringWriter |
class | LinePartIterator |
class | LineWrapper |
struct | OStreamWriter |
struct | StreamWriter |
struct | SyscallWriter |
struct | TemporaryWriter |
Static Public Member Functions | |
static void | upmax (int &i1, int i2) |
static void | indent (IStringWriter &write, int &x, int want_x) |
static bool | isWideChar (unsigned ch) |
Returns true if ch is the unicode code point of a wide character. More... | |
static void | printUsage (IStringWriter &write, const Descriptor usage[], int width=80, int last_column_min_percent=50, int last_column_own_line_max_percent=75) |
Definition at line 1724 of file optionparser.h.
|
inlinestatic |
Definition at line 1867 of file optionparser.h.
References write().
Referenced by option::PrintUsageImplementation::LineWrapper::flush(), printUsage(), and option::PrintUsageImplementation::LineWrapper::write_one_line().
|
inlinestatic |
Returns true if ch is the unicode code point of a wide character.
Definition at line 1903 of file optionparser.h.
Referenced by option::PrintUsageImplementation::LineWrapper::process(), and option::PrintUsageImplementation::LinePartIterator::update_length().
|
inlinestatic |
We don't let rows that don't use table separators ( or ) influence the width of column 0. This allows the user to interject section headers or explanatory paragraphs that do not participate in the table layout.
If lastcolumn == 0 we must disable print_last_column_on_own_line because otherwise 2 copies of the last (and only) column would be output. Actually this is just defensive programming. It is currently not possible that lastcolumn==0 and print_last_column_on_own_line==true at the same time, because lastcolumn==0 => tabstop[lastcolumn] == 0 => rightwidth==width => rightwidth>=last_column_min_width (unless someone passes a bullshit value >100 for last_column_min_percent) => the above if condition is false => print_last_column_on_own_line==false
an interjection that doesn't contain or
NOTE: This code block is not necessarily executed for each line, because some rows may have fewer columns.
Definition at line 2447 of file optionparser.h.
References option::PrintUsageImplementation::LinePartIterator::column(), option::PrintUsageImplementation::LinePartIterator::data(), option::PrintUsageImplementation::LineWrapper::flush(), indent(), option::PrintUsageImplementation::LinePartIterator::length(), option::PrintUsageImplementation::LinePartIterator::line(), option::PrintUsageImplementation::LinePartIterator::next(), option::PrintUsageImplementation::LinePartIterator::nextRow(), option::PrintUsageImplementation::LinePartIterator::nextTable(), option::PrintUsageImplementation::LineWrapper::process(), option::PrintUsageImplementation::LinePartIterator::restartRow(), option::PrintUsageImplementation::LinePartIterator::restartTable(), option::PrintUsageImplementation::LinePartIterator::screenLength(), upmax(), and write().
Referenced by option::printUsage().
|
inlinestatic |
Definition at line 1851 of file optionparser.h.
Referenced by option::PrintUsageImplementation::LinePartIterator::next(), and printUsage().