From 1342823102e99baa30fbd75b9682f611d15819b4 Mon Sep 17 00:00:00 2001
From: Vesa Oikonen <vesoik@utu.fi>
Date: Mon, 22 Jun 2020 17:40:55 +0300
Subject: [PATCH] code style

---
 v2/libtpcpar/pario.c | 21 +++++++++------------
 v2/parutils/paradd.c | 11 ++++-------
 2 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/v2/libtpcpar/pario.c b/v2/libtpcpar/pario.c
index d4097d6e..e5a899c1 100644
--- a/v2/libtpcpar/pario.c
+++ b/v2/libtpcpar/pario.c
@@ -57,7 +57,7 @@ static const char *par_fn_ext[] = {
     @author Vesa Oikonen
  */
 char *parFormattxt(
-  /** PAR format code */
+  /** PAR format code. */
   parformat c
 ) {
   if(c<PAR_FORMAT_UNKNOWN || c>=PAR_FORMAT_LAST) return NULL;
@@ -125,8 +125,7 @@ int parFormatFromExtension(
 /*****************************************************************************/
 
 /*****************************************************************************/
-/** Return pointer to default PAR file name extension, including the dot,
-    based on the PAR format code.
+/** Return pointer to default PAR file name extension, including the dot, based on the PAR format code.
     @return pointer to the file name extension string.
     @sa parformat, parFormatFromExtension, parFormattxt, parWrite
     @author Vesa Oikonen
@@ -151,8 +150,8 @@ int parWrite(
   PAR *par,
   /** Output file pointer. */
   FILE *fp,
-  /** File format code; enter PAR_FORMAT_UNKNOWN (0)
-      to write data in the format specified inside PAR struct. */
+  /** File format code; enter PAR_FORMAT_UNKNOWN (0) to write data in the format specified inside
+      the PAR struct. */
   parformat format,
   /** Write (1) or do not write (0) also extra header fields found in PAR;
       only effective with CSV formats. */
@@ -236,7 +235,7 @@ int parRead(
   PAR *par,
   /** Pointer to the file name; this string is not modified. */
   const char *fname,
-  /** Pointer to status data; enter NULL if not needed */
+  /** Pointer to status data; enter NULL if not needed. */
   TPCSTATUS *status
 ) {
   int verbose=0; if(status!=NULL) verbose=status->verbose;
@@ -353,8 +352,7 @@ int parRead(
     IFT hdr; iftInit(&hdr);
     iftRead(&hdr, fp, 1, 1, status); fclose(fp);
     if(hdr.keyNr>0) {
-      if(!strcasecmp(hdr.item[0].key, "content") &&
-         !strcasecmp(hdr.item[0].value, "parameters"))
+      if(!strcasecmp(hdr.item[0].key, "content") && !strcasecmp(hdr.item[0].value, "parameters"))
         format=PAR_FORMAT_IFT;
     }
     if(format==PAR_FORMAT_IFT) {
@@ -480,15 +478,14 @@ int parWriteLimits(
 /*****************************************************************************/
 
 /*****************************************************************************/
-/** Read the specified file and try to find constraints and tolerance for parameters 
-    listed in PAR structure.
+/** Read the specified file and try to find constraints and tolerance for parameters listed in PAR structure.
     @return enum tpcerror (TPCERROR_OK when successful).
     @author Vesa Oikonen
     @sa parWriteLimits, parWrite, parFree
  */
 int parReadLimits(
-  /** Pointer to PAR structure, into which the limits are saved. This must also
-      list the parameter names that are searched for from the file. */
+  /** Pointer to PAR structure, into which the limits are saved. This must also list the parameter 
+      names that are searched for from the file. */
   PAR *par,
   /** Input file name. */
   const char *fname,
diff --git a/v2/parutils/paradd.c b/v2/parutils/paradd.c
index f7930f00..1d4fb6dc 100644
--- a/v2/parutils/paradd.c
+++ b/v2/parutils/paradd.c
@@ -256,14 +256,12 @@ int main(int argc, char **argv)
   }
 
   /*
-   *  If target file does not exist, then save the selected contents in file, 
-   *  and quit.
+   *  If target file does not exist, then save the selected contents in file, and quit.
    */
   if(newfile) {
 
     if(drymode) {
-      printf("%d parameter(s) and %d TAC(s) would be written in %s\n", 
-             parNr, tacNr, parfile1);
+      printf("%d parameter(s) and %d TAC(s) would be written in %s\n", parNr, tacNr, parfile1);
       parFree(&par1); parFree(&par2);
       return(0);
     }
@@ -288,8 +286,8 @@ int main(int argc, char **argv)
 
   /*
    *  We are here only if target file exists. 
-   *  Read the previous contents.
    */
+  /* Read the previous contents. */
   if(verbose>1) printf("reading %s\n", parfile1);
   ret=parRead(&par1, parfile1, &status);
   if(ret!=TPCERROR_OK) {
@@ -366,8 +364,7 @@ int main(int argc, char **argv)
   }
 
   /*
-   *  If new and old parameters do match but TACs did not, then add
-   *  new TAC row(s)
+   *  If new and old parameters do match but TACs did not, then add new TAC row(s)
    */
   if(samepars) {
 
-- 
GitLab