brac.c (1ea316270f1f75922ac53976d5d8808a41442f46) | brac.c (f6b74a7d164b5fada266d00e723155a178a4529f) |
---|---|
1/* | 1/* |
2 * Copyright (C) 1984-2015 Mark Nudelman | 2 * Copyright (C) 1984-2017 Mark Nudelman |
3 * 4 * You may distribute under the terms of either the GNU General Public 5 * License or the Less License, as specified in the README file. 6 * 7 * For more information, see the README file. 8 */ 9 10 --- 8 unchanged lines hidden (view full) --- 19 * Try to match the n-th open bracket 20 * which appears in the top displayed line (forwdir), 21 * or the n-th close bracket 22 * which appears in the bottom displayed line (!forwdir). 23 * The characters which serve as "open bracket" and 24 * "close bracket" are given. 25 */ 26 public void | 3 * 4 * You may distribute under the terms of either the GNU General Public 5 * License or the Less License, as specified in the README file. 6 * 7 * For more information, see the README file. 8 */ 9 10 --- 8 unchanged lines hidden (view full) --- 19 * Try to match the n-th open bracket 20 * which appears in the top displayed line (forwdir), 21 * or the n-th close bracket 22 * which appears in the bottom displayed line (!forwdir). 23 * The characters which serve as "open bracket" and 24 * "close bracket" are given. 25 */ 26 public void |
27match_brac(int obrac, int cbrac, int forwdir, int n) | 27match_brac(obrac, cbrac, forwdir, n) 28 int obrac; 29 int cbrac; 30 int forwdir; 31 int n; |
28{ 29 int c; 30 int nest; 31 POSITION pos; | 32{ 33 int c; 34 int nest; 35 POSITION pos; |
32 int (*chget)(void); | 36 int (*chget)(); |
33 | 37 |
34 extern int ch_forw_get(void), ch_back_get(void); | 38 extern int ch_forw_get(), ch_back_get(); |
35 36 /* 37 * Seek to the line containing the open bracket. 38 * This is either the top or bottom line on the screen, 39 * depending on the type of bracket. 40 */ 41 pos = position((forwdir) ? TOP : BOTTOM); 42 if (pos == NULL_POSITION || ch_seek(pos)) --- 54 unchanged lines hidden --- | 39 40 /* 41 * Seek to the line containing the open bracket. 42 * This is either the top or bottom line on the screen, 43 * depending on the type of bracket. 44 */ 45 pos = position((forwdir) ? TOP : BOTTOM); 46 if (pos == NULL_POSITION || ch_seek(pos)) --- 54 unchanged lines hidden --- |