Changeset View
Changeset View
Standalone View
Standalone View
contrib/less/brac.c
Show All 18 Lines | |||||
* Try to match the n-th open bracket | * Try to match the n-th open bracket | ||||
* which appears in the top displayed line (forwdir), | * which appears in the top displayed line (forwdir), | ||||
* or the n-th close bracket | * or the n-th close bracket | ||||
* which appears in the bottom displayed line (!forwdir). | * which appears in the bottom displayed line (!forwdir). | ||||
* The characters which serve as "open bracket" and | * The characters which serve as "open bracket" and | ||||
* "close bracket" are given. | * "close bracket" are given. | ||||
*/ | */ | ||||
public void | public void | ||||
match_brac(obrac, cbrac, forwdir, n) | match_brac(int obrac, int cbrac, int forwdir, int n) | ||||
register int obrac; | |||||
register int cbrac; | |||||
int forwdir; | |||||
int n; | |||||
{ | { | ||||
register int c; | int c; | ||||
register int nest; | int nest; | ||||
POSITION pos; | POSITION pos; | ||||
int (*chget)(); | int (*chget)(void); | ||||
extern int ch_forw_get(), ch_back_get(); | extern int ch_forw_get(void), ch_back_get(void); | ||||
/* | /* | ||||
* Seek to the line containing the open bracket. | * Seek to the line containing the open bracket. | ||||
* This is either the top or bottom line on the screen, | * This is either the top or bottom line on the screen, | ||||
* depending on the type of bracket. | * depending on the type of bracket. | ||||
*/ | */ | ||||
pos = position((forwdir) ? TOP : BOTTOM); | pos = position((forwdir) ? TOP : BOTTOM); | ||||
if (pos == NULL_POSITION || ch_seek(pos)) | if (pos == NULL_POSITION || ch_seek(pos)) | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |