From d106ce7d51248eeb44aec65a47303e8df14dc282 Mon Sep 17 00:00:00 2001
From: Raphael Boucherie <raphael.boucherie@inria.fr>
Date: Fri, 7 Apr 2017 14:19:11 +0200
Subject: [PATCH] removed functions for drawing from libhqr header, added
 matrice for testing treedraw

---
 include/libhqr.h            | 10 ----------
 src/treedraw.c              |  9 +++++++++
 testings/testing_treewalk.c |  2 +-
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/include/libhqr.h b/include/libhqr.h
index 8850141..d724e48 100644
--- a/include/libhqr.h
+++ b/include/libhqr.h
@@ -195,16 +195,6 @@ void libhqr_hqr_finalize( libhqr_tree_t *qrtree );
 
 void libhqr_treewalk(const libhqr_tree_t *qrtree,int k);
 
-/*
- * function for treedraw
- */
-void libhqr_writeheader();
-void libhqr_writecss();
-void libhqr_writeend();
-void libhqr_drawTT(int x, int y, int k);
-void libhqr_drawTS(int x, int y);
-void libhqr_drawline(int x1, int y1, int x2, int y2);
-
 /*
  * Debugging functions
  */
diff --git a/src/treedraw.c b/src/treedraw.c
index 2fd52ff..5ffa182 100644
--- a/src/treedraw.c
+++ b/src/treedraw.c
@@ -28,6 +28,15 @@ void libhqr_writeheader(FILE *tree){
     if(fprintf(tree, "<svg width=\"2000\" height=\"2000\" version=\"1.1\" \n xmlns=\"http://www.w3.org/2000/svg\">\n") <0) return;
 }
 
+/*
+ * Common prameters to the 2 following functions:
+ *    x - Parameter x for the x-axis
+ *    y - Parameter y for the y-axis
+ *    w - Parameter w for the width
+ *    h - Parameter h for the height
+ *    k - Factorization step for the color
+ */
+
 void libhqr_drawTT(int x, int y, int w, int h, int k, FILE *tree){
     switch (k % 4){
     case 0 :
diff --git a/testings/testing_treewalk.c b/testings/testing_treewalk.c
index af45747..2224a9a 100644
--- a/testings/testing_treewalk.c
+++ b/testings/testing_treewalk.c
@@ -23,7 +23,6 @@ main(int argc, char ** argv)
     libhqr_tree_t qrtree;
     libhqr_tiledesc_t matrix;
     int minMN, k, rc ;
-
     /*
      * Test treewalk for HQR trees
      */
@@ -31,6 +30,7 @@ main(int argc, char ** argv)
     matrix.p = 1;
     matrix.mt = 4;
     matrix.nt = 13;
+    int matrix2[matrix.mt][matrix.nt];
     libhqr_hqr_init( &qrtree, LIBHQR_QR, &matrix, -1 , -1 , -1 , -1, 0, 0);
     minMN = libhqr_imin(matrix.mt, matrix.nt );
     rc = libhqr_tree_check( &matrix, &qrtree );
-- 
GitLab