Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 59784 invoked from network); 12 Aug 2007 21:10:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Aug 2007 21:10:38 -0000 Received: (qmail 36469 invoked by uid 500); 12 Aug 2007 21:10:36 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 36442 invoked by uid 500); 12 Aug 2007 21:10:36 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 36433 invoked by uid 99); 12 Aug 2007 21:10:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Aug 2007 14:10:36 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Aug 2007 21:10:35 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0729B1A981A; Sun, 12 Aug 2007 14:10:12 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r565151 - /harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h Date: Sun, 12 Aug 2007 21:10:11 -0000 To: commits@harmony.apache.org From: dlydick@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070812211012.0729B1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dlydick Date: Sun Aug 12 14:10:11 2007 New Revision: 565151 URL: http://svn.apache.org/viewvc?view=rev&rev=565151 Log: Added typedef (struct classpath_search) and changed classpath_get_from_prchar() and classpath_get_from_cp_entry_utf() prototypes to use it. Added prototype for classpath_free_search_result(). Modified: harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h Modified: harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h URL: http://svn.apache.org/viewvc/harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h?view=diff&rev=565151&r1=565150&r2=565151 ============================================================================== --- harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h (original) +++ harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/classpath.h Sun Aug 12 14:10:11 2007 @@ -78,6 +78,7 @@ "$URL$", "$Id$"); +#include "jar.h" /*! * @brief Delimiter betwen members of @b CLASSPATH string @@ -108,10 +109,40 @@ /*@} */ +/*! + * @brief Search result from examining @b CLASSPATH + * + * + * The result of classpath_get_from_cp_entry_utf() is either a class + * file or a Java archive file member class file. One of these + * structure members will be @link #rnull rnull@endlink and one will + * contain a valid pointer. + * + * If it is a Java archive file member, that pointer contains the state + * of an open JAR file, so it @e must be examined, at least + * enough to close the file handle. Otherwise, open file handles will + * accumulate. + * + * One member or the other will be non-null. If both members are null, + * then the class was not found in this @b CLASSPATH entry. + * + * In both cases, non-null the pointer will need to be freed when + * processing of that class is done. + * + */ +typedef struct +{ + rchar *classfile_name; /**< Name of class file defining + this class */ + + jar_state *jarfile_member_state; /**< State of open Java archive + file containing this class */ + +} classpath_search; + /* Prototypes for functions in 'classpath.c' */ extern rvoid classpath_init(rvoid); -extern rvoid classpath_shutdown(rvoid); extern rboolean classpath_isjar(rchar *pclasspath); @@ -120,11 +151,14 @@ extern rchar *classpath_external2internal_classname_inplace(rchar *inoutbfr); -extern rchar *classpath_get_from_prchar(rchar *clsname); +extern classpath_search *classpath_get_from_prchar(rchar *clsname); -extern rchar *classpath_get_from_cp_entry_utf( +extern classpath_search *classpath_get_from_cp_entry_utf( cp_info_mem_align *clsname); +extern rvoid classpath_free_search_result(classpath_search *pcpsr); + +extern rvoid classpath_shutdown(rvoid); #endif /* _classpath_h_included_ */