Index: trunk/mgpp/lib/perf_hash.cpp
===================================================================
--- trunk/mgpp/lib/perf_hash.cpp	(revision 3365)
+++ trunk/mgpp/lib/perf_hash.cpp	(revision 9612)
@@ -213,9 +213,9 @@
   Stack[StackPos].v = v;
   Stack[StackPos].m = 0;
-  StackPos++;
+  ++StackPos;
   while (StackPos)
     {
       int m, b;
-      StackPos--;
+      --StackPos;
       e = Stack[StackPos].e;
       v = Stack[StackPos].v;
@@ -277,5 +277,5 @@
   /* build list of edges for each node */
   for (v = 1; v <= n; FIRST[v++] = 0);
-  for (e = 1; e <= m; e++)
+  for (e = 1; e <= m; ++e)
     {
       NEXT[A + e] = FIRST[NODEa[e]];
@@ -293,5 +293,5 @@
   S.sp = 0;			/* empty the stack */
   mk[0] = ERASED;		/* a sentinel for the test below */
-  for (v = 1; v <= n; v++)
+  for (v = 1; v <= n; ++v)
     {
       if (mk[e = norm (unique (v))] == MEMBER)
@@ -324,6 +324,6 @@
       *n = (int) (num * c + 1);
       /* initialize tables of random integers */
-      for (i = 0; i < MAX_CH; i++)
-	for (j = 0; j < MAX_L; j++)
+      for (i = 0; i < MAX_CH; ++i)
+	for (j = 0; j < MAX_L; ++j)
 	  {
 #ifndef STRUCT
@@ -340,5 +340,5 @@
 
       /* compute an edge (NODEa[e], NODEb[e], NODEc[e]) for each word */
-      for (e = 1; e <= num; e++)
+      for (e = 1; e <= num; ++e)
 	{
 	  /*generate an edge corresponding to the ith word */
@@ -363,5 +363,5 @@
 	      if (++j >= MAX_L)
 		j = 0;
-	      w++;
+	      ++w;
 	    }
 	  while (--l);
@@ -460,5 +460,5 @@
 
   /*for each word compute its place in hash table and check if correct */
-  for (e = 1; e <= m; e++)
+  for (e = 1; e <= m; ++e)
     {
       if ((e - 1) != (g[NODEa[e]] ^ g[NODEb[e]] ^ g[NODEc[e]]))
@@ -538,5 +538,5 @@
   printf ("#define _HFM %d\n#define _HXL %d\n", m, MAX_L);
   printf ("#define _HFA %d\n\nstatic int g[_HFN] = {\n", lc - fc + 1);
-  for (i = 1; i < n; i++)
+  for (i = 1; i < n; ++i)
     {
       if (i % 8 == 0)
@@ -547,13 +547,13 @@
 
   printf ("static int mt1[_HFA][_HXL] = {\n");
-  for (j = fc; j < lc; j++)
+  for (j = fc; j < lc; ++j)
     {
       printf ("{");
-      for (i = 0; i < MAX_L - 1; i++)
+      for (i = 0; i < MAX_L - 1; ++i)
 	printf ("%*d,", w, tb0[j][i]);
       printf ("%*d},\n", w, tb0[j][MAX_L - 1]);
     }
   printf ("{");
-  for (i = 0; i < MAX_L - 1; i++)
+  for (i = 0; i < MAX_L - 1; ++i)
     printf ("%*d,", w, tb0[lc][i]);
   printf ("%*d}\n", w, tb0[lc][MAX_L - 1]);
@@ -561,13 +561,13 @@
 
   printf ("static int mt2[_HFA][_HXL] = {\n");
-  for (j = fc; j < lc; j++)
+  for (j = fc; j < lc; ++j)
     {
       printf ("{");
-      for (i = 0; i < MAX_L - 1; i++)
+      for (i = 0; i < MAX_L - 1; ++i)
 	printf ("%*d,", w, tb1[j][i]);
       printf ("%*d},\n", w, tb1[j][MAX_L - 1]);
     }
   printf ("{");
-  for (i = 0; i < MAX_L - 1; i++)
+  for (i = 0; i < MAX_L - 1; ++i)
     printf ("%*d,", w, tb1[lc][i]);
   printf ("%*d}\n", w, tb1[lc][MAX_L - 1]);
@@ -575,13 +575,13 @@
 
   printf ("static int mt3[_HFA][_HXL] = {\n");
-  for (j = fc; j < lc; j++)
+  for (j = fc; j < lc; ++j)
     {
       printf ("{");
-      for (i = 0; i < MAX_L - 1; i++)
+      for (i = 0; i < MAX_L - 1; ++i)
 	printf ("%*d,", w, tb2[j][i]);
       printf ("%*d},\n", w, tb2[j][MAX_L - 1]);
     }
   printf ("{");
-  for (i = 0; i < MAX_L - 1; i++)
+  for (i = 0; i < MAX_L - 1; ++i)
     printf ("%*d,", w, tb2[lc][i]);
   printf ("%*d}\n", w, tb2[lc][MAX_L - 1]);
@@ -606,9 +606,9 @@
 
   MAX_L = 1;
-  for (i = 0; i < num; i++)
+  for (i = 0; i < num; ++i)
     {
       unsigned len = keys[i][0];
       u_char *s = keys[i] + 1;
-      for (; len; len--, s++)
+      for (; len; len--, ++s)
 	translate[*s] = 1;
       if (i)
@@ -621,5 +621,5 @@
     }
   j = 0;
-  for (i = 0; i < 256; i++)
+  for (i = 0; i < 256; ++i)
     if (translate[i])
       translate[i] = j++;
@@ -657,5 +657,5 @@
     Xfree (g);
 #ifndef STRUCT
-  for (i = 0; i < MAX_CH; i++)
+  for (i = 0; i < MAX_CH; ++i)
     {
       if (tb0 && tb0[i])
@@ -673,5 +673,5 @@
     Xfree (tb2);
 #else
-  for (i = 0; i < MAX_CH; i++)
+  for (i = 0; i < MAX_CH; ++i)
     if (tb && tb[i])
       Xfree (tb[i]);
@@ -697,5 +697,5 @@
   tb1 = Xmalloc (sizeof (int *) * MAX_CH);
   tb2 = Xmalloc (sizeof (int *) * MAX_CH);
-  for (i = 0; i < MAX_CH; i++)
+  for (i = 0; i < MAX_CH; ++i)
     {
       if (tb0)
@@ -718,5 +718,5 @@
 #else
   tb = (tb_entry **)Xmalloc (sizeof (struct tb_entry *) * MAX_CH);
-  for (i = 0; i < MAX_CH; i++)
+  for (i = 0; i < MAX_CH; ++i)
     if (tb)
       if (!(tb[i] = (tb_entry *)Xmalloc (sizeof (struct tb_entry) * MAX_L)))
@@ -809,5 +809,5 @@
 
   /* [RPAP - Jan 97: Endian Ordering] */
-  for (i = 0; i < phd->MAX_N + 1; i++)
+  for (i = 0; i < phd->MAX_N + 1; ++i)
     HTONSI(phd->g[i]);
 
@@ -815,13 +815,13 @@
 
   /* [RPAP - Jan 97: Endian Ordering] */
-  for (i = 0; i < phd->MAX_N + 1; i++)
+  for (i = 0; i < phd->MAX_N + 1; ++i)
     NTOHSI(phd->g[i]);
 
 #ifndef STRUCT
-  for (i = 0; i < phd->MAX_CH; i++)
+  for (i = 0; i < phd->MAX_CH; ++i)
     {
       /* [RPAP - Jan 97: Endian Ordering] */
       int j;
-      for (j = 0; j < phd->MAX_L; j++)
+      for (j = 0; j < phd->MAX_L; ++j)
 	{
 	  HTONSI(phd->tb0[i][j]);
@@ -838,5 +838,5 @@
 
       /* [RPAP - Jan 97: Endian Ordering] */
-      for (j = 0; j < phd->MAX_L; j++)
+      for (j = 0; j < phd->MAX_L; ++j)
 	{
 	  NTOHSI(phd->tb0[i][j]);
@@ -846,9 +846,9 @@
     }
 #else
-  for (i = 0; i < phd->MAX_CH; i++)
+  for (i = 0; i < phd->MAX_CH; ++i)
     {
       /* [RPAP - Jan 97: Endian Ordering] */
       int j;
-      for (j = 0; j < phd->MAX_L; j++)
+      for (j = 0; j < phd->MAX_L; ++j)
 	{
 	  HTONSL(phd->tb[i][j].tb0);
@@ -861,5 +861,5 @@
 
       /* [RPAP - Jan 97: Endian Ordering] */
-      for (j = 0; j < phd->MAX_L; j++)
+      for (j = 0; j < phd->MAX_L; ++j)
 	{
 	  NTOHSL(phd->tb[i][j].tb0);
@@ -899,5 +899,5 @@
   phd->tb1 = Xmalloc (sizeof (int *) * phd->MAX_CH);
   phd->tb2 = Xmalloc (sizeof (int *) * phd->MAX_CH);
-  for (i = 0; i < phd->MAX_CH; i++)
+  for (i = 0; i < phd->MAX_CH; ++i)
     {
       if (phd->tb0)
@@ -917,5 +917,5 @@
       if (phd->g)
 	Xfree (phd->g);
-      for (i = 0; i < MAX_CH; i++)
+      for (i = 0; i < MAX_CH; ++i)
 	{
 	  if (phd->tb0 && phd->tb0[i])
@@ -939,8 +939,8 @@
 
   /* [RPAP - Jan 97: Endian Ordering] */
-  for (i = 0; i < phd->MAX_N + 1; i++)
+  for (i = 0; i < phd->MAX_N + 1; ++i)
     NTOHSI(phd->g[i]);
 
-  for (i = 0; i < phd->MAX_CH; i++)
+  for (i = 0; i < phd->MAX_CH; ++i)
     {
       int j;
@@ -954,5 +954,5 @@
 
       /* [RPAP - Jan 97: Endian Ordering] */
-      for (j = 0; j < phd->MAX_L; j++)
+      for (j = 0; j < phd->MAX_L; ++j)
 	{
 	  NTOHSI(phd->tb0[i][j]);
@@ -963,5 +963,5 @@
 #else
   phd->tb = (struct tb_entry **)Xmalloc (sizeof (struct tb_entry *) * phd->MAX_CH);
-  for (i = 0; i < phd->MAX_CH; i++)
+  for (i = 0; i < phd->MAX_CH; ++i)
     if (phd->tb)
       if (!(phd->tb[i] = (struct tb_entry *)Xmalloc (sizeof (struct tb_entry) * phd->MAX_L)))
@@ -973,5 +973,5 @@
       if (phd->g)
 	Xfree (phd->g);
-      for (i = 0; i < MAX_CH; i++)
+      for (i = 0; i < MAX_CH; ++i)
 	if (phd->tb && phd->tb[i])
 	  Xfree (phd->tb[i]);
@@ -985,8 +985,8 @@
 
   /* [RPAP - Jan 97: Endian Ordering] */
-  for (i = 0; i < phd->MAX_N + 1; i++)
+  for (i = 0; i < phd->MAX_N + 1; ++i)
     NTOHSI(phd->g[i]);
 
-  for (i = 0; i < phd->MAX_CH; i++)
+  for (i = 0; i < phd->MAX_CH; ++i)
     {
       int j;
@@ -996,5 +996,5 @@
 
       /* [RPAP - Jan 97: Endian Ordering] */
-      for (j = 0; j < phd->MAX_L; j++)
+      for (j = 0; j < phd->MAX_L; ++j)
 	{
 	  NTOHSL(phd->tb[i][j].tb0);
@@ -1015,5 +1015,5 @@
   if (phd->g)
     Xfree (phd->g);
-  for (i = 0; i < phd->MAX_CH; i++)
+  for (i = 0; i < phd->MAX_CH; ++i)
     if (phd->tb && phd->tb[i])
       Xfree (phd->tb[i]);
@@ -1051,6 +1051,6 @@
       if (++i >= phd->MAX_L)
 	i = 0;
-      l--;
-      s++;
+      --l;
+      ++s;
     }
   if (u == v && ++v >= phd->MAX_N)
