From a6ed88e246618fceca306a555be5d444593c7617 Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Thu, 5 Oct 2017 19:16:20 +0200
Subject: [PATCH] Cleanup headers as much as possible

---
 drivers/laplacian.c   |  7 +++----
 drivers/laplacian.h   |  6 ++++--
 drivers/readhb.c      | 17 +++++++++--------
 drivers/readijv.c     | 23 +++++++++++------------
 drivers/readmm.c      | 37 ++++++++++++++++++-------------------
 drivers/readrsa.c     | 17 +++++++++--------
 integer_sort.c        | 15 +++++++++++++++
 integer_sort_mtypes.c | 15 +++++++++++++++
 spm.c                 |  8 ++++----
 spm_dof_extend.c      |  2 +-
 spm_io.c              |  4 ++--
 spm_read_driver.c     |  4 ++--
 z_spm_expand.c        |  4 ++--
 13 files changed, 95 insertions(+), 64 deletions(-)

diff --git a/drivers/laplacian.c b/drivers/laplacian.c
index eb66aeb7..d015b7b6 100644
--- a/drivers/laplacian.c
+++ b/drivers/laplacian.c
@@ -1,11 +1,10 @@
 /**
  * @file laplacian.c
  *
- *  This file contains the user routine to generate 1, 2 and 3 dimensional Laplacian
- *  matrices.
- *  $COPYRIGHTS$
+ * @copyright 2011-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+ *                      Univ. Bordeaux. All rights reserved.
  *
- * @version 1.0.0
+ * @version 6.0.0
  * @author Mathieu Faverge
  * @author Pierre Ramet
  * @author Xavier Lacoste
diff --git a/drivers/laplacian.h b/drivers/laplacian.h
index c08ebbda..a13e0065 100644
--- a/drivers/laplacian.h
+++ b/drivers/laplacian.h
@@ -1,9 +1,11 @@
 /**
+ *
  * @file laplacian.h
  *
- *  $COPYRIGHTS$
+ * @copyright 2011-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+ *                      Univ. Bordeaux. All rights reserved.
  *
- * @version 1.0.0
+ * @version 6.0.0
  * @author Mathieu Faverge
  * @author Theophile Terraz
  * @date 2011-11-11
diff --git a/drivers/readhb.c b/drivers/readhb.c
index a3245d6d..baae93da 100644
--- a/drivers/readhb.c
+++ b/drivers/readhb.c
@@ -1,9 +1,11 @@
 /**
+ *
  * @file readhb.c
  *
- *  $COPYRIGHTS$
+ * @copyright 2014-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+ *                      Univ. Bordeaux. All rights reserved.
  *
- * @version 1.0.0
+ * @version 6.0.0
  * @author Mathieu Faverge
  * @author Pierre Ramet
  * @author Xavier Lacoste
@@ -16,11 +18,11 @@
 #include "drivers/iohb.h"
 
 /**
- * ******************************************************************************
+ *******************************************************************************
  *
  * @ingroup pastix_spm_driver
  *
- * readHB - Interface to the Harwell-Boeing C driver (iohb.c)
+ * @brief Interface to the Harwell-Boeing C driver (iohb.c)
  *
  *******************************************************************************
  *
@@ -32,10 +34,9 @@
  *
  *******************************************************************************
  *
- * @return
- *      \retval PASTIX_SUCCESS if the matrix has been read successfully
- *      \retval PASTIX_ERR_IO if a problem occured in the Harwell Boeing driver
- *      \retval PASTIX_ERR_BADPARAMETER if the matrix is no in a supported format
+ * @retval PASTIX_SUCCESS if the matrix has been read successfully
+ * @retval PASTIX_ERR_IO if a problem occured in the Harwell Boeing driver
+ * @retval PASTIX_ERR_BADPARAMETER if the matrix is no in a supported format
  *
  *******************************************************************************/
 int
diff --git a/drivers/readijv.c b/drivers/readijv.c
index 473e4570..807ceecb 100644
--- a/drivers/readijv.c
+++ b/drivers/readijv.c
@@ -1,9 +1,11 @@
 /**
+ *
  * @file readijv.c
  *
- *  $COPYRIGHTS$
+ * @copyright 2014-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+ *                      Univ. Bordeaux. All rights reserved.
  *
- * @version 1.0.0
+ * @version 6.0.0
  * @author Mathieu Faverge
  * @author Pierre Ramet
  * @author Xavier Lacoste
@@ -20,7 +22,7 @@
  *
  * @ingroup pastix_spm_driver
  *
- * threeFilesReadHeader - Read header from three file IJV format.
+ * @brief Read header from three file IJV format.
  *
  *******************************************************************************
  *
@@ -38,9 +40,8 @@
  *
  *******************************************************************************
  *
- * @return
- *      \retval PASTIX_SUCCESS if the information has been read successfully
- *      \retval PASTIX_ERR_BADPARAMETER if the header has a wrong format
+ * @retval PASTIX_SUCCESS if the information has been read successfully
+ * @retval PASTIX_ERR_BADPARAMETER if the header has a wrong format
  *
  *******************************************************************************/
 int
@@ -69,7 +70,7 @@ threeFilesReadHeader(FILE         *infile,
  *
  * @ingroup pastix_spm_driver
  *
- * readIJV - Read matrix from three files IJV
+ * @brief Read matrix from three files IJV
  *
  * header file is "filename"/header
  * columns file is "filename"/ia_threeFiles
@@ -86,11 +87,9 @@ threeFilesReadHeader(FILE         *infile,
  *
  *******************************************************************************
  *
- * @return
- *      \retval PASTIX_SUCCESS if the matrix has been read successfully
- *      \retval PASTIX_ERR_IO if a problem occurs while reading the files
- *      \retval PASTIX_ERR_BADPARAMETER if a problem occurs while opening the
- *              files
+ * @retval PASTIX_SUCCESS if the matrix has been read successfully
+ * @retval PASTIX_ERR_IO if a problem occurs while reading the files
+ * @retval PASTIX_ERR_BADPARAMETER if a problem occurs while opening the files
  *
  *******************************************************************************/
 int
diff --git a/drivers/readmm.c b/drivers/readmm.c
index 6039cf15..b811cd9f 100644
--- a/drivers/readmm.c
+++ b/drivers/readmm.c
@@ -1,9 +1,11 @@
 /**
+ *
  * @file readmm.c
  *
- *  $COPYRIGHTS$
+ * @copyright 2011-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+ *                      Univ. Bordeaux. All rights reserved.
  *
- * @version 1.0.0
+ * @version 6.0.0
  * @author Mathieu Faverge
  * @author Pierre Ramet
  * @author Xavier Lacoste
@@ -20,7 +22,8 @@
  *
  * @ingroup pastix_spm_driver
  *
- * z_readMM - Read the data part of a complex matrix in Matrix Market file.
+ * @brief Read the data part of a complex matrix in Matrix Market file.
+ *
  * For more information about matrix market format see mmio.c/mmio.h
  *
  *******************************************************************************
@@ -34,9 +37,8 @@
  *
  *******************************************************************************
  *
- * @return
- *      \retval PASTIX_SUCCESS if the matrix has been read successfully
- *      \retval PASTIX_ERR_IO if a problem occured in the RSA driver
+ * @retval PASTIX_SUCCESS if the matrix has been read successfully
+ * @retval PASTIX_ERR_IO if a problem occured in the RSA driver
  *
  *******************************************************************************/
 int
@@ -77,7 +79,7 @@ z_readMM( FILE *file,
  *
  * @ingroup pastix_spm_driver
  *
- * d_readMM - Read the data part of a real matrix in Matrix Market file.
+ * @brief Read the data part of a real matrix in Matrix Market file.
  * For more information about matrix market format see mmio.c/mmio.h
  *
  *******************************************************************************
@@ -91,9 +93,8 @@ z_readMM( FILE *file,
  *
  *******************************************************************************
  *
- * @return
- *      \retval PASTIX_SUCCESS if the matrix has been read successfully
- *      \retval PASTIX_ERR_IO if a problem occured in the RSA driver
+ * @retval PASTIX_SUCCESS if the matrix has been read successfully
+ * @retval PASTIX_ERR_IO if a problem occured in the RSA driver
  *
  *******************************************************************************/
 int
@@ -134,7 +135,7 @@ d_readMM( FILE *file,
  *
  * @ingroup pastix_spm_driver
  *
- * p_readMM - Read the data part of a pattern matrix in Matrix Market file.
+ * @brief Read the data part of a pattern matrix in Matrix Market file.
  * For more information about matrix market format see mmio.c/mmio.h
  *
  *******************************************************************************
@@ -148,9 +149,8 @@ d_readMM( FILE *file,
  *
  *******************************************************************************
  *
- * @return
- *      \retval PASTIX_SUCCESS if the matrix has been read successfully
- *      \retval PASTIX_ERR_IO if a problem occured in the RSA driver
+ * @retval PASTIX_SUCCESS if the matrix has been read successfully
+ * @retval PASTIX_ERR_IO if a problem occured in the RSA driver
  *
  *******************************************************************************/
 int
@@ -187,7 +187,7 @@ p_readMM( FILE *file,
  *
  * @ingroup pastix_spm_driver
  *
- * readMM - Read a matrix in Matrix Market fill. This corresponds to
+ * @brief Read a matrix in Matrix Market fill. This corresponds to
  * IJV format with (%d %d[ %lf[ %lf]]) format per line.
  * For more information about matrix market format see mmio.c/mmio.h
  *
@@ -201,10 +201,9 @@ p_readMM( FILE *file,
  *
  *******************************************************************************
  *
- * @return
- *      \retval PASTIX_SUCCESS if the matrix has been read successfully
- *      \retval PASTIX_ERR_IO if a problem occured in the RSA driver
- *      \retval PASTIX_ERR_BADPARAMETER if the matrix is no in a supported format
+ * @retval PASTIX_SUCCESS if the matrix has been read successfully
+ * @retval PASTIX_ERR_IO if a problem occured in the RSA driver
+ * @retval PASTIX_ERR_BADPARAMETER if the matrix is no in a supported format
  *
  *******************************************************************************/
 int
diff --git a/drivers/readrsa.c b/drivers/readrsa.c
index 96bf5f8a..56622081 100644
--- a/drivers/readrsa.c
+++ b/drivers/readrsa.c
@@ -1,9 +1,11 @@
 /**
+ *
  * @file readrsa.c
  *
- *  $COPYRIGHTS$
+ * @copyright 2011-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+ *                      Univ. Bordeaux. All rights reserved.
  *
- * @version 1.0.0
+ * @version 6.0.0
  * @author Mathieu Faverge
  * @author Pierre Ramet
  * @author Xavier Lacoste
@@ -65,7 +67,7 @@ FC_GLOBAL(wreadmtc,WREADMTC)(int        *tmp1,
  *
  * @ingroup pastix_spm_driver
  *
- * readRSAHeader - Read the header structure of a RSA file
+ * @brief Read the header structure of a RSA file
  *
  *******************************************************************************
  *
@@ -131,7 +133,7 @@ readRSAHeader( const char *filename,
  *
  * @ingroup pastix_spm_driver
  *
- * readRSA - Read a RSA matrix file. This driver reads only real matrices, and
+ * @brief Read a RSA matrix file. This driver reads only real matrices, and
  * does not support complex matrices.
  * The matrix is returned in double, convert it to real if needed through TODO
  *
@@ -147,10 +149,9 @@ readRSAHeader( const char *filename,
  *
  *******************************************************************************
  *
- * @return
- *      \retval PASTIX_SUCCESS if the matrix has been read successfully
- *      \retval PASTIX_ERR_IO if a problem occured in the RSA driver
- *      \retval PASTIX_ERR_BADPARAMETER if the matrix is no in a supported format
+ * @retval PASTIX_SUCCESS if the matrix has been read successfully
+ * @retval PASTIX_ERR_IO if a problem occured in the RSA driver
+ * @retval PASTIX_ERR_BADPARAMETER if the matrix is no in a supported format
  *
  *******************************************************************************/
 int
diff --git a/integer_sort.c b/integer_sort.c
index 93cfb426..cd79798a 100644
--- a/integer_sort.c
+++ b/integer_sort.c
@@ -1,3 +1,18 @@
+/**
+ *
+ * @file integer_sort.c
+ *
+ * File template to generate sort functions using qsort based algorithm.
+ *
+ * @copyright 2004-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+ *                      Univ. Bordeaux. All rights reserved.
+ *
+ * @version 6.0.0
+ * @author François Pellegrini
+ * @author Xavier Lacoste
+ * @date 2011-11-11
+ *
+ */
 /* This file is part of the Scotch distribution. It does
 ** not have the stardard Scotch header with the INRIA
 ** copyright notice because it is a very slight adaptation
diff --git a/integer_sort_mtypes.c b/integer_sort_mtypes.c
index c79ee9ee..ed46b9d9 100644
--- a/integer_sort_mtypes.c
+++ b/integer_sort_mtypes.c
@@ -1,3 +1,18 @@
+/**
+ *
+ * @file integer_sort_mtypes.c
+ *
+ * File template to generate sort functions using qsort based algorithm.
+ *
+ * @copyright 2004-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+ *                      Univ. Bordeaux. All rights reserved.
+ *
+ * @version 6.0.0
+ * @author François Pellegrini
+ * @author Xavier Lacoste
+ * @date 2011-11-11
+ *
+ */
 /* This file is part of the Scotch distribution. It does
 ** not have the stardard Scotch header with the INRIA
 ** copyright notice because it is a very slight adaptation
diff --git a/spm.c b/spm.c
index 0fb03d1d..4039b39b 100644
--- a/spm.c
+++ b/spm.c
@@ -452,19 +452,19 @@ spmBase( pastix_spm_t *spm,
 
     /* Parameter checks */
     if ( spm == NULL ) {
-        pastix_error_print("spmBase: spm pointer is NULL");
+        pastix_print_error("spmBase: spm pointer is NULL");
         return;
     }
     if ( (spm->colptr == NULL) ||
          (spm->rowptr == NULL) )
     {
-        pastix_error_print("spmBase: spm pointer is not correctly initialized");
+        pastix_print_error("spmBase: spm pointer is not correctly initialized");
         return;
     }
     if ( (baseval != 0) &&
          (baseval != 1) )
     {
-        pastix_error_print("spmBase: baseval is incorrect, must be 0 or 1");
+        pastix_print_error("spmBase: baseval is incorrect, must be 0 or 1");
         return;
     }
 
@@ -586,7 +586,7 @@ spmConvert( int ofmttype, pastix_spm_t *spm )
 {
     if ( conversionTable[spm->fmttype][ofmttype][spm->flttype] ) {
         if ( spm->dof != 1 ) {
-            //pastix_error_print( "spmConvert: Conversion of non unique dof not yet implemented\n");
+            //pastix_print_error( "spmConvert: Conversion of non unique dof not yet implemented\n");
             return PASTIX_ERR_NOTIMPLEMENTED;
         }
         return conversionTable[spm->fmttype][ofmttype][spm->flttype]( spm );
diff --git a/spm_dof_extend.c b/spm_dof_extend.c
index 15362c4f..51510ec3 100644
--- a/spm_dof_extend.c
+++ b/spm_dof_extend.c
@@ -60,7 +60,7 @@ spmDofExtend( const pastix_spm_t *spm,
         return (pastix_spm_t *)spm;
 
     if ( spm->dof != 1 ) {
-        pastix_error_print( "Cannot extend spm including dofs already\n" );
+        pastix_print_error( "Cannot extend spm including dofs already\n" );
         return (pastix_spm_t *)spm;
     }
 
diff --git a/spm_io.c b/spm_io.c
index 50d808c1..bdd7c774 100644
--- a/spm_io.c
+++ b/spm_io.c
@@ -473,7 +473,7 @@ spmLoad( pastix_spm_t  *spm,
         infile = fopen( "matrix.spm", "r" );
 
         if ( infile == NULL ) {
-            pastix_error_print( "spmLoad: Impossible to open the file matrix.spm\n");
+            pastix_print_error( "spmLoad: Impossible to open the file matrix.spm\n");
             return PASTIX_ERR_FILE;
         }
 
@@ -816,7 +816,7 @@ spmSave( const pastix_spm_t *spm,
     if ( outfile == NULL ) {
         outfile = fopen( "matrix.spm", "w" );
         if ( outfile == NULL ) {
-            pastix_error_print( "spmSave: Impossible to open the file matrix.spm\n");
+            pastix_print_error( "spmSave: Impossible to open the file matrix.spm\n");
             return PASTIX_ERR_FILE;
         }
 
diff --git a/spm_read_driver.c b/spm_read_driver.c
index 5c240481..02f3d0fd 100644
--- a/spm_read_driver.c
+++ b/spm_read_driver.c
@@ -116,13 +116,13 @@ spmReadDriver( pastix_driver_t  driver,
 
             file = fopen( filename, "r" );
             if ( file == NULL ) {
-                pastix_error_print("spmReadDriver: impossible to open the file %s\n", filename );
+                pastix_print_error("spmReadDriver: impossible to open the file %s\n", filename );
                 return PASTIX_ERR_FILE;
             }
 
             /* Check integer compatibility */
             if (sizeof(pastix_int_t) != sizeof(SCOTCH_Num)) {
-                pastix_error_print("Inconsistent integer type\n");
+                pastix_print_error("Inconsistent integer type\n");
                 fclose(file);
                 return PASTIX_ERR_INTEGER_TYPE;
             }
diff --git a/z_spm_expand.c b/z_spm_expand.c
index ecbcb849..cde62525 100644
--- a/z_spm_expand.c
+++ b/z_spm_expand.c
@@ -57,7 +57,7 @@ z_spmCSCExpand(const pastix_spm_t *spm)
     }
 
     if ( spm->layout != PastixColMajor ) {
-        pastix_error_print( "Unsupported layout\n" );
+        pastix_print_error( "Unsupported layout\n" );
         return NULL;
     }
 
@@ -242,7 +242,7 @@ z_spmCSRExpand(const pastix_spm_t *spm)
     }
 
     if ( spm->layout != PastixColMajor ) {
-        pastix_error_print( "Unsupported layout\n" );
+        pastix_print_error( "Unsupported layout\n" );
         return NULL;
     }
 
-- 
GitLab