#include "unicode/unistr.h"
#include "unicode/fmtable.h"
+#ifndef UPRV_LENGTHOF
+#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+#endif
+
// Verify that a UErrorCode is successful; exit(1) if not
void check(UErrorCode& status, const char* msg);
#include "unicode/uiter.h"
#include "uit_len8.h"
+#ifndef UPRV_LENGTHOF
+#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+#endif
+
#define log_err printf
/* UCharIterator test ------------------------------------------------------- */
#include <string.h>
#include <stdlib.h> /* malloc */
-#include "cmemory.h"
#include "unicode/utypes.h" /* Basic ICU data types */
#include "unicode/ucnv.h" /* C Converter API */
#include "unicode/ustring.h" /* some more string fcns*/
#include "flagcb.h"
/* Some utility functions */
+#ifndef UPRV_LENGTHOF
+#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+#endif
static const UChar kNone[] = { 0x0000 };
# Can change this to LINK.c if it is a C only program
# Can add more libraries here.
$(TARGET): $(OBJECTS)
- $(CC) -o $@ $^ $(LDFLAGS)
+ $(CC) -o $(TARGET) $(LDFLAGS)
# Make check: simply runs the sample, logged to a file
check: $(TARGET) $(RESOURCES)
#include "unicode/ucnv.h"
#include "unicode/unistr.h"
+#ifndef UPRV_LENGTHOF
+#define UPRV_LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+#endif
+
// helper functions -------------------------------------------------------- ***
// default converter for the platform encoding