apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr/file_io/netware filestat.c
Date Fri, 02 Aug 2002 20:47:17 GMT
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;
  
  
  

Mime
View raw message