Pretty up alg.c

It is now compilable and produces no warnings with
	`clang -std=c89 -ansi -pedantic'

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>