annotate rogue4/findpw.c @ 12:9535a08ddc39

Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
author edwarj4
date Sat, 24 Oct 2009 16:52:52 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
1 /*
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
2 * print out an encrypted password on the standard output
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
3 *
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
4 * @(#)findpw.c 1.1 (Berkeley) 12/20/81
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
5 *
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
6 * Rogue: Exploring the Dungeons of Doom
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
7 * Copyright (C) 1980, 1981, 1982 Michael Toy, Ken Arnold and Glenn Wichman
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
8 * All rights reserved.
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
9 *
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
10 * See the file LICENSE.TXT for full copyright and licensing information.
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
11 */
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
12
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
13 #include <stdio.h>
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
14
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
15 main()
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
16 {
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
17 char buf[80];
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
18
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
19 fprintf(stderr, "Password: ");
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
20 fgets(buf, 80, stdin);
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
21 buf[strlen(buf) - 1] = '\0';
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
22 printf("%s\n", xcrypt(buf, "mT"));
9535a08ddc39 Import Rogue 5.2 from the Roguelike Restoration Project (r1490)
edwarj4
parents:
diff changeset
23 }