#!/usr/bin/onyx # # Read one or more files and count the number of lines, words, and characters. # Unlike most wc implementations, this program pays enough attention to get the # line count correct, even if there is no newline at the end of the file. # ################################################################################ # # Parse the command line. # # Load the clopt module. $modclopt mclass:singleton:load # Subclass clopt and add option handlers. $optclass clopt < # # Class data. # >< # # Methods. # # Constructor. This could be omitted, since no work is done, except to # recursively call the superclass's constructor, which would happen anyway, # were this method definition missing. However, the convention is to always # define this method. # #class# #- new #instance $new { ;rnew #instance } bind # Print usage to #file. # #file usage_print - $usage_print { # Substitute progname into usage string. `\ progname usage: progname [