.
original commit: bfa8c40f14e1e265a6845d6f64ac20d5cf8ee60c
This commit is contained in:
parent
af279647b2
commit
ac6de0c74b
|
@ -7,14 +7,30 @@
|
||||||
(lib "list.ss")
|
(lib "list.ss")
|
||||||
(lib "contract.ss"))
|
(lib "contract.ss"))
|
||||||
|
|
||||||
(provide do-search
|
(provide doc-collections-changed)
|
||||||
doc-collections-changed)
|
(provide/contract
|
||||||
(provide/contract (build-string-finds/finds (string?
|
[do-search
|
||||||
|
(string?
|
||||||
|
number?
|
||||||
|
boolean?
|
||||||
|
boolean?
|
||||||
|
(listof path?)
|
||||||
|
boolean?
|
||||||
|
any?
|
||||||
|
(-> any)
|
||||||
|
(string? any? . -> . void?)
|
||||||
|
(string? any? . -> . void?)
|
||||||
|
(string? string? string? string? (union string? false?) any . -> . void?)
|
||||||
|
. -> .
|
||||||
|
(union string? false?))]
|
||||||
|
|
||||||
|
(build-string-finds/finds (string?
|
||||||
boolean?
|
boolean?
|
||||||
boolean?
|
boolean?
|
||||||
. -> .
|
. -> .
|
||||||
(values (listof string?)
|
(values (listof string?)
|
||||||
(listof (union regexp? string?)))))
|
(listof (union regexp? string?)))))
|
||||||
|
|
||||||
(non-regexp (string? . -> . string?)))
|
(non-regexp (string? . -> . string?)))
|
||||||
|
|
||||||
(define (html-doc-position x)
|
(define (html-doc-position x)
|
||||||
|
@ -24,7 +40,7 @@
|
||||||
; These are set by reset-doc-lists:
|
; These are set by reset-doc-lists:
|
||||||
; docs, doc-names and doc-kinds are parallel lists. doc-kinds
|
; docs, doc-names and doc-kinds are parallel lists. doc-kinds
|
||||||
; distinguishes between the two variants of docs.
|
; distinguishes between the two variants of docs.
|
||||||
; docs : (list-of (union string (list string string)))
|
; docs : (list-of (union string (list path string)))
|
||||||
(define docs null)
|
(define docs null)
|
||||||
; doc-names : (list-of string)
|
; doc-names : (list-of string)
|
||||||
(define doc-names null)
|
(define doc-names null)
|
||||||
|
@ -275,7 +291,7 @@
|
||||||
; num ; 0 = keyword, 1 = keyword+index, 2 = all text
|
; num ; 0 = keyword, 1 = keyword+index, 2 = all text
|
||||||
; boolean ; #t if string should be used as a regexp
|
; boolean ; #t if string should be used as a regexp
|
||||||
; boolean ; #t if the string should match exactly (not just "contains")
|
; boolean ; #t if the string should match exactly (not just "contains")
|
||||||
; (listof string) the manuals to search
|
; (listof path) ; the manuals to search
|
||||||
; boolean ; #t if the doc.txt files should be searched
|
; boolean ; #t if the doc.txt files should be searched
|
||||||
; value ; arbitrary key supplied to the "add" functions
|
; value ; arbitrary key supplied to the "add" functions
|
||||||
; (-> A) ; called when more than enough are found; must escape
|
; (-> A) ; called when more than enough are found; must escape
|
||||||
|
@ -448,7 +464,7 @@
|
||||||
(cdr string-finds))))))
|
(cdr string-finds))))))
|
||||||
#f))))
|
#f))))
|
||||||
|
|
||||||
;; filter-docs : (listof string) boolean -> (values docs[sublist] doc-names[sublist] doc-kinds[sublist])
|
;; filter-docs : (listof path) boolean -> (values docs[sublist] doc-names[sublist] doc-kinds[sublist])
|
||||||
;; given the list of manuals specified by `manuals', returns the sublists of the global
|
;; given the list of manuals specified by `manuals', returns the sublists of the global
|
||||||
;; variables docs, doc-names, and doc-kinds that make sense for this search.
|
;; variables docs, doc-names, and doc-kinds that make sense for this search.
|
||||||
(define (filter-docs manuals doc-txt?)
|
(define (filter-docs manuals doc-txt?)
|
||||||
|
@ -469,7 +485,7 @@
|
||||||
r-doc-kinds))))])))
|
r-doc-kinds))))])))
|
||||||
|
|
||||||
;; find-doc :
|
;; find-doc :
|
||||||
;; string -> (values doc[element of docs] doc-name[element of doc-names] doc-kind[element of doc-kinds])
|
;; path -> (values doc[element of docs] doc-name[element of doc-names] doc-kind[element of doc-kinds])
|
||||||
(define (find-doc man)
|
(define (find-doc man)
|
||||||
(let loop ([x-docs docs]
|
(let loop ([x-docs docs]
|
||||||
[x-doc-names doc-names]
|
[x-doc-names doc-names]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user