* src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 21 Mar 2005 13:56:44 +0000 (13:56 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 21 Mar 2005 13:56:44 +0000 (13:56 +0000)
last time.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3704 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCcflow.c

index 2eefe5e9b74e4bbe23d0a0fe0316d2bc2d8363ff..a9c382d0366d7f4482a618796df408de2ff13dd5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+       * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
+       last time.
+
 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
 
        * src/port.h (struct PORT),
index cb6bf7a6e075a2e3f484e3f6e20ffb0e49de4aa3..505b2d725a1e293c8d11b46947b910c1bf18f47c 100644 (file)
@@ -357,6 +357,24 @@ markNoPath (ebbIndex * ebbi)
       ebbs[i]->noPath = 1;
 }
 
+/*-----------------------------------------------------------------*/
+/* dfNumCompare - used by qsort to sort by dfNumber                */
+/*-----------------------------------------------------------------*/
+int 
+dfNumCompare (const void *a, const void *b)
+{
+  const eBBlock *const *i = a;
+  const eBBlock *const *j = b;
+
+  if ((*i)->dfnum > (*j)->dfnum)
+    return 1;
+
+  if ((*i)->dfnum < (*j)->dfnum)
+    return -1;
+
+  return 0;
+}
+
 /*-----------------------------------------------------------------*/
 /* computeControlFlow - does the control flow computation          */
 /*-----------------------------------------------------------------*/