libfossil
fsl_dibu_opt Struct Reference

An instance of this class is used to convey certain state to fsl_dibu objects. More...

#include "util.h"

Collaboration diagram for fsl_dibu_opt:

Data Structures

struct  fsl_dibu_opt_ansi
 EXPERIMENTAL AND SUBJECT TO CHANGE. More...

Data Fields

struct fsl_dibu_opt::fsl_dibu_opt_ansi ansiColor
unsigned short columnWidth
 Maximum column width hint for side-by-side, a.k.a.
unsigned short contextLines
 Number of lines of diff context (number of lines common to the LHS and RHS of the diff).
uint32_t diffFlags
 Flags from the fsl_diff2_flag_e enum.
const char * hashLHS
 The hash of the object represented by the LHS of the diff.
const char * hashRHS
 The hash of the object represented by the RHS of the diff.
const char * nameLHS
 The filename of the object represented by the LHS of the diff.
const char * nameRHS
 The filename of the object represented by the LHS of the diff.
fsl_output_f out
 Output destination.
void * outState
 State for this->out().

Detailed Description

An instance of this class is used to convey certain state to fsl_dibu objects.

Some of this state is configuration provided by the client and some is volatile, used for communicating common state to diff builder instances during the diff rendering process.

Certain fsl_dibu implementations may require that some ostensibly optional fields be filled out. Documenting that is TODO, as the builders get developed.

Definition at line 3891 of file util.h.

Field Documentation

◆ ansiColor

struct fsl_dibu_opt::fsl_dibu_opt_ansi fsl_dibu_opt::ansiColor

◆ columnWidth

unsigned short fsl_dibu_opt::columnWidth

Maximum column width hint for side-by-side, a.k.a.

split, diffs.

FSL_DIBU_SPLIT_TEXT truncates its content columns (as opposed to line numbers and its modification marker) to, at most, this width. By default it uses as much width as is necessary to render whole lines. It treats this limit as UTF8 characters, not bytes.

This is a hint, not a rule. A given diff builder is free to ignore it or to ignore values which are arbitrarily deemed "too small" or "too large."

Definition at line 3914 of file util.h.

◆ contextLines

unsigned short fsl_dibu_opt::contextLines

Number of lines of diff context (number of lines common to the LHS and RHS of the diff).

Library-wide default is 5.

Definition at line 3900 of file util.h.

◆ diffFlags

uint32_t fsl_dibu_opt::diffFlags

Flags from the fsl_diff2_flag_e enum.

Definition at line 3895 of file util.h.

◆ hashLHS

const char* fsl_dibu_opt::hashLHS

The hash of the object represented by the LHS of the diff.

This is intentended for, e.g., generating header-style output. This may be NULL.

Definition at line 3926 of file util.h.

◆ hashRHS

const char* fsl_dibu_opt::hashRHS

The hash of the object represented by the RHS of the diff.

This is intentended for, e.g., generating header-style output. This may be NULL.

Definition at line 3939 of file util.h.

◆ nameLHS

const char* fsl_dibu_opt::nameLHS

The filename of the object represented by the LHS of the diff.

This is intentended for, e.g., generating header-style output. This may be NULL.

Definition at line 3920 of file util.h.

◆ nameRHS

const char* fsl_dibu_opt::nameRHS

The filename of the object represented by the LHS of the diff.

This is intentended for, e.g., generating header-style output. If this is NULL but nameLHS is not then they are assumed to have the same name.

Definition at line 3933 of file util.h.

◆ out

fsl_output_f fsl_dibu_opt::out

Output destination.

Any given builder might, depending on how it actually constructs the diff, buffer output and delay calling this until its finish() method is called.

Note that not all diff builders use this. e.g. a diff builder which outputs to an ncurses widget cannot do so via this method and instead has to use the drawing methods of that API. Thus is is legal for this method to be NULL for some builders.

Definition at line 3950 of file util.h.

◆ outState

void* fsl_dibu_opt::outState

State for this->out().

Ownership is unspecified by this interface: it is for use by this->out() but what is supposed to happen to it after this object is done with it depends on higher-level code.

Definition at line 3957 of file util.h.


The documentation for this struct was generated from the following file: