Made fts_pointer and fts_number fields separate fields.
authorElan Amir <elan@ucbvax.Berkeley.EDU>
Fri, 6 Mar 1992 08:34:01 +0000 (00:34 -0800)
committerElan Amir <elan@ucbvax.Berkeley.EDU>
Fri, 6 Mar 1992 08:34:01 +0000 (00:34 -0800)
SCCS-vsn: include/fts.h 5.23
SCCS-vsn: lib/libc/gen/fts.c 5.33
SCCS-vsn: lib/libc/gen/fts.3 5.21

usr/src/include/fts.h
usr/src/lib/libc/gen/fts.3
usr/src/lib/libc/gen/fts.c

index 2527646..eaa273e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)fts.h       5.22 (Berkeley) %G%
+ *     @(#)fts.h       5.23 (Berkeley) %G%
  */
 
 #ifndef        _FTS_H_
  */
 
 #ifndef        _FTS_H_
@@ -39,12 +39,8 @@ typedef struct _ftsent {
        struct _ftsent *fts_cycle;      /* cycle node */
        struct _ftsent *fts_parent;     /* parent directory */
        struct _ftsent *fts_link;       /* next file in directory */
        struct _ftsent *fts_cycle;      /* cycle node */
        struct _ftsent *fts_parent;     /* parent directory */
        struct _ftsent *fts_link;       /* next file in directory */
-       union {
-               long number;            /* local numeric value */
-               void *pointer;          /* local address value */
-       } fts_local;
-#define        fts_number      fts_local.number
-#define        fts_pointer     fts_local.pointer
+       long fts_number;                /* local numeric value */
+       void *fts_pointer;              /* local address value */
        char *fts_accpath;              /* access path */
        char *fts_path;                 /* root path */
        int fts_errno;                  /* errno for this node */
        char *fts_accpath;              /* access path */
        char *fts_path;                 /* root path */
        int fts_errno;                  /* errno for this node */
index 6b6bc92..0d2e271 100644 (file)
@@ -3,7 +3,7 @@
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"     @(#)fts.3      5.20 (Berkeley) %G%
+.\"     @(#)fts.3      5.21 (Berkeley) %G%
 .\"
 .Dd 
 .Dt FTS 3
 .\"
 .Dd 
 .Dt FTS 3
@@ -230,12 +230,6 @@ not modified by the
 .Nm fts
 functions.
 It is initialized to 0.
 .Nm fts
 functions.
 It is initialized to 0.
-The
-.Fa fts_number
-and
-.Fa fts_pointer
-fields occupy the same physical location; using both may cause undefined
-results.
 .It Fa fts_pointer
 This field is provided for the use of the application program and is
 not modified by the
 .It Fa fts_pointer
 This field is provided for the use of the application program and is
 not modified by the
@@ -243,12 +237,6 @@ not modified by the
 functions.
 It is initialized to
 .Dv NULL .
 functions.
 It is initialized to
 .Dv NULL .
-The
-.Fa fts_number
-and
-.Fa fts_pointer
-fields occupy the same physical location; using both may cause undefined
-results.
 .It Fa fts_parent
 A pointer to the
 .Fa FTSENT
 .It Fa fts_parent
 A pointer to the
 .Fa FTSENT
index 496bd3f..488525b 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fts.c      5.32 (Berkeley) %G%";
+static char sccsid[] = "@(#)fts.c      5.33 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
@@ -847,9 +847,7 @@ fts_alloc(sp, name, len)
        p->fts_flags = 0;
        p->fts_instr = FTS_NOINSTR;
        p->fts_number = 0;
        p->fts_flags = 0;
        p->fts_instr = FTS_NOINSTR;
        p->fts_number = 0;
-#ifdef NOT_NECESSARY
        p->fts_pointer = NULL;
        p->fts_pointer = NULL;
-#endif
        return (p);
 }
 
        return (p);
 }