debian: git-build-package config
[debian/dhcpd-pools.git] / src / sort.c
index 8f769e3..e436f5a 100644 (file)
@@ -1,19 +1,18 @@
-/*
-** Copyright (C) 2006- Sami Kerola <kerolasa@iki.fi>
-**  
-** This program is free software; you can redistribute it and/or modify
+/* http://dhcpd-pools.sourceforge.net/
+** Copyright 2006- Sami Kerola <kerolasa@iki.fi>
+**
+** This program is free software: you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
+** the Free Software Foundation, either version 3 of the License, or
 ** (at your option) any later version.
-** 
+**
 ** This program is distributed in the hope that it will be useful,
 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ** GNU General Public License for more details.
-** 
+**
 ** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software 
-** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+** along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifdef HAVE_CONFIG_H
@@ -27,7 +26,6 @@
 #include <err.h>
 
 #include "dhcpd-pools.h"
-#include "defaults.h"
 
 /* Sort functions for range sorting */
 int intcomp(const void *x, const void *y)
@@ -120,7 +118,7 @@ void field_selector(char c)
        default:
                warnx("field_selector: unknown sort order `%c'", c);
                errx(EXIT_FAILURE, "Try `%s --help' for more information.",
-                       program_invocation_short_name);
+                    program_invocation_short_name);
        }
 }
 
@@ -168,6 +166,8 @@ void mergesort_ranges(struct range_t *orig, int size, struct range_t *temp)
 {
        int left, right, i;
        struct range_t hold;
+       /* Merge sort split size */
+       static const int MIN_MERGE_SIZE = 8;
 
        if (size < MIN_MERGE_SIZE) {
                for (left = 0; left < size; left++) {