Fixes in 1991/ant/README.md
Mostly formatting fixes but one spelling fix that I feel almost guilty about. Though programme is correct in most cases (except US English but the author is from Canada) with computers it's actually program. It just seems better to have this correct if I'm going to go through and look for typos. Besides this is a programming contest so it makes sense that it should be correct. Easy mistake to make but should it be fixed? Maybe, maybe not but I chose to anyway.
This commit is contained in:
1 parent
f95e8c6956
commit
637a43d841
1 file changed
+50
-49
+50
-49
@@ -1,26 +1,32 @@
|
|||||||
# Best Utility:
|
# Best Utility:
|
||||||
|
|
||||||
Anthony C Howe
|
Anthony C Howe
|
||||||
Mortice Kern Systems Inc. #CL-23
|
Mortice Kern Systems Inc. #CL-23
|
||||||
35 King St. N 268 Phillip St.
|
35 King St. N 268 Phillip St.
|
||||||
Waterloo, On Waterloo, On
|
Waterloo, On Waterloo, On
|
||||||
Canada, N2J 2W9 Canada, N2L 6G9
|
Canada, N2J 2W9 Canada, N2L 6G9
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
## To run:
|
## To run:
|
||||||
|
|
||||||
./ant some_file
|
```sh
|
||||||
|
./ant some_file
|
||||||
|
```
|
||||||
|
|
||||||
NOTE: the file must already exist and not specifying any arg will make the
|
NOTE: the file must already exist and not specifying any arg will make the
|
||||||
program exit without doing anything.
|
program exit without doing anything.
|
||||||
|
|
||||||
## Try:
|
## Try:
|
||||||
|
|
||||||
cp README.md hill
|
```sh
|
||||||
./ant hill
|
cp README.md hill
|
||||||
|
./ant hill
|
||||||
|
```
|
||||||
|
|
||||||
## Judges' comments:
|
## Judges' comments:
|
||||||
|
|
||||||
@@ -42,64 +48,59 @@ commands section for other commands.
|
|||||||
|
|
||||||
Ant's Editor vIOCCC91
|
Ant's Editor vIOCCC91
|
||||||
|
|
||||||
Text files consists of lines of printable text or tab characters.
|
Text files consists of lines of printable text or tab characters. A line can be
|
||||||
A line can be of arbitrary length and is delimited by either a
|
of arbitrary length and is delimited by either a newline or the end of file.
|
||||||
newline or the end of file. Carriage return is mapped to newline
|
Carriage return is mapped to newline on input and ignored on output. Tab stops
|
||||||
on input and ignored on output. Tab stops are every eight columns.
|
are every eight columns. Non-printable characters may have unpredictable
|
||||||
Non-printable characters may have unpredictable results depending
|
results depending on the implementation of `curses`.
|
||||||
on the implementation of CURSES.
|
|
||||||
|
|
||||||
### COMMANDS:
|
### COMMANDS:
|
||||||
|
|
||||||
h j k l left, down, up, right cursor movement
|
- h j k l left, down, up, right cursor movement
|
||||||
H J K L word left, page down, page up, word right
|
- H J K L word left, page down, page up, word right
|
||||||
[ ] beginning and end of line
|
- [ ] beginning and end of line
|
||||||
t b top and bottom of file
|
- t b top and bottom of file
|
||||||
i enter insert mode, formfeed to quit
|
- i enter insert mode, form-feed to quit
|
||||||
x delete character under the cursor
|
- x delete character under the cursor
|
||||||
W write buffer to file
|
- W write buffer to file
|
||||||
R refresh the screen
|
- R refresh the screen
|
||||||
Q quit
|
- Q quit
|
||||||
|
|
||||||
### EXIT STATUS:
|
### EXIT STATUS:
|
||||||
|
|
||||||
0 success
|
- 0 success
|
||||||
2 missing edit filename
|
- 2 missing edit filename
|
||||||
|
|
||||||
|
|
||||||
### ABOUT THIS ENTRY:
|
### ABOUT THIS ENTRY:
|
||||||
|
|
||||||
The BUF size should be set at compile time to 32767. This value
|
The BUF size should be set at compile time to 32767. This value was used
|
||||||
was used because the Sozobon C compiler for the Atari ST has 16
|
because the Sozobon C compiler for the Atari ST has 16 bit ints and a limit on
|
||||||
bit ints and a limit on the size of arrays & structures of 32k.
|
the size of arrays & structures of 32k. Also the WatCom C compiler for the PC
|
||||||
Also the WatCom C compiler for the PC also has 16 bits ints. On
|
also has 16 bits ints. On machines that have 32 bit ints (most unix boxes), a
|
||||||
machines that have 32 bit ints (most unix boxes), a larger value
|
larger value for BUF could be used.
|
||||||
for BUF could be used.
|
|
||||||
|
|
||||||
It is recommend that compact memory model be used on PC class
|
It is recommend that compact memory model be used on PC class machines. Small
|
||||||
machines. Small memory model may work too provided BUF is not
|
memory model may work too provided BUF is not too large.
|
||||||
too large.
|
|
||||||
|
|
||||||
The character constants '\b', '\f', '\n', '\r', '\t' are used
|
The character constants `'\b'`, `'\f'`, `'\n'`, `'\r'`, `'\t'` are used in order
|
||||||
in order to provide more portable code, since the compiler should
|
to provide more portable code, since the compiler should handle the translation
|
||||||
handle the translation of them into the native character set.
|
of them into the native character set. Note that `'\f'` (form-feed) was used to
|
||||||
Note that '\f' (formfeed) was used to exit insert mode because
|
exit insert mode because K&R C had no escape constant for the escape-key.
|
||||||
K&R C had no escape constant for the escape-key.
|
|
||||||
|
|
||||||
My goals for this project were to learn and experiment with the
|
My goals for this project were to learn and experiment with the
|
||||||
Buffer Gap Scheme [Fin80][net90], write a useful and *portable*
|
Buffer Gap Scheme [Fin80][net90], write a useful and *portable*
|
||||||
programme, and meet the requirements of the IOCCC. I initially
|
program, and meet the requirements of the IOCCC. I initially
|
||||||
planned to have a mini CURSES built-in like the IOCCC Tetris entry
|
planned to have a mini `curses` built-in like the IOCCC Tetris entry
|
||||||
from a previous year, however this was not as portable as using a
|
from a previous year, however this was not as portable as using a
|
||||||
CURSES library with TERMINFO/TERMCAP support.
|
`curses` library with `TERMINFO`/`TERMCAP` support.
|
||||||
|
|
||||||
I plan to post followups such as unobfuscated versions and bugs
|
I plan to post follow-ups such as unobfuscated versions and bugs fixes to
|
||||||
fixes to comp.editors. Reposts of the editor.101, gap.doc, and
|
comp.editors. Reposts of the editor.101, gap.doc, and editor.102 can be found
|
||||||
editor.102 can be found in the same group every so often.
|
in the same group every so often.
|
||||||
|
|
||||||
This entry will display a file with long lines, but has trouble
|
This entry will display a file with long lines, but has trouble scrolling the
|
||||||
scrolling the screen with long lines. Paging up and down should
|
screen with long lines. Paging up and down should work correctly, however.
|
||||||
work correctly, however.
|
|
||||||
|
|
||||||
### REFERENCES:
|
### REFERENCES:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user