Oneword This is a silly little program which I was requested to write several years ago by a classmate with the purpose of writing a story one word at a time. Users type one word each, and their words are collected into a story. The program prevents a user from entering two words in succession. The number of each user is also logged so that statistics may be computed, and in case of a dispute it is possible to find out which user entered each word. I make no guarantees about portability, but this program contains rather little in the way of system-dependent calls, except for the ioctl which determines the terminal width. The four file names at the start of the program should be changed as appropriate, then the program should be compiled as usual, for example with this command. cc -O -o oneword oneword.c In order for the program to be able to write to its files, either the files must be made world-writable or the program must be made set-uid. The latter solution prevents unauthorised users from altering the files. In order to initialise the program, you should echo a word *without a trailing space or newline* to the word file, and your uid number, with a trailing space, to the worduser file. Also echo your uid to the lastuser file. The easiest way to print out the word file is to call oneword, since it formats the text to your display width. The words are stored in sequence separated by spaces. A newline character in the wordfile indicates the end of a sentence. The format of the worduser file is just a sequence of numbers.