Redefine the default boolean type to gmx_bool.
[alexxy/gromacs.git] / src / kernel / pdb2top.c
index 52a3e6f94ca833176ce429d9cc2ec8f27eab50bc..4b8d4fac3e4187427b2ccdaca86f5fa7fb2bc659 100644 (file)
@@ -75,7 +75,7 @@ static int missing_atoms(t_restp *rp, int resind,t_atoms *at, int i0, int i)
 {
     int  j,k,nmiss;
     char *name;
-    bool bFound, bRet;
+    gmx_bool bFound, bRet;
     
     nmiss = 0;
     for (j=0; j<rp->natom; j++)
@@ -105,7 +105,7 @@ static int missing_atoms(t_restp *rp, int resind,t_atoms *at, int i0, int i)
     return nmiss;
 }
 
-bool is_int(double x)
+gmx_bool is_int(double x)
 {
   const double tol = 1e-4;
   int   ix;
@@ -379,7 +379,7 @@ static int name2type(t_atoms *at, int **cgnr, gpp_atomtype_t atype,
 {
   int     i,j,prevresind,resind,i0,prevcg,cg,curcg;
   char    *name;
-  bool    bProt, bNterm;
+  gmx_bool    bProt, bNterm;
   double  qt;
   int     nmissat;
   gmx_residuetype_t rt;
@@ -460,7 +460,7 @@ static void print_top_heavy_H(FILE *out, real mHmult)
 }
 
 void print_top_comment(FILE *out,const char *filename,
-                       const char *generator,bool bITP)
+                       const char *generator,gmx_bool bITP)
 {
   char tmp[256]; 
 
@@ -472,7 +472,7 @@ void print_top_comment(FILE *out,const char *filename,
 }
 
 void print_top_header(FILE *out,const char *filename, 
-                      const char *title,bool bITP,const char *ffdir,real mHmult)
+                      const char *title,gmx_bool bITP,const char *ffdir,real mHmult)
 {
     print_top_comment(out,filename,title,bITP);
     
@@ -558,7 +558,7 @@ void print_top_mols(FILE *out,
 }
 
 void write_top(FILE *out, char *pr,char *molname,
-               t_atoms *at,bool bRTPresname,
+               t_atoms *at,gmx_bool bRTPresname,
                int bts[],t_params plist[],t_excls excls[],
                gpp_atomtype_t atype,int *cgnr, int nrexcl)
      /* NOTE: nrexcl is not the size of *excl! */
@@ -596,7 +596,7 @@ void write_top(FILE *out, char *pr,char *molname,
 static atom_id search_res_atom(const char *type,int resind,
                               int natom,t_atom at[],
                               char ** const *aname,
-                              const char *bondtype,bool bAllowMissing)
+                              const char *bondtype,gmx_bool bAllowMissing)
 {
   int i;
 
@@ -608,7 +608,7 @@ static atom_id search_res_atom(const char *type,int resind,
 }
 
 static void do_ssbonds(t_params *ps,int natoms,t_atom atom[],char **aname[],
-                      int nssbonds,t_ssbond *ssbonds,bool bAllowMissing)
+                      int nssbonds,t_ssbond *ssbonds,gmx_bool bAllowMissing)
 {
   int     i,ri,rj;
   atom_id ai,aj;
@@ -627,7 +627,7 @@ static void do_ssbonds(t_params *ps,int natoms,t_atom atom[],char **aname[],
   }
 }
 
-static bool inter_res_bond(const t_rbonded *b)
+static gmx_bool inter_res_bond(const t_rbonded *b)
 {
     return (b->AI[0] == '-' || b->AI[0] == '+' ||
             b->AJ[0] == '-' || b->AJ[0] == '+');
@@ -637,7 +637,7 @@ static void at2bonds(t_params *psb, t_hackblock *hb,
                      int natoms, t_atom atom[], char **aname[], 
                      int nres, rvec x[], 
                      real long_bond_dist, real short_bond_dist,
-                     bool bAllowMissing)
+                     gmx_bool bAllowMissing)
 {
   int     resind,i,j,k;
   atom_id ai,aj;
@@ -752,7 +752,7 @@ static void clean_bonds(t_params *ps)
     fprintf(stderr,"No bonds\n");
 }
 
-void print_sums(t_atoms *atoms, bool bSystem)
+void print_sums(t_atoms *atoms, gmx_bool bSystem)
 {
   double m,qtot;
   int    i;
@@ -865,7 +865,7 @@ void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp,
   char buf[STRLEN];
   const char *Hnum="123456";
   int tern,terc;
-  bool bN,bC,bRM;
+  gmx_bool bN,bC,bRM;
 
   snew(*hb,nres);
   snew(*restp,nres);
@@ -1008,7 +1008,7 @@ void get_hackblocks_rtp(t_hackblock **hb, t_restp **restp,
     }
 }
 
-static bool atomname_cmp_nr(const char *anm,t_hack *hack,int *nr)
+static gmx_bool atomname_cmp_nr(const char *anm,t_hack *hack,int *nr)
 {
 
     if (hack->nr == 1)
@@ -1039,9 +1039,9 @@ static bool atomname_cmp_nr(const char *anm,t_hack *hack,int *nr)
     }
 }
 
-static bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind,
+static gmx_bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind,
                                           t_restp *rptr,t_hackblock *hbr,
-                                          bool bVerbose)
+                                          gmx_bool bVerbose)
 {
     int  resnr;
     int  i,j,k;
@@ -1049,8 +1049,8 @@ static bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind,
     int  anmnr;
     char *start_at,buf[STRLEN];
     int  start_nr;
-    bool bReplaceReplace,bFoundInAdd;
-    bool bDeleted;
+    gmx_bool bReplaceReplace,bFoundInAdd;
+    gmx_bool bDeleted;
 
     oldnm = *pdba->atomname[atind];
     resnr = pdba->resinfo[pdba->atom[atind].resind].nr;
@@ -1198,7 +1198,7 @@ static bool match_atomnames_with_rtp_atom(t_atoms *pdba,rvec *x,int atind,
     
 void match_atomnames_with_rtp(t_restp restp[],t_hackblock hb[],
                               t_atoms *pdba,rvec *x,
-                              bool bVerbose)
+                              gmx_bool bVerbose)
 {
     int  i,j,k;
     char *oldnm,*newnm;
@@ -1208,7 +1208,7 @@ void match_atomnames_with_rtp(t_restp restp[],t_hackblock hb[],
     int  anmnr;
     char *start_at,buf[STRLEN];
     int  start_nr;
-    bool bFoundInAdd;
+    gmx_bool bFoundInAdd;
     
     for(i=0; i<pdba->nr; i++)
     {
@@ -1303,14 +1303,14 @@ void pdb2top(FILE *top_file, char *posre_fn, char *molname,
              int nrtp, t_restp rtp[],
              t_restp *restp, t_hackblock *hb,
              int nterpairs,t_hackblock **ntdb, t_hackblock **ctdb,
-             int *rn, int *rc, bool bAllowMissing,
-             bool bVsites, bool bVsiteAromatics,
+             int *rn, int *rc, gmx_bool bAllowMissing,
+             gmx_bool bVsites, gmx_bool bVsiteAromatics,
              const char *ff, const char *ffdir,
              real mHmult,
              int nssbonds, t_ssbond *ssbonds,
              real long_bond_dist, real short_bond_dist,
-             bool bDeuterate, bool bChargeGroups, bool bCmap,
-             bool bRenumRes,bool bRTPresname)
+             gmx_bool bDeuterate, gmx_bool bChargeGroups, gmx_bool bCmap,
+             gmx_bool bRenumRes,gmx_bool bRTPresname)
 {
     /*
   t_hackblock *hb;