removed C99 features
typos fixed
#include "config.h"
#endif
#include "config.h"
#endif
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "sp_matrix.h"
#include "list.h"
#include <assert.h>
#include "sp_matrix.h"
#include "list.h"
/**
* Allocates space for @p count entries in the rows array and
/**
* Allocates space for @p count entries in the rows array and
- * intitializes all entries from @p start to the end.
+ * inititializes all entries from @p start to the end.
*/
static INLINE void _m_alloc_row(sp_matrix_t *m, int start, int count) {
int p;
*/
static INLINE void _m_alloc_row(sp_matrix_t *m, int start, int count) {
int p;
/**
* Allocates space for @p count entries in the cols array and
/**
* Allocates space for @p count entries in the cols array and
- * intitializes all entries from @p start to the end.
+ * inititializes all entries from @p start to the end.
*/
static INLINE void _m_alloc_col(sp_matrix_t *m, int start, int count) {
int p;
*/
static INLINE void _m_alloc_col(sp_matrix_t *m, int start, int count) {
int p;
/* kill all double-entries (Mij and Mji are set) */
matrix_foreach(m, e) {
/* kill all double-entries (Mij and Mji are set) */
matrix_foreach(m, e) {
assert(e->row != e->col && "Root has itself as arg. Ok. But the arg (=root) will alwazs have the same color as root");
assert(e->row != e->col && "Root has itself as arg. Ok. But the arg (=root) will alwazs have the same color as root");
- int t_val = matrix_get(m, e->col, e->row);
+ t_val = matrix_get(m, e->col, e->row);
if (t_val) {
matrix_set(m, e->col, e->row, 0);
matrix_set(m, e->row, e->col, e->val + t_val);
if (t_val) {
matrix_set(m, e->col, e->row, 0);
matrix_set(m, e->row, e->col, e->val + t_val);