Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 52570 invoked by uid 500); 2 Aug 2002 20:47:18 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 52559 invoked from network); 2 Aug 2002 20:47:18 -0000 Date: 2 Aug 2002 20:47:17 -0000 Message-ID: <20020802204717.13847.qmail@icarus.apache.org> From: bnicholes@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/file_io/netware filestat.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N bnicholes 2002/08/02 13:47:17 Modified: file_io/netware filestat.c Log: Introducing a new API for resolving the file name to disk Revision Changes Path 1.16 +11 -3 apr/file_io/netware/filestat.c Index: filestat.c =================================================================== RCS file: /home/cvs/apr/file_io/netware/filestat.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- filestat.c 31 Jul 2002 20:06:06 -0000 1.15 +++ filestat.c 2 Aug 2002 20:47:17 -0000 1.16 @@ -107,15 +107,23 @@ char *case_filename(apr_pool_t *pPool, const char *szFile) { char *casedFileName = NULL; - char buf[1024]; - NXDirAttrWithName_t *attrBuf; + char name[1024]; int rc; - attrBuf = (NXDirAttrWithName_t *) &buf; +#ifdef NEW_API + rc = realname(szFile, name); + if (rc == 0) { + casedFileName = apr_pstrdup(pPool, name); + } +#else + NXDirAttrWithName_t *attrBuf; + + attrBuf = (NXDirAttrWithName_t *) &name; rc =NXGetAttr(NULL, szFile, NX_DELEVEL_NAME_ONLY, attrBuf, 1024, 0); if (rc == 0) { casedFileName = apr_pstrdup(pPool, attrBuf->deName); } +#endif else { char *s;