Merge branch 'release-4-5-patches'
authorCarsten Kutzner <ckutzne@gwdg.de>
Tue, 4 Jan 2011 17:31:50 +0000 (18:31 +0100)
committerCarsten Kutzner <ckutzne@gwdg.de>
Tue, 4 Jan 2011 17:31:50 +0000 (18:31 +0100)
src/kernel/topio.c
src/tools/gmx_trjconv.c

index 4e291bd336ed132be27b8955f156110d22d38e55..61375cbb354450aa895fbd2625a45f7e92de928c 100644 (file)
@@ -299,14 +299,6 @@ static char ** cpp_opts(const char *define,const char *include,
       }
     }
   }
-  if ((rptr=strrchr(infile,DIR_SEPARATOR)) != NULL) {
-    buf = strdup(infile);
-    buf[(int)(rptr-infile)] = '\0';
-    srenew(cppopts,++ncppopts);
-    snew(cppopts[ncppopts-1],strlen(buf)+4);
-    sprintf(cppopts[ncppopts-1],"-I%s",buf);
-    sfree(buf);
-  }
   srenew(cppopts,++ncppopts);
   cppopts[ncppopts-1] = NULL;
 
index 463f3216a662164e968466f3c2ce5a70dacb9692..c87344d1f1c098b5a02e7a6bc68f7511c43fda2c 100644 (file)
@@ -393,10 +393,11 @@ static void mk_filenm(char *base,const char *ext,int ndigit,int file_nr,
 
     strcpy(out_file,base);
     fnr = file_nr;
-    while(fnr > 0) {
-        fnr = fnr/10;
+    do {
+        fnr /= 10;
         nd++;
-    }
+    } while (fnr > 0);
+
     if (nd < ndigit)
         strncat(out_file,"00000000000",ndigit-nd);
     sprintf(nbuf,"%d.",file_nr);
@@ -709,8 +710,8 @@ int gmx_trjconv(int argc,char *argv[])
                         "file" },
                     { "-nzero", FALSE, etINT,
                         { &nzero },
-                        "Prepend file number in case you use the -sep flag "
-                        "with this number of zeroes" },
+                        "If the -sep flag is set, use these many digits "
+                        "for the file numbers and prepend zeros as needed" },
                     { "-dropunder", FALSE, etREAL,
                         { &dropunder }, "Drop all frames below this value" },
                     { "-dropover", FALSE, etREAL,