From a1dd9131036ca712f15dc107bc4f5c54a63b9932 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Fri, 6 Jan 2012 23:32:50 +0000 Subject: [PATCH] ICU-8972 make usrc_create() take & write generator name, remove temporary usrc_createFromGenerator() X-SVN-Rev: 31184 --- icu4c/source/tools/toolutil/writesrc.c | 22 ++++------------------ icu4c/source/tools/toolutil/writesrc.h | 11 ++--------- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/icu4c/source/tools/toolutil/writesrc.c b/icu4c/source/tools/toolutil/writesrc.c index 48c28fee0fc..6db9087e451 100644 --- a/icu4c/source/tools/toolutil/writesrc.c +++ b/icu4c/source/tools/toolutil/writesrc.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2005-2011, International Business Machines +* Copyright (C) 2005-2012, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -71,22 +71,8 @@ usrc_createWithHeader(const char *path, const char *filename, } U_CAPI FILE * U_EXPORT2 -usrc_create(const char *path, const char *filename) { - const char *header= - "/*\n" - " * Copyright (C) 1999-%s, International Business Machines\n" - " * Corporation and others. All Rights Reserved.\n" - " *\n" - " * file name: %s\n" - " *\n" - " * machine-generated on: %s\n" - " */\n\n"; - return usrc_createWithHeader(path, filename, NULL, header); -} - -U_CAPI FILE * U_EXPORT2 -usrc_createFromGenerator(const char *path, const char *filename, const char *generator) { - const char *header= +usrc_create(const char *path, const char *filename, const char *generator) { + static const char *header= "/*\n" " * Copyright (C) 1999-%s, International Business Machines\n" " * Corporation and others. All Rights Reserved.\n" @@ -100,7 +86,7 @@ usrc_createFromGenerator(const char *path, const char *filename, const char *gen U_CAPI FILE * U_EXPORT2 usrc_createTextData(const char *path, const char *filename, const char *generator) { - const char *header= + static const char *header= "# Copyright (C) 1999-%s, International Business Machines\n" "# Corporation and others. All Rights Reserved.\n" "#\n" diff --git a/icu4c/source/tools/toolutil/writesrc.h b/icu4c/source/tools/toolutil/writesrc.h index 9c393deb6b0..f4ca08103bb 100644 --- a/icu4c/source/tools/toolutil/writesrc.h +++ b/icu4c/source/tools/toolutil/writesrc.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2005-2011, International Business Machines +* Copyright (C) 2005-2012, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -23,19 +23,12 @@ #include "unicode/utypes.h" #include "utrie2.h" -/** - * Creates a source text file and writes a header comment with the ICU copyright. - * Writes a C/Java-style comment with the generation date. - */ -U_CAPI FILE * U_EXPORT2 -usrc_create(const char *path, const char *filename); - /** * Creates a source text file and writes a header comment with the ICU copyright. * Writes a C/Java-style comment with the generator name. */ U_CAPI FILE * U_EXPORT2 -usrc_createFromGenerator(const char *path, const char *filename, const char *generator); +usrc_create(const char *path, const char *filename, const char *generator); /** * Creates a source text file and writes a header comment with the ICU copyright. -- 2.40.0