int cu_location_cmp | ( | cu_location_t | loc0, | |
cu_location_t | loc1 | |||
) |
Return negative, zero, or positive whether loc0 is smaller than, equal to, or greater than loc1, considering the lower bound bound significant than the upper.
void cu_location_fprint | ( | cu_location_t | loc, | |
FILE * | file | |||
) |
Print loc to file.
int cu_location_height | ( | cu_location_t | loc | ) |
The Number of lines spanned by loc, starting from zero if loc is contained within a line.
void cu_location_init | ( | cu_location_t | loc, | |
cu_locorigin_t | origin, | |||
int | lbline, | |||
int | lbcol, | |||
int | ubline, | |||
int | ubcol | |||
) |
Initialize loc as the given range range within origin.
void cu_location_init_copy | ( | cu_location_t | loc, | |
cu_location_t | loc0 | |||
) |
Initialize loc as a copy of loc0.
void cu_location_init_cover | ( | cu_location_t | loc, | |
cu_location_t | loc0, | |||
cu_location_t | loc1 | |||
) |
Initialize loc as the narrowest location which covers loc0 and loc1, where the latter two must refer to the same origin.
void cu_location_init_point | ( | cu_location_t | loc, | |
cu_locbound_t | bound | |||
) |
Initialize loc as the point location at bound.
void cu_location_init_point_lb | ( | cu_location_t | loc, | |
cu_location_t | loc0 | |||
) |
Initialize loc as the point location at the lower boundary of loc0.
void cu_location_init_point_ub | ( | cu_location_t | loc, | |
cu_location_t | loc0 | |||
) |
Initialize loc as the point location at the upper boundary of loc0.
void cu_location_init_range | ( | cu_location_t | loc, | |
cu_locbound_t | lbound, | |||
cu_locbound_t | ubound | |||
) |
Initialize loc as the range from lbound to ubound, which must refer to the same origin.
int cu_location_lb_column | ( | cu_location_t | loc | ) |
The column of the lower boundary of loc.
int cu_location_lb_line | ( | cu_location_t | loc | ) |
The line of the lower boundary of loc.
cu_locbound_t cu_location_lbound | ( | cu_location_t | loc | ) |
The lower boundary of loc.
int cu_location_length | ( | cu_location_t | loc | ) |
If loc is within a line, the number of columns spanned, otherwise INT_MAX
.
cu_location_t cu_location_new | ( | cu_locorigin_t | origin, | |
int | lbline, | |||
int | lbcol, | |||
int | ubline, | |||
int | ubcol | |||
) |
Return the location for the given range within origin.
cu_location_t cu_location_new_copy | ( | cu_location_t | loc0 | ) |
Return a location identical to loc0.
cu_location_t cu_location_new_cover | ( | cu_location_t | loc0, | |
cu_location_t | loc1 | |||
) |
Return the narrowest location which covers loc0 and loc1, where the latter two must refer to the same origin.
cu_location_t cu_location_new_point | ( | cu_locbound_t | bound | ) |
Return the point location at bound.
cu_location_t cu_location_new_point_lb | ( | cu_location_t | loc0 | ) |
Return the point location coinciding with the lower bound of loc0.
cu_location_t cu_location_new_point_ub | ( | cu_location_t | loc0 | ) |
Return the point location coinciding with the upper bound of loc0.
cu_location_t cu_location_new_range | ( | cu_locbound_t | lbound, | |
cu_locbound_t | ubound | |||
) |
Return the location for the range from lbound to ubound, which must refer to the same origin.
cu_locorigin_t cu_location_origin | ( | cu_location_t | loc | ) |
The origin of loc.
int cu_location_origin_cmp | ( | cu_location_t | loc0, | |
cu_location_t | loc1 | |||
) |
Returns a cu_locorigin_cmp applied to the origins of loc0 and loc1.
cu_str_t cu_location_path | ( | cu_location_t | loc | ) |
The path of the file within which loc refer.
int cu_location_ub_column | ( | cu_location_t | loc | ) |
The column of the upper boundary of loc.
int cu_location_ub_line | ( | cu_location_t | loc | ) |
The line of the upper boundary of loc.
cu_locbound_t cu_location_ubound | ( | cu_location_t | loc | ) |
The upper boundary of loc.
int cu_locbound_cmp | ( | cu_locbound_t | bound0, | |
cu_locbound_t | bound1 | |||
) |
Returns negative, zero, or positive whether bound0 is considered less than, equal to, or greater than bound1. Within the same file, later positions are greater.
int cu_locbound_column | ( | cu_locbound_t | bound | ) |
The current column number of bound.
void cu_locbound_init | ( | cu_locbound_t | bound, | |
cu_locorigin_t | origin, | |||
int | line, | |||
int | column | |||
) |
Initialize bound to refer to line and column within origin.
void cu_locbound_init_copy | ( | cu_locbound_t | bound, | |
cu_locbound_t | bound0 | |||
) |
Initialize bound as a copy of bound0.
void cu_locbound_init_file | ( | cu_locbound_t | bound, | |
cu_str_t | path, | |||
int | line, | |||
int | column | |||
) |
Initialize bound as the given position of the file at path using tabstop spaced at 8 columns.
int cu_locbound_line | ( | cu_locbound_t | bound | ) |
The current line number of bound.
cu_locbound_t cu_locbound_new | ( | cu_locorigin_t | origin, | |
int | line, | |||
int | column | |||
) |
Return a location boundary which refers to line and column within origin.
cu_locbound_t cu_locbound_new_copy | ( | cu_locbound_t | bound0 | ) |
Return a copy of bound0.
cu_locbound_t cu_locbound_new_file | ( | cu_str_t | path, | |
int | line, | |||
int | column | |||
) |
Initialize bound as the given position of the file at path using 8 column tabstops.
cu_locorigin_t cu_locbound_origin | ( | cu_locbound_t | bound | ) |
The origin of bound.
cu_str_t cu_locbound_path | ( | cu_locbound_t | bound | ) |
The path of the origin of bound.
void cu_locbound_put_char | ( | cu_locbound_t | bound, | |
char | ch | |||
) |
Advance bound over ch. This works for ASCII characters. Characters above 127 have no effect, which yields a first approximation to UTF-8.
void cu_locbound_put_newline | ( | cu_locbound_t | bound | ) |
Advance the line number of bound and reset the column to 0.
void cu_locbound_put_tab | ( | cu_locbound_t | bound | ) |
Advance bound to the next tabstop.
void cu_locbound_skip | ( | cu_locbound_t | bound, | |
int | n | |||
) |
Advance bound by n columns.
void cu_locbound_skip_1 | ( | cu_locbound_t | bound | ) |
Advance bound by 1 column.
int cu_locorigin_cmp | ( | cu_locorigin_t | origin0, | |
cu_locorigin_t | origin1 | |||
) |
Return negative, 0, or positive whether origin0 is considered smaller, equal, or greater than origin1.
void cu_locorigin_init | ( | cu_locorigin_t | origin, | |
cu_str_t | path, | |||
int | tabstop | |||
) |
Initialize origin as referring to the file at path having tabstops in steps of tabstop.
cu_locorigin_t cu_locorigin_new | ( | cu_str_t | path, | |
int | tabstop | |||
) |
Return a location referring to the file at path having tabstops in steps of tabstop.
cu_str_t cu_locorigin_path | ( | cu_locorigin_t | origin | ) |
The path of the file to which origin is refers.
int cu_locorigin_tabstop | ( | cu_locorigin_t | origin | ) |
The width of the tabstops used in origin.