HPUX getcdf[3c]






 getcdf(3C)                                                       getcdf(3C)





 NAME
      getcdf(), hidecdf() - manipulate CDF path names

 SYNOPSIS
      #include <unistd.h>

      char *getcdf(const char *path, char *buf, size_t size);

      char *hidecdf(const char *path, char *buf, size_t size);

 DESCRIPTION
      getcdf() and hidecdf() manipulate path names possibly containing CDF
      (hidden directory) components.

      getcdf()       Returns a pointer to the expanded path matching the
                     path name in path.  The path argument can be a context
                     dependent file (CDF) in which case a path name with all
                     hidden directories expanded is returned.  If path is
                     not a CDF, a copy of the original path name is
                     returned.

      hidecdf()      Returns a pointer to the simplified path corresponding
                     to path.  Any context-dependent components in the
                     original path that match the current context (see
                     context(5)) are removed from the resulting path.

      The value of size must be at least one greater than the length of the
      path name to be returned.

      If buf is not a NULL pointer, getcdf() and hidecdf() copy the expanded
      path name into array buf.  If buf is a NULL pointer, getcdf() and
      hidecdf() obtain size bytes of space using malloc() (see malloc(3C)).
      In this case, the pointer returned by getcdf() and hidecdf() can be
      used as an argument in a subsequent call to free() (see malloc(3C)).

 RETURN VALUE
      Upon successful completion, getcdf() and hidecdf() return a pointer to
      the resulting path name.  Otherwise, a value of NULL is returned and
      errno is set to indicate the error.

 ERRORS
      If either getcdf() or hidecdf() fails, it will set errno to one of the
      following values:

           [ENOENT]                 A component of path does not exist.

           [EACCES]                 Read or search permission is denied for
                                    one of the directories given in path.

           [ENAMETOOLONG]           size is not large enough to hold the
                                    resulting path.



 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 getcdf(3C)                                                       getcdf(3C)





 EXAMPLES
           #include <stdio.h>

           char *path, *cdf, *getcdf();
           int size;
                 ...
           if ((cdf = getcdf(path, NULL, size)) == NULL) {
               perror("getcdf");
               exit(1);
           }
           printf("%s\n", cdf);
           free(cdf);

 AUTHOR
      getcdf() and hidecdf() were developed by HP.

 SEE ALSO
      showcdf(1), malloc(3C), cdf(4), context(5).




































 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992