#!/bin/sh
-# /* Copyright (C) 2011 IBM Corporation and Others. All Rights Reserved */
+# /* Copyright (C) 2011-2012 IBM Corporation and Others. All Rights Reserved */
icc -o iculd iculd.c
+icc -o cxxfilt cxxfilt.cpp
+
+
--- /dev/null
+/* Copyright (C) 2012 IBM Corporation and Others. All Rights Reserved */
+
+#include <stdio.h>
+#include <demangle.h>
+
+void showSym(char *str) {
+ char *rest;
+ struct Name *name = Demangle(str, rest); // "f__1XFi"
+
+ printf("# '%s'\n", str);
+ if(*rest) printf("\trest: '%s'\n", rest);
+ if(name->Kind() == MemberFunction) {
+ //((MemberFunctionName *) name)->Scope()->Text() is "X"
+ //((MemberFunctionName *) name)->RootName() is "f"
+ //((MemberFunctionName *) name)->Text() is "X::f(int)"
+ printf("\t=> %s\n", ((MemberFunctionName *) name)->Text());
+ } else {
+ printf("\t(not MemberFunction)\n");
+ }
+}
+
+
+
+
+
+int main(int argc, /*const*/ char *argv[]) {
+ if(argc>1) {
+ for(int i=1;i<argc;i++) {
+ showSym(argv[i]);
+ }
+ } else {
+ printf("Usage: %s <symbol> ...\n", argv[0]);
+ }
+
+
+
+}
# For building a source distribution.
distcheck dist-local:
- $(MAKE) -C . -f config/dist.mk srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" $@
+ $(MAKE) -C . -f $(top_srcdir)/config/dist.mk srcdir="$(srcdir)" top_srcdir="$(top_srcdir)" $@
ifeq ($(DESTDIR),)
releaseDist:
private:
// list of word candidate lengths, in increasing length order
int32_t lengths[POSSIBLE_WORD_LIST_MAX];
- int count; // Count of candidates
+ int32_t count; // Count of candidates
int32_t prefix; // The longest match with a dictionary word
int32_t offset; // Offset in the text of these candidates
int mark; // The preferred candidate's offset
// Dynamic programming to find the best segmentation.
bool is_prev_katakana = false;
- for (int i = 0; i < numChars; ++i) {
+ for (int32_t i = 0; i < numChars; ++i) {
//utext_setNativeIndex(text, rangeStart + i);
utext_setNativeIndex(&normalizedText, i);
if (bestSnlp[i] == kuint32max)
continue;
- int count;
+ int32_t count;
// limit maximum word length matched to size of current substring
- int maxSearchLength = (i + maxWordSize < (size_t) numChars)? maxWordSize : (numChars - i);
+ int32_t maxSearchLength = (i + maxWordSize < (size_t) numChars)? maxWordSize : (numChars - i);
fDictionary->matches(&normalizedText, maxSearchLength, lengths.elems(), count, maxSearchLength, values.elems());
id.append((UChar)0x2B); // '+'
}
// Always use US-ASCII digits
- id.append((UChar)0x30 + (hour%100)/10);
- id.append((UChar)0x30 + (hour%10));
+ id.append((UChar)(0x30 + (hour%100)/10));
+ id.append((UChar)(0x30 + (hour%10)));
id.append((UChar)0x3A); // ':'
id.append((UChar)(0x30 + (min%100)/10));
id.append((UChar)(0x30 + (min%10)));