##
# search all sources for pattern string
# returns a tagged list, those matching, and those not-matching
##
proc checkAllSources { {pattern USE_DOC_VAR} } {
package require fileutil
set FILES [fileutil::findByPattern ../src *.c]
foreach w [gnocl::widgets] {
foreach f $FILES {
if { [string first /$w.c $f] != -1 } {
set fp [open $f r]
set DATA [read $fp]
close $fp
if { [string first $pattern $DATA] != -1 } {
lappend yes $f
} else {
lappend no $f
}
}
}
}
return "yes {$yes} no {$no}"
}
puts [join [dict get [checkAllSources gnoclGetDocumentationVarArgs] yes] \n]
Monday, February 09, 2026
Search Source Files for Matching Key Phrases
Subscribe to:
Post Comments (Atom)
-
Given this module some attention today. Added some of the more package wide options to the module and created customised handler for settin...
-
Over the past few programming sessions I've been working on producing a central point, a dashboard, around which it's possible to se...
-
The contents of a GtkTextBuffer can be saved as serialized binary file. Whilst converting such a file to ascii may be problematic if the bu...
No comments:
Post a Comment