Mercurial > hg > early-roguelike
comparison rogue4/mdport.c @ 304:e52a8a7ad4c5
Fix many compiler warnings.
There should only be two changes in behavior:
arogue7/fight.c, arogue7/fight.c: a to-hit bonus is now correctly
applied to characters who are not monks instead of monks who are not
empty-handed.
urogue/fight.c: fixed an interaction with the "debug" macro that could
cause the wrong message to be displayed.
| author | John "Elwin" Edwards |
|---|---|
| date | Wed, 14 Apr 2021 18:55:33 -0400 |
| parents | 5b6855d5d089 |
| children |
comparison
equal
deleted
inserted
replaced
| 303:e06ebc407615 | 304:e52a8a7ad4c5 |
|---|---|
| 108 #if defined(__CYGWIN__) || defined(__MSYS__) | 108 #if defined(__CYGWIN__) || defined(__MSYS__) |
| 109 ESCDELAY=250; | 109 ESCDELAY=250; |
| 110 #endif | 110 #endif |
| 111 } | 111 } |
| 112 | 112 |
| 113 #ifdef _WIN32 | |
| 113 static int md_standout_mode = 0; | 114 static int md_standout_mode = 0; |
| 115 #endif | |
| 114 | 116 |
| 115 void | 117 void |
| 116 md_raw_standout(void) | 118 md_raw_standout(void) |
| 117 { | 119 { |
| 118 #ifdef _WIN32 | 120 #ifdef _WIN32 |
| 407 /* | 409 /* |
| 408 * Set back to original user, just in case | 410 * Set back to original user, just in case |
| 409 */ | 411 */ |
| 410 setuid(getuid()); | 412 setuid(getuid()); |
| 411 setgid(getgid()); | 413 setgid(getgid()); |
| 412 execl(sh == NULL ? "/bin/sh" : sh, "shell", "-i", 0); | 414 execl(sh == NULL ? "/bin/sh" : sh, "shell", "-i", (char *) NULL); |
| 413 perror("No shelly"); | 415 perror("No shelly"); |
| 414 _exit(-1); | 416 _exit(-1); |
| 415 } | 417 } |
| 416 else /* Application */ | 418 else /* Application */ |
| 417 { | 419 { |
| 588 #endif | 590 #endif |
| 589 { | 591 { |
| 590 avg[0] = avg[1] = avg[2] = 0.0; | 592 avg[0] = avg[1] = avg[2] = 0.0; |
| 591 return -1; | 593 return -1; |
| 592 } | 594 } |
| 595 return 3; | |
| 593 } | 596 } |
| 594 | 597 |
| 595 long | 598 long |
| 596 md_random(void) | 599 md_random(void) |
| 597 { | 600 { |
