diff -u ./misc.c ../dominion-2.8.2-new/misc.c
old
|
new
|
|
26 | 26 | /* int interrupt() - handles interupts */ |
27 | 27 | /* show_nation(np) - displays a nation's characteristics */ |
28 | 28 | /* free_nation_mark(wp,c) - tell us if the symbol is available */ |
29 | | /* getline(s,n) - read a line from stdin, remove \n */ |
| 29 | /* getline_internal(s,n) - read a line from stdin, remove \n */ |
30 | 30 | /* get_crypt_pass(prompt,s,w) - get password and encrypt */ |
31 | 31 | /* critical() - while writing, don't bug me!! */ |
32 | 32 | /* noncritical() - normal operation */ |
… |
… |
|
161 | 161 | return 1; |
162 | 162 | } |
163 | 163 | |
164 | | void getline(char s[], int n) /* read a line from stdin, remove \n */ |
| 164 | void getline_internal(char s[], int n) /* read a line from stdin, remove \n */ |
165 | 165 | { |
166 | 166 | fgets(s, n, stdin); |
167 | 167 | if (s[strlen(s)-1] == '\n') { /* remove \n if it is there */ |
diff -u ./printmap.c ../dominion-2.8.2-new/printmap.c
old
|
new
|
|
470 | 470 | |
471 | 471 | read_world(&world, WORLD_FILE); |
472 | 472 | fprintf(stderr, "Enter nation name: "); |
473 | | getline(nation, NAMELEN); |
| 473 | getline_internal(nation, NAMELEN); |
474 | 474 | user.id = get_nation_id(nation); |
475 | 475 | get_crypt_pass("Your password: ", passwd, NULL, NULL); |
476 | 476 | if (strcmp(world.nations[user.id].passwd, passwd)) { |
diff -u ./proto.h ../dominion-2.8.2-new/proto.h
old
|
new
|
|
100 | 100 | int get_n_civil(Snation *np); |
101 | 101 | int free_nation_mark(Sworld *wp, Symbol c); |
102 | 102 | int get_n_soldiers(Snation *np); |
103 | | void getline(char s[], int n); |
| 103 | void getline_internal(char s[], int n); |
104 | 104 | void get_crypt_pass(char prompt[], char pass[], WINDOW *w, char def_pass[]); |
105 | 105 | void cpass(Snation *np, char pass[]); |
106 | 106 | int which_mark(int x, int y, Suser *up); |
diff -u ./user.c ../dominion-2.8.2-new/user.c
old
|
new
|
|
61 | 61 | if (!innation) |
62 | 62 | { |
63 | 63 | printf("which nation would you like to play? "); |
64 | | getline(nation, NAMELEN); |
| 64 | getline_internal(nation, NAMELEN); |
65 | 65 | } |
66 | 66 | if ((user.id = get_nation_id(nation)) == -1) { |
67 | 67 | printf ("\r\nnation does not exist, sorry\r\n"); |