head 1.19; access; symbols netbsd-10-0-RELEASE:1.19 netbsd-10-0-RC6:1.19 netbsd-10-0-RC5:1.19 netbsd-10-0-RC4:1.19 netbsd-10-0-RC3:1.19 netbsd-10-0-RC2:1.19 netbsd-10-0-RC1:1.19 netbsd-10:1.19.0.58 netbsd-10-base:1.19 netbsd-9-3-RELEASE:1.19 cjep_sun2x-base1:1.19 cjep_sun2x:1.19.0.56 cjep_sun2x-base:1.19 cjep_staticlib_x-base1:1.19 netbsd-9-2-RELEASE:1.19 cjep_staticlib_x:1.19.0.54 cjep_staticlib_x-base:1.19 netbsd-9-1-RELEASE:1.19 phil-wifi-20200421:1.19 phil-wifi-20200411:1.19 is-mlppp:1.19.0.52 is-mlppp-base:1.19 phil-wifi-20200406:1.19 netbsd-8-2-RELEASE:1.19 netbsd-9-0-RELEASE:1.19 netbsd-9-0-RC2:1.19 netbsd-9-0-RC1:1.19 phil-wifi-20191119:1.19 netbsd-9:1.19.0.50 netbsd-9-base:1.19 phil-wifi-20190609:1.19 netbsd-8-1-RELEASE:1.19 netbsd-8-1-RC1:1.19 pgoyette-compat-merge-20190127:1.19 pgoyette-compat-20190127:1.19 pgoyette-compat-20190118:1.19 pgoyette-compat-1226:1.19 pgoyette-compat-1126:1.19 pgoyette-compat-1020:1.19 pgoyette-compat-0930:1.19 pgoyette-compat-0906:1.19 netbsd-7-2-RELEASE:1.19 pgoyette-compat-0728:1.19 netbsd-8-0-RELEASE:1.19 phil-wifi:1.19.0.48 phil-wifi-base:1.19 pgoyette-compat-0625:1.19 netbsd-8-0-RC2:1.19 pgoyette-compat-0521:1.19 pgoyette-compat-0502:1.19 pgoyette-compat-0422:1.19 netbsd-8-0-RC1:1.19 pgoyette-compat-0415:1.19 pgoyette-compat-0407:1.19 pgoyette-compat-0330:1.19 pgoyette-compat-0322:1.19 pgoyette-compat-0315:1.19 netbsd-7-1-2-RELEASE:1.19 pgoyette-compat:1.19.0.46 pgoyette-compat-base:1.19 netbsd-7-1-1-RELEASE:1.19 matt-nb8-mediatek:1.19.0.44 matt-nb8-mediatek-base:1.19 perseant-stdc-iso10646:1.19.0.42 perseant-stdc-iso10646-base:1.19 netbsd-8:1.19.0.40 netbsd-8-base:1.19 prg-localcount2-base3:1.19 prg-localcount2-base2:1.19 prg-localcount2-base1:1.19 prg-localcount2:1.19.0.38 prg-localcount2-base:1.19 pgoyette-localcount-20170426:1.19 bouyer-socketcan-base1:1.19 pgoyette-localcount-20170320:1.19 netbsd-7-1:1.19.0.36 netbsd-7-1-RELEASE:1.19 netbsd-7-1-RC2:1.19 netbsd-7-nhusb-base-20170116:1.19 bouyer-socketcan:1.19.0.34 bouyer-socketcan-base:1.19 pgoyette-localcount-20170107:1.19 netbsd-7-1-RC1:1.19 pgoyette-localcount-20161104:1.19 netbsd-7-0-2-RELEASE:1.19 localcount-20160914:1.19 netbsd-7-nhusb:1.19.0.32 netbsd-7-nhusb-base:1.19 pgoyette-localcount-20160806:1.19 pgoyette-localcount-20160726:1.19 pgoyette-localcount:1.19.0.30 pgoyette-localcount-base:1.19 netbsd-7-0-1-RELEASE:1.19 netbsd-7-0:1.19.0.28 netbsd-7-0-RELEASE:1.19 netbsd-7-0-RC3:1.19 netbsd-7-0-RC2:1.19 netbsd-7-0-RC1:1.19 netbsd-5-2-3-RELEASE:1.17 netbsd-5-1-5-RELEASE:1.17 netbsd-6-0-6-RELEASE:1.19 netbsd-6-1-5-RELEASE:1.19 netbsd-7:1.19.0.26 netbsd-7-base:1.19 yamt-pagecache-base9:1.19 yamt-pagecache-tag8:1.19 netbsd-6-1-4-RELEASE:1.19 netbsd-6-0-5-RELEASE:1.19 tls-earlyentropy:1.19.0.24 tls-earlyentropy-base:1.19 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.19 riastradh-drm2-base3:1.19 netbsd-6-1-3-RELEASE:1.19 netbsd-6-0-4-RELEASE:1.19 netbsd-5-2-2-RELEASE:1.17 netbsd-5-1-4-RELEASE:1.17 netbsd-6-1-2-RELEASE:1.19 netbsd-6-0-3-RELEASE:1.19 netbsd-5-2-1-RELEASE:1.17 netbsd-5-1-3-RELEASE:1.17 netbsd-6-1-1-RELEASE:1.19 riastradh-drm2-base2:1.19 riastradh-drm2-base1:1.19 riastradh-drm2:1.19.0.18 riastradh-drm2-base:1.19 netbsd-6-1:1.19.0.22 netbsd-6-0-2-RELEASE:1.19 netbsd-6-1-RELEASE:1.19 netbsd-6-1-RC4:1.19 netbsd-6-1-RC3:1.19 agc-symver:1.19.0.20 agc-symver-base:1.19 netbsd-6-1-RC2:1.19 netbsd-6-1-RC1:1.19 yamt-pagecache-base8:1.19 netbsd-5-2:1.17.0.8 netbsd-6-0-1-RELEASE:1.19 yamt-pagecache-base7:1.19 netbsd-5-2-RELEASE:1.17 netbsd-5-2-RC1:1.17 matt-nb6-plus-nbase:1.19 yamt-pagecache-base6:1.19 netbsd-6-0:1.19.0.16 netbsd-6-0-RELEASE:1.19 netbsd-6-0-RC2:1.19 tls-maxphys:1.19.0.14 tls-maxphys-base:1.19 matt-nb6-plus:1.19.0.12 matt-nb6-plus-base:1.19 netbsd-6-0-RC1:1.19 yamt-pagecache-base5:1.19 yamt-pagecache-base4:1.19 netbsd-6:1.19.0.10 netbsd-6-base:1.19 netbsd-5-1-2-RELEASE:1.17 netbsd-5-1-1-RELEASE:1.17 yamt-pagecache-base3:1.19 yamt-pagecache-base2:1.19 yamt-pagecache:1.19.0.8 yamt-pagecache-base:1.19 cherry-xenmp:1.19.0.6 cherry-xenmp-base:1.19 uebayasi-xip-base7:1.19 bouyer-quota2-nbase:1.19 bouyer-quota2:1.19.0.4 bouyer-quota2-base:1.19 matt-mips64-premerge-20101231:1.19 matt-nb5-mips64-premerge-20101231:1.17 matt-nb5-pq3:1.17.0.20 matt-nb5-pq3-base:1.17 netbsd-5-1:1.17.0.18 uebayasi-xip-base6:1.19 uebayasi-xip-base5:1.19 netbsd-5-1-RELEASE:1.17 uebayasi-xip-base4:1.19 uebayasi-xip-base3:1.19 netbsd-5-1-RC4:1.17 matt-nb5-mips64-k15:1.17 uebayasi-xip-base2:1.19 netbsd-5-1-RC3:1.17 netbsd-5-1-RC2:1.17 uebayasi-xip-base1:1.19 netbsd-5-1-RC1:1.17 uebayasi-xip:1.19.0.2 uebayasi-xip-base:1.19 netbsd-5-0-2-RELEASE:1.17 matt-nb5-mips64-premerge-20091211:1.17 matt-premerge-20091211:1.19 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.17 matt-nb4-mips64-k7-u2a-k9b:1.17 matt-nb5-mips64-u1-k1-k5:1.17 matt-nb5-mips64:1.17.0.16 netbsd-5-0-1-RELEASE:1.17 jym-xensuspend-nbase:1.18 netbsd-5-0:1.17.0.14 netbsd-5-0-RELEASE:1.17 netbsd-5-0-RC4:1.17 netbsd-5-0-RC3:1.17 netbsd-5-0-RC2:1.17 jym-xensuspend:1.18.0.2 jym-xensuspend-base:1.18 netbsd-5-0-RC1:1.17 christos-time_t-nbase:1.17 christos-time_t:1.17.0.12 christos-time_t-base:1.17 netbsd-5:1.17.0.10 netbsd-5-base:1.17 matt-mips64-base2:1.17 matt-mips64:1.16.0.18 netbsd-4-0-1-RELEASE:1.16 wrstuden-revivesa-base-3:1.17 wrstuden-revivesa-base-2:1.17 wrstuden-fixsa-newbase:1.16 wrstuden-revivesa-base-1:1.17 simonb-wapbl-nbase:1.17 yamt-pf42-base4:1.17 simonb-wapbl:1.17.0.6 simonb-wapbl-base:1.17 yamt-pf42-base3:1.17 hpcarm-cleanup-nbase:1.17 yamt-pf42-baseX:1.17 yamt-pf42-base2:1.17 wrstuden-revivesa:1.17.0.4 wrstuden-revivesa-base:1.17 yamt-pf42:1.17.0.2 yamt-pf42-base:1.17 keiichi-mipv6:1.16.0.16 keiichi-mipv6-base:1.17 matt-armv6-nbase:1.17 matt-armv6-prevmlocking:1.16 wrstuden-fixsa-base-1:1.16 netbsd-4-0:1.16.0.14 netbsd-4-0-RELEASE:1.16 cube-autoconf:1.16.0.12 cube-autoconf-base:1.16 netbsd-4-0-RC5:1.16 netbsd-4-0-RC4:1.16 netbsd-4-0-RC3:1.16 netbsd-4-0-RC2:1.16 netbsd-4-0-RC1:1.16 matt-armv6:1.16.0.10 matt-armv6-base:1.16 matt-mips64-base:1.16 hpcarm-cleanup:1.16.0.8 hpcarm-cleanup-base:1.16 netbsd-3-1-1-RELEASE:1.12 netbsd-3-0-3-RELEASE:1.12 wrstuden-fixsa:1.16.0.6 wrstuden-fixsa-base:1.16 abandoned-netbsd-4-base:1.16 abandoned-netbsd-4:1.16.0.2 netbsd-3-1:1.12.0.6 netbsd-3-1-RELEASE:1.12 netbsd-3-0-2-RELEASE:1.12 netbsd-3-1-RC4:1.12 netbsd-3-1-RC3:1.12 netbsd-3-1-RC2:1.12 netbsd-3-1-RC1:1.12 netbsd-4:1.16.0.4 netbsd-4-base:1.16 netbsd-3-0-1-RELEASE:1.12 netbsd-3-0:1.12.0.4 netbsd-3-0-RELEASE:1.12 netbsd-3-0-RC6:1.12 netbsd-3-0-RC5:1.12 netbsd-3-0-RC4:1.12 netbsd-3-0-RC3:1.12 netbsd-3-0-RC2:1.12 netbsd-3-0-RC1:1.12 netbsd-2-0-3-RELEASE:1.11 netbsd-2-1:1.11.0.6 netbsd-2-1-RELEASE:1.11 netbsd-2-1-RC6:1.11 netbsd-2-1-RC5:1.11 netbsd-2-1-RC4:1.11 netbsd-2-1-RC3:1.11 netbsd-2-1-RC2:1.11 netbsd-2-1-RC1:1.11 netbsd-2-0-2-RELEASE:1.11 netbsd-3:1.12.0.2 netbsd-3-base:1.12 netbsd-2-0-1-RELEASE:1.11 netbsd-2:1.11.0.4 netbsd-2-base:1.11 netbsd-2-0-RELEASE:1.11 netbsd-2-0-RC5:1.11 netbsd-2-0-RC4:1.11 netbsd-2-0-RC3:1.11 netbsd-2-0-RC2:1.11 netbsd-2-0-RC1:1.11 netbsd-2-0:1.11.0.2 netbsd-2-0-base:1.11 netbsd-1-6-PATCH002-RELEASE:1.9 netbsd-1-6-PATCH002:1.9 netbsd-1-6-PATCH002-RC4:1.9 netbsd-1-6-PATCH002-RC3:1.9 netbsd-1-6-PATCH002-RC2:1.9 netbsd-1-6-PATCH002-RC1:1.9 netbsd-1-6-PATCH001:1.9 netbsd-1-6-PATCH001-RELEASE:1.9 netbsd-1-6-PATCH001-RC3:1.9 netbsd-1-6-PATCH001-RC2:1.9 netbsd-1-6-PATCH001-RC1:1.9 nathanw_sa_before_merge:1.10 nathanw_sa_end:1.9.12.1 fvdl_fs64_base:1.10 nathanw_sa_base:1.10 netbsd-1-6-RELEASE:1.9 netbsd-1-6-RC3:1.9 netbsd-1-6-RC2:1.9 netbsd-1-6-RC1:1.9 netbsd-1-6:1.9.0.14 netbsd-1-6-base:1.9 netbsd-1-5-PATCH003:1.9 netbsd-1-5-PATCH002:1.9 netbsd-1-5-PATCH001:1.9 nathanw_sa:1.9.0.12 netbsd-1-5-RELEASE:1.9 netbsd-1-5-BETA2:1.9 netbsd-1-5-BETA:1.9 netbsd-1-4-PATCH003:1.9 netbsd-1-5-ALPHA2:1.9 netbsd-1-5:1.9.0.10 netbsd-1-5-base:1.9 minoura-xpg4dl:1.9.0.8 minoura-xpg4dl-base:1.9 netbsd-1-4-PATCH002:1.9 wrstuden-devbsize-19991221:1.9 wrstuden-devbsize:1.9.0.6 wrstuden-devbsize-base:1.9 comdex-fall-1999:1.9.0.4 comdex-fall-1999-base:1.9 netbsd-1-4-PATCH001:1.9 netbsd-1-4-RELEASE:1.9 netbsd-1-4:1.9.0.2 netbsd-1-4-base:1.9 netbsd-1-3-PATCH003:1.6.2.3 netbsd-1-3-PATCH003-CANDIDATE2:1.6.2.3 netbsd-1-3-PATCH003-CANDIDATE1:1.6.2.3 netbsd-1-3-PATCH003-CANDIDATE0:1.6.2.3 netbsd-1-3-PATCH002:1.6.2.3 netbsd-1-3-PATCH001:1.6.2.3 lite-2:1.1.1.2 CSRG:1.1.1 netbsd-1-3-RELEASE:1.6.2.3 netbsd-1-3-BETA:1.6.2.3 netbsd-1-3:1.6.0.2 netbsd-1-3-base:1.6 netbsd-1-2-PATCH001:1.5 nsswitch:1.5.0.4 netbsd-1-2-RELEASE:1.5 netbsd-1-2-BETA:1.5 netbsd-1-2-base:1.5 netbsd-1-2:1.5.0.6 netbsd-1-1-PATCH001:1.5 netbsd-1-1-RELEASE:1.5 netbsd-1-1:1.5.0.2 netbsd-1-1-base:1.5 netbsd-1-0-PATCH06:1.3 netbsd-1-0-PATCH05:1.3 netbsd-1-0-PATCH04:1.3 netbsd-1-0-PATCH03:1.3 netbsd-1-0-PATCH02:1.3 netbsd-1-0-PATCH1:1.3 netbsd-1-0-PATCH0:1.3 netbsd-1-0-RELEASE:1.3 netbsd-1-0:1.3.0.2 netbsd-1-0-base:1.3 netbsd-0-9-RELEASE:1.1.1.1 netbsd-0-9-BETA:1.1.1.1 netbsd-0-9-ALPHA2:1.1.1.1 netbsd-0-9-ALPHA:1.1.1.1 netbsd-0-9:1.1.1.1.0.2 netbsd-0-9-base:1.1.1.1 netbsd-0-8:1.1.1.1 netbsd-alpha-1:1.1.1.1 patchkit-0-2-2:1.1.1.1 WFJ-386bsd-01:1.1.1.1 WFJ-920714:1.1.1; locks; strict; comment @ * @; 1.19 date 2009.08.16.19.33.38; author christos; state Exp; branches; next 1.18; 1.18 date 2009.01.11.03.04.12; author christos; state Exp; branches; next 1.17; 1.17 date 2008.03.07.10.38.31; author lukem; state Exp; branches 1.17.12.1; next 1.16; 1.16 date 2006.07.27.15.47.09; author christos; state Exp; branches 1.16.10.1 1.16.16.1; next 1.15; 1.15 date 2006.03.30.01.23.50; author christos; state Exp; branches; next 1.14; 1.14 date 2005.09.13.01.44.32; author christos; state Exp; branches; next 1.13; 1.13 date 2005.08.19.02.05.59; author christos; state Exp; branches; next 1.12; 1.12 date 2005.02.03.04.39.32; author perry; state Exp; branches; next 1.11; 1.11 date 2003.08.07.09.44.10; author agc; state Exp; branches; next 1.10; 1.10 date 2002.11.11.01.07.08; author thorpej; state Exp; branches; next 1.9; 1.9 date 98.11.06.19.44.52; author christos; state Exp; branches 1.9.12.1; next 1.8; 1.8 date 97.11.04.23.36.19; author thorpej; state Exp; branches; next 1.7; 1.7 date 97.10.22.00.53.48; author fvdl; state Exp; branches; next 1.6; 1.6 date 97.10.21.00.55.10; author fvdl; state Exp; branches 1.6.2.1; next 1.5; 1.5 date 94.12.28.01.41.50; author mycroft; state Exp; branches; next 1.4; 1.4 date 94.10.26.00.55.55; author cgd; state Exp; branches; next 1.3; 1.3 date 93.11.06.01.06.12; author cgd; state Exp; branches; next 1.2; 1.2 date 93.08.01.00.23.18; author mycroft; state Exp; branches; next 1.1; 1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches 1.1.1.1; next ; 1.17.12.1 date 2008.11.08.21.13.13; author christos; state Exp; branches; next ; 1.16.10.1 date 2008.03.23.00.26.44; author matt; state Exp; branches; next ; 1.16.16.1 date 2008.03.24.07.14.43; author keiichi; state Exp; branches; next ; 1.9.12.1 date 2002.11.11.22.24.25; author nathanw; state Exp; branches; next ; 1.6.2.1 date 97.10.21.00.55.10; author thorpej; state dead; branches; next 1.6.2.2; 1.6.2.2 date 97.10.22.06.26.48; author thorpej; state Exp; branches; next 1.6.2.3; 1.6.2.3 date 97.11.04.23.38.31; author thorpej; state Exp; branches; next ; 1.1.1.1 date 93.03.21.09.45.37; author cgd; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 98.02.02.07.23.01; author perry; state Exp; branches; next ; desc @@ 1.19 log @Version fts one more time! This is the most versioned API ever... Bump fts_level from short to int to avoid a potential DoS. From Maksymilian Arciemowicz @ text @/* $NetBSD: fts.h,v 1.18 2009/01/11 03:04:12 christos Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @@(#)fts.h 8.3 (Berkeley) 8/14/94 */ #ifndef _FTS_H_ #define _FTS_H_ #ifndef __fts_stat_t #define __fts_stat_t struct stat #endif #ifndef __fts_nlink_t #define __fts_nlink_t nlink_t #endif #ifndef __fts_ino_t #define __fts_ino_t ino_t #endif #ifndef __fts_length_t #define __fts_length_t unsigned int #endif #ifndef __fts_number_t #define __fts_number_t int64_t #endif #ifndef __fts_dev_t #define __fts_dev_t dev_t #endif #ifndef __fts_level_t #define __fts_level_t int #endif typedef struct { struct _ftsent *fts_cur; /* current node */ struct _ftsent *fts_child; /* linked list of children */ struct _ftsent **fts_array; /* sort array */ dev_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ int fts_rfd; /* fd for root */ unsigned int fts_pathlen; /* sizeof(path) */ unsigned int fts_nitems; /* elements in the sort array */ int (*fts_compar) /* compare function */ (const struct _ftsent **, const struct _ftsent **); #define FTS_COMFOLLOW 0x001 /* follow command line symlinks */ #define FTS_LOGICAL 0x002 /* logical walk */ #define FTS_NOCHDIR 0x004 /* don't change directories */ #define FTS_NOSTAT 0x008 /* don't get stat info */ #define FTS_PHYSICAL 0x010 /* physical walk */ #define FTS_SEEDOT 0x020 /* return dot and dot-dot */ #define FTS_XDEV 0x040 /* don't cross devices */ #define FTS_WHITEOUT 0x080 /* return whiteout information */ #define FTS_OPTIONMASK 0x0ff /* valid user option mask */ #define FTS_NAMEONLY 0x100 /* (private) child names only */ #define FTS_STOP 0x200 /* (private) unrecoverable error */ int fts_options; /* fts_open options, global flags */ } FTS; typedef struct _ftsent { struct _ftsent *fts_cycle; /* cycle node */ struct _ftsent *fts_parent; /* parent directory */ struct _ftsent *fts_link; /* next file in directory */ __fts_number_t 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 */ int fts_symfd; /* fd for symlink */ __fts_length_t fts_pathlen; /* strlen(fts_path) */ __fts_length_t fts_namelen; /* strlen(fts_name) */ __fts_ino_t fts_ino; /* inode */ __fts_dev_t fts_dev; /* device */ __fts_nlink_t fts_nlink; /* link count */ #define FTS_ROOTPARENTLEVEL -1 #define FTS_ROOTLEVEL 0 __fts_level_t fts_level; /* depth (-1 to N) */ #define FTS_D 1 /* preorder directory */ #define FTS_DC 2 /* directory that causes cycles */ #define FTS_DEFAULT 3 /* none of the above */ #define FTS_DNR 4 /* unreadable directory */ #define FTS_DOT 5 /* dot or dot-dot */ #define FTS_DP 6 /* postorder directory */ #define FTS_ERR 7 /* error; errno is set */ #define FTS_F 8 /* regular file */ #define FTS_INIT 9 /* initialized only */ #define FTS_NS 10 /* stat(2) failed */ #define FTS_NSOK 11 /* no stat(2) requested */ #define FTS_SL 12 /* symbolic link */ #define FTS_SLNONE 13 /* symbolic link without target */ #define FTS_W 14 /* whiteout object */ unsigned short fts_info; /* user flags for FTSENT structure */ #define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ #define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ #define FTS_ISW 0x04 /* this is a whiteout object */ unsigned short fts_flags; /* private flags for FTSENT structure */ #define FTS_AGAIN 1 /* read node again */ #define FTS_FOLLOW 2 /* follow symbolic link */ #define FTS_NOINSTR 3 /* no instructions */ #define FTS_SKIP 4 /* discard node */ unsigned short fts_instr; /* fts_set() instructions */ __fts_stat_t *fts_statp; /* stat(2) information */ char fts_name[1]; /* file name */ } FTSENT; #include __BEGIN_DECLS #ifndef __LIBC12_SOURCE__ FTSENT *fts_children(FTS *, int) __RENAME(__fts_children60); int fts_close(FTS *) __RENAME(__fts_close60); FTS *fts_open(char * const *, int, int (*)(const FTSENT **, const FTSENT **)) __RENAME(__fts_open60); FTSENT *fts_read(FTS *) __RENAME(__fts_read60); int fts_set(FTS *, FTSENT *, int) __RENAME(__fts_set60); #endif __END_DECLS #endif /* !_FTS_H_ */ @ 1.18 log @merge christos-time_t @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.17.12.1 2008/11/08 21:13:13 christos Exp $ */ d55 3 d105 1 a105 1 short fts_level; /* depth (-1 to N) */ d142 2 a143 2 FTSENT *fts_children(FTS *, int) __RENAME(__fts_children50); int fts_close(FTS *) __RENAME(__fts_close50); d145 3 a147 3 int (*)(const FTSENT **, const FTSENT **)) __RENAME(__fts_open50); FTSENT *fts_read(FTS *) __RENAME(__fts_read50); int fts_set(FTS *, FTSENT *, int) __RENAME(__fts_set50); @ 1.17 log @Use "unsigned foo" instead of "u_foo". Be consistent with tabs. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.16 2006/07/27 15:47:09 christos Exp $ */ d52 3 d97 1 a97 1 dev_t fts_dev; /* device */ d139 2 a140 2 FTSENT *fts_children(FTS *, int) __RENAME(__fts_children32); int fts_close(FTS *) __RENAME(__fts_close32); d142 3 a144 3 int (*)(const FTSENT **, const FTSENT **)) __RENAME(__fts_open32); FTSENT *fts_read(FTS *) __RENAME(__fts_read32); int fts_set(FTS *, FTSENT *, int) __RENAME(__fts_set32); @ 1.17.12.1 log @changes for 64 bit time_t @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.17 2008/03/07 10:38:31 lukem Exp $ */ a51 3 #ifndef __fts_dev_t #define __fts_dev_t dev_t #endif d94 1 a94 1 __fts_dev_t fts_dev; /* device */ d136 2 a137 2 FTSENT *fts_children(FTS *, int) __RENAME(__fts_children50); int fts_close(FTS *) __RENAME(__fts_close50); d139 3 a141 3 int (*)(const FTSENT **, const FTSENT **)) __RENAME(__fts_open50); FTSENT *fts_read(FTS *) __RENAME(__fts_read50); int fts_set(FTS *, FTSENT *, int) __RENAME(__fts_set50); @ 1.16 log @fts_number is a quad; bump version. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.15 2006/03/30 01:23:50 christos Exp $ */ d46 2 a47 2 #ifndef __fts_length_t #define __fts_length_t u_int d49 1 a49 1 #ifndef __fts_number_t d60 2 a61 2 u_int fts_pathlen; /* sizeof(path) */ u_int fts_nitems; /* elements in the sort array */ d115 1 a115 1 u_short fts_info; /* user flags for FTSENT structure */ d120 1 a120 1 u_short fts_flags; /* private flags for FTSENT structure */ d126 1 a126 1 u_short fts_instr; /* fts_set() instructions */ d135 1 a135 1 #ifndef __LIBC12_SOURCE__ @ 1.16.16.1 log @sync with head. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.17 2008/03/07 10:38:31 lukem Exp $ */ d46 2 a47 2 #ifndef __fts_length_t #define __fts_length_t unsigned int d49 1 a49 1 #ifndef __fts_number_t d60 2 a61 2 unsigned int fts_pathlen; /* sizeof(path) */ unsigned int fts_nitems; /* elements in the sort array */ d115 1 a115 1 unsigned short fts_info; /* user flags for FTSENT structure */ d120 1 a120 1 unsigned short fts_flags; /* private flags for FTSENT structure */ d126 1 a126 1 unsigned short fts_instr; /* fts_set() instructions */ d135 1 a135 1 #ifndef __LIBC12_SOURCE__ @ 1.16.10.1 log @sync with HEAD @ text @d1 1 a1 1 /* fts.h,v 1.17 2008/03/07 10:38:31 lukem Exp */ d46 2 a47 2 #ifndef __fts_length_t #define __fts_length_t unsigned int d49 1 a49 1 #ifndef __fts_number_t d60 2 a61 2 unsigned int fts_pathlen; /* sizeof(path) */ unsigned int fts_nitems; /* elements in the sort array */ d115 1 a115 1 unsigned short fts_info; /* user flags for FTSENT structure */ d120 1 a120 1 unsigned short fts_flags; /* private flags for FTSENT structure */ d126 1 a126 1 unsigned short fts_instr; /* fts_set() instructions */ d135 1 a135 1 #ifndef __LIBC12_SOURCE__ @ 1.15 log @PR/33163: Auster Vl.: fts: cant allocate memory | filename too long Change the ftp_pathlen and fts_namelen to u_int from u_short so that pathnames > 32K work. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.14 2005/09/13 01:44:32 christos Exp $ */ d49 3 d84 1 a84 1 long fts_number; /* local numeric value */ d136 2 a137 2 FTSENT *fts_children(FTS *, int) __RENAME(__fts_children31); int fts_close(FTS *) __RENAME(__fts_close31); d139 3 a141 3 int (*)(const FTSENT **, const FTSENT **)) __RENAME(__fts_open31); FTSENT *fts_read(FTS *) __RENAME(__fts_read31); int fts_set(FTS *, FTSENT *, int) __RENAME(__fts_set31); @ 1.14 log @compat code reorg @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.13 2005/08/19 02:05:59 christos Exp $ */ d46 3 d87 2 a88 2 u_short fts_pathlen; /* strlen(fts_path) */ u_short fts_namelen; /* strlen(fts_name) */ d133 2 a134 2 FTSENT *fts_children(FTS *, int) __RENAME(__fts_children30); int fts_close(FTS *) __RENAME(__fts_close30); d136 3 a138 3 int (*)(const FTSENT **, const FTSENT **)) __RENAME(__fts_open30); FTSENT *fts_read(FTS *) __RENAME(__fts_read30); int fts_set(FTS *, FTSENT *, int) __RENAME(__fts_set30); @ 1.13 log @64 bit inode changes @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.12 2005/02/03 04:39:32 perry Exp $ */ d129 1 a129 8 #ifdef __LIBC12_SOURCE__ FTSENT *fts_children(FTS *, int); int fts_close(FTS *); FTS *fts_open(char * const *, int, int (*)(const FTSENT **, const FTSENT **)); FTSENT *fts_read(FTS *); int fts_set(FTS *, FTSENT *, int); #else d133 1 a133 2 int (*)(const FTSENT **, const FTSENT **)) __RENAME(__fts_open30); d135 1 a135 1 int fts_set(FTS *, FTSENT *, int) __RENAME(__fts_set30); @ 1.12 log @de-__P -- the hack is long since useless. Discussed with christos, matt, kleink, others. Approved by christos. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.11 2003/08/07 09:44:10 agc Exp $ */ d37 10 d87 1 a87 1 ino_t fts_ino; /* inode */ d89 1 a89 5 #ifdef __LIBC12_SOURCE__ u_int16_t fts_nlink; /* link count */ #else nlink_t fts_nlink; /* link count */ #endif d122 1 a122 5 #ifdef __LIBC12_SOURCE__ struct stat12 *fts_statp; /* stat(2) information */ #else struct stat *fts_statp; /* stat(2) information */ #endif d137 2 a138 2 FTSENT *fts_children(FTS *, int) __RENAME(__fts_children13); int fts_close(FTS *) __RENAME(__fts_close13); d141 3 a143 3 __RENAME(__fts_open13); FTSENT *fts_read(FTS *) __RENAME(__fts_read13); int fts_set(FTS *, FTSENT *, int) __RENAME(__fts_set13); @ 1.11 log @Move UCB-licensed code from 4-clause to 3-clause licence. Patches provided by Joel Baker in PR 22270, verified by myself. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.10 2002/11/11 01:07:08 thorpej Exp $ */ d47 1 a47 1 __P((const struct _ftsent **, const struct _ftsent **)); d128 6 a133 6 FTSENT *fts_children __P((FTS *, int)); int fts_close __P((FTS *)); FTS *fts_open __P((char * const *, int, int (*)(const FTSENT **, const FTSENT **))); FTSENT *fts_read __P((FTS *)); int fts_set __P((FTS *, FTSENT *, int)); d135 4 a138 4 FTSENT *fts_children __P((FTS *, int)) __RENAME(__fts_children13); int fts_close __P((FTS *)) __RENAME(__fts_close13); FTS *fts_open __P((char * const *, int, int (*)(const FTSENT **, const FTSENT **))) d140 2 a141 2 FTSENT *fts_read __P((FTS *)) __RENAME(__fts_read13); int fts_set __P((FTS *, FTSENT *, int)) __RENAME(__fts_set13); @ 1.10 log @Make fts_pathlen and fts_nitems unsigned. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.9 1998/11/06 19:44:52 christos Exp $ */ d15 1 a15 5 * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors @ 1.9 log @complete prototype for fts_compar. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.8 1997/11/04 23:36:19 thorpej Exp $ */ d48 2 a49 2 int fts_pathlen; /* sizeof(path) */ int fts_nitems; /* elements in the sort array */ @ 1.9.12.1 log @Catch up to -current @ text @d1 1 a1 1 /* $NetBSD$ */ d48 2 a49 2 u_int fts_pathlen; /* sizeof(path) */ u_int fts_nitems; /* elements in the sort array */ @ 1.8 log @Fix __RENAME quoting lossage (don't pass it a quoted string). From Chris Demetriou . @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.7 1997/10/22 00:53:48 fvdl Exp $ */ d50 2 a51 1 int (*fts_compar)(); /* compare function */ @ 1.7 log @New hacks to make libc work painlessly without bumping the major number: use type func(arg1s) asm("emitted_name") gcc mechanism. Suggested by Bill Sommerfeld. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.6 1997/10/21 00:55:10 fvdl Exp $ */ d138 2 a139 2 FTSENT *fts_children __P((FTS *, int)) __RENAME("__fts_children13"); int fts_close __P((FTS *)) __RENAME("__fts_close13"); d142 3 a144 3 __RENAME("__fts_open13"); FTSENT *fts_read __P((FTS *)) __RENAME("__fts_read13"); int fts_set __P((FTS *, FTSENT *, int)) __RENAME("__fts_set13"); @ 1.6 log @Hacks to enable libc to work without bumping the major. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft Exp $ */ d41 11 a51 3 /* * fts_options flags */ a63 12 typedef struct { struct _ftsent12 *fts_cur; /* current node */ struct _ftsent12 *fts_child; /* linked list of children */ struct _ftsent12 **fts_array; /* sort array */ dev_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ int fts_rfd; /* fd for root */ int fts_pathlen; /* sizeof(path) */ int fts_nitems; /* elements in the sort array */ int (*fts_compar)(); /* compare function */ d65 1 a65 1 } FTS12; d67 12 a78 10 typedef struct { struct _ftsent *fts_cur; /* current node */ struct _ftsent *fts_child; /* linked list of children */ struct _ftsent **fts_array; /* sort array */ dev_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ int fts_rfd; /* fd for root */ int fts_pathlen; /* sizeof(path) */ int fts_nitems; /* elements in the sort array */ int (*fts_compar)(); /* compare function */ d80 7 a86 2 int fts_options; /* fts_open options, global flags */ } FTS; a87 3 /* * fts_level defines. */ d90 1 a91 3 /* * fts_info defines */ d106 1 a107 3 /* * fts_flags defines */ d111 1 a112 3 /* * fts_set instructions */ a116 24 typedef struct _ftsent { struct _ftsent *fts_cycle; /* cycle node */ struct _ftsent *fts_parent; /* parent directory */ struct _ftsent *fts_link; /* next file in directory */ 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 */ int fts_symfd; /* fd for symlink */ u_short fts_pathlen; /* strlen(fts_path) */ u_short fts_namelen; /* strlen(fts_name) */ ino_t fts_ino; /* inode */ dev_t fts_dev; /* device */ nlink_t fts_nlink; /* link count */ short fts_level; /* depth (-1 to N) */ u_short fts_info; /* user flags for FTSENT structure */ u_short fts_flags; /* private flags for FTSENT structure */ d119 3 d123 1 a126 29 typedef struct _ftsent12 { struct _ftsent12 *fts_cycle; /* cycle node */ struct _ftsent12 *fts_parent; /* parent directory */ struct _ftsent12 *fts_link; /* next file in directory */ 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 */ int fts_symfd; /* fd for symlink */ u_short fts_pathlen; /* strlen(fts_path) */ u_short fts_namelen; /* strlen(fts_name) */ ino_t fts_ino; /* inode */ dev_t fts_dev; /* device */ u_int16_t fts_nlink; /* link count */ short fts_level; /* depth (-1 to N) */ u_short fts_info; /* user flags for FTSENT structure */ u_short fts_flags; /* private flags for FTSENT structure */ u_short fts_instr; /* fts_set() instructions */ struct stat12 *fts_statp; /* stat(2) information */ char fts_name[1]; /* file name */ } FTSENT12; d130 4 a133 10 FTSENT12 *fts_children __P((FTS12 *, int)); int fts_close __P((FTS12 *)); FTS12 *fts_open __P((char * const *, int, int (*)(const FTSENT12 **, const FTSENT12 **))); FTSENT12 *fts_read __P((FTS12 *)); int fts_set __P((FTS12 *, FTSENT12 *, int)); FTSENT *__fts_children13 __P((FTS *, int)); int __fts_close13 __P((FTS *)); FTS *__fts_open13 __P((char * const *, int, d135 11 a145 2 FTSENT *__fts_read13 __P((FTS *)); int __fts_set13 __P((FTS *, FTSENT *, int)); a146 6 #define fts_children(f,i) __fts_children13(f,i) #define fts_close(f) __fts_close13(f) #define fts_open(p,i,f) __fts_open13(p,i,f) #define fts_read(f) __fts_read13(f) #define fts_set(f,g,i) __fts_set13(f,g,i) @ 1.6.2.1 log @file fts.h was added on branch netbsd-1-3 on 1997-10-22 06:26:48 +0000 @ text @d1 206 @ 1.6.2.2 log @Pull up from trunk: Update for less nasty function renaming. @ text @a0 148 /* $NetBSD: fts.h,v 1.6.2.1 1997/10/22 06:26:48 thorpej Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @@(#)fts.h 8.3 (Berkeley) 8/14/94 */ #ifndef _FTS_H_ #define _FTS_H_ typedef struct { struct _ftsent *fts_cur; /* current node */ struct _ftsent *fts_child; /* linked list of children */ struct _ftsent **fts_array; /* sort array */ dev_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ int fts_rfd; /* fd for root */ int fts_pathlen; /* sizeof(path) */ int fts_nitems; /* elements in the sort array */ int (*fts_compar)(); /* compare function */ #define FTS_COMFOLLOW 0x001 /* follow command line symlinks */ #define FTS_LOGICAL 0x002 /* logical walk */ #define FTS_NOCHDIR 0x004 /* don't change directories */ #define FTS_NOSTAT 0x008 /* don't get stat info */ #define FTS_PHYSICAL 0x010 /* physical walk */ #define FTS_SEEDOT 0x020 /* return dot and dot-dot */ #define FTS_XDEV 0x040 /* don't cross devices */ #define FTS_WHITEOUT 0x080 /* return whiteout information */ #define FTS_OPTIONMASK 0x0ff /* valid user option mask */ #define FTS_NAMEONLY 0x100 /* (private) child names only */ #define FTS_STOP 0x200 /* (private) unrecoverable error */ int fts_options; /* fts_open options, global flags */ } FTS; typedef struct _ftsent { struct _ftsent *fts_cycle; /* cycle node */ struct _ftsent *fts_parent; /* parent directory */ struct _ftsent *fts_link; /* next file in directory */ 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 */ int fts_symfd; /* fd for symlink */ u_short fts_pathlen; /* strlen(fts_path) */ u_short fts_namelen; /* strlen(fts_name) */ ino_t fts_ino; /* inode */ dev_t fts_dev; /* device */ #ifdef __LIBC12_SOURCE__ u_int16_t fts_nlink; /* link count */ #else nlink_t fts_nlink; /* link count */ #endif #define FTS_ROOTPARENTLEVEL -1 #define FTS_ROOTLEVEL 0 short fts_level; /* depth (-1 to N) */ #define FTS_D 1 /* preorder directory */ #define FTS_DC 2 /* directory that causes cycles */ #define FTS_DEFAULT 3 /* none of the above */ #define FTS_DNR 4 /* unreadable directory */ #define FTS_DOT 5 /* dot or dot-dot */ #define FTS_DP 6 /* postorder directory */ #define FTS_ERR 7 /* error; errno is set */ #define FTS_F 8 /* regular file */ #define FTS_INIT 9 /* initialized only */ #define FTS_NS 10 /* stat(2) failed */ #define FTS_NSOK 11 /* no stat(2) requested */ #define FTS_SL 12 /* symbolic link */ #define FTS_SLNONE 13 /* symbolic link without target */ #define FTS_W 14 /* whiteout object */ u_short fts_info; /* user flags for FTSENT structure */ #define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ #define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ #define FTS_ISW 0x04 /* this is a whiteout object */ u_short fts_flags; /* private flags for FTSENT structure */ #define FTS_AGAIN 1 /* read node again */ #define FTS_FOLLOW 2 /* follow symbolic link */ #define FTS_NOINSTR 3 /* no instructions */ #define FTS_SKIP 4 /* discard node */ u_short fts_instr; /* fts_set() instructions */ #ifdef __LIBC12_SOURCE__ struct stat12 *fts_statp; /* stat(2) information */ #else struct stat *fts_statp; /* stat(2) information */ #endif char fts_name[1]; /* file name */ } FTSENT; #include __BEGIN_DECLS #ifdef __LIBC12_SOURCE__ FTSENT *fts_children __P((FTS *, int)); int fts_close __P((FTS *)); FTS *fts_open __P((char * const *, int, int (*)(const FTSENT **, const FTSENT **))); FTSENT *fts_read __P((FTS *)); int fts_set __P((FTS *, FTSENT *, int)); #else FTSENT *fts_children __P((FTS *, int)) __RENAME("__fts_children13"); int fts_close __P((FTS *)) __RENAME("__fts_close13"); FTS *fts_open __P((char * const *, int, int (*)(const FTSENT **, const FTSENT **))) __RENAME("__fts_open13"); FTSENT *fts_read __P((FTS *)) __RENAME("__fts_read13"); int fts_set __P((FTS *, FTSENT *, int)) __RENAME("__fts_set13"); #endif __END_DECLS #endif /* !_FTS_H_ */ @ 1.6.2.3 log @Pull up from trunk: Fix __RENAME() usage. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.6.2.2 1997/11/04 23:38:31 thorpej Exp $ */ d138 2 a139 2 FTSENT *fts_children __P((FTS *, int)) __RENAME(__fts_children13); int fts_close __P((FTS *)) __RENAME(__fts_close13); d142 3 a144 3 __RENAME(__fts_open13); FTSENT *fts_read __P((FTS *)) __RENAME(__fts_read13); int fts_set __P((FTS *, FTSENT *, int)) __RENAME(__fts_set13); @ 1.5 log @Sync with CSRG. @ text @d1 1 a1 1 /* $NetBSD: fts.h,v 1.4 1994/10/26 00:55:55 cgd Exp $ */ d41 3 a43 11 typedef struct { struct _ftsent *fts_cur; /* current node */ struct _ftsent *fts_child; /* linked list of children */ struct _ftsent **fts_array; /* sort array */ dev_t fts_dev; /* starting device # */ char *fts_path; /* path for this descent */ int fts_rfd; /* fd for root */ int fts_pathlen; /* sizeof(path) */ int fts_nitems; /* elements in the sort array */ int (*fts_compar)(); /* compare function */ d56 12 d69 1 a69 1 } FTS; d71 10 a80 12 typedef struct _ftsent { struct _ftsent *fts_cycle; /* cycle node */ struct _ftsent *fts_parent; /* parent directory */ struct _ftsent *fts_link; /* next file in directory */ 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 */ int fts_symfd; /* fd for symlink */ u_short fts_pathlen; /* strlen(fts_path) */ u_short fts_namelen; /* strlen(fts_name) */ d82 2 a83 3 ino_t fts_ino; /* inode */ dev_t fts_dev; /* device */ nlink_t fts_nlink; /* link count */ d85 3 a89 1 short fts_level; /* depth (-1 to N) */ d91 3 a107 1 u_short fts_info; /* user flags for FTSENT structure */ d109 3 a114 1 u_short fts_flags; /* private flags for FTSENT structure */ d116 3 d123 24 d153 29 d185 10 a194 3 FTSENT *fts_children __P((FTS *, int)); int fts_close __P((FTS *)); FTS *fts_open __P((char * const *, int, d196 2 a197 2 FTSENT *fts_read __P((FTS *)); int fts_set __P((FTS *, FTSENT *, int)); d199 6 @ 1.4 log @new RCS ID format. @ text @d1 1 a1 1 /* $NetBSD$ */ d35 1 a35 1 * @@(#)fts.h 8.1 (Berkeley) 6/2/93 d59 2 a60 1 #define FTS_OPTIONMASK 0x07f /* valid user option mask */ d62 2 a63 2 #define FTS_NAMEONLY 0x080 /* (private) child names only */ #define FTS_STOP 0x100 /* (private) unrecoverable error */ d101 1 d106 1 @ 1.3 log @version number update @ text @d1 2 d35 1 a35 2 * from: @@(#)fts.h 8.1 (Berkeley) 6/2/93 * $Id$ @ 1.2 log @New version to match new fts.c. @ text @d2 2 a3 2 * Copyright (c) 1989 The Regents of the University of California. * All rights reserved. d33 2 a34 2 * from: @@(#)fts.h 5.24 (Berkeley) 5/5/92 * $Id: $ @ 1.1 log @Initial revision @ text @d33 2 a34 1 * @@(#)fts.h 5.14 (Berkeley) 4/3/91 a42 1 struct _ftsent *fts_savelink; /* saved link if node had a cycle */ d44 1 a44 1 dev_t rdev; /* starting device # */ a45 1 int fts_dfd; /* fd for directories */ d51 6 a56 6 #define FTS_LOGICAL 0x001 /* logical walk */ #define FTS_NOCHDIR 0x002 /* don't change directories */ #define FTS_NOSTAT 0x004 /* don't get stat info */ #define FTS_PHYSICAL 0x008 /* physical walk */ #define FTS_SEEDOT 0x010 /* return dot and dot-dot */ #define FTS_STOP 0x020 /* (private) unrecoverable error */ d58 5 a62 1 int fts_options; /* openfts() options */ d66 1 d68 3 a70 7 struct _ftsent *fts_link; /* cycle or next file structure */ 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 d73 8 a80 3 int fts_cderr; /* chdir failed -- errno */ short fts_pathlen; /* strlen(fts_path) */ short fts_namelen; /* strlen(fts_name) */ d90 9 a98 7 #define FTS_DP 5 /* postorder directory */ #define FTS_ERR 6 /* error; errno is set */ #define FTS_F 7 /* regular file */ #define FTS_NS 8 /* stat(2) failed */ #define FTS_NSOK 9 /* no stat(2) requested */ #define FTS_SL 10 /* symbolic link */ #define FTS_SLNONE 11 /* symbolic link without target */ d101 4 d111 1 a111 1 struct stat fts_statb; /* stat(2) information */ d118 1 a118 1 FTSENT *fts_children __P((FTS *)); d120 2 a121 2 FTS *fts_open __P((char * const *, int, int (*)(const FTSENT *, const FTSENT *))); @ 1.1.1.1 log @initial import of 386bsd-0.1 sources @ text @@ 1.1.1.2 log @import lite-2 @ text @d2 2 a3 2 * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. d33 1 a33 1 * @@(#)fts.h 8.3 (Berkeley) 8/14/94 d42 1 d44 1 a44 1 dev_t fts_dev; /* starting device # */ d46 1 d52 6 a57 6 #define FTS_COMFOLLOW 0x001 /* follow command line symlinks */ #define FTS_LOGICAL 0x002 /* logical walk */ #define FTS_NOCHDIR 0x004 /* don't change directories */ #define FTS_NOSTAT 0x008 /* don't get stat info */ #define FTS_PHYSICAL 0x010 /* physical walk */ #define FTS_SEEDOT 0x020 /* return dot and dot-dot */ d59 1 a59 6 #define FTS_WHITEOUT 0x080 /* return whiteout information */ #define FTS_OPTIONMASK 0x0ff /* valid user option mask */ #define FTS_NAMEONLY 0x100 /* (private) child names only */ #define FTS_STOP 0x200 /* (private) unrecoverable error */ int fts_options; /* fts_open options, global flags */ a62 1 struct _ftsent *fts_cycle; /* cycle node */ d64 7 a70 3 struct _ftsent *fts_link; /* next file in directory */ long fts_number; /* local numeric value */ void *fts_pointer; /* local address value */ d73 3 a75 8 int fts_errno; /* errno for this node */ int fts_symfd; /* fd for symlink */ u_short fts_pathlen; /* strlen(fts_path) */ u_short fts_namelen; /* strlen(fts_name) */ ino_t fts_ino; /* inode */ dev_t fts_dev; /* device */ nlink_t fts_nlink; /* link count */ d85 7 a91 10 #define FTS_DOT 5 /* dot or dot-dot */ #define FTS_DP 6 /* postorder directory */ #define FTS_ERR 7 /* error; errno is set */ #define FTS_F 8 /* regular file */ #define FTS_INIT 9 /* initialized only */ #define FTS_NS 10 /* stat(2) failed */ #define FTS_NSOK 11 /* no stat(2) requested */ #define FTS_SL 12 /* symbolic link */ #define FTS_SLNONE 13 /* symbolic link without target */ #define FTS_W 14 /* whiteout object */ a93 5 #define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ #define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ #define FTS_ISW 0x04 /* this is a whiteout object */ u_short fts_flags; /* private flags for FTSENT structure */ d100 1 a100 1 struct stat *fts_statp; /* stat(2) information */ d107 1 a107 1 FTSENT *fts_children __P((FTS *, int)); d109 2 a110 2 FTS *fts_open __P((char * const *, int, int (*)(const FTSENT **, const FTSENT **))); @