]> granicus.if.org Git - postgis/commitdiff
#2878 get rid of duplicate definition of hexbytes_from_bytes (already defined in...
authorRegina Obe <lr@pcorp.us>
Thu, 7 Aug 2014 22:23:00 +0000 (22:23 +0000)
committerRegina Obe <lr@pcorp.us>
Thu, 7 Aug 2014 22:23:00 +0000 (22:23 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12871 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_out_twkb.c
liblwgeom/cunit/cu_varint.c

index 768d9dfbc5c34c5e13adf90f15a4705b713763a7..d44ebd6f462a83d66235d1227b24dfb1d793474d 100644 (file)
@@ -48,28 +48,6 @@ static int clean_twkb_out_suite(void)
        return 0;
 }
 
-static char *hexchr = "0123456789ABCDEF";
-
-char* hexbytes_from_bytes(uint8_t *bytes, size_t size) 
-{
-       char *hex;
-       int i;
-       if ( ! bytes || ! size )
-       {
-               lwerror("hexbutes_from_bytes: invalid input");
-               return NULL;
-       }
-       hex = lwalloc(size * 2 + 1);
-       hex[2*size] = '\0';
-       for( i = 0; i < size; i++ )
-       {
-               /* Top four bits to 0-F */
-               hex[2*i] = hexchr[bytes[i] >> 4];
-               /* Bottom four bits to 0-F */
-               hex[2*i+1] = hexchr[bytes[i] & 0x0F];
-       }
-       return hex;
-}
 
 /*
 ** Creating an input TWKB from a wkt string 
index ab8cf6fc7a476aa0a725c7a5813417fe9ab56e13..2949e0858b9fc75a0e070675cbe0d896f936e836 100644 (file)
@@ -18,9 +18,7 @@
 #include "CUnit/CUnit.h"
 
 #include "liblwgeom_internal.h"
-#include "liblwgeom.h"
 
-#include "varint.h"
 #include "cu_tester.h"
 
 static void do_test_u32_varint(uint32_t nr,int expected_size, char* expected_res)