OSSP CVS Repository

ossp - Check-in [3261]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3261
Date: 2003-Feb-16 12:38:11 (local)
2003-Feb-16 11:38:11 (UTC)
User:rse
Branch:
Comment: remove trailing whitespaces from source files
Tickets:
Inspections:
Files:
ossp-pkg/path/ChangeLog      added-> 1.2
ossp-pkg/path/README      added-> 1.2
ossp-pkg/path/devtool      1.1 -> 1.2     1 inserted, 1 deleted
ossp-pkg/path/devtool.func      1.2 -> 1.3     1 inserted, 1 deleted
ossp-pkg/path/path-config.in      1.2 -> 1.3     1 inserted, 1 deleted
ossp-pkg/path/path.pod      1.3 -> 1.4     4 inserted, 4 deleted
ossp-pkg/path/path_abs2rel.c      1.2 -> 1.3     3 inserted, 3 deleted
ossp-pkg/path/path_basename.c      1.2 -> 1.3     1 inserted, 1 deleted
ossp-pkg/path/path_canon.c      1.1 -> 1.2     7 inserted, 7 deleted
ossp-pkg/path/path_rel2abs.c      1.2 -> 1.3     5 inserted, 5 deleted
ossp-pkg/path/path_resolve.c      1.2 -> 1.3     1 inserted, 1 deleted
ossp-pkg/path/path_temp.c      1.1 -> 1.2     16 inserted, 16 deleted
ossp-pkg/path/path_util.c      1.1 -> 1.2     4 inserted, 4 deleted

ossp-pkg/path/ChangeLog -> 1.2

*** /dev/null    Sat Nov 23 01:33:41 2024
--- -    Sat Nov 23 01:34:07 2024
***************
*** 0 ****
--- 1,9 ----
+ 
+   o Taken FreeBSD 3.4's realpath.c/realpath.3 and created path_resolve.c
+     out of realpath.c, but support a size-restricted output buffer.
+   o Taken abs2rel.c/abs2rel.3 and rel2abs.c/rel2abs.3 from
+     PathConvert (http://www.tamacom.com/pathconvert/)
+   o Cleaned up the sources (K&R -> ANSI C, indentation, use path_ prefix, etc.)
+   o Added path.h
+   o Merged PathConverts's test suite into path_test.{c,pl}
+ 


ossp-pkg/path/README -> 1.2

*** /dev/null    Sat Nov 23 01:33:41 2024
--- -    Sat Nov 23 01:34:07 2024
***************
*** 0 ****
--- 1,12 ----
+    ____       _   _
+   |  _ \ __ _| |_| |__
+   | |_) / _` | __| '_ \
+   |  __/ (_| | |_| | | |
+   |_|   \__,_|\__|_| |_|
+ 
+   Path - Filesystem Path Manipulation Library
+ 
+   This product includes software developed by the University of California,
+   Berkeley and its contributors. This product includes software developed by
+   Shigio Yamaguchi.
+ 


ossp-pkg/path/devtool 1.1 -> 1.2

--- devtool      2002/01/21 13:32:35     1.1
+++ devtool      2003/02/16 11:38:11     1.2
@@ -1,7 +1,7 @@
 #!/bin/sh
 ##
 ##  devtool -- Development Tool
-##  Copyright (c) 2001 Ralf S. Engelschall <rse@engelschall.com> 
+##  Copyright (c) 2001 Ralf S. Engelschall <rse@engelschall.com>
 ##
 
 if [ $# -eq 0 ]; then


ossp-pkg/path/devtool.func 1.2 -> 1.3

--- devtool.func 2002/08/03 10:23:41     1.2
+++ devtool.func 2003/02/16 11:38:11     1.3
@@ -1,6 +1,6 @@
 ##
 ##  devtool.func -- Development Tool Functions
-##  Copyright (c) 2001-2002 Ralf S. Engelschall <rse@engelschall.com> 
+##  Copyright (c) 2001-2002 Ralf S. Engelschall <rse@engelschall.com>
 ##
 
 devtool_require () {


ossp-pkg/path/path-config.in 1.2 -> 1.3

--- path-config.in       2002/08/03 10:23:41     1.2
+++ path-config.in       2003/02/16 11:38:11     1.3
@@ -29,7 +29,7 @@
 ##  path-config.in: library build utility
 ##
 
-DIFS='  
+DIFS=' 
 '
 
 prefix="@prefix@"


ossp-pkg/path/path.pod 1.3 -> 1.4

--- path.pod     2002/08/03 21:00:15     1.3
+++ path.pod     2003/02/16 11:38:11     1.4
@@ -52,7 +52,7 @@
 
 B<OSSP path> is a filesystem path manipulation library. It allows one
 to convert between absolute and relative paths and to resolve symbolic
-links in a path. 
+links in a path.
 
 =head1 APPLICATION PROGRAMMING INTERFACE (API)
 
@@ -178,7 +178,7 @@
 You should convert the base directory into a real path in advance.
 
  path = path_abs2rel(result, sizeof(result),
-                     "/sys/kern", 
+                     "/sys/kern",
                      path_resolve(result2, sizeof(result2), "/sys"));
 
 This then yields:
@@ -188,8 +188,8 @@
 That is correct, but a little redundant. If you wish get the simple
 answer 'C<kern>', do the following.
 
- path = path_abs2rel(r0, sizeof(r0), 
-                     path_resolve(r1, sizeof(r1), "/sys/kern"), 
+ path = path_abs2rel(r0, sizeof(r0),
+                     path_resolve(r1, sizeof(r1), "/sys/kern"),
                      path_resolve(r2, sizeof(r2), "/sys"));
 
 The path_resolve(3) function assures correct result, but don't forget


ossp-pkg/path/path_abs2rel.c 1.2 -> 1.3

--- path_abs2rel.c       2002/08/03 10:23:41     1.2
+++ path_abs2rel.c       2003/02/16 11:38:11     1.3
@@ -89,11 +89,11 @@
             goto erange;
         strcpy(result, path);
         goto finish;
-    } 
+    }
     else if (*base != '/' || !size) {
         errno = EINVAL;
         return NULL;
-    } 
+    }
     else if (size == 1) {
         goto erange;
     }
@@ -143,7 +143,7 @@
         if (rp + strlen(branch + 1) > endp)
             goto erange;
         strcpy(rp, branch + 1);
-    } 
+    }
     else {
         *--rp = 0;
     }


ossp-pkg/path/path_basename.c 1.2 -> 1.3

--- path_basename.c      2002/08/03 10:23:41     1.2
+++ path_basename.c      2003/02/16 11:38:11     1.3
@@ -74,7 +74,7 @@
         if (path == NULL || *path == '\0')
                 return (strncpy(outbuf, ".", outsize));
 
-    /* skip leading slashes */ 
+    /* skip leading slashes */
         len = strspn(path, "/");
         if (len > 0)
                 path += len - 1;


ossp-pkg/path/path_canon.c 1.1 -> 1.2

--- path_canon.c 2002/08/27 19:04:33     1.1
+++ path_canon.c 2003/02/16 11:38:11     1.2
@@ -33,7 +33,7 @@
 
 #include "path.h"
 
-path_rc_t 
+path_rc_t
 path_canon(
     char       *res_buf, size_t res_len,
     const char *src_buf, size_t src_len)
@@ -59,13 +59,13 @@
     if (res_len == 0)
         res_len = strlen(res_buf);
 
-    /* perform processing 
+    /* perform processing
        (keep in mind that source and target can overlap) */
     res_ptr = res_buf;
     res_end = res_buf+res_len;
     src_ptr = src_buf;
     src_end = src_buf+src_len;
-    
+
     while (src_ptr < src_end && res_ptr < res_end) {
         /* recognize path separator */
         if (*src_ptr == '/') {
@@ -96,8 +96,8 @@
             /* path element is parent directory (".."),
                so skip over to next path element in source and
                skip back last path element in result */
-            if (   res_ptr == res_buf 
-                || (   res_ptr >= res_buf+3 
+            if (   res_ptr == res_buf
+                || (   res_ptr >= res_buf+3
                     && res_ptr[-1] == '/' && res_ptr[-2] == '.' && res_ptr[-3] == '.')) {
                 /* path is relative and empty or already explicit directing
                    to the parent directory, so keep explicit parent specification */
@@ -105,7 +105,7 @@
                     *res_ptr++ = *src_ptr++;
             }
             else {
-                /* there is already a path element in the 
+                /* there is already a path element in the
                    result which can be removed */
                 src_ptr += 2;
                 while (res_ptr > res_buf && res_ptr[-1] == '/')
@@ -119,7 +119,7 @@
             }
         }
         else {
-            /* path element something else, so copy 
+            /* path element something else, so copy
                it over from source to the result */
             while (src_ptr < src_end && res_ptr < res_end && src_ptr[0] != '/')
                 *res_ptr++ = *src_ptr++;


ossp-pkg/path/path_rel2abs.c 1.2 -> 1.3

--- path_rel2abs.c       2002/08/03 10:23:41     1.2
+++ path_rel2abs.c       2003/02/16 11:38:12     1.3
@@ -90,11 +90,11 @@
             goto erange;
         strcpy(result, path);
         goto finish;
-    } 
+    }
     else if (*base != '/' || !size) {
         errno = EINVAL;
         return (NULL);
-    } 
+    }
     else if (size == 1) {
         goto erange;
     }
@@ -133,15 +133,15 @@
             pp += 3;
             while (bp > base && *--bp != '/')
                 ;
-        } 
+        }
         else if (!strncmp(pp, "./", 2)) {
             pp += 2;
-        } 
+        }
         else if (!strncmp(pp, "..\0", 3)) {
             pp += 2;
             while (bp > base && *--bp != '/')
                 ;
-        } 
+        }
         else
             break;
     }


ossp-pkg/path/path_resolve.c 1.2 -> 1.3

--- path_resolve.c       2002/08/03 10:23:41     1.2
+++ path_resolve.c       2003/02/16 11:38:12     1.3
@@ -178,7 +178,7 @@
     outbuf[outsize-1] = '\0';
     return outbuf;
 
-err1:   
+err1:
     serrno = errno;
     fchdir(fd);
 err2:


ossp-pkg/path/path_temp.c 1.1 -> 1.2

--- path_temp.c  2002/08/03 21:00:15     1.1
+++ path_temp.c  2003/02/16 11:38:12     1.2
@@ -43,15 +43,15 @@
 #include "path.h"
 #include "path_util.h"
 
-static const char 
-path_temp_padchar[] = 
+static const char
+path_temp_padchar[] =
     "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
-path_rc_t 
+path_rc_t
 path_temp(
-    path_temp_t id, 
-    const char *tmpl, 
-    char      **res_ptr, 
+    path_temp_t id,
+    const char *tmpl,
+    char      **res_ptr,
     size_t     *res_size,
     int        *res_fd)
 {
@@ -60,7 +60,7 @@
     char *tmpdir;
     size_t n;
     char *user;
-    char user_buf[4+((sizeof(long)*8)/3)+10]; 
+    char user_buf[4+((sizeof(long)*8)/3)+10];
     const char *cp;
     const char *cpT;
     char *cpP;
@@ -97,27 +97,27 @@
             user = user_buf;
         }
         n = strlen(tmpdir);
-        path_msnprintf(tmpl_def, sizeof(tmpl_def), "%s%s%s.XXXXXXXX", 
+        path_msnprintf(tmpl_def, sizeof(tmpl_def), "%s%s%s.XXXXXXXX",
                        tmpdir, (tmpdir[n-1] != '/' ? "/" : ""), user_buf);
-        tmpl = tmpl_def;  
+        tmpl = tmpl_def;
     }
     else if (tmpl[0] != '/') {
         /* non-absolute path template */
         n = strlen(tmpdir);
-        path_msnprintf(tmpl_def, sizeof(tmpl_def), "%s%s%s", 
+        path_msnprintf(tmpl_def, sizeof(tmpl_def), "%s%s%s",
                        tmpdir, (tmpdir[n-1] != '/' ? "/" : ""), tmpl);
         if (strchr(tmpl_def, 'X') == NULL) {
             n = strlen(tmpl_def);
             path_msnprintf(tmpl_def+n, sizeof(tmpl_def)-n, ".XXXXXXXX");
         }
-        tmpl = tmpl_def;  
+        tmpl = tmpl_def;
     }
 
     /* seed PRNG as good as possible with POSIX features */
     gettimeofday(&tp, &tzp);
     pid = getpid();
     ppid = getppid();
-    srand(  (unsigned int)tp.tv_sec 
+    srand(  (unsigned int)tp.tv_sec
           + (unsigned int)tp.tv_usec
           + (unsigned int)uid
           + (unsigned int)pid
@@ -150,7 +150,7 @@
             }
             if (errno != EEXIST)
                 return PATH_ERR_SYS;
-        } 
+        }
         else if (id == PATH_TEMP_DIR) {
             if (mkdir(path, 0700) == 0) {
                 rc = PATH_OK;
@@ -158,8 +158,8 @@
             }
             if (errno != EEXIST)
                 return PATH_ERR_SYS;
-        } 
-        else 
+        }
+        else
             return PATH_ERR_ARG;
 
         /* path collision found, so cycle through namespace */
@@ -189,7 +189,7 @@
         else
             close(fd);
     }
- 
+
     return rc;
 }
 


ossp-pkg/path/path_util.c 1.1 -> 1.2

--- path_util.c  2002/08/03 21:00:15     1.1
+++ path_util.c  2003/02/16 11:38:12     1.2
@@ -40,8 +40,8 @@
 int path_mvxprintf(int (*output)(void *ctx, const char *buffer, size_t bufsize), void *ctx, const char *format, va_list ap)
 {
     /* sufficient integer buffer: <available-bits> x log_10(2) + safety */
-    char ibuf[((sizeof(int)*8)/3)+10]; 
-    char libuf[((sizeof(long)*8)/3)+10]; 
+    char ibuf[((sizeof(int)*8)/3)+10];
+    char libuf[((sizeof(long)*8)/3)+10];
     char *cp;
     char c;
     int d;
@@ -153,7 +153,7 @@
         return -1;
     if (buffer != NULL && bufsize == 0)
         return -1;
-    if (buffer == NULL) 
+    if (buffer == NULL)
         /* just determine output length */
         n = path_mvxprintf(NULL, NULL, format, ap);
     else {
@@ -187,7 +187,7 @@
 char *path_mvasnprintf(const char *format, va_list ap)
 {
     char *buffer;
-    size_t bufsize; 
+    size_t bufsize;
     va_list apbak;
 
     apbak = ap;

CVSTrac 2.0.1