Changeset View
Changeset View
Standalone View
Standalone View
head/cddl/contrib/opensolaris/lib/libdtrace/common/mkerrno.sh
Show All 18 Lines | |||||
# information: Portions Copyright [yyyy] [name of copyright owner] | # information: Portions Copyright [yyyy] [name of copyright owner] | ||||
# | # | ||||
# CDDL HEADER END | # CDDL HEADER END | ||||
# | # | ||||
# | # | ||||
# Copyright 2003 Sun Microsystems, Inc. All rights reserved. | # Copyright 2003 Sun Microsystems, Inc. All rights reserved. | ||||
# Use is subject to license terms. | # Use is subject to license terms. | ||||
# | # | ||||
#ident "%Z%%M% %I% %E% SMI" | |||||
set -e | set -e | ||||
echo "\ | printf "%s" " | ||||
/*\n\ | /* | ||||
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.\n\ | * Copyright 2003 Sun Microsystems, Inc. All rights reserved. | ||||
* Use is subject to license terms.\n\ | * Use is subject to license terms. | ||||
*/\n\ | */ | ||||
\n\ | |||||
#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n" | " | ||||
pattern='^#define[ ]\(E[A-Z0-9]*\)[ ]*\([A-Z0-9]*\).*$' | pattern='^#define[ ]\(E[A-Z0-9]*\)[ ]*\([A-Z0-9]*\).*$' | ||||
replace='inline int \1 = \2;@#pragma D binding "1.0" \1' | replace='inline int \1 = \2;@#pragma D binding "1.0" \1' | ||||
sed -n "s/$pattern/$replace/p" | tr '@' '\n' | sed -n "s/$pattern/$replace/p" | tr '@' '\n' |