Fix compilation and README of 2006/borsanyi

The Makefile needs -lpthread because not all systems implicitly link it
in. I tentatively noted this fix in the README.md but I'm not sure about
it as it's nothing special at all.

Format fix README.md. I note that I could not add <>s to the email
address as for some reason (in particular the dot in the email early on)
caused rdiscount (or I think - vim syntax certainly had a problem).
This commit is contained in:
Cody Boone Ferguson committed 2023-04-30 07:16:02 -07:00
1 parent 992e8a3f54
commit f2a98a2ed3
2 files changed
+27 -23

No files matched your search

+1 -1
View File
@@ -73,7 +73,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
# Libraries needed to build # Libraries needed to build
# #
LIBS= LIBS= -lpthread
# C compiler to use # C compiler to use
# #
+26 -22
View File
@@ -1,12 +1,8 @@
# Most Useful # Most Useful
Szabolcs Borsanyi Szabolcs Borsanyi
Department of Physics and Astronomy United Kingdom
University of Sussex s.borsanyi at sussex dot ac dot uk
Brighton
East Sussex BN1 9QH
United Kingdom
s.borsanyi at sussex dot ac dot uk
## To build: ## To build:
@@ -14,6 +10,10 @@
make make
``` ```
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed (the Makefile)
under some systems where the `lpthread` was not implicitly linked in. Thank you
Cody!
## To run: ## To run:
```sh ```sh
@@ -46,24 +46,27 @@ anti-CAPTCHA tools.
Most spam robots collect email addresses from the web sites of Most spam robots collect email addresses from the web sites of
innocent people, like you. Conference organizers cannot disclose innocent people, like you. Conference organizers cannot disclose
the participant's address to prevent malicious users from the participant's address to prevent malicious users from
grabbing them. One solution is to write as my_email _at_ address grabbing them. One solution is to write as `my_email _at_ address
_dot_ com. But robots are clever enough to sort that out. A _dot_ com`. But robots are clever enough to sort that out. A
more sophisticated approach is to create an image file with the more sophisticated approach is to create an image file with the
email address and put that on the web page. email address and put that on the web page.
This program creates a GIF image file from the address given This program creates a GIF image file from the address given in the command
in the command line. To avoid complications with patent issues line. To avoid complications with patent issues the [LZW
the LZW compression feature is not used. A typical email address compression](https://en.wikipedia.org/wiki/Lempel-Ziv-Welch) feature is not
is stored in less than 1-2 kilobytes. used. A typical email address is stored in less than 1-2 kilobytes.
### Usage: ### Usage:
$ gcc email.c -lpthread -o email ```sh
$ ./email my@email.address.com > email.gif make all
$ my_favourite_gif_viewer email.gif ./borsanyi my@example.com > email.gif
my_favourite_gif_viewer email.gif
```
The address cannot be longer than 42 characters, and may consist of The address cannot be longer than 42 characters, and may consist of
the characters: a-z_A-Z0-9@.- the characters: `a-z_A-Z0-9@.-`.
The program is (like email addresses are) case insensitive. The program is (like email addresses are) case insensitive.
### Obfuscation: ### Obfuscation:
@@ -73,26 +76,27 @@ entry supports up to 25 cores. The odd names in the bottom
part of the program do have a meaning, they are not there just part of the program do have a meaning, they are not there just
for obfuscation. The preprocessor is used to keep the program for obfuscation. The preprocessor is used to keep the program
small, in fact, everything is a macro. Are you familiar with small, in fact, everything is a macro. Are you familiar with
the GIF format? Studying this program will give you a (very the GIF format? Studying this program will give you a (very)
little) insight. little insight.
### Questions: ### Questions:
After analyzing the source code, try to answer these questions: After analyzing the source code, try to answer these questions:
1. How can you add a further supported symbol? 1. How can you add a further supported symbol?
2. Can you alter the look of the output characters? 2. Can you alter the look of the output characters?
3. What limits the number of input characters to 42? 3. What limits the number of input characters to 42?
### Portability: ### Portability:
The program uses posix threads (using the linker flag -lpthread). The program uses posix threads (using the linker flag `-lpthread`).
The program accepts email addresses not longer than 42 bytes The program accepts email addresses not longer than 42 bytes
composed from letters, digits, and the @._- symbols. An address composed from letters, digits, and the `@._-` symbols. An address
not obeying these rules will cause undefined behaviour. The not obeying these rules will cause undefined behaviour. The
program is not expected to depend on endianness. The standard program is not expected to depend on endianness. The standard
output is used for a binary output, which might cause problems. output is used for a binary output, which might cause problems.
To avoid most caveats, the program does not output the octet To avoid most caveats, the program does not output the octet
0x0a. The program assumes the use of ASCII. `0x0a`. The program assumes the use of ASCII.
## Copyright and CC BY-SA 4.0 License: ## Copyright and CC BY-SA 4.0 License: