Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 11ee1bc5 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Add common.c/comm.h into testings and restructure headers

parent 908f904e
No related branches found
No related tags found
1 merge request!7Cleanup
......@@ -18,8 +18,8 @@
#ifndef _LIBHQR_H_
#define _LIBHQR_H_
#include "common.h"
#include <stdio.h>
#include "libhqr_common.h"
BEGIN_C_DECLS
......
/**
*
* @file common.h
* @file libhqr_common.h
*
* Header file for common macro
*
* @copyright 2010-2017 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
*
* @copyright 2012-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* @copyright 2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
* @version 1.0.0
......@@ -17,8 +13,8 @@
* @date 2017-04-05
*
*/
#ifndef _COMMON_H_
#define _COMMON_H_
#ifndef _LIBHQR_COMMON_H_
#define _LIBHQR_COMMON_H_
#undef BEGIN_C_DECLS
#undef END_C_DECLS
......@@ -30,4 +26,4 @@
# define END_C_DECLS /* empty */
#endif
#endif /* _COMMON_H_ */
#endif /* _LIBHQR_COMMON_H_ */
/**
*
* @file libdraw.h
* @file libhqr_draw.h
*
* Header file for all the functions of drawing.
*
* @copyright 2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* @copyright 2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
* @version 1.0.0
......@@ -14,10 +14,11 @@
*
**/
#ifndef _LIBDRAW_H_
#define _LIBDRAW_H_
#ifndef _LIBHQR_DRAW_H_
#define _LIBHQR_DRAW_H_
#include "libhqr_common.h"
#include "common.h"
BEGIN_C_DECLS
#define WIDTH 50
......@@ -42,4 +43,4 @@ void libhqr_drawline(int x1, int y1, int x2, int y2, int k, FILE *file);
END_C_DECLS
#endif /* _LIBDRAW_H_ */
#endif /* _LIBHQR_DRAW_H_ */
/**
*
* @file queue.h
* @file libhqr_queue.h
*
* Queue module for the treewalk algorithm.
*
* @copyright 2012-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* @copyright 2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
* @version 1.0.0
......@@ -13,10 +13,10 @@
* @date 2017-03-21
*
*/
#ifndef _QUEUE_H_
#define _QUEUE_H_
#ifndef _LIBHQR_QUEUE_H_
#define _LIBHQR_QUEUE_H_
#include "common.h"
#include "libhqr_common.h"
BEGIN_C_DECLS
......@@ -34,4 +34,4 @@ void libhqr_queue_tile_delete(libhqr_queue_tile_t ** queue_tile);
END_C_DECLS
#endif /* _QUEUE_H_ */
#endif /* _LIBHQR_QUEUE_H_ */
......@@ -13,7 +13,7 @@
* @date 2017-04-05
*
*/
#include "queue.h"
#include "libhqr_queue.h"
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
......
......@@ -16,7 +16,7 @@
#include <string.h>
#include <stdio.h>
#include "libdraw.h"
#include "libhqr_draw.h"
/*
* Global array for color
......
......@@ -15,8 +15,8 @@
*/
#include "libhqr.h"
#include "libdraw.h"
#include "queue.h"
#include "libhqr_draw.h"
#include "libhqr_queue.h"
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
......
......@@ -8,6 +8,9 @@
# @date 2017-04-26
#
###
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set(TESTINGS
testing_pivgen.c
testing_tileinit.c
......@@ -16,7 +19,8 @@ set(TESTINGS
foreach (_file ${TESTINGS})
get_filename_component(_name_we ${_file} NAME_WE)
add_executable(${_name_we} ${_file})
add_executable(${_name_we}
${_file} common.c)
target_link_libraries(${_name_we} hqr)
install(TARGETS ${_name_we} RUNTIME DESTINATION examples )
......
......@@ -17,11 +17,12 @@
* @date 2017-03-21
*
*/
#include "libhqr.h"
#include <stdlib.h>
#include <stdio.h>
#include "libhqr.h"
int main(int argc, char ** argv)
int
main(int argc, char ** argv)
{
libhqr_tree_t qrtree;
libhqr_tiledesc_t matrix;
......
/**
*
* @file testting_tileinit.c
* @file testing_tileinit.c
*
* Testing file for the functions stocking the informations of the tiles
*
......@@ -13,8 +13,6 @@
* @date 2017-04-18
*
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
......
......@@ -13,13 +13,11 @@
* @date 2017-04-04
*
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "libdraw.h"
#include "libhqr.h"
#include "libhqr_draw.h"
int
main(int argc, char ** argv)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment