Badges and mingw warnings

This commit is contained in:
Linus Probert 2017-12-21 12:35:52 +01:00
parent 433d907ae8
commit 618f28a519
6 changed files with 12 additions and 1 deletions

View File

@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.org/LiquidityC/breakhack.svg?branch=master)](https://travis-ci.org/LiquidityC/breakhack)
[![Build status](https://ci.appveyor.com/api/projects/status/2nvna97cmm4cf535?svg=true)](https://ci.appveyor.com/project/LiquidityC/breakhack)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fc02d56fa7194e61b2c7d260fd2e4186)](https://www.codacy.com/app/LiquidityC/breakhack?utm_source=github.com&utm_medium=referral&utm_content=LiquidityC/breakhack&utm_campaign=Badge_Grade)
Something in the ways of NETHACK

View File

@ -1,3 +1,4 @@
#include <stdlib.h>
#include "actiontext.h"
#include "util.h"

View File

@ -44,6 +44,8 @@ hash(Hashtable *table, const char *key)
unsigned long int hashval = 0;
unsigned int i = 0;
// TODO(Linus): This isn't very good,
// bad distribution on similar strings
while (hashval < ULONG_MAX && i < strlen(key)) {
hashval = hashval << 8;
hashval += key[i++];

View File

@ -1,3 +1,4 @@
#include <stdlib.h>
#include <assert.h>
#include "monster.h"
#include "util.h"

View File

@ -62,6 +62,8 @@ void roommatrix_populate_from_map(RoomMatrix *rm, Map *m)
}
}
// TODO(Linus): These should probably be macros
#undef min
#ifndef min
static int
min(int a, int b)
@ -70,6 +72,7 @@ min(int a, int b)
}
#endif // min
#undef max
#ifndef max
static int
max(int a, int b)

View File

@ -1,10 +1,13 @@
#include "defines.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef __MINGW32__
#include <string_s.h>
#endif // __MINGW32__
#ifndef _WIN32
#include <unistd.h>
#endif // _WIN32
#include <string.h>
#include "util.h"