Files
ioccc/1989
Landon Curt Noll 657a0be130 add tool to sort .gitignore content
We sort with lines starting with # first.
We sort with lines starting with * second.
We sort with lines that do not start with [#!*] third.
We sort with lines starting with ! fourth.

Example usage in vim with a keyboard macro <escape>f:

```vim
:map ^[f 1G!G../../bin/sgi^M
```

 or via .vimrc:

```vimrc
" sort the entire .gitignore file using ../../bin/sgi
:map  ^[f 1G!G../../bin/sgi^M
```

 NOTE: The ^[ above is ((Escape)) and ^M is ((Control-M)).

Example usage in shell:

```sh
rm -f t && ../../bin/sgi < .gitignore > t && mv -f t .gitignore
```

Suggested usage:

```sh
bin/all-run.sh bin/sort.gitignore -v 1
```

Sorted all winner .gitignore according to this method.
Sorted all year level .gitignore according to this method.
Sorted top level .gitignore according to this method.
2024-02-01 14:35:49 -08:00
..
2024-02-01 14:35:49 -08:00
2024-02-01 14:35:49 -08:00
2024-02-01 14:35:49 -08:00
2024-02-01 14:35:49 -08:00
2024-02-01 14:35:49 -08:00
2024-02-01 14:35:49 -08:00
2020-12-30 16:57:03 -08:00
2023-12-26 09:00:03 -08:00

1989 marked the "The Sixth International Obfuscated C Code Contest"

Look at the README.md file for the given winning entry for information on how to compile it and how to run the winning program. Look at the winning source and try to figure how it does what it does! You may then wish to look at the Author's remarks for even more details.

Instructions for use: Run make to compile entries (it is possible that on System V or non-Unix systems the Makefile needs to be changed).

This year, the Grand Prize was given to the most useful program.

The "Strangest abuse of the rules" award was given this year to stress the fact that starting in 1990, compiling entries must result an executable regular file.

The Makefile always uses the portable version of the "Best self modifying program" because there is no loss of functionality in using it. In the case of the "Best game" winner, however, some functionality is lost in the portable version and so the Makefile uses the original program. System V users may need to change the Makefile to use the s5 version. See the hint files or the Makefile for details.

Rules and results were posted to comp.lang.c, comp.sources.unix, and alt.sources. They have been made available on a wide number of USENET archive sites such as uunet. The 1989 winners will be published in the Micro/Systems Journal.

Final Comments

IMPORTANT NOTE: See contact.html for up to date contact details as well as details on how to provide fixes to any of the entries. See also the IOCCC FAQ for addition information on the IOCCC.

Copyright and License

Copyright (c) 1989,2023, Landon Curt Noll and Larry Bassel. All Rights Reserved. This work is licensed under a Creative Commons CC BY-SA 4.0 DEED Attribution-ShareAlike 4.0 International license. If you do use this work in some form, the IOCCC judges would appreciate (but does not require) if you were to send us a note about your use.