Skip to content

Commit 6b06565

Browse files
authored
Merge pull request #3713 from masatake/misc-fix
Misc fix
2 parents 20c45ce + 9d034a4 commit 6b06565

File tree

14 files changed

+54
-17
lines changed

14 files changed

+54
-17
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ _build
8585
man/ctags.1
8686
man/ctags.1.html
8787
man/ctags.1.rst
88+
man/ctags-*.5
89+
man/ctags-*.5.rst
90+
man/ctags-*.5.html
8891
man/ctags-*.7
8992
man/ctags-*.7.rst
9093
man/ctags-*.7.html
@@ -93,6 +96,7 @@ man/readtags.1
9396
man/readtags.1.rst
9497
man/readtags.1.html
9598
man/tags.5
99+
man/tags.5.rst
96100
man/tags.5.html
97101
man/*.[157].in
98102
ManTest
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
(abcx)
2+
(abc)
3+
(abc )
4+
(abc)
5+
(abcx)
6+
(abcx)

Tmain/common-prelude.d/chop.ps

122 Bytes
Binary file not shown.

Tmain/common-prelude.d/stdout-expected.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
aindex.ps...0
22
amember.ps...0
33
buildstring.ps...0
4+
chop.ps...0
45
dedup.ps...0
56
dedup_spaces.ps...0
67
ndup.ps...0

Tmain/optscript.d/stack.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@
3434
3
3535
3
3636
/A
37+
/rangecheck

Tmain/optscript.d/stack.ps

124 Bytes
Binary file not shown.

docs/man/ctags-lang-asm.7.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The main effects of running the CPreProcessor parser;
6060

6161
* lines started from `//` are stripped as comments,
6262
* areas surrounded by the pair of `/*` and `*/` are
63-
started as comments, and
63+
stripped as comments, and
6464
* macros defined with `#define` are extracted as tags.
6565

6666
Set ``runCPreProcessor`` to ``false`` for disabling the CPreProcessor

dsl/optscript.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,6 +2772,8 @@ op_roll (OptVM *vm, EsObject *name)
27722772
if (!es_integer_p (nobj))
27732773
return OPT_ERR_TYPECHECK;
27742774
int n = es_integer_get (nobj);
2775+
if (n < 0)
2776+
return OPT_ERR_RANGECHECK;
27752777

27762778
if ((((int)c) - 2) < n)
27772779
return OPT_ERR_UNDERFLOW;

main/CommonPrelude.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,27 @@ const char ctagsCommonPrelude []=
119119
" exch copy pop\n"
120120
"} __bddef\n"
121121
"\n"
122+
"(string _CHOP string)\n"
123+
"/_chop {\n"
124+
" mark exch {} forall pop _buildstring\n"
125+
"} __bddef\n"
126+
"\n"
127+
"(string _CHOP_SPACE string)\n"
128+
"/_chop_space {\n"
129+
" dup length dup 0 gt {\n"
130+
" % string length\n"
131+
" 1 sub\n"
132+
" % string `length - 1`\n"
133+
" 1 index exch\n"
134+
" % string string `length - 1`\n"
135+
" get (\\n\\t\\r\\f\\v ) exch _amember {\n"
136+
" _chop\n"
137+
" } if\n"
138+
" } {\n"
139+
" pop % pop the length\n"
140+
" } ifelse\n"
141+
"} __bddef\n"
142+
"\n"
122143
"% /x mark 40 (a) 32 32 10 (b) 10 10 9 9 (xyz) 9 9 41 _buildstring def\n"
123144
"% x _normalize_spaces! x pstack\n"
124145
"\n"

main/CommonPrelude.ps

432 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)