2 # $XConsortium: BuildOidHdrs.sh /main/3 1996/08/12 18:41:52 cde-hp $
4 # (c) Copyright 1996 Digital Equipment Corporation.
5 # (c) Copyright 1996 Hewlett-Packard Company.
6 # (c) Copyright 1996 International Business Machines Corp.
7 # (c) Copyright 1996 Sun Microsystems, Inc.
8 # (c) Copyright 1996 Novell, Inc.
9 # (c) Copyright 1996 FUJITSU LIMITED.
10 # (c) Copyright 1996 Hitachi.
18 oid_tmp=$tmpbase.oid_tmp
19 str_tmp=$tmpbase.str_tmp
21 rm -f $oid_tmp > /dev/null 2>&1
22 rm -f $str_tmp > /dev/null 2>&1
26 echo "parsing $in_file \c"
30 while read oid str mset mnum defmsg
32 if [ -n "$oid" -a "$oid" != "#" ]
41 echo " $oid\c" >> $oid_tmp
42 str_length=`echo "$str\c" | wc -c`
43 if [ -z "$mset" ] ; then
46 if [ -z "$mnum" ] ; then
49 if [ -z "$defmsg" ] ; then
50 defmsg="(const char*)NULL"
54 echo " { \"$str\", $str_length, $mset, $mnum, $defmsg }\c" \
65 echo "creating $oid_file ...\c"
68 echo '/* $'XConsortium'$ */'
69 echo '/* This is an automatically-generated file. Do not edit. */'
71 * (c) Copyright 1996 Digital Equipment Corporation.
72 * (c) Copyright 1996 Hewlett-Packard Company.
73 * (c) Copyright 1996 International Business Machines Corp.
74 * (c) Copyright 1996 Sun Microsystems, Inc.
75 * (c) Copyright 1996 Novell, Inc.
76 * (c) Copyright 1996 FUJITSU LIMITED.
77 * (c) Copyright 1996 Hitachi.
87 echo "creating $str_file ...\c"
90 echo '/* $'XConsortium'$ */'
91 echo '/* This is an automatically-generated file. Do not edit. */'
93 * (c) Copyright 1996 Digital Equipment Corporation.
94 * (c) Copyright 1996 Hewlett-Packard Company.
95 * (c) Copyright 1996 International Business Machines Corp.
96 * (c) Copyright 1996 Sun Microsystems, Inc.
97 * (c) Copyright 1996 Novell, Inc.
98 * (c) Copyright 1996 FUJITSU LIMITED.
99 * (c) Copyright 1996 Hitachi.
102 echo "static int PdmOidStringMapCount = `cat $str_tmp | wc -l`;"
104 echo 'static const PdmOidStringMapEntry PdmOidStringMap[] = {'
111 rm -f $oid_tmp > /dev/null 2>&1
112 rm -f $str_tmp > /dev/null 2>&1