dougm       01/08/19 08:52:18

  Modified:    include  apr_uri.h
               uri      apr_uri.c
  Log:
  namespace protection: s/UNP_*/APR_URI_UNP_*/
  
  Revision  Changes    Path
  1.5       +14 -14    apr-util/include/apr_uri.h
  
  Index: apr_uri.h
  ===================================================================
  RCS file: /home/cvs/apr-util/include/apr_uri.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apr_uri.h 2001/06/13 22:56:21     1.4
  +++ apr_uri.h 2001/08/19 15:52:18     1.5
  @@ -95,13 +95,13 @@
   #define APU_URI_SIP_DEFAULT_PORT       5060
   
   /* Flags passed to unparse_uri_components(): */
  -#define UNP_OMITSITEPART     (1U<<0) /* suppress "scheme://[EMAIL 
PROTECTED]:port" */
  -#define      UNP_OMITUSER            (1U<<1) /* Just omit user */
  -#define      UNP_OMITPASSWORD        (1U<<2) /* Just omit password */
  -#define      UNP_OMITUSERINFO        (UNP_OMITUSER|UNP_OMITPASSWORD) /* omit 
"user:password@" part */
  -#define      UNP_REVEALPASSWORD      (1U<<3) /* Show plain text password 
(default: show XXXXXXXX) */
  -#define UNP_OMITPATHINFO     (1U<<4) /* Show "scheme://[EMAIL 
PROTECTED]:port" only */
  -#define UNP_OMITQUERY                (1U<<5) /* Omit the "?queryarg" from 
the path */
  +#define APR_URI_UNP_OMITSITEPART     (1U<<0) /* suppress "scheme://[EMAIL 
PROTECTED]:port" */
  +#define      APR_URI_UNP_OMITUSER            (1U<<1) /* Just omit user */
  +#define      APR_URI_UNP_OMITPASSWORD        (1U<<2) /* Just omit password */
  +#define      APR_URI_UNP_OMITUSERINFO        
(APR_URI_UNP_OMITUSER|APR_URI_UNP_OMITPASSWORD) /* omit "user:password@" part */
  +#define      APR_URI_UNP_REVEALPASSWORD      (1U<<3) /* Show plain text 
password (default: show XXXXXXXX) */
  +#define APR_URI_UNP_OMITPATHINFO     (1U<<4) /* Show "scheme://[EMAIL 
PROTECTED]:port" only */
  +#define APR_URI_UNP_OMITQUERY                (1U<<5) /* Omit the "?queryarg" 
from the path */
   
   typedef struct apr_uri_components apr_uri_components;
   
  @@ -161,13 +161,13 @@
    * @param uptr All of the parts of the uri
    * @param flags How to unparse the uri.  One of:
    * <PRE>
  - *    UNP_OMITSITEPART        suppress "scheme://[EMAIL PROTECTED]:port" 
  - *    UNP_OMITUSER            Just omit user 
  - *    UNP_OMITPASSWORD        Just omit password 
  - *    UNP_OMITUSERINFO        omit "user:password@" part 
  - *    UNP_REVEALPASSWORD      Show plain text password (default: show 
XXXXXXXX) 
  - *    UNP_OMITPATHINFO        Show "scheme://[EMAIL PROTECTED]:port" only 
  - *    UNP_OMITQUERY           Omit the "?queryarg" from the path 
  + *    APR_URI_UNP_OMITSITEPART        suppress "scheme://[EMAIL 
PROTECTED]:port" 
  + *    APR_URI_UNP_OMITUSER            Just omit user 
  + *    APR_URI_UNP_OMITPASSWORD        Just omit password 
  + *    APR_URI_UNP_OMITUSERINFO        omit "user:password@" part 
  + *    APR_URI_UNP_REVEALPASSWORD      Show plain text password (default: 
show XXXXXXXX) 
  + *    APR_URI_UNP_OMITPATHINFO        Show "scheme://[EMAIL PROTECTED]:port" 
only 
  + *    APR_URI_UNP_OMITQUERY           Omit the "?queryarg" from the path 
    * </PRE>
    * @return The uri as a string
    * @deffunc char * apr_uri_unparse_components(apr_pool_t *p, const 
apr_uri_components *uptr, unsigned flags)
  
  
  
  1.8       +13 -13    apr-util/uri/apr_uri.c
  
  Index: apr_uri.c
  ===================================================================
  RCS file: /home/cvs/apr-util/uri/apr_uri.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apr_uri.c 2001/08/18 04:00:22     1.7
  +++ apr_uri.c 2001/08/19 15:52:18     1.8
  @@ -129,18 +129,18 @@
       char *ret = "";
   
       /* If suppressing the site part, omit both user name & scheme://hostname 
*/
  -    if (!(flags & UNP_OMITSITEPART)) {
  +    if (!(flags & APR_URI_UNP_OMITSITEPART)) {
   
  -     /* Construct a "user:password@" string, honoring the passed UNP_ flags: 
*/
  +     /* Construct a "user:password@" string, honoring the passed 
APR_URI_UNP_ flags: */
        if (uptr->user||uptr->password)
            ret = apr_pstrcat (p,
  -                     (uptr->user     && !(flags & UNP_OMITUSER)) ? 
uptr->user : "",
  -                     (uptr->password && !(flags & UNP_OMITPASSWORD)) ? ":" : 
"",
  -                     (uptr->password && !(flags & UNP_OMITPASSWORD))
  -                        ? ((flags & UNP_REVEALPASSWORD) ? uptr->password : 
"XXXXXXXX")
  +                     (uptr->user     && !(flags & APR_URI_UNP_OMITUSER)) ? 
uptr->user : "",
  +                     (uptr->password && !(flags & APR_URI_UNP_OMITPASSWORD)) 
? ":" : "",
  +                     (uptr->password && !(flags & APR_URI_UNP_OMITPASSWORD))
  +                        ? ((flags & APR_URI_UNP_REVEALPASSWORD) ? 
uptr->password : "XXXXXXXX")
                           : "",
  -            ((uptr->user     && !(flags & UNP_OMITUSER)) ||
  -             (uptr->password && !(flags & UNP_OMITPASSWORD))) ? "@" : "", 
  +            ((uptr->user     && !(flags & APR_URI_UNP_OMITUSER)) ||
  +             (uptr->password && !(flags & APR_URI_UNP_OMITPASSWORD))) ? "@" 
: "", 
               NULL);
   
        /* Construct scheme://site string */
  @@ -162,15 +162,15 @@
       }
   
       /* Should we suppress all path info? */
  -    if (!(flags & UNP_OMITPATHINFO)) {
  +    if (!(flags & APR_URI_UNP_OMITPATHINFO)) {
        /* Append path, query and fragment strings: */
        ret = apr_pstrcat (p,
                ret,
                uptr->path ? uptr->path : "",
  -             (uptr->query    && !(flags & UNP_OMITQUERY)) ? "?" : "",
  -             (uptr->query    && !(flags & UNP_OMITQUERY)) ? uptr->query : "",
  -             (uptr->fragment && !(flags & UNP_OMITQUERY)) ? "#" : NULL,
  -             (uptr->fragment && !(flags & UNP_OMITQUERY)) ? uptr->fragment : 
NULL,
  +             (uptr->query    && !(flags & APR_URI_UNP_OMITQUERY)) ? "?" : "",
  +             (uptr->query    && !(flags & APR_URI_UNP_OMITQUERY)) ? 
uptr->query : "",
  +             (uptr->fragment && !(flags & APR_URI_UNP_OMITQUERY)) ? "#" : 
NULL,
  +             (uptr->fragment && !(flags & APR_URI_UNP_OMITQUERY)) ? 
uptr->fragment : NULL,
                NULL);
       }
       return ret;
  
  
  

Reply via email to