X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..38fbf2fd31f5cd99b500914d6037b1d06b608645:/icuSources/tools/genren/genren.pl diff --git a/icuSources/tools/genren/genren.pl b/icuSources/tools/genren/genren.pl old mode 100644 new mode 100755 index 4e01028c..faf00475 --- a/icuSources/tools/genren/genren.pl +++ b/icuSources/tools/genren/genren.pl @@ -1,12 +1,14 @@ #!/usr/bin/perl +# Copyright (C) 2016 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html #* #******************************************************************************* -#* Copyright (C) 2001-2011, International Business Machines +#* Copyright (C) 2001-2012, International Business Machines #* Corporation and others. All Rights Reserved. #******************************************************************************* #* #* file name: genren.pl -#* encoding: US-ASCII +#* encoding: UTF-8 #* tab size: 8 (not used) #* indentation:4 #* @@ -78,11 +80,11 @@ print HEADER <<"EndOfHeaderComment"; ******************************************************************************* * * file name: $headername -* encoding: US-ASCII +* encoding: UTF-8 * tab size: 8 (not used) * indentation:4 * -* Created by: Perl script written by Vladimir Weinstein +* Created by: Perl script tools/genren.pl written by Vladimir Weinstein * * Contains data for renaming ICU exports. * Gets included by umachine.h @@ -94,9 +96,13 @@ print HEADER <<"EndOfHeaderComment"; #ifndef $HEADERDEF #define $HEADERDEF -/* Uncomment the following line to disable renaming on platforms - that do not use Autoconf. */ -/* #define U_DISABLE_RENAMING 1 */ +/* U_DISABLE_RENAMING can be defined in the following ways: + * - when running configure, e.g. + * runConfigureICU Linux --disable-renaming + * - by changing the default setting of U_DISABLE_RENAMING in uconfig.h + */ + +#include "unicode/uconfig.h" #if !U_DISABLE_RENAMING @@ -104,9 +110,6 @@ print HEADER <<"EndOfHeaderComment"; the platform a chance to define it first. Normally (if utypes.h or umachine.h was included first) this will not be necessary as it will already be defined. */ -#ifndef U_ICU_ENTRY_POINT_RENAME -#include "unicode/uconfig.h" -#endif #ifndef U_ICU_ENTRY_POINT_RENAME #include "unicode/umachine.h" @@ -147,8 +150,9 @@ for(;@ARGV; shift(@ARGV)) { ($_, $address, $type) = split(/\|/); chop $qtype; } elsif ($mode =~ /Mach-O/) { - if(/^(?:[0-9a-fA-F]){8} ([A-Z]) (?:_)?(.*)$/) { - ($_, $type) = ($2, $1); + ($address, $type, $_) = split(/ /); + if(/^_(.*)$/) { + $_ = $1; } else { next; }