############################################################################ XVile-compatible filters for: RCS (Revision Control System) files C/C++ nroff/troff Version 1.0 Phil Mercurio mercurio@acm.org ############################################################################ This archive contains three filter programs for use with the XVile text editor, version 5.2 or greater. Each program processes the file currently being edited in xvile and inserts codes to change text attributes (color, italics, etc.) for portions of the text. The filters are meant to be run via xvile macros, they are not stand-alone programs. The C/C++ filter is a modification of the FLEX-based C filter distributed with vile-5.2. The nroff filter is a quick hack. The RCS filter is an original work. == Contents ============================================================ cFilt/ Processes C/C++ text and adds attributes based on syntax. This is an extension of c-filt.flx, written by Alistair G. Crooks. It requires GNU flex. I've added two more categories of words to be colored, so it now handles: preprocessor commands (#ifdef, #define, etc.) keywords (if, for, while, etc.) comments (/* */ and //) types (int, char, float, etc.) special (whatever you want) I've also attempted to make it easier for an individual user to add their own keywords, types, and special words. The flex code has been incorporated into a C shell script which inserts the files "user.keys", "user.types", and "user.special" into pieces of code to produce the complete flex source file. (This can't be done using the C preprocessor, it adds text which confuses flex.) The makefile runs the shell script and compiles the output. This is the sort of program each user should have their own copy of, modified to their particular tastes. For example, I add data types specific to the project I'm working on to my "user.types" file and install the filter in my home directory. This version, like the original, fails to recognize some valid comment strings. nrFilt/ A quick hack to highlight lines beginning with a period. rcsFilt/ Reads the input file and its corresponding RCS file and adds attributes to color lines by their age (the lines from the current revision of the file are the youngest, those from the first version of the file are the oldest). If you use RCS, this tool can provide an overview of the history of your files in a very intuitive form. See the manual page (rcsFilt.1) in this directory for details. sample.vilerc This file contains the macros I use to invoke each of the filters in this package. You can insert this file in your ~/.vilerc file and edit it to your liking. The macros are bound to these keys: ^X-q C/C++ filter ^X-w nroff filter ^X-a RCS filter sample.Xdefaults This is a portion of my ~/.Xdefaults for XVile, containing the colors I use for C/C++ highlighting and RCS highlighting. version Contains the version of this release. == Installation ======================================================== The Makefiles in each of the subdirectories are very simple, just edit the BINDIR variable (and the MANDIR variable, for rcsFilt) and do a "make install". There's no common Makefile, since you may want to install different filters in different places (for example, each user may want their own modified copy of the C/C++ filter, while the RCS filter can be installed in a public place). You'll need flex to compile cFilt, and a C++ compiler to compile rcsFilt. rcsFilt was written using GCC 2.6.3, but it should be fairly generic C++ code.
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.