19b50d902SRodney W. Grimes /*- 28a16b7a1SPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 38a16b7a1SPedro F. Giffuni * 49b50d902SRodney W. Grimes * Copyright (c) 1991, 1993, 1994 59b50d902SRodney W. Grimes * The Regents of the University of California. All rights reserved. 69b50d902SRodney W. Grimes * 79b50d902SRodney W. Grimes * Redistribution and use in source and binary forms, with or without 89b50d902SRodney W. Grimes * modification, are permitted provided that the following conditions 99b50d902SRodney W. Grimes * are met: 109b50d902SRodney W. Grimes * 1. Redistributions of source code must retain the above copyright 119b50d902SRodney W. Grimes * notice, this list of conditions and the following disclaimer. 129b50d902SRodney W. Grimes * 2. Redistributions in binary form must reproduce the above copyright 139b50d902SRodney W. Grimes * notice, this list of conditions and the following disclaimer in the 149b50d902SRodney W. Grimes * documentation and/or other materials provided with the distribution. 15fbbd9655SWarner Losh * 3. Neither the name of the University nor the names of its contributors 169b50d902SRodney W. Grimes * may be used to endorse or promote products derived from this software 179b50d902SRodney W. Grimes * without specific prior written permission. 189b50d902SRodney W. Grimes * 199b50d902SRodney W. Grimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 209b50d902SRodney W. Grimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 219b50d902SRodney W. Grimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 229b50d902SRodney W. Grimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 239b50d902SRodney W. Grimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 249b50d902SRodney W. Grimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 259b50d902SRodney W. Grimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 269b50d902SRodney W. Grimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 279b50d902SRodney W. Grimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 289b50d902SRodney W. Grimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 299b50d902SRodney W. Grimes * SUCH DAMAGE. 309b50d902SRodney W. Grimes */ 319b50d902SRodney W. Grimes 329b50d902SRodney W. Grimes #include <sys/cdefs.h> 339b50d902SRodney W. Grimes 34a2925a5aSJilles Tjoelker void brace_subst(char *, char **, char *, size_t); 35ecca1f1cSMark Murray PLAN *find_create(char ***); 36ecca1f1cSMark Murray int find_execute(PLAN *, char **); 37ecca1f1cSMark Murray PLAN *find_formplan(char **); 38ecca1f1cSMark Murray PLAN *not_squish(PLAN *); 39ecca1f1cSMark Murray PLAN *or_squish(PLAN *); 40ecca1f1cSMark Murray PLAN *paren_squish(PLAN *); 4165bcaaecSEd Schouten time_t get_date(char *); 429b50d902SRodney W. Grimes struct stat; 43ecca1f1cSMark Murray void printlong(char *, char *, struct stat *); 44ecca1f1cSMark Murray int queryuser(char **); 45ecca1f1cSMark Murray OPTION *lookup_option(const char *); 4622170420SKirill Ponomarev void finish_execplus(void); 479b50d902SRodney W. Grimes 48ea92232aSPoul-Henning Kamp creat_f c_Xmin; 49ea92232aSPoul-Henning Kamp creat_f c_Xtime; 509c5d31dfSBosko Milekic creat_f c_acl; 51ea92232aSPoul-Henning Kamp creat_f c_and; 52ea92232aSPoul-Henning Kamp creat_f c_delete; 53ea92232aSPoul-Henning Kamp creat_f c_depth; 54ea92232aSPoul-Henning Kamp creat_f c_empty; 55ea92232aSPoul-Henning Kamp creat_f c_exec; 56ea92232aSPoul-Henning Kamp creat_f c_flags; 57ea92232aSPoul-Henning Kamp creat_f c_follow; 58ea92232aSPoul-Henning Kamp creat_f c_fstype; 59ea92232aSPoul-Henning Kamp creat_f c_group; 6040072dc2SJilles Tjoelker creat_f c_ignore_readdir_race; 61ea92232aSPoul-Henning Kamp creat_f c_inum; 62ea92232aSPoul-Henning Kamp creat_f c_links; 63ea92232aSPoul-Henning Kamp creat_f c_ls; 64ea92232aSPoul-Henning Kamp creat_f c_mXXdepth; 65ea92232aSPoul-Henning Kamp creat_f c_name; 66ea92232aSPoul-Henning Kamp creat_f c_newer; 67ea92232aSPoul-Henning Kamp creat_f c_nogroup; 68ea92232aSPoul-Henning Kamp creat_f c_nouser; 69ea92232aSPoul-Henning Kamp creat_f c_perm; 70ea92232aSPoul-Henning Kamp creat_f c_print; 71ea92232aSPoul-Henning Kamp creat_f c_regex; 7246b993ffSWarner Losh creat_f c_samefile; 73ea92232aSPoul-Henning Kamp creat_f c_simple; 74ea92232aSPoul-Henning Kamp creat_f c_size; 759ed0c92cSDavid Malone creat_f c_sparse; 76ea92232aSPoul-Henning Kamp creat_f c_type; 77ea92232aSPoul-Henning Kamp creat_f c_user; 78ea92232aSPoul-Henning Kamp creat_f c_xdev; 79ea92232aSPoul-Henning Kamp 80ea92232aSPoul-Henning Kamp exec_f f_Xmin; 81ea92232aSPoul-Henning Kamp exec_f f_Xtime; 829c5d31dfSBosko Milekic exec_f f_acl; 83ea92232aSPoul-Henning Kamp exec_f f_always_true; 84ea92232aSPoul-Henning Kamp exec_f f_closeparen; 85ea92232aSPoul-Henning Kamp exec_f f_delete; 861c832963SOliver Eikemeier exec_f f_depth; 87ea92232aSPoul-Henning Kamp exec_f f_empty; 88ea92232aSPoul-Henning Kamp exec_f f_exec; 89*e4b646ceSRicardo Branco exec_f f_executable; 90ea92232aSPoul-Henning Kamp exec_f f_expr; 9146b993ffSWarner Losh exec_f f_false; 92ea92232aSPoul-Henning Kamp exec_f f_flags; 93ea92232aSPoul-Henning Kamp exec_f f_fstype; 94ea92232aSPoul-Henning Kamp exec_f f_group; 95ea92232aSPoul-Henning Kamp exec_f f_inum; 96ea92232aSPoul-Henning Kamp exec_f f_links; 97ea92232aSPoul-Henning Kamp exec_f f_ls; 98ea92232aSPoul-Henning Kamp exec_f f_name; 99ea92232aSPoul-Henning Kamp exec_f f_newer; 100ea92232aSPoul-Henning Kamp exec_f f_nogroup; 101ea92232aSPoul-Henning Kamp exec_f f_not; 102ea92232aSPoul-Henning Kamp exec_f f_nouser; 103ea92232aSPoul-Henning Kamp exec_f f_openparen; 104ea92232aSPoul-Henning Kamp exec_f f_or; 105ea92232aSPoul-Henning Kamp exec_f f_path; 106ea92232aSPoul-Henning Kamp exec_f f_perm; 107ea92232aSPoul-Henning Kamp exec_f f_print; 108ea92232aSPoul-Henning Kamp exec_f f_print0; 109ea92232aSPoul-Henning Kamp exec_f f_prune; 11046b993ffSWarner Losh exec_f f_quit; 111*e4b646ceSRicardo Branco exec_f f_readable; 112ea92232aSPoul-Henning Kamp exec_f f_regex; 113ea92232aSPoul-Henning Kamp exec_f f_size; 1149ed0c92cSDavid Malone exec_f f_sparse; 115ea92232aSPoul-Henning Kamp exec_f f_type; 116ea92232aSPoul-Henning Kamp exec_f f_user; 117*e4b646ceSRicardo Branco exec_f f_writable; 1189b50d902SRodney W. Grimes 119c305c18eSEitan Adler extern int ftsoptions, ignore_readdir_race, isdepth, isoutput; 12040072dc2SJilles Tjoelker extern int issort, isxargs; 121c76bc8f3SOllivier Robert extern int mindepth, maxdepth; 1227c1d4b3aSAkinori MUSHA extern int regexp_flags; 1237a79617cSJilles Tjoelker extern int exitstatus; 124ef646f18SMark Murray extern time_t now; 125ef646f18SMark Murray extern int dotfd; 126ef646f18SMark Murray extern FTS *tree; 127d06a0096SGoran Mekić extern volatile sig_atomic_t showinfo; 128