##
# 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:
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...
-
Spent some time today creating some simple howto-tutorials on creating standalone Tcl/Gnocl applications using freewrap. The process is almo...
-
Linux distros have heaps of pre-installed icons ready for use. I recently needed to create a toolbar menu which needed to access a set of un...