function.c (61573) | function.c (61575) |
---|---|
1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Cimarron D. Taylor of the University of California, Berkeley. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 21 unchanged lines hidden (view full) --- 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#ifndef lint | 1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Cimarron D. Taylor of the University of California, Berkeley. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 21 unchanged lines hidden (view full) --- 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#ifndef lint |
38static char sccsid[] = "@(#)function.c 8.10 (Berkeley) 5/4/95"; 39static char rcsid[] = "$FreeBSD: head/usr.bin/find/function.c 61573 2000-06-12 10:36:52Z roberto $"; | 38#if 0 39static const char sccsid[] = "@(#)function.c 8.10 (Berkeley) 5/4/95"; 40#else 41static const char rcsid[] = 42 "$FreeBSD: head/usr.bin/find/function.c 61575 2000-06-12 11:12:41Z roberto $"; 43#endif |
40#endif /* not lint */ 41 42#include <sys/param.h> 43#include <sys/ucred.h> 44#include <sys/stat.h> 45#include <sys/wait.h> 46#include <sys/mount.h> 47 --- 664 unchanged lines hidden (view full) --- 712{ 713 ftsoptions &= ~FTS_NOSTAT; 714 isoutput = 1; 715 716 return (palloc(N_LS, f_ls)); 717} 718 719/* | 44#endif /* not lint */ 45 46#include <sys/param.h> 47#include <sys/ucred.h> 48#include <sys/stat.h> 49#include <sys/wait.h> 50#include <sys/mount.h> 51 --- 664 unchanged lines hidden (view full) --- 716{ 717 ftsoptions &= ~FTS_NOSTAT; 718 isoutput = 1; 719 720 return (palloc(N_LS, f_ls)); 721} 722 723/* |
724 * -maxdepth n functions -- 725 * 726 * Does the same as -prune if the level of the current file is greater 727 * than the specified maximum depth. 728 * 729 * Note that -maxdepth and -mindepth are handled specially in 730 * find_execute() so their f_* functions here do nothing. 731 */ 732int 733f_maxdepth(plan, entry) 734 PLAN *plan; 735 FTSENT *entry; 736{ 737 return (1); 738} 739 740PLAN * 741c_maxdepth(arg) 742 char *arg; 743{ 744 PLAN *new; 745 746 if (*arg == '-') 747 /* all other errors handled by find_parsenum() */ 748 errx(1, "-maxdepth: %s: value must be positive", arg); 749 750 new = palloc(N_MAXDEPTH, f_maxdepth); 751 maxdepth = find_parsenum(new, "-maxdepth", arg, NULL); 752 return (new); 753} 754 755/* 756 * -mindepth n functions -- 757 * 758 * True if the current file is at or deeper than the specified minimum 759 * depth. 760 */ 761int 762f_mindepth(plan, entry) 763 PLAN *plan; 764 FTSENT *entry; 765{ 766 return (1); 767} 768 769PLAN * 770c_mindepth(arg) 771 char *arg; 772{ 773 PLAN *new; 774 775 if (*arg == '-') 776 /* all other errors handled by find_parsenum() */ 777 errx(1, "-maxdepth: %s: value must be positive", arg); 778 779 new = palloc(N_MINDEPTH, f_mindepth); 780 mindepth = find_parsenum(new, "-mindepth", arg, NULL); 781 return (new); 782} 783 784/* |
|
720 * -mtime n functions -- 721 * 722 * True if the difference between the file modification time and the 723 * current time is n 24 hour periods. 724 */ 725int 726f_mtime(plan, entry) 727 PLAN *plan; --- 277 unchanged lines hidden (view full) --- 1005 new->fl_flags = flags; 1006 new->fl_mask = flags | notflags; 1007#if 0 1008 printf("flags = %08x, mask = %08x (%08x, %08x)\n", 1009 new->fl_flags, new->fl_mask, flags, notflags); 1010#endif 1011 return new; 1012} | 785 * -mtime n functions -- 786 * 787 * True if the difference between the file modification time and the 788 * current time is n 24 hour periods. 789 */ 790int 791f_mtime(plan, entry) 792 PLAN *plan; --- 277 unchanged lines hidden (view full) --- 1070 new->fl_flags = flags; 1071 new->fl_mask = flags | notflags; 1072#if 0 1073 printf("flags = %08x, mask = %08x (%08x, %08x)\n", 1074 new->fl_flags, new->fl_mask, flags, notflags); 1075#endif 1076 return new; 1077} |
1013 1014 /* | |
1015 | 1078 |
1016 | |
1017/* 1018 * -print functions -- 1019 * 1020 * Always true, causes the current pathame to be written to 1021 * standard output. 1022 */ 1023int 1024f_print(plan, entry) --- 382 unchanged lines hidden --- | 1079/* 1080 * -print functions -- 1081 * 1082 * Always true, causes the current pathame to be written to 1083 * standard output. 1084 */ 1085int 1086f_print(plan, entry) --- 382 unchanged lines hidden --- |