Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 4 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 26, 2012
@tung CS78: Fail hard w/ too many DLB files; grow limit dd08491
@tung Use lev->z instead of u.uz for CS10. Fixes #1.
There might be a few other places where I've accidentally used u.uz
instead of lev->z. I'll have to check later.
c492c74
@tung CS58: Silence compiler warnings
This changeset in UnNetHack affects a few other places, but here it only
affects the iron safe code from CS56.

Fixes #2.
2c56b1f
@tung Don't output '-e' in launch script on Ubuntu
This suppresses an error where the launch script contains an extra '-e'
when built on Ubuntu.

The CMake file spits out 'echo -e ...' to the shell script generating
makefile, which runs under /bin/sh. /bin/sh links to dash, not bash, on
Ubuntu, and dash's echo doesn't accept '-e' as an option.

In short: echo is not portable between shells, but printf is.
1e0f243
View
2  libnitrohack/src/apply.c
@@ -174,7 +174,7 @@ static boolean its_dead(int rx, int ry, int *resp, struct obj *tobj)
}
/* Using a stethoscope on a safe may crack the safe open. */
- if (otmp = sobj_at(IRON_SAFE, level, rx, ry)) {
+ if ((otmp = sobj_at(IRON_SAFE, level, rx, ry))) {
pick_lock(tobj, rx, ry);
return TRUE;
}
View
2  libnitrohack/src/lock.c
@@ -274,7 +274,7 @@ int pick_lock(struct obj *pick, int rx, int ry)
/* Very clumsy special case for this, but forcing the player to
* a)pply > just to open a safe, when a)pply . works in all other cases? */
- if (cc.x == u.ux && cc.y == u.uy || picktyp == STETHOSCOPE) { /* pick lock on a container */
+ if ((cc.x == u.ux && cc.y == u.uy) || picktyp == STETHOSCOPE) { /* pick lock on a container */
const char *verb;
boolean it;
int count;
View
2  libnitrohack/src/mkmaze.c
@@ -343,7 +343,7 @@ static void fixup_special(struct level *lev)
} else {
s_level *sp;
if (strcmp("random_plane", r->rname.str) == 0)
- sp = get_next_elemental_plane(&u.uz);
+ sp = get_next_elemental_plane(&lev->z);
else
sp = find_level(r->rname.str);
lvl = sp->dlevel;
View
6 libnitrohack/util/dlb_main.c
@@ -37,7 +37,7 @@ static const char *list_file = LIBLISTFILE;
#define O_BINARY 0
#endif
-#define MAX_DLB_FILES 200 /* max # of files we'll handle */
+#define MAX_DLB_FILES 250 /* max # of files we'll handle */
#define DLB_VERS 1 /* version of dlb file we will write */
/*
@@ -297,7 +297,7 @@ int main(int argc, char *argv[])
if (nfiles >= MAX_DLB_FILES) {
printf("Too many dlb files! Stopping at %d.\n",
MAX_DLB_FILES);
- break;
+ xexit(EXIT_FAILURE);
}
ld[nfiles].fname = malloc(strlen(argv[ap]) + 1);
strcpy(ld[nfiles].fname, argv[ap]);
@@ -317,7 +317,7 @@ int main(int argc, char *argv[])
if (nfiles >= MAX_DLB_FILES) {
printf("Too many dlb files! Stopping at %d.\n",
MAX_DLB_FILES);
- break;
+ xexit(EXIT_FAILURE);
}
*(eos(buf)-1) = '\0'; /* strip newline */
ld[nfiles].fname = malloc(strlen(buf) + 1);
View
2  nitrohack/CMakeLists.txt
@@ -89,7 +89,7 @@ add_dependencies (nitrohack_curses libnitrohack)
if (UNIX)
add_custom_command(OUTPUT nitrohack.sh
- COMMAND echo -e "#!/bin/sh\\nLD_LIBRARY_PATH=${LIBDIR} ${BINDIR}/nitrohack $@" >> nitrohack.sh
+ COMMAND printf "%s\\n%s\\n" "#!/bin/sh" "LD_LIBRARY_PATH=${LIBDIR} ${BINDIR}/nitrohack $@" >> nitrohack.sh
VERBATIM)
add_custom_target(nitrohack_curses_shell_script ALL
DEPENDS nitrohack.sh)

No commit comments for this range

Something went wrong with that request. Please try again.