Commit d235af01 authored by Islam Amer's avatar Islam Amer

import from upstream tarball icu4c-52_1-src.tgz

parent 19aef609

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This source diff could not be displayed because it is too large. You can view the blob instead.
#!/usr/bin/python
# Copyright (C) 2011 IBM Corporation and Others. All Rights Reserved.
#
# run in icu/
# will create file icu/as_is/bomlist.txt
#
# Usage:
# ( python as_is/bomlist.py > as_is/bomlist.txt ) || rm -f as_is/bomlist.txt
import os
import codecs
tree = os.walk(".")
nots=0
notutf8=0
noprops=0
utf8=0
fixed=0
tfiles=0
bom=codecs.BOM_UTF8
for ent in tree:
(path,dirs,files) = ent
if(path.find("/.svn") != -1):
continue
for file in files:
tfiles=tfiles+1
fp = (path + "/" + file)
if not os.path.isfile(fp):
continue
f = open(fp, 'rb')
bytes=f.read(3)
if bytes and (bytes == bom):
print 'icu/'+fp[2::]
f.close()
This diff is collapsed.
File mode changed from 100755 to 100644
#!/bin/sh
# /* Copyright (C) 2011-2012 IBM Corporation and Others. All Rights Reserved */
icc -o iculd iculd.c
icc -o cxxfilt cxxfilt.cpp
# Copyright (C) 2006-2009, International Business Machines Corporation
# Copyright (C) 2006-2011, International Business Machines Corporation
# and others. All Rights Reserved.
#
# Use "test -x" instead of "test -f" most of the time.
......@@ -23,6 +23,7 @@ s/ diff / cmp -s /g
## srl
# trouble w/ redirects.
s% >&$3%%g
s% >&$4% >$4%g
s%^ac_cr=%# AWK reads ASCII, not EBCDIC\
touch -C 819 $tmp/defines.awk $tmp/subs.awk $tmp/subs1.awk conf$$subs.awk\
\
......
/* 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]);
}
}
#!/usr/bin/qsh
# Copyright (C) 2000-2011, International Business Machines
# Corporation and others. All Rights Reserved.
#
# Authors:
# Ami Fixler
# Barry Novinger
# Steven R. Loomis
# George Rhoten
# Jason Spieth
#
#
# This script detects if any UTF-8 files were incorrectly converted to EBCDIC, and
# converts them back.
if [ -z "$QSH_VERSION" ];
then
QSH=0
echo "QSH not detected (QSH_VERSION not set) - just testing."
else
QSH=1
#echo "QSH version $QSH_VERSION"
fi
export QSH
tar_file=$1
echo ""
echo "Determining binary files by BOM ..."
echo ""
bin_count=0
binary_files=""
# Process BOMs
for file in `find ./icu/source/data/unidata \( -name \*.txt -print \)`; do
bom8=`od -t x1 -N 3 $file|\
head -n 1|\
cut -c10-18`;
#Find a converted UTF-8 BOM
echo "file $file bom /${bom8}/"
if [ "$bom8" = "57 8b ab" ]
then
file="`echo $file | cut -d / -f2-`"
echo "converting ${file}"
if [ `echo $binary_files | wc -w` -lt 200 ]
then
bin_count=`expr $bin_count + 1`
binary_files="$binary_files $file";
else
echo "Restoring binary files by BOM ($bin_count)..."
rm $binary_files;
pax -C 819 -rvf $tar_file $binary_files;
echo "Determining binary files by BOM ($bin_count)..."
binary_files="$file";
bin_count=`expr $bin_count + 1`
fi
fi
done
if [ `echo $binary_files | wc -w` -gt 0 ]
then
echo restoring
rm $binary_files
pax -C 819 -rvf $tar_file $binary_files
fi
/* Copyright (C) 2011 IBM Corporation and Others. All Rights Reserved */
/**
Input:
-o makeconv makeconv.o ucnvstat.o ../../lib/libicuuc48.so -qOPTION='*DUPPROC *DUPVAR*'
CRTPGM PGM(SRLICU/MAKECONV) MODULE(SRLICU/MAKECONV SRLICU/UCNVSTAT SRLICU/GENMBCS SRLICU/GENCNVEX) BNDSRVPGM(SRLICU/LIBICUUC48 SRLICU/LIBICUTU48 SRLICU/LIBICUIN48) OPTION(*DUPPROC *DUPVAR) REPLACE(*YES)
Handles .o ( modules ), .so ( srvpgm ), .a ( bnddir ).
TODO:
- cleanup
- much better error handling
- factor common code
- instead of caring about .o vs .so vs .a, just read the link - if it ends in .srvpgm then treat it as a service program, etc.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#ifndef TEST_MODE
#define TEST_MODE 0
#endif
#if !TEST_MODE
#include <qp0z1170.h>
#else
static int Qp0zSystem(const char *cmd) {
printf("CL: %s\n", cmd);
return 0;
}
#endif
static int runcmd(const char *cmd) {
int rc;
printf("%s\n", cmd);
rc = Qp0zSystem(cmd);
if(rc==0) {
printf("..ok\n");
return 0;
} else if(rc<0){
printf("..Qp0zSystem failed.\n");
return 1;
} else {
printf("..System call failed.\n");
return 1;
}
}
int main(int argc, const char *argv[]) {
int i;
char buf[8048];
char opt[4100];
char objs[4024];
char libs[4024];
char bnddirs[4024];
const char *prog="";
const char *progshort=prog;
const char *outputdir=getenv("OUTPUTDIR");
printf("# OUTPUTDIR=%s ",outputdir);
for(i=0;i<argc;i++) {
printf("%s ", argv[i]);
}
printf("\n");
buf[0]=0;
opt[0]=0;
objs[0]=0;
libs[0]=0;
bnddirs[0]=0;
for(i=1;i<argc;i++) {
if(argv[i][0]=='-') {
switch(argv[i][1]) {
case 'O':
printf(".. ignoring optimization: %s\n", argv[i]);
break;
case 'g':
printf(".. ignoring debugging: %s\n", argv[i]);
break;
case 'l':
printf(".. ignoring lib: %s\n", argv[i]);
break;
case 'v':
printf(".. already verbose\n");
break;
case 'o':
i++;
prog=argv[i];
progshort=strrchr(prog,'/');
if(!progshort) {
progshort=prog;
} else {
progshort++; /* / */
}
break;
case 'q':
if(!strncmp(argv[i]+2,"OPTION=",7)) {
strcat(opt,argv[i]+9);