httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-2.0/src/main util.c
Date Mon, 23 Oct 2000 16:58:25 GMT
wrowe       00/10/23 09:58:25

  Modified:    src/main util.c
  Log:
    A more thorough example is appropriate.  Also simplify the behavior and
    always return root (/) if n < 1, which is no worse than returning elems
    if n > elems.
  
  Revision  Changes    Path
  1.76      +8 -3      apache-2.0/src/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- util.c	2000/10/19 10:43:03	1.75
  +++ util.c	2000/10/23 16:58:21	1.76
  @@ -564,20 +564,25 @@
    * *** See also directory_walk in src/main/http_request.c
   
    * examples:
  + *    /a/b, 0  ==> /  (true for all platforms)
    *    /a/b, 1  ==> /
    *    /a/b, 2  ==> /a/
    *    /a/b, 3  ==> /a/b/
    *    /a/b, 4  ==> /a/b/
  + *
  + *    c:/a/b 0 ==> /
  + *    c:/a/b 1 ==> c:/
  + *    c:/a/b 2 ==> c:/a/
  + *    c:/a/b 3 ==> c:/a/b
  + *    c:/a/b 4 ==> c:/a/b
    */
   AP_DECLARE(char *) ap_make_dirstr_prefix(char *d, const char *s, int n)
   {
  -#if defined(HAVE_DRIVE_LETTERS) || defined(NETWARE)
  -    if (!n) {
  +    if (n < 1) {
           *d = '/';
           *++d = '\0';
           return (d);
       }
  -#endif /* def HAVE_DRIVE_LETTERS || NETWARE */
   
       for (;;) {
   	if (*s == '\0' || (*s == '/' && (--n) == 0)) {
  
  
  

Mime
View raw message