A few programs I've released for you to enjoy. All are free for non-commercial use. Some have more generous licences.
If my ex scripts aren't working for you, first check to make sure you're not running the extensively broken "vim". If "ex -v" brings up the vim startup screen, you should reinstall the stock vi/ex if available, or if not a faithful clone such as nvi.
For some excellent C programming resources, check out this site from Lysator of Linköping University.