Source
stringclasses
1 value
Date
int64
2k
2.01k
Text
stringlengths
20
19M
Token_count
int64
7
8.91M
freebsd_cvs_archive
2,011
/*- * Copyright (c) 2010 The FreeBSD Foundation * All rights reserved. * * This software was developed by Edward Tomasz Napierala under sponsorship * from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following cond...
6,456
freebsd_cvs_archive
2,013
/*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Kevin Fall. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following con...
2,404
freebsd_cvs_archive
2,013
d47 1 a47 1 __FBSDID("$FreeBSD: head/bin/cat/cat.c 246083 2013-01-29 18:19:40Z brooks $"); d71 1 a71 1 static void usage(void); d156 1
63
freebsd_cvs_archive
2,013
a0 336 /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Kevin Fall. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the follow...
2,303
freebsd_cvs_archive
2,012
d47 1 a47 1 __FBSDID("$FreeBSD: head/bin/cat/cat.c 238653 2012-07-20 08:33:23Z jh $"); d67 1 a67 1 static int bflag, eflag, nflag, sflag, tflag, vflag; d99 1 d103 1 a103 1 while ((ch = getopt(argc, argv, "benstuv")) != -1) d111 3 d134 9 d156 1 a156 1 fprintf(stderr, "usage: cat [-benstuv] [file ...]\n");
145
freebsd_cvs_archive
2,011
d61 1 a65 1 #include <stddef.h> d80 14 a93 10 /* Memory strategy threshold, in pages: if physmem is larger then this, use a * large buffer */ #define PHYSPAGES_THRESHOLD (32*1024) /* Maximum buffer size in bytes - do not allow it to grow larger than this */ #define BUFSIZE_MAX (2*1024*1024) /* Small (default) buffe...
228
freebsd_cvs_archive
2,008
d67 3 a69 3 int bflag, eflag, nflag, sflag, tflag, vflag; int rval; const char *filename;
37
freebsd_cvs_archive
2,012
a60 1 #include <stddef.h> d65 1 d80 10 a89 14 /* * Memory strategy threshold, in pages: if physmem is larger than this, * use a large buffer. */ #define PHYSPAGES_THRESHOLD (32 * 1024) /* Maximum buffer size in bytes - do not allow it to grow larger than this. */ #define BUFSIZE_MAX (2 * 1024 * 1024) /* * Small (...
238
freebsd_cvs_archive
2,013
d47 1 a47 1 __FBSDID("$FreeBSD: stable/9/bin/cat/cat.c 248337 2013-03-15 19:27:27Z brooks $"); d67 3 a69 3 static int bflag, eflag, lflag, nflag, sflag, tflag, vflag; static int rval; static const char *filename; a98 1 struct flock stdout_lock; d102 1 a102 1 while ((ch = getopt(argc, argv, "belnstuv")) != -1) a109 3 ...
260
freebsd_cvs_archive
2,012
a60 1 #include <stddef.h> d65 1 d80 10 a89 14 /* * Memory strategy threshold, in pages: if physmem is larger than this, * use a large buffer. */ #define PHYSPAGES_THRESHOLD (32 * 1024) /* Maximum buffer size in bytes - do not allow it to grow larger than this. */ #define BUFSIZE_MAX (2 * 1024 * 1024) /* * Small (...
238
freebsd_cvs_archive
2,002
d74 1 a74 1 static void scanfiles(char **argv, int cooked); d135 2 a136 2 void scanfiles(char **argv, int cooked)
42
freebsd_cvs_archive
2,002
d182 4 a185 4 if (ch == '\n') { if (sflag) { if (!gobble && putchar(ch) == EOF) break; d187 5 a191 9 continue; } if (nflag && !bflag) { fprintf(stdout, "%6d\t", ++line); if (ferror(stdout)) break; } } else if (nflag) { fprintf(stdout, "%6d\t", ++line); a195 1 ...
156
freebsd_cvs_archive
2,002
d112 1 a112 1 (void)fprintf(stderr, d190 1 a190 1 (void)fprintf(stdout, "%6d\t", ++line); d195 1 a195 1 (void)fprintf(stdout, "%6d\t", ++line); d243 1 a243 1 static char *buf; d271 1 a271 1 int len; d278 2 a279 1 if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) >= 0) { d297 2 a298 1 shutdown(fd, SHUT_WR); d...
166
freebsd_cvs_archive
2,001
d48 1 a48 1 "$FreeBSD: src/bin/cat/cat.c,v 1.18 2001/09/26 11:32:23 ru Exp $"; d73 3 a75 5 int main __P((int argc, char *argv[])); static void scanfiles __P((char **argv, int cooked)); static void cook_cat __P((FILE *)); static void raw_cat __P((int)); d78 1 a78 1 static int udom_open __P((const char *path, int flag...
274
freebsd_cvs_archive
2,001
d48 1 a48 1 "$FreeBSD: src/bin/cat/cat.c,v 1.17 2001/09/15 00:39:14 dillon Exp $"; d80 1 a80 1 static int udom_open __P((const char *path, int flags, int modes)); d151 1 a151 1 fd = udom_open(path, O_RDONLY, 0); d275 1 a275 1 udom_open(path, flags, modes) a277 1 int modes;
124
freebsd_cvs_archive
2,001
d48 1 a48 1 "$FreeBSD: src/bin/cat/cat.c,v 1.15 2000/04/14 21:01:35 asmodai Exp $"; d53 5 d67 1 a72 2 void cook_args __P((char *argv[])); void cook_buf __P((FILE *)); d74 8 a81 2 void raw_args __P((char *argv[])); void raw_cat __P((int)); d123 1 a123 1 cook_args(argv); d125 1 a125 1 raw_args(argv); d132 3 a134 2 ...
465
freebsd_cvs_archive
2,001
d48 1 a48 1 "$FreeBSD$"; a59 1 #include <string.h>
26
freebsd_cvs_archive
2,001
d48 1 a48 1 "$FreeBSD: src/bin/cat/cat.c,v 1.14.2.2 2001/07/30 10:30:01 dd Exp $"; a52 5 #ifndef NO_UDOM_SUPPORT #include <sys/socket.h> #include <sys/un.h> #include <errno.h> #endif a61 1 #include <stddef.h> d67 2 d70 2 a71 8 static void scanfiles __P((char **argv, int cooked)); static void cook_cat __P((FILE *)); ...
750
freebsd_cvs_archive
2,002
d80 1 a80 1 static int udom_open __P((const char *path, int flags)); d150 1 a150 1 fd = udom_open(path, O_RDONLY); d265 1 a265 1 udom_open(path, flags) d268 1 d310 1
73
freebsd_cvs_archive
2,002
d278 1 a278 2 fd = socket(AF_UNIX, SOCK_STREAM, 0); if (fd >= 0) { d296 1 a296 2 if (shutdown(fd, SHUT_WR) == -1) perror("cat"); d299 1 a299 2 if (shutdown(fd, SHUT_RD) == -1) perror("cat");
88
freebsd_cvs_archive
2,002
d241 1 a241 1 static char *buf = NULL; d271 1 a271 1 unsigned int len;
31
freebsd_cvs_archive
2,002
a137 1 FILE *fp; d144 1 a144 1 fd = STDIN_FILENO; d157 3 a159 7 if (fd == STDIN_FILENO) cook_cat(stdin); else { fp = fdopen(fd, "r"); cook_cat(fp); fclose(fp); } d162 1 a162 2 if (fd != STDIN_FILENO) close(fd); a174 4 /* Reset EOF condition on stdin. */ if (fp == stdin && feof(std...
129
freebsd_cvs_archive
2,013
/*- * Copyright (c) 1992, 1993, 1994 * 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 abov...
1,594
freebsd_cvs_archive
2,013
a0 205 /*- * Copyright (c) 1992, 1993, 1994 * 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 t...
1,641
freebsd_cvs_archive
2,012
d43 1 a43 1 __FBSDID("$FreeBSD: head/bin/chflags/chflags.c 194795 2009-06-23 23:30:56Z delphij $"); d120 1 a120 5 /* XXX: Why don't chflags and lchflags have compatible prototypes? */ if (hflag) change_flags = (int (*)(const char *, unsigned long))lchflags; else change_flags = chflags;
106
freebsd_cvs_archive
2,005
d63 1 a63 1 u_long clear, set; d65 2 a66 1 int Hflag, Lflag, Rflag, hflag, ch, fts_options, oct, rval; d70 2 a71 2 Hflag = Lflag = Rflag = hflag = 0; while ((ch = getopt(argc, argv, "HLPRh")) != -1) d87 3 d93 3 d176 16 a191 9 if (oct) { if (!(*change_flags)(p->fts_accpath, set)) continue; } else { p->...
252
freebsd_cvs_archive
2,008
d63 1 a63 1 u_long clear, newflags, set; d65 1 a65 2 int Hflag, Lflag, Rflag, fflag, hflag, vflag; int ch, fts_options, oct, rval; d69 2 a70 2 Hflag = Lflag = Rflag = fflag = hflag = vflag = 0; while ((ch = getopt(argc, argv, "HLPRfhv")) != -1) a85 3 case 'f': fflag = 1; break; a88 3 case 'v': vflag++...
360
freebsd_cvs_archive
2,005
d65 1 a65 1 int Hflag, Lflag, Rflag, ch, fts_options, oct, rval; d67 1 d69 2 a70 2 Hflag = Lflag = Rflag = 0; while ((ch = getopt(argc, argv, "HLPR")) != -1) d86 3 d101 3 d113 6 d163 3 a165 1 continue; d170 1 a170 1 if (!chflags(p->fts_accpath, set)) d175 2 a176 1 if (!chflags(p->fts_accpath, (u_long)p->fts...
190
freebsd_cvs_archive
2,004
d65 1 a65 1 int Hflag, Lflag, Pflag, Rflag, ch, fts_options, oct, rval; d68 1 a68 1 Hflag = Lflag = Pflag = Rflag = 0; d73 1 a73 1 Lflag = Pflag = 0; d77 1 a77 1 Hflag = Pflag = 0; a79 1 Pflag = 1;
110
freebsd_cvs_archive
2,002
d63 1 a63 3 main(argc, argv) int argc; char *argv[]; d178 1 a178 1 usage()
34
freebsd_cvs_archive
2,001
a33 4 #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); d40 1 d42 1 a42 1 static const char sccsid[] = "@(#)chflags.c 8.5 (Berkeley) 4/1/94"; d44 4
68
freebsd_cvs_archive
2,001
d34 4 d42 1 a42 1 #endif /* not lint */ d45 1 a45 2 #if 0 static char sccsid[] = "@(#)chflags.c 8.5 (Berkeley) 4/1/94"; a46 3 static const char rcsid[] = "$FreeBSD: src/usr.bin/chflags/chflags.c,v 1.10 2001/05/20 06:21:12 kris Exp $"; #endif /* not lint */
115
freebsd_cvs_archive
2,001
d45 1 a45 1 "$FreeBSD: src/usr.bin/chflags/chflags.c,v 1.9 2000/06/17 14:19:32 joe Exp $"; a101 1 fts_options = FTS_PHYSICAL; d103 1 d110 2 a111 1 }
76
freebsd_cvs_archive
2,013
/* $NetBSD: chio.c,v 1.6 1998/01/04 23:53:58 thorpej Exp $ */ /*- * Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com> * 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. Redistributio...
9,044
freebsd_cvs_archive
2,013
a0 1179 /* $NetBSD: chio.c,v 1.6 1998/01/04 23:53:58 thorpej Exp $ */ /*- * Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com> * 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. Redis...
8,547
freebsd_cvs_archive
2,010
d90 1 a90 1 const struct element_type elements[] = { d100 1 a100 1 const struct changer_command commands[] = { d115 1 a115 1 const struct special_word specials[] = {
54
freebsd_cvs_archive
2,013
d46 1 a46 1 __FBSDID("$FreeBSD: stable/9/bin/chio/chio.c 252214 2013-06-25 21:43:49Z ken $"); a56 2 #include <langinfo.h> #include <locale.h> a83 1 static void print_designator(const char *, u_int8_t, u_int8_t); a725 4 if (ces->ces_designator_length > 0) print_designator(ces->ces_designator, ces->ces_code...
574
freebsd_cvs_archive
2,005
d72 1 a72 1 (unsigned int, unsigned int); d972 2 a973 1 ces = get_element_status((unsigned int)type, (unsigned int)element); d1008 1 a1008 1 get_element_status(unsigned int type, unsigned int element) d1024 2 a1025 1 cesr.cesr_flags |= CESR_VOLTAGS; /* Grab voltags as well */
103
freebsd_cvs_archive
2,008
d72 1 a72 1 (unsigned int, unsigned int, int); d972 1 a972 2 ces = get_element_status((unsigned int)type, (unsigned int)element, CHET_VT == type); d1007 1 a1007 1 get_element_status(unsigned int type, unsigned int element, int use_voltags) d1023 1 a1023 2 if (use_voltags) cesr.cesr_flags |= CESR_VOLTAGS; /...
126
freebsd_cvs_archive
2,002
a41 2 #include <sys/cdefs.h> __FBSDID("$FreeBSD$");
21
freebsd_cvs_archive
2,002
d50 1 d69 1 a69 1 static void find_element(char *, u_int16_t *, u_int16_t *); d947 1 a947 1 u_int16_t type, element; d1019 2 a1020 2 cesr.cesr_element_type = (u_int16_t)type; cesr.cesr_element_base = (u_int16_t)element; d1043 1 a1043 1 find_element(char *voltag, u_int16_t *et, u_int16_t *eu)
128
freebsd_cvs_archive
2,002
d61 2 a62 2 static int parse_element_type(char *); static int parse_element_unit(char *); d527 2 a528 1 int i, count, base, chet, schet, echet; d605 1 a605 1 base = atol(argv[1]); d609 1 a609 4 count = atol(argv[2]) - base + 1; if (base < 0 || count < 0) errx(1, "bad arguments"); d800 1 a800 1 csvr.csvr_addr ...
278
freebsd_cvs_archive
2,001
d42 1 a42 1 "$FreeBSD: src/bin/chio/chio.c,v 1.18 2001/07/03 03:22:49 mikeh Exp $"; d59 8 a66 8 static void usage __P((void)); static void cleanup __P((void)); static int parse_element_type __P((char *)); static int parse_element_unit __P((char *)); static const char * element_type_name __P((int et)); static int pars...
937
freebsd_cvs_archive
2,001
d42 1 a42 1 "$FreeBSD: src/bin/chio/chio.c,v 1.17 2000/09/18 06:09:11 ken Exp $"; d66 1 a66 1 static const char *bits_to_string __P((int, const char *)); d69 2 a70 1 static struct changer_element_status *get_element_status __P((u_int16_t, u_int16_t)); d693 1 a693 1 calloc(count, sizeof(struct changer_element_stat...
326
freebsd_cvs_archive
2,000
d42 1 a42 1 "$FreeBSD: src/bin/chio/chio.c,v 1.16 2000/08/16 05:14:47 imp Exp $"; d71 10 a80 10 static int do_move __P((char *, int, char **)); static int do_exchange __P((char *, int, char **)); static int do_position __P((char *, int, char **)); static int do_params __P((char *, int, char **)); static int do_getpic...
352
freebsd_cvs_archive
2,000
d35 1 d42 1 a42 1 "$FreeBSD: src/bin/chio/chio.c,v 1.15 1999/08/27 23:13:34 peter Exp $"; d68 3 d79 1 d82 4 d92 1 d106 1 d209 7 a215 2 /* <from EU> */ cmd.cm_fromunit = parse_element_unit(*argv); d222 5 d290 7 a296 2 /* <src EU> */ cmd.ce_srcunit = parse_element_unit(*argv); d303 7 a309 2 /* <dst1 EU> */ cmd.ce...
213
freebsd_cvs_archive
2,000
a34 1 * Addidional Copyright (c) 2000, by C. Stephen Gunn, Waterspout Communications d41 1 a41 1 "$FreeBSD: src/bin/chio/chio.c,v 1.15.2.1 2000/09/18 02:07:10 jkh Exp $"; a66 3 static void find_element __P((char *, u_int16_t *, u_int16_t *)); static struct changer_element_status *get_element_status __P((u_int16_t, u...
2,372
freebsd_cvs_archive
2,001
d42 1 a42 1 "$FreeBSD: src/bin/chio/chio.c,v 1.19 2001/07/04 21:35:15 mikeh Exp $"; d66 1 a66 1 static const char *bits_to_string __P((ces_status_flags, const char *)); d69 1 a69 2 static struct changer_element_status *get_element_status __P((unsigned int, unsigned int)); d71 10 a80 10 static int do_move __P((co...
694
freebsd_cvs_archive
2,012
/* $FreeBSD: head/bin/chio/defs.h 139969 2005-01-10 08:39:26Z imp $ */ /*- * Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com> * 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. Red...
567
freebsd_cvs_archive
2,013
a0 57 /* $FreeBSD: releng/8.4/bin/chio/defs.h 139969 2005-01-10 08:39:26Z imp $ */ /*- * Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are me...
577
freebsd_cvs_archive
2,012
/*- * Copyright (c) 1989, 1993, 1994 * 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 abov...
2,053
freebsd_cvs_archive
2,013
a0 248 /*- * Copyright (c) 1989, 1993, 1994 * 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 t...
2,063
freebsd_cvs_archive
2,009
a43 1 #include <sys/types.h> d65 1 a65 1 int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval, error; a171 1 /* else */ d189 5 a193 3 if (error && !fflag) { warn("%s", p->fts_path); rval = 1; a203 1 a210 1 a214 1 free(set);
113
freebsd_cvs_archive
2,009
d45 1 d58 1 a58 1 static int may_have_nfs4acl(const FTSENT *ent); d66 1 a66 1 int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval; a69 1 int (*change_mode)(const char *, mode_t); a142 5 if (hflag) change_mode = lchmod; else change_mode = chmod; d184 1 a184 1 if (may_have_nfs4acl(p) == 0 && d187 5 a1...
232
freebsd_cvs_archive
2,010
a44 1 #include <sys/param.h> d57 1 a57 1 static int may_have_nfs4acl(const FTSENT *ent, int hflag); d65 1 a65 1 int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval, error; d69 1 d143 5 d189 1 a189 1 if (may_have_nfs4acl(p, hflag) == 0 && d192 1 a192 5 if (hflag) error = lchmod(p->fts_accpath, newmode);...
271
freebsd_cvs_archive
2,010
d44 1 d66 1 a66 1 int Hflag, Lflag, Rflag, ch, error, fflag, fts_options, hflag, rval; d173 1 d191 3 a193 5 if (error) { if (!fflag) { warn("%s", p->fts_path); rval = 1; } d204 1 d212 1 d217 1
104
freebsd_cvs_archive
2,005
d56 1 a56 1 void usage(void); d215 1 a215 1 void
25
freebsd_cvs_archive
2,003
a67 2 long val; int oct; d70 2 a71 2 char *ep, *mode; mode_t newmode, omode; a74 1 omode = 0; d152 2 a153 16 if (*mode >= '0' && *mode <= '7') { errno = 0; val = strtol(mode, &ep, 8); if (val > USHRT_MAX || val < 0) errno = ERANGE; if (errno) err(1, "invalid file mode: %s", mode); if (*ep) errx...
246
freebsd_cvs_archive
2,002
a59 1 int main(int, char *[]);
13
freebsd_cvs_archive
2,002
d70 2 a71 2 int oct, omode; int Hflag, Lflag, Pflag, Rflag, ch, fflag, fts_options, hflag, rval; d74 1 a74 1 int newmode; d79 1 a79 1 Hflag = Lflag = Pflag = Rflag = fflag = hflag = vflag = 0; d84 1 a84 1 Lflag = Pflag = 0; d88 1 a88 1 Hflag = Pflag = 0; a90 1 Pflag = 1; d159 1 a159 1 if (val > INT_MAX |...
183
freebsd_cvs_archive
2,001
d45 1 a45 1 "$FreeBSD: src/bin/chmod/chmod.c,v 1.21 2001/05/28 15:31:11 ru Exp $"; d60 2 a61 2 int main __P((int, char *[])); void usage __P((void)); d64 1 a64 3 main(argc, argv) int argc; char *argv[]; d75 1 a75 1 int (*change_mode) __P((const char *, mode_t)); d223 1 a223 1 usage()
130
freebsd_cvs_archive
2,001
d45 1 a45 1 "$FreeBSD: src/bin/chmod/chmod.c,v 1.19 2001/05/20 03:24:24 kris Exp $"; d77 1 d82 1 a82 1 while ((ch = getopt(argc, argv, "HLPRXfgorstuvwx")) != -1) d106 4 a109 3 * link. 4.4BSD's symbolic links don't have modes, * so it's an undocumented noop. Do syntax checking, * though. d153 5 d200 4 a...
209
freebsd_cvs_archive
2,001
d45 1 a45 1 "$FreeBSD: src/bin/chmod/chmod.c,v 1.18 2000/07/29 22:16:55 peter Exp $"; a136 1 fts_options = FTS_PHYSICAL; d138 1 d148 2 a149 1 }
75
freebsd_cvs_archive
2,000
d45 1 a45 1 "$FreeBSD: src/bin/chmod/chmod.c,v 1.16 1999/11/28 12:24:16 obrien Exp $"; d75 1 d195 4 a198 2 if (chmod(p->fts_accpath, oct ? omode : getmode(set, p->fts_statp->st_mode)) && !fflag) {
95
freebsd_cvs_archive
2,000
a74 1 int newmode; d194 2 a195 4 newmode = oct ? omode : getmode(set, p->fts_statp->st_mode); if ((newmode & ALLPERMS) == (p->fts_statp->st_mode & ALLPERMS)) continue; if (chmod(p->fts_accpath, newmode) && !fflag) {
88
freebsd_cvs_archive
2,001
d45 1 a45 1 "$FreeBSD: src/bin/chmod/chmod.c,v 1.16.2.2 2000/08/07 07:33:23 ps Exp $"; a59 1 int main __P((int, char *[]));
64
freebsd_cvs_archive
2,002
a76 1 int (*change_mode) __P((const char *, mode_t)); d81 1 a81 1 while ((ch = getopt(argc, argv, "HLPRXfghorstuvwx")) != -1) d105 3 a107 4 * link. 4.4BSD's symbolic links didn't have modes, * so it was an undocumented noop. In FreeBSD 3.0, * lchmod(2) is introduced and this option does real * work....
238
freebsd_cvs_archive
2,013
/*- * Copyright (c) 1988, 1993, 1994 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * David Hitz of Auspex Systems Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted pro...
4,314
freebsd_cvs_archive
2,013
a0 521 /*- * Copyright (c) 1988, 1993, 1994 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * David Hitz of Auspex Systems Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permit...
4,321
freebsd_cvs_archive
2,012
d45 1 a45 1 __FBSDID("$FreeBSD: head/bin/cp/cp.c 208821 2010-06-05 08:50:39Z trasz $"); d101 1 a101 1 int Hflag, Lflag, Pflag, ch, fts_options, r, have_trailing_slash; d105 1 a105 1 Hflag = Lflag = Pflag = 0; d110 1 a110 1 Lflag = Pflag = 0; d114 1 a114 1 Hflag = Pflag = 0; a116 1 Pflag = 1; a122 1 Pflag ...
186
freebsd_cvs_archive
2,013
d45 1 a45 1 __FBSDID("$FreeBSD: stable/9/bin/cp/cp.c 246266 2013-02-02 23:11:20Z eadler $"); d101 1 a101 1 int Hflag, Lflag, ch, fts_options, r, have_trailing_slash; d105 1 a105 1 Hflag = Lflag = 0; d110 1 a110 1 Lflag = 0; d114 1 a114 1 Hflag = 0; d117 1 d124 1 d149 1 a149 1 Hflag = 0;
160
freebsd_cvs_archive
2,013
d45 1 a45 1 __FBSDID("$FreeBSD: stable/8/bin/cp/cp.c 246265 2013-02-02 23:11:16Z eadler $"); d101 1 a101 1 int Hflag, Lflag, ch, fts_options, r, have_trailing_slash; d105 1 a105 1 Hflag = Lflag = 0; d110 1 a110 1 Lflag = 0; d114 1 a114 1 Hflag = 0; d117 1 d124 1 d149 1 a149 1 Hflag = 0;
160
freebsd_cvs_archive
2,007
d213 3 a215 4 if (argc > 1) { warnx("Target is not a directory"); exit(1); }
38
freebsd_cvs_archive
2,006
d158 3 a160 6 if (rflag) { if (Rflag) errx(1, "the -R and -r options may not be specified together."); } if (rflag && !Hflag && !Pflag) d230 1 a230 1 if (S_ISDIR(tmp_stat.st_mode) && (Rflag))
85
freebsd_cvs_archive
2,006
d141 2 a142 1 rflag = 1; d159 1 a159 1 if (Rflag) d162 3 a164 6 if (Hflag || Lflag || Pflag) errx(1, "the -H, -L, and -P options may not be specified with the -r option."); fts_options &= ~FTS_PHYSICAL; fts_options |= FTS_LOGICAL; } d228 1 a228 1 if (rflag || (Rflag && (Lflag || Hflag))) d233 1 a233 ...
184
freebsd_cvs_archive
2,006
d86 1 a86 1 int fflag, iflag, nflag, pflag, vflag; d105 1 a105 1 while ((ch = getopt(argc, argv, "HLPRfinprv")) != -1) d143 3 d463 3
65
freebsd_cvs_archive
2,006
d86 1 a86 1 int fflag, iflag, lflag, nflag, pflag, vflag; d105 1 a105 1 while ((ch = getopt(argc, argv, "HLPRfinprvl")) != -1) a142 3 case 'l': lflag = 1; break; a459 3 case S_IFSOCK: warnx("%s is a socket (not copied).", curr->fts_path);
111
freebsd_cvs_archive
2,003
a90 1 a91 1 static void siginfo (int notused __unused); d97 1 d509 1 a509 1 siginfo (int notused __unused)
45
freebsd_cvs_archive
2,003
d92 1 a92 1 int info;
13
freebsd_cvs_archive
2,002
d364 4 a367 3 if (pflag) rval = setfile(curr->fts_statp, 0); else {
34
freebsd_cvs_archive
2,002
d95 1 a95 1 static int mastercmp(const FTSENT **, const FTSENT **); d487 1 a487 1 mastercmp(const FTSENT **a, const FTSENT **b)
48
freebsd_cvs_archive
2,002
d89 2 a90 2 int iflag, pflag, fflag; static int Rflag, rflag, vflag; d106 1 a106 1 while ((ch = getopt(argc, argv, "HLPRfiprv")) != -1) d125 1 a125 1 iflag = 0; d129 5 a133 1 fflag = 0;
95
freebsd_cvs_archive
2,002
d94 2 a95 2 int copy(char *[], enum op, int); int mastercmp(const FTSENT **, const FTSENT **);
33
freebsd_cvs_archive
2,002
d102 2 a103 2 int Hflag, Lflag, Pflag, ch, fts_options, r; char *target; d182 2 d234 8
41
freebsd_cvs_archive
2,002
d85 1 a85 1 PATH_T to = { to.p_path, "", "" }; d87 4 a90 1 int Rflag, iflag, pflag, rflag, fflag, vflag; d247 2 a248 1 int base = 0, dne, badcp, nlen, rval; d274 1 d378 2 a379 1 warnx("cannot overwrite directory %s with non-directory %s",
109
freebsd_cvs_archive
2,002
d91 2 a92 2 int copy __P((char *[], enum op, int)); int mastercmp __P((const FTSENT **, const FTSENT **)); d95 1 a95 3 main(argc, argv) int argc; char *argv[]; d239 1 a239 4 copy(argv, type, fts_options) char *argv[]; enum op type; int fts_options; d458 1 a458 2 mastercmp(a, b) const FTSENT **a, **b;
118
freebsd_cvs_archive
2,001
d251 1 a251 1 mode_t mask; d334 14 a347 4 * We are finished copying to this directory. If * -p is in effect, set permissions and timestamps. * Otherwise, if we created this directory, set the * correct permissions, limited by the umask. d351 8 a358 6 else if (curr->fts_number) { mode_t perm = c...
301
freebsd_cvs_archive
2,001
d48 1 a48 1 "$FreeBSD: src/bin/cp/cp.c,v 1.24 1999/11/28 09:34:21 mharo Exp $"; a85 1 uid_t myuid; a86 1 int myumask; a169 6 myuid = getuid(); /* Copy the umask for explicit mode setting. */ myumask = umask(0); (void)umask(myumask);
107
freebsd_cvs_archive
2,001
d48 1 a48 1 "$FreeBSD: src/bin/cp/cp.c,v 1.24.2.1 2001/07/12 11:58:02 bde Exp $"; a71 1 #include <limits.h> d172 1 a172 1 if (strlcpy(to.p_path, target, sizeof(to.p_path)) >= sizeof(to.p_path)) d174 1 d313 1 a313 1 if (target_mid - to.p_path + nlen >= PATH_MAX) {
123
freebsd_cvs_archive
2,001
d48 1 a48 1 "$FreeBSD: src/bin/cp/cp.c,v 1.24.2.2 2001/08/01 01:32:10 obrien Exp $"; a73 1 #include <stdlib.h>
59
freebsd_cvs_archive
2,001
d48 1 a48 1 "$FreeBSD$"; a250 8 mode_t mask; /* * Keep an inverted copy of the umask, for use in correcting * permissions on created directories when not using -p. */ mask = ~umask(0777); umask(~mask); d267 2 a325 19 if (curr->fts_info == FTS_DP) { /* * We are finished copying to this directory. ...
402
freebsd_cvs_archive
2,002
d251 1 a251 1 mode_t mask, mode; d334 4 a337 14 * We are nearly finished with this directory. If we * didn't actually copy it, or otherwise don't need to * change its attributes, then we are done. */ if (!curr->fts_number) continue; /* * If -p is in effect, set all the attributes. * ...
342
freebsd_cvs_archive
2,002
d87 1 a87 1 int Rflag, fflag, iflag, nflag, pflag, rflag, vflag; d105 1 a105 1 while ((ch = getopt(argc, argv, "HLPRfinprv")) != -1) d124 1 a124 1 iflag = nflag = 0; d128 1 a128 5 fflag = nflag = 0; break; case 'n': nflag = 1; fflag = iflag = 0;
127
freebsd_cvs_archive
2,002
d353 3 a355 4 if (pflag) { if (setfile(curr->fts_statp, 0)) rval = 1; } else {
42
freebsd_cvs_archive
2,012
/*- * Copyright (c) 1991, 1993, 1994 * 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 abov...
554
freebsd_cvs_archive
2,013
a0 52 /*- * Copyright (c) 1991, 1993, 1994 * 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 th...
564
freebsd_cvs_archive
2,005
d40 1 a40 1 extern int fflag, iflag, nflag, pflag, vflag;
27
freebsd_cvs_archive
2,005
a48 2 int preserve_dir_acls(struct stat *, char *, char *); int preserve_fd_acls(int, int);
28
freebsd_cvs_archive
2,006
d40 1 a40 1 extern int fflag, iflag, lflag, nflag, pflag, vflag;
30
freebsd_cvs_archive
2,003
d45 1 a45 1 extern int info;
14