[vte/wip/sixels: 34/82] sixel: Move helper function up to the helper section



commit 8959b8c39d9535d7f0d4d69c00adfa54f2a3af68
Author: Hans Petter Jansson <hpj cl no>
Date:   Mon Jun 8 20:35:04 2020 +0200

    sixel: Move helper function up to the helper section

 src/sixel-gen.cc | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/sixel-gen.cc b/src/sixel-gen.cc
index 7aa2d349..752006ff 100644
--- a/src/sixel-gen.cc
+++ b/src/sixel-gen.cc
@@ -62,6 +62,21 @@ typedef struct
 }
 Image;
 
+static int
+random_int_in_range (int min, int max)
+{
+        if (min == max)
+                return min;
+
+        if (min > max) {
+                int t = max;
+                max = min;
+                min = t;
+        }
+
+        return min + (random () % (max - min));
+}
+
 static int
 round_up_to_multiple (int n, int m)
 {
@@ -364,21 +379,6 @@ typedef struct
 }
 Options;
 
-static int
-random_int_in_range (int min, int max)
-{
-        if (min == max)
-                return min;
-
-        if (min > max) {
-                int t = max;
-                max = min;
-                min = t;
-        }
-
-        return min + (random () % (max - min));
-}
-
 static void
 cursor_to_offset (gint x, gint y, GString *gstr)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]