Skip to content

Commit d193b66

Browse files
Improve and rename the sources searcher
FossilOrigin-Name: cf802026778f444a16c77cfe6037a3a47e77c26bb654a1293dc70fce545bfa65
1 parent 5fe9393 commit d193b66

File tree

5 files changed

+41
-32
lines changed

5 files changed

+41
-32
lines changed

VERSIONS.adoc

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Solo Forth version history
22
:author: Marcos Cruz (programandala.net)
3-
:revdate: 2020-07-08
3+
:revdate: 2020-07-28
44
:toc:
55

66
// This file is part of Solo Forth
@@ -12,7 +12,7 @@
1212
// Version 0.14.0 {{{1
1313
== Version 0.14.0
1414

15-
About to be released in 2020-06.
15+
About to be released in 2020-08.
1616

1717
// Background image {{{2
1818
=== Background image
@@ -333,6 +333,8 @@ http://qbi2005.windows.cervantesvirtual.com/wfrmVistaImagen.aspx?imagen=00096057
333333
- Make paren comments multiline in the Vim syntax file.
334334
- Make `do_create` and `do_variable` Z80 entries 8 T States faster, by
335335
moving them from the `noop` word to the `next` entry.
336+
- The sources searcher searches also the document sources. It's
337+
renamed to <tools/seek>.
336338

337339
// Other changes {{{2
338340
=== Other changes

src/doc/manual_skeleton.adoc

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= Solo Forth: Version {version} for {dosname}
22
:author: Marcos Cruz
33
:producer: Marcos Cruz
4-
:revdate: 2020-07-27
4+
:revdate: 2020-07-28
55
:doctype: book
66
:lang: en
77
ifdef::backend-html5[]
@@ -874,20 +874,20 @@ endif::trdos[]
874874
== How to search the source files
875875

876876
A shell script is included in order to make searching the Forth
877-
sources for a regular expression a bit easier: <tools/search_sources>.
877+
sources for a regular expression a bit easier: <tools/seek>.
878878

879879
The script uses ``ack`` by default; if ``ack`` is not installed,
880-
``grep`` is used instead.
880+
``grep`` is used instead. All parameters are passed to them.
881881

882882
Usage examples:
883883

884884
----
885-
./tools/search_sources use-thru-index
886-
./tools/search_sources use-thru-index -l
887-
./tools/search_sources color
888-
./tools/search_sources ";\s:\s"
889-
./tools/search_sources "\-bank"
890-
./tools/search_sources "code\s+\S+\s+\("
885+
./tools/seek use-thru-index
886+
./tools/seek use-thru-index -l
887+
./tools/seek color
888+
./tools/seek ";\s:\s"
889+
./tools/seek "\-bank"
890+
./tools/seek "code\s+\S+\s+\("
891891
----
892892

893893
// How to test and benchmark {{{1

src/version.z80s

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ version_patch: equ 0
1212
version_prerelease_id: equ 'r'
1313
; 'd' for "dev", 'p' for "pre", 'r' for "rc", zero if none
1414

15-
version_prerelease: equ 113
15+
version_prerelease: equ 114
1616

1717
version_build_high_part: equ $0134
1818
version_build_low_part: equ $3D18 ; build 20200728

tools/search_sources

-20
This file was deleted.

tools/seek

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
# seek
4+
5+
# This file is part of Solo Forth
6+
# http://programandala.net/en.program.solo_forth.html
7+
8+
# Last modified: 202007282046.
9+
# See change log at the end of the file.
10+
11+
# Search the sources of Solo Forth using ack (by default) or grep
12+
# (when ack is not installed). All parameters are passed
13+
# to them.
14+
15+
# ==============================================================
16+
17+
dirs="./src/kernel*.z80s ./src/lib/*.fs ./src/doc/*.adoc"
18+
19+
ack $* -r $dirs 2>/dev/null || \
20+
grep $* -r $dirs 2>/dev/null
21+
22+
# ==============================================================
23+
# Change log
24+
25+
# 2020-03-01: Start.
26+
#
27+
# 2020-07-28: Search also the documentation sources. Rename to "seek".

0 commit comments

Comments
 (0)