From: "M. Leo Cooper" Newsgroups: alt.sources,alt.source-code Subject: judge-1.0 Scrabble (TM) word challenge adjudicator Date: Sun, 7 Jun 1998 16:56:59 -0700 Organization: All USENET -- http://www.Supernews.com Message-ID: Submitted-by: thegrendel@theriver.com Archive-name: judge-1.0/part01 #!/bin/sh # This is a shell archive (produced by GNU sharutils 4.1). # To extract the files from this archive, save it to some FILE, remove # everything before the `!/bin/sh' line above, then type `sh FILE'. # # Made on 1998-06-07 16:24 MST by . # Source directory was `/home/thegrendel/judge'. # # Existing files will *not* be overwritten unless `-c' is specified. # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ # 537 -rw-r--r-- packing.list # 1377 -rw-r--r-- judge-1.0.lsm # 6217 -rw-r--r-- README # 2642 -rw-r--r-- judge.1 # 1865 -rw-r--r-- INSTALL # 726 -rw-r--r-- Makefile # 6524 -rw-r--r-- judge.c # 7474 -rw-r--r-- judge_u.c # 443 -rw-r--r-- srch.h # 2883 -rwxr-xr-x judge # 18122 -rw------- COPYING # touch -am 1231235999 $$.touch >/dev/null 2>&1 if test ! -f 1231235999 && test -f $$.touch; then shar_touch=touch else shar_touch=: echo echo 'WARNING: not restoring timestamps. Consider getting and' echo "installing GNU \`touch', distributed in GNU File Utilities..." echo fi rm -f 1231235999 $$.touch # # ============= packing.list ============== if test -f 'packing.list' && test X"$1" != X"-c"; then echo 'x - skipping packing.list (file already exists)' else echo 'x - extracting packing.list (text)' sed 's/^X//' << 'SHAR_EOF' > 'packing.list' && X Files In This Archive X ===================== X COPYING The Gnu Software GPL INSTALL Installation instructions README The doc file Makefile judge The GUI (Tcl) version of the program judge.1 The man page judge.c Source for the driver of the stand-alone program judge_u.c Source for the driver of the GUI version srch.h Include file, source judge-1.0.lsm Linux Software Map descriptor file packing.list This file SHAR_EOF $shar_touch -am 0607162298 'packing.list' && chmod 0644 'packing.list' || echo 'restore of packing.list failed' shar_count="`wc -c < 'packing.list'`" test 537 -eq "$shar_count" || echo "packing.list: original size 537, current size $shar_count" fi # ============= judge-1.0.lsm ============== if test -f 'judge-1.0.lsm' && test X"$1" != X"-c"; then echo 'x - skipping judge-1.0.lsm (file already exists)' else echo 'x - extracting judge-1.0.lsm (text)' sed 's/^X//' << 'SHAR_EOF' > 'judge-1.0.lsm' && Begin3 Title: judge - Word challenge adjudicator for Scrabble (TM) Version: 1.0 Entered-date: 07JUN98 Description: Running a Scrabble (TM) tournament, or even just a X club game night involves looking up and adjudicating X word challenges. The 'judge' package computerizes this X odious administrative task. Challenges are saved in a X log file, and may optionally be individually printed X out. There are two versions of the program in the X package, a stand-alone program that runs in console X mode or in an xterm, and a GUI version for X. X X Scrabble is a registered trademark of the Milton X Bradley Co., a subsidiary of Hasbro, Inc. X Keywords: Scrabble (TM), challenge, tournament, word game X Author: thegrendel@theriver.com (Mendel Cooper) Maintained-by: thegrendel@theriver.com (Mendel Cooper) Primary-site: sunsite.unc.edu /pub/Linux/games/amusements X 14.9k judge-1.0.tar.gz X 1377 judge-1.0.lsm X Alternate-site: http://personal.riverusers.com/~thegrendel/judge.html Original-site: http://personal.riverusers.com/~thegrendel/wordy.html Platforms: Linux/X11 (Tcl/Tk required) X Generic UNIX with X11 or similar (Tcl/Tk required) X DOS (original text version) Copying-policy: GPL End SHAR_EOF $shar_touch -am 0607162298 'judge-1.0.lsm' && chmod 0644 'judge-1.0.lsm' || echo 'restore of judge-1.0.lsm failed' shar_count="`wc -c < 'judge-1.0.lsm'`" test 1377 -eq "$shar_count" || echo "judge-1.0.lsm: original size 1377, current size $shar_count" fi # ============= README ============== if test -f 'README' && test X"$1" != X"-c"; then echo 'x - skipping README (file already exists)' else echo 'x - extracting README (text)' sed 's/^X//' << 'SHAR_EOF' > 'README' && X JUDGE X X A Software Word Judge X ===================== X X 'Judge' is a program that adjudicates challenges in club or tournament Scrabble (tm) games. The original 'Judge', DOS text-only version, took its inspiration from Barry Harridge's LOOK program that can be downloaded from: ftp://ftp.break.com.au/user/b/barry/look402.zip. X 'Judge' can use as its dictionary any word list in standard UNIX format, one word per line terminated by a LF. Among possible candidates are the list in /usr/dict, the 'ispell' word list (dumped as an ASCII file), or the Public Domain 'Webster's 2' available on the Internet. It is highly recommended, however, that the Public Domain ENABLE list be downloaded from the authors site, at http://personal.riverusers.com/~thegrendel/enable10.zip. This is a 172,000+ word list compiled specially for word game use. X X 'Judge' fills a real need in the word gaming community for the following reasons. X 1) 'Judge' is distributed under the GPL, and, of course, the source code has been supplied. This makes it possible for the user community to modify 'Judge', as necessary. Moreover, it is cross-platform. The source code can be compiled, with only minor modifications, to run on any generic UNIX system, such as Linux, in both console or X-Windows mode. It could conceivably be compiled for a Mac or Amiga. There is even a DOS version available from the author's Web site. This makes it possible to use 'Judge' at a club or tournament on virtually any computer system. X 2) 'Judge' may be used with any word list in standard, unencrypted ASCII format. This enables the user to edit or even substitute the word list used. Using the Public Domain 172,000+ word ENABLE list, downloadable from the author's Web site, makes possible lookups of all legal words in North American play up to 16 or more letters long. It is even possible to put together a "SOWPODS" dictionary from sources on the author's site. X 3) 'Judge' has a GUI front end that runs under X, and may also be run in just text mode in the console or an xterm. X X 'Judge' is freeware released under the GPL, and is freely usable and distributable without payment of fees or licenses. Programmers and tinkerers who modify the code are urged to share their modifications with the author, but, in any case, modified versions of the program package also necessarily fall under the GPL. Users of the program are encouraged to communicate with the author. X ------------------------------------------------------------------------ X X X Instructions for Using 'Judge' X You may invoke the text mode program in the package, 'Judge' (note the uppercase 'J'), either in console mode or in an xterm. This opening screen pops up immediately. Press a key to get to the query screen. You may now enter words to be checked. Multiple words may be entered separated by a space, or by any other non-alphabetic separator, such as a tab. It is suggested that the same entry format be used always, for consistency in the log file (see below). X Pressing the

key prints out a hard copy confirmation of the adjudication for a particular instance. Of course, your printer must be connected and turned on. 'Judge' supports any type of text printer, even of the "ancient" dot matrix variety. X To exit 'Judge', hit without entering a word. A session log is saved in the file 'judge.log'. Note that the 'judge.log' file is not erased and started fresh each time 'Judge' is run, rather it is appendedd to. Should you need a fresh log file, erase (and save on a floppy, if desired) the old 'judge.log' file. X X ------------------------------------------------------------------------ X X Instructions for Using 'judge' X You may invoke the GUI program in the package, 'judge' (note the lowercase 'j'), under X only, either from an xterm or from a menu or task bar (if .fvwmrc has been suitably modified). Operation of the program is highly intuitive, involving click on and filling in the entry space with the challenged word. Click the red, 'Look Up Word' bar to actually perform the lookup, and a red or green 'Accept' or 'Reject' flag pops up to inform you of the result. Pressing the blue, 'Print Last Entry' bar gives you hard copy, and the light green 'View Log' button lets you browse the log file. Repeat as necessary, backspacing to erase the previous challenged word in the entry box. The purple 'Exit' bar ends the session. X X ======================================================================== X X IMPORTANT X You *must* have a word list file named 'word.lst' in the directory from which 'judge' or 'Judge' is invoked. This may be a symbolic link to a word list in another directory, created by the command X ln -s /usr/dict/xxxxx.list word.lst X If 'judge' is invoked from a menu or task bar, the list, or link should reside in your home directory. X ======================================================================== X You should get the freeware Public Domain ENABLE10.ZIP dictionary package in order to get the optimum word list that this package needs. This may be downloaded directly from the following website: X ======================================================== X http://personal.riverusers.com/~thegrendel/software.html X ======================================================== The file WORD.LST should then be converted from DOS to UNIX format either by a dos2unix utility, or using the following script: X X #!/usr/bin/sh X tr -d '\015' < $1 X The script would be invoked as 'scriptname WORD.LST > word.lst'. X X X Scrabble and OSPD are trademarks of the Milton Bradley Co., Inc., a subsidiary of Hasbro, Inc. X X Judge is not a trademark. X X X X M\Cooper X PO Box 237 X St. David, AZ 85630-0237 X -------------------------------------------- X thegrendel@theriver.com X http://personal.riverusers.com/~thegrendel/ SHAR_EOF $shar_touch -am 0607123098 'README' && chmod 0644 'README' || echo 'restore of README failed' shar_count="`wc -c < 'README'`" test 6217 -eq "$shar_count" || echo "README: original size 6217, current size $shar_count" fi # ============= judge.1 ============== if test -f 'judge.1' && test X"$1" != X"-c"; then echo 'x - skipping judge.1 (file already exists)' else echo 'x - extracting judge.1 (text)' sed 's/^X//' << 'SHAR_EOF' > 'judge.1' && X.TH JUDGE "1" "Version 1.0" X.SH NAME X.B judge \- Graphical challenge adjudicator for Scrabble (TM) tournaments and club games. X.SH SYNOPSIS X.B Judge Stand-alone word adjudicator that runs in text mode in either the console or an xterm. X X.B judge This invokes the Tcl front end for the challenge adjudicator (runs under X only). X.SH DESCRIPTION X.B Judge is a stand-alone program that looks up and adjudicates challenged words in Scrabble (TM) games. The results of each challenge are appended to the log file, 'judge.log', and there is the option of printing out each decision. 'Judge' may be invoked from the command line in either console mode or in an xterm. X X.B judge is the graphic (Tcl) front end for the challenge adjudicator. Just fill in the challenged word in the field provided and click the red "Look Up Word" bar. A flag will pop up, indicating whether the word is accepted or rejected. If desired, a printout of the last challenge may be obtained by clicking the blue "Print Last Entry" bar. You may also click on the light green "View Log" button to display and scroll through the log file, 'judge.log'. X For each new challenged word, repeat the process by clicking on the entry window, backspacing to delete the last word, and entering the new word. Then click the appropriate buttons again. To terminate the session, click on the purple "Exit" bar. X Program operation requires a word list in standard ASCII format, one word per line, in the directory from which it is invoked (in the user's home directory if installed in a menu or task bar). The word list must be named word.lst, but this may be a symbolic link to the word list in /usr/dict (ln -s /usr/dict/dictionary.name word.lst). X It is highly recommended that the authoritative Public Domain 172,000+ word ENABLE list, specially created for word game use, be downloaded from the author's site, http://personal.riverusers.com/~thegrendel/software.html. Of course, the file WORD.LST in the ENABLE archive would need to be converted to UNIX format either by a dos2unix utility, or the following equivalent script: X X ================ X #!/usr/bin/bash X tr -d '\015' < $1 X ================ X Invoke the script as 'scriptname WORD.LST > word.lst'. X X Scrabble is a registered trademark of the Milton Bradley Co., a subsidiary of Hasbro, Inc. Hallelujah. Amen. X X.SH BUGS Printouts in the the graphical version, 'judge', automatically terminate in a form feed, so each challenge is printed on a separate sheet. This wastes paper. X X X.SH AUTHOR X Mendel Cooper - SHAR_EOF $shar_touch -am 0607123798 'judge.1' && chmod 0644 'judge.1' || echo 'restore of judge.1 failed' shar_count="`wc -c < 'judge.1'`" test 2642 -eq "$shar_count" || echo "judge.1: original size 2642, current size $shar_count" fi # ============= INSTALL ============== if test -f 'INSTALL' && test X"$1" != X"-c"; then echo 'x - skipping INSTALL (file already exists)' else echo 'x - extracting INSTALL (text)' sed 's/^X//' << 'SHAR_EOF' > 'INSTALL' && X Installation X 1) Check the Makefile and change it, if appropriate. It should work fine as-is for standard Linux distributions. X X 2) 'make' X X Note: If you are using an older version of gcc, such as 2.6.3, X you may need to delete line 81 in the file judge_u.c if X 'judge' bombs with a "segment violation" error. Line 81 reads: X strcat( words, "\0" ); X If you are running a 2.0 series kernel, you almost certainly have X an up-to-date version of gcc (2.7.2 or better), and you will not X have to worry about this. X X 3) As root, 'make install' and 'make install_man' i X 4) Set up a symbolic link to the word list file you will be using in the directory from which you will be invoking the program (if you will be running 'judge' from a menu or task bar in X, this will be your home directory). For example, to create a link to the file, 'xxx.list' in /usr/dict, X ln -s /usr/dict/xxx.list word.lst X It is *highly* recommended that you obtain the free authoritative Public Domain ENABLE list, specially created for word game play and containing over 172,000 words. The list may be downloaded from the author's site at X http://personal.riverusers.com/~thegrendel/enable10.zip X Then, after unzipping the archive, the file 'WORD.LST' needs to be converted to UNIX format by a dos2unix utility or by the following equivalent script: X X #!/usr/bin/sh X tr -d '\015' < $1 X The script would be invoked as 'scriptname WORD.LST > word.lst'. X X X M\Cooper X PO Box 237 X St. David, AZ 85630-0237 X -------------------------------------------- X thegrendel@theriver.com X http://personal.riverusers.com/~thegrendel/ X SHAR_EOF $shar_touch -am 0607161898 'INSTALL' && chmod 0644 'INSTALL' || echo 'restore of INSTALL failed' shar_count="`wc -c < 'INSTALL'`" test 1865 -eq "$shar_count" || echo "INSTALL: original size 1865, current size $shar_count" fi # ============= Makefile ============== if test -f 'Makefile' && test X"$1" != X"-c"; then echo 'x - skipping Makefile (file already exists)' else echo 'x - extracting Makefile (text)' sed 's/^X//' << 'SHAR_EOF' > 'Makefile' && # Judge: A program for adjudicating challenges in Scrabble(R) tournaments # Scrabble is a registered trademark of the Milton Bradley, Co., Inc. # # Note that a sorted ASCII word file, one word per line, is needed. # # Note that if you are using an older version of gcc (2.6.3 or older) # you may need to delete line 81 in judge_u.c [see INSTALL] X CC = gcc # Change to cc if you don't have gcc installed X FLAGS = -O2 BINS = /usr/local X all: judge_u Judge X judge_u : judge_u.c srch.h X $(CC) -o judge_u $(FLAGS) judge_u.c X strip judge_u X Judge: judge.c srch.h X $(CC) -o Judge $(FLAGS) judge.c X strip Judge X X # Must as root, of course. X install: X cp Judge judge judge_u $(BINS)/bin X install_man: X cp judge.1 $(BINS)/man/man1 SHAR_EOF $shar_touch -am 0607161998 'Makefile' && chmod 0644 'Makefile' || echo 'restore of Makefile failed' shar_count="`wc -c < 'Makefile'`" test 726 -eq "$shar_count" || echo "Makefile: original size 726, current size $shar_count" fi # ============= judge.c ============== if test -f 'judge.c' && test X"$1" != X"-c"; then echo 'x - skipping judge.c (file already exists)' else echo 'x - extracting judge.c (text)' sed 's/^X//' << 'SHAR_EOF' > 'judge.c' && #include "srch.h" #include #include #include X /************MSDOG?***************/ #undef DOS /*********************************/ X #ifdef DOS X #include #define PRINTER stdprn #define CLEARSCREEN "cls" X #endif X X #ifndef DOS X #define CLEARSCREEN "clear" X #endif /*********************************/ X #define ARGCOUNT 2 #define BAD_ARGS 2 #define DELAY1 500 #define FILE_ERROR 10 #define MAXFILENAMELEN 40 #define MAXNAMELEN 100 #define TEMPBUFLEN 30 X typedef enum { OFF, ON } SWITCH; typedef enum { FALSE, TRUE } Boolean; X Rflag lookup2( char *, char * ); Boolean isvalid( char *word_set, char *filename ); long filesize( char *file_name ); Rflag b_search( char *s_word, FILE *fp, long lft, long rt ); Rflag l_search( char *sh_word, FILE *fp ); int judge1( char *word, char *filenam, FILE *logfile ); char *get_timeofday(); char *strlwr ( char *wordxx ); void clearscreen(); X X void main( int argc, char **argv ) { X X char searchfile [MAXFILENAMELEN], X words [MAXNAMELEN] = "XXX"; X FILE *logfile; X X if( argc < ARGCOUNT ) X strcpy( searchfile, "word.lst" ); X X logfile = fopen( "judge.log", "a" ); X X clearscreen(); X X while( isalpha( *words ) ) X { X printf( "---Enter word(s) to check---\n" ); X printf( " just to exit \n\n" ); X gets( words ); X if( isalpha( *words ) ) X { X strlwr( words ); X judge1( words, searchfile, logfile ); X } X X } X X fclose( logfile ); X } X /****************************************************/ X int judge1( char *words, char *filename, FILE *lgfile ) { X #ifndef DOS FILE *prn; #endif X X char *timeofday, X messagec [MAXNAMELEN], X messagef [MAXNAMELEN], X resp [MAXNAMELEN] = "*"; X SWITCH PRINTER = OFF; X #ifndef DOS prn = fopen( "/dev/lp1", "w" ); #endif X X X X if( isvalid( words, filename ) ) X { X sprintf( messagec, "==========VALID=========\n" ); X sprintf( messagef, "%s VALID\n", words ); X } X else X { X sprintf( messagec, "========NOT FOUND=======\n" ); X sprintf( messagef, "%s NOT FOUND\n", words ); X } X X timeofday = get_timeofday(); X X X fprintf( lgfile, "%s", messagef ); X fprintf( lgfile, "%s\n\n", timeofday ); X X X printf( "\n%s", messagec ); X printf( "%s\n\n\n\n", timeofday ); X printf( "

rint or to continue... " ); X gets( resp ); X if( *resp == 'P' || *resp == 'p' ) X PRINTER = ON; X printf( "\n\n" ); X X /**********************PRINTOUT*************************/ #ifdef DOS X if( PRINTER == ON ) X { X fprintf( stdprn, "%s", messagef ); X fprintf( stdprn, "%s", timeofday ); X } X #else X X if( PRINTER == ON ) X { X fprintf( prn, "%s", messagef ); X fprintf( prn, "%s\n\n", timeofday ); X } X fclose( prn ); X #endif /*********************************************************/ X X clearscreen(); X X return; X } X X X Rflag b_search( char *search_word, FILE *fp, long left, long right ) { X int result; X long middle; X char discard [MAX_WLEN + 1], X working [MAX_WLEN + 1], X target [MAX_WLEN]; X Rflag bflag = FAIL; X X strcpy( working, search_word ); X strcat( working, "\n" ); X X while( right - left > MAX_SPAN ) X { X middle = ( left + right ) / 2; X fseek( fp, middle, SEEK_SET ); X fgets( discard, MAX_WLEN + 1, fp ); X fgets( target, MAX_WLEN, fp ); X X result = strcmp( working, target ); X X if( !result ) X { bflag = SUCCESS; break; } X X if( result < 0 ) X right = middle; X X else X if( result > 0 ) X left = middle; X X else X { X puts( "Error in strcmp() in BINARY SEARCH !" ); X exit( COMPARISON_ERROR ); X } X } X X if( !bflag ) X bflag = l_search( search_word, fp ); X X return( bflag ); X } X X Rflag l_search( char *search_word, FILE *fp ) { X long backstep; X int test, X i; X char target [MAX_WLEN], X work [MAX_WLEN + 1], X CR_str [] = "\n"; X Rflag flag = FAIL; X X X if( ( backstep = ftell( fp ) ) > 2 * MAX_SPAN ) X backstep = -1L * ( 2 * MAX_SPAN ); X else X backstep = -1L * backstep; X X fseek( fp, backstep, SEEK_CUR ); X X strcpy( work, search_word ); X strcat( work, CR_str ); X X for( i = 0; i <= MAXTESTS; i++ ) X { X if( !( fgets( target, MAX_WLEN, fp ) ) ) break; X X X test = strcmp( work, target ); X if( test < 0 && i > 0 ) X break; X if( !test ) X { flag = SUCCESS; break; } X } X X return ( flag ); } X Rflag lookup2( char *tstword, char *filename ) { X FILE *fptr; X long file_end; X const long file_begin = 0L; X Rflag rflag; X X X file_end = filesize( filename ); X X if( NULL == ( fptr = fopen( filename, "r" ) ) ) X exit( FILE_ERROR ); X X rflag = b_search( tstword, fptr, file_begin, file_end ); X X fclose( fptr ); X X return( rflag ); X } X X X X X X long filesize( char *filename ) { X X int filehandle; X long fsize; X FILE *fp; X struct stat fstatistics; X X fp = fopen( filename, "r" ); X filehandle = fileno( fp ); X X if( !fstat( filehandle, &fstatistics ) ) X fsize = fstatistics.st_size; X else X fsize = -1L; X X fclose( fp ); X X return( fsize ); X } X X char *get_timeofday() { X time_t tim; X char *timstr; X X tim = time( NULL ); X timstr = ctime( &tim ); X X X return( timstr ); X } X X char *strlwr ( char *wd ) { X X char *wptr; X X wptr = wd; X X while( *wptr ) X { X *wptr = tolower( *wptr ); X wptr++; X } X X return( wd ); X } X X void clearscreen() { X system( CLEARSCREEN ); X X return; } X Boolean isvalid( char *wordset, char *filename ) { X X char word_buf [MAXNAMELEN], X w_temp [TEMPBUFLEN], X *wp, X *wtp; X X strcpy( word_buf, wordset ); X wp = word_buf; X wtp = w_temp; X /* initialize pointer to words storage */ X X X while( *wp != 0 ) X { X while( isalpha( *wp ) ) X *wtp++ = *wp++; X *wtp = 0; X if( !lookup2( w_temp, filename ) ) X return( FALSE ); /* A word doesn't check: crash! */ X wtp = w_temp; /* reinitialize pointer */ X while( !isalpha( *wp ) && *wp != 0 ) X wp++; X } X X X X X X X return( TRUE ); /* All words check */ X } SHAR_EOF $shar_touch -am 0605230698 'judge.c' && chmod 0644 'judge.c' || echo 'restore of judge.c failed' shar_count="`wc -c < 'judge.c'`" test 6524 -eq "$shar_count" || echo "judge.c: original size 6524, current size $shar_count" fi # ============= judge_u.c ============== if test -f 'judge_u.c' && test X"$1" != X"-c"; then echo 'x - skipping judge_u.c (file already exists)' else echo 'x - extracting judge_u.c (text)' sed 's/^X//' << 'SHAR_EOF' > 'judge_u.c' && #include "srch.h" #include #include #include X /************MSDOG?***************/ #undef DOS /*********************************/ X #ifdef DOS X #include #define PRINTER stdprn #define CLEARSCREEN "cls" X #endif X X #ifndef DOS X #define CLEARSCREEN "clear" X #endif /*********************************/ X #define ARGCOUNT 2 #define BAD_ARGS 2 #define DELAY1 500 #define FILE_ERROR 10 #define MAXFILENAMELEN 40 #define MAXNAMELEN 100 #define TEMPBUFLEN 30 X typedef enum { OFF, ON } SWITCH; typedef enum { FALSE, TRUE } Boolean; X Rflag lookup2( char *, char * ); Boolean isvalid( char *word_set, char *filename ); long filesize( char *file_name ); Rflag b_search( char *s_word, FILE *fp, long lft, long rt ); Rflag l_search( char *sh_word, FILE *fp ); int judge1( char *word, char *filenam, FILE *logfile ); char *get_timeofday(); char *strlwr ( char *wordxx ); void clearscreen(); X X void main( int argc, char **argv ) { X X char searchfile [MAXFILENAMELEN], X words [MAXNAMELEN] = "XXX"; X FILE *logfile; X /* if( argc < ARGCOUNT ) */ X strcpy( searchfile, "word.lst" ); X X logfile = fopen( "judge.log", "a" ); X /* clearscreen(); */ X /* X while( isalpha( *words ) ) X { X printf( "---Enter word(s) to check---\n" ); X printf( " just to exit \n\n" ); X gets( words ); X if( isalpha( *words ) ) X { X strlwr( words ); X judge1( words, searchfile, logfile ); X } X X } X */ X X strcpy( words, *( argv + 1 ) ); X /**********************************************************/ X strcat( words, "\0" ); /* Note: delete above line if using older version of Tcl */ /**********************************************************/ X X X strlwr( words ); X judge1( words, searchfile, logfile ); X X fclose( logfile ); X X } X /****************************************************/ X int judge1( char *words, char *filename, FILE *lgfile ) { X #ifndef DOS FILE *prn; #endif X X char *timeofday, X messagec [MAXNAMELEN], X messagef [MAXNAMELEN], X resp [MAXNAMELEN] = "*"; X SWITCH PRINTER = OFF; /* X Tcl_Interp *interp; X Boolean Isvalid; */ X /* #ifndef DOS prn = fopen( "/dev/lp1", "w" ); #endif */ X X /* interp = Tcl_CreateInterp(); */ /* Tcl_LinkVar( interp, "valid", (char *) &Isvalid, TCL_LINK_BOOLEAN); */ X X if( isvalid( words, filename ) ) X { X sprintf( messagec, "==========VALID=========\n" ); X sprintf( messagef, "%s VALID\n", words ); /* (void) Tcl_SetVar(interp, "valid", "1", 0); */ /* (void) Tcl_EvalFile( interp, "/home/thegrendel/judge/judge" ); */ /* Isvalid = TRUE; */ X printf( "%d", 1 ); X } X else X { X sprintf( messagec, "========NOT FOUND=======\n" ); X sprintf( messagef, "%s NOT FOUND\n", words ); /* (void) Tcl_SetVar(interp, "valid", "0", 0); */ /* (void) Tcl_EvalFile( interp, "/home/thegrendel/judge/judge" ); */ /* Isvalid = FALSE; */ X printf( "%d", 0 ); X } X X X X X X X timeofday = get_timeofday(); X X fprintf( lgfile, "%s", timeofday ); X fprintf( lgfile, "%s", messagef ); X fprintf( lgfile, "\n\n"); X /* X X printf( "\n%s", messagec ); X printf( "%s\n\n\n\n", timeofday ); X printf( "

rint or to continue... " ); X gets( resp ); X if( *resp == 'P' || *resp == 'p' ) X PRINTER = ON; X printf( "\n\n" ); */ X /**********************PRINTOUT*************************/ #ifdef DOS X if( PRINTER == ON ) X { X fprintf( stdprn, "%s", messagef ); X fprintf( stdprn, "%s", timeofday ); X } X #else X X if( PRINTER == ON ) X { X fprintf( prn, "%s", messagef ); X fprintf( prn, "%s\n\n", timeofday ); X } X fclose( prn ); X #endif /*********************************************************/ X /* clearscreen(); */ X X return; X } X X X Rflag b_search( char *search_word, FILE *fp, long left, long right ) { X int result; X long middle; X char discard [MAX_WLEN + 1], X working [MAX_WLEN + 1], X target [MAX_WLEN]; X Rflag bflag = FAIL; X X strcpy( working, search_word ); X strcat( working, "\n" ); X X while( right - left > MAX_SPAN ) X { X middle = ( left + right ) / 2; X fseek( fp, middle, SEEK_SET ); X fgets( discard, MAX_WLEN + 1, fp ); X fgets( target, MAX_WLEN, fp ); X X result = strcmp( working, target ); X X if( !result ) X { bflag = SUCCESS; break; } X X if( result < 0 ) X right = middle; X X else X if( result > 0 ) X left = middle; X X else X { X puts( "Error in strcmp() in BINARY SEARCH !" ); X exit( COMPARISON_ERROR ); X } X } X X if( !bflag ) X bflag = l_search( search_word, fp ); X X return( bflag ); X } X X Rflag l_search( char *search_word, FILE *fp ) { X long backstep; X int test, X i; X char target [MAX_WLEN], X work [MAX_WLEN + 1], X CR_str [] = "\n"; X Rflag flag = FAIL; X X X if( ( backstep = ftell( fp ) ) > 2 * MAX_SPAN ) X backstep = -1L * ( 2 * MAX_SPAN ); X else X backstep = -1L * backstep; X X fseek( fp, backstep, SEEK_CUR ); X X strcpy( work, search_word ); X strcat( work, CR_str ); X X for( i = 0; i <= MAXTESTS; i++ ) X { X if( !( fgets( target, MAX_WLEN, fp ) ) ) break; X X X test = strcmp( work, target ); X if( test < 0 && i > 0 ) X break; X if( !test ) X { flag = SUCCESS; break; } X } X X return ( flag ); } X Rflag lookup2( char *tstword, char *filename ) { X FILE *fptr; X long file_end; X const long file_begin = 0L; X Rflag rflag; X X X file_end = filesize( filename ); X X if( NULL == ( fptr = fopen( filename, "r" ) ) ) X exit( FILE_ERROR ); X X rflag = b_search( tstword, fptr, file_begin, file_end ); X X fclose( fptr ); X X return( rflag ); X } X X X X X X long filesize( char *filename ) { X X int filehandle; X long fsize; X FILE *fp; X struct stat fstatistics; X X fp = fopen( filename, "r" ); X filehandle = fileno( fp ); X X if( !fstat( filehandle, &fstatistics ) ) X fsize = fstatistics.st_size; X else X fsize = -1L; X X fclose( fp ); X X return( fsize ); X } X X char *get_timeofday() { X time_t tim; X char *timstr; X X tim = time( NULL ); X timstr = ctime( &tim ); X X X return( timstr ); X } X X char *strlwr ( char *wd ) { X X char *wptr; X X wptr = wd; X X while( *wptr ) X { X *wptr = tolower( *wptr ); X wptr++; X } X X return( wd ); X } X X void clearscreen() { X system( CLEARSCREEN ); X X return; } X Boolean isvalid( char *wordset, char *filename ) { X X char word_buf [MAXNAMELEN], X w_temp [TEMPBUFLEN], X *wp, X *wtp; X X strcpy( word_buf, wordset ); X wp = word_buf; X wtp = w_temp; X /* initialize pointer to words storage */ X X X while( *wp != 0 ) X { X while( isalpha( *wp ) ) X *wtp++ = *wp++; X *wtp = 0; X if( !lookup2( w_temp, filename ) ) X return( FALSE ); /* A word doesn't check: crash! */ X wtp = w_temp; /* reinitialize pointer */ X while( !isalpha( *wp ) && *wp != 0 ) X wp++; X } X X X X X X X return( TRUE ); /* All words check */ X } SHAR_EOF $shar_touch -am 0607154098 'judge_u.c' && chmod 0644 'judge_u.c' || echo 'restore of judge_u.c failed' shar_count="`wc -c < 'judge_u.c'`" test 7474 -eq "$shar_count" || echo "judge_u.c: original size 7474, current size $shar_count" fi # ============= srch.h ============== if test -f 'srch.h' && test X"$1" != X"-c"; then echo 'x - skipping srch.h (file already exists)' else echo 'x - extracting srch.h (text)' sed 's/^X//' << 'SHAR_EOF' > 'srch.h' && #include #include #include X #define COMPARISON_ERROR 1 #define MAXTESTS 50 #define MAX_WLEN 24 #define MAX_SPAN 25 X const char Wordfile[] = "word.lst"; X typedef enum { FAIL, SUCCESS } Rflag; X /*********************PROTOTYPES***********************************/ Rflag l_search( char *search_word, FILE *fp ); Rflag b_search( char *search_word, FILE *fp, long left, long right ); Rflag lookup( char *test_word ); SHAR_EOF $shar_touch -am 0605230698 'srch.h' && chmod 0644 'srch.h' || echo 'restore of srch.h failed' shar_count="`wc -c < 'srch.h'`" test 443 -eq "$shar_count" || echo "srch.h: original size 443, current size $shar_count" fi # ============= judge ============== if test -f 'judge' && test X"$1" != X"-c"; then echo 'x - skipping judge (file already exists)' else echo 'x - extracting judge (text)' sed 's/^X//' << 'SHAR_EOF' > 'judge' && #!/usr/bin/wish -f # ^^^^^^^^^^^^ # Change the path to wish, if different on your system! X X X # Globals set file_ref_no 0 set windowON 0 set window_ref_no 0 set print_lines 4 # number of lines to print out from log file X label .label00 -text "Judge" label .label01 -text "Word Adjudicator" X label .label1 -text "Challenged Word" entry .entry1 -width 20 -relief sunken -bd 2 -textvariable word X message .msg1 -width 7c -justify left -relief raised -bd 2 \ X -font -Adobe-Helvetica-Bold-R-Normal--*-80-* \ X -text "Enter challenged word, then click red bar." X message .msgcpr -width 7c -justify left -relief raised -bd 2 \ X -font -Adobe-Helvetica-Medium-R-Normal--*-80-* \ X -text "(c) 1998 by M. Leo Cooper X released under terms of the GPL, with no warranty." X X pack .label00 -side top -padx 0m -pady 0m pack .label01 -side top -padx 0m -pady 1m pack .msgcpr -side top -pady 2m pack .label1 .entry1 -side top -padx 1m -pady 1m X X button .b -background #F04000 -foreground #FFFB91 \ -text "Look Up Word" -command {CreateFile $word} X button .bb -background #2060A0 -foreground #9FD5D0 \ -text "Print Last Entry" -command {Printout} X button .c -background #F00090 -foreground #FFF7FF \ -text "Exit" -command exit X pack .msg1 .b .bb .c -fill x X # =================================================== X X proc CreateFile {word} { X global file_ref_no window_ref_no windowON X set t 0 X set valid [exec judge_u $word] X X X if {$windowON} { X set t $window_ref_no X incr t -1 X destroy .msg2$t X destroy .msg3$t X } X X message .msg2$window_ref_no -width 7c -justify left -relief raised -bd 2 \ X -bg green -font -Adobe-Helvetica-Medium-R-Normal--*-140-* \ X -text "Accept" X message .msg3$window_ref_no -width 7c -justify left -relief raised -bd 2 \ X -bg red -font -Adobe-Helvetica-Medium-R-Normal--*-140-* \ X -text "Reject" X X X if {$valid} { X pack .msg2$window_ref_no -fill x X } else { X pack .msg3$window_ref_no -fill x X } X incr window_ref_no X set windowON 1 X X if {$file_ref_no > 0} { X destroy .d$file_ref_no X } X incr file_ref_no X X button .d$file_ref_no -background #00E0A0 -foreground black \ X -text "View Log" -command {Loadfile judge.log} X pack .d$file_ref_no -fill x X } X X text .txt -height 12 -width 24 -relief raised -bd 2 \ X -yscrollcommand ".scroll set" scrollbar .scroll -command ".txt yview" pack .scroll -side right -fill y pack .txt -side left X proc Loadfile {file} { X if {$file == ""} { X set file judge.log X } X .txt delete 1.0 end X set fptr [open $file] X while {![eof $fptr]} { X .txt insert end [read $fptr 1000] X } X close $fptr } X proc Printout {} { X global print_lines X exec tail -$print_lines judge.log | lpr } SHAR_EOF $shar_touch -am 0605230698 'judge' && chmod 0755 'judge' || echo 'restore of judge failed' shar_count="`wc -c < 'judge'`" test 2883 -eq "$shar_count" || echo "judge: original size 2883, current size $shar_count" fi # ============= COPYING ============== if test -f 'COPYING' && test X"$1" != X"-c"; then echo 'x - skipping COPYING (file already exists)' else echo 'x - extracting COPYING (text)' sed 's/^X//' << 'SHAR_EOF' > 'COPYING' && X GNU GENERAL PUBLIC LICENSE X Version 2, June 1991 X X Copyright (C) 1989, 1991 Free Software Foundation, Inc. X 59 Temple Place, Suite 330 X Boston, MA 02111-1307 USA X X Everyone is permitted to copy and distribute verbatim copies X of this license document, but changing it is not allowed. X X Preamble X X The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. X X When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. X X To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. X X For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. X X We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. X X Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. X X Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. X X The precise terms and conditions for copying, distribution and modification follow. X X GNU GENERAL PUBLIC LICENSE X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION X X 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". X Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. X X 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. X You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. X X 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: X X a) You must cause the modified files to carry prominent notices X stating that you changed the files and the date of any change. X X b) You must cause any work that you distribute or publish, that in X whole or in part contains or is derived from the Program or any X part thereof, to be licensed as a whole at no charge to all third X parties under the terms of this License. X X c) If the modified program normally reads commands interactively X when run, you must cause it, when started running for such X interactive use in the most ordinary way, to print or display an X announcement including an appropriate copyright notice and a X notice that there is no warranty (or else, saying that you provide X a warranty) and that users may redistribute the program under X these conditions, and telling the user how to view a copy of this X License. (Exception: if the Program itself is interactive but X does not normally print such an announcement, your work based on X the Program is not required to print an announcement.) X These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. X Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. X In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. X X 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: X X a) Accompany it with the complete corresponding machine-readable X source code, which must be distributed under the terms of Sections X 1 and 2 above on a medium customarily used for software interchange; or, X X b) Accompany it with a written offer, valid for at least three X years, to give any third party, for a charge no more than your X cost of physically performing source distribution, a complete X machine-readable copy of the corresponding source code, to be X distributed under the terms of Sections 1 and 2 above on a medium X customarily used for software interchange; or, X X c) Accompany it with the information you received as to the offer X to distribute corresponding source code. (This alternative is X allowed only for noncommercial distribution and only if you X received the program in object code or executable form with such X an offer, in accord with Subsection b above.) X The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. X If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. X X 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. X X 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. X X 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. X X 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. X If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. X It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. X This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. X X 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. X X 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. X Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. X X 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. X X NO WARRANTY X X 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. X X 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. X X END OF TERMS AND CONDITIONS X X How to Apply These Terms to Your New Programs X X If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. X X To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. X X X Copyright (C) 19yy X X This program is free software; you can redistribute it and/or modify X it under the terms of the GNU General Public License as published by X the Free Software Foundation; either version 2 of the License, or X (at your option) any later version. X X This program is distributed in the hope that it will be useful, X but WITHOUT ANY WARRANTY; without even the implied warranty of X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the X GNU General Public License for more details. X X You should have received a copy of the GNU General Public License X along with this program; if not, write to the Free Software X Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA X X Also add information on how to contact you by electronic and paper mail. X If the program is interactive, make it output a short notice like this when it starts in an interactive mode: X X Gnomovision version 69, Copyright (C) 19yy name of author X Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. X This is free software, and you are welcome to redistribute it X under certain conditions; type `show c' for details. X The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. X You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: X X Yoyodyne, Inc., hereby disclaims all copyright interest in the program X `Gnomovision' (which makes passes at compilers) written by James Hacker. X X , 1 April 1989 X Ty Coon, President of Vice X This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. X SHAR_EOF $shar_touch -am 0606171498 'COPYING' && chmod 0600 'COPYING' || echo 'restore of COPYING failed' shar_count="`wc -c < 'COPYING'`" test 18122 -eq "$shar_count" || echo "COPYING: original size 18122, current size $shar_count" fi exit 0