#!/bin/sh
# generate a list of all of the deprecated methods
#!/bin/sh
# Look for deprecated methods in the html documentation

# Author:  Christopher Hylands
# Version: $Id: deprecated,v 1.7 2005/02/28 20:51:11 cxh Exp $
#
# Copyright (c) 1999-2005 The Regents of the University of California.
# 	All Rights Reserved.
#
# Permission is hereby granted, without written agreement and without
# license or royalty fees, to use, copy, modify, and distribute this
# software and its documentation for any purpose, provided that the
# above copyright notice and the following two paragraphs appear in all
# copies of this software.
#
# IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
# ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
# THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
# PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
# CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
# ENHANCEMENTS, OR MODIFICATIONS.
#
# 						PT_COPYRIGHT_VERSION_2
# 						COPYRIGHTENDKEY

PTII=/users/ptII/adm/trees/ptII0.4

# File generated by javadoc that contains all the deprecated methods
deprecatedfile=$PTII/doc/codeDoc/deprecated-list.html


# Find all the deprecated methods
methods=`grep ptolemy/ $deprecatedfile |
	awk -F\" '{print $2}' |
	awk -F/ '{print $NF}' |
	awk -F\# '{print $2}' |
	awk -F\( '{print $1}' |  sort | uniq |
	grep -v "^Complex$" |
	grep -v "^description$" |
	grep -v "^elements$" |
	grep -v "^init$" |
	grep -v "^initialize$" |
	grep -v "^mag$" |
	grep -v "^take$" |
	grep -v "^terminate$" |
	grep -v "^typeConstraints$" |
	grep -v "^directory$"`

echo $methods

# Search for them in the html version of the documentation
for method in $methods
do
	result=`grep $method $PTII/doc/design/html/*.html`
	status=$?
	if [ $status = 0 ]; then
		echo "-------------$method---------------"
		echo $result |	awk '{printf "%10s %s\n", method, $0}' method=$method -
	fi
done
