]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/samples/udata/reader.c
ICU-62108.0.1.tar.gz
[apple/icu.git] / icuSources / samples / udata / reader.c
index b7038567f332bd2bc5dd8f3fbb772146d3b2d01f..00817b8900851e835db8f8f6ced7f1e58b355073 100644 (file)
@@ -1,18 +1,24 @@
 /*
-*******************************************************************************
-*
-*   Copyright (C) 1999-2000, International Business Machines
-*   Corporation and others.  All Rights Reserved.
-*
-*******************************************************************************
-*   file name:  reader.c
-*   encoding:   US-ASCII
-*   tab size:   8 (not used)
-*   indentation:4
-*
-*   created on: 2000sep5
-*   created by: Vladimir Weinstein
-*/
+ *******************************************************************************
+ *
+ *   © 2016 and later: Unicode, Inc. and others.
+ *   License & terms of use: http://www.unicode.org/copyright.html#License
+ *
+ *******************************************************************************
+ *******************************************************************************
+ *
+ *   Copyright (C) 1999-2009, International Business Machines
+ *   Corporation and others.  All Rights Reserved.
+ *
+ *******************************************************************************
+ *   file name:  reader.c
+ *   encoding:   UTF-8
+ *   tab size:   8 (not used)
+ *   indentation:4
+ *
+ *   created on: 2000sep5
+ *   created by: Vladimir Weinstein
+ */
 
 /*******************************************************************************
  * Derived from Madhu Katragadda gentest
 #include <unistd.h>
 #endif
 #include "unicode/utypes.h"
+#include "unicode/putil.h"
 #include "unicode/udata.h"
 
-#define DATA_NAME "example"
+#define DATA_NAME "mypkg_example"
 #define DATA_TYPE "dat"
 
 /* UDataInfo cf. udata.h */
@@ -89,10 +96,8 @@ main(int argc, const char *argv[]) {
     char *currdir = getcwd(NULL, 0);
 #endif
 
-    /* need to put  "current/dir/pkgname" as path */
+    /* need to put  "current/dir" as path */
     strcpy(curPathBuffer, currdir);
-    strcat(curPathBuffer, U_FILE_SEP_STRING);
-    strcat(curPathBuffer, "mypkg"); /* package name */
 
     result=udata_openChoice(curPathBuffer, DATA_TYPE, DATA_NAME, isAcceptable, NULL, &status);