chown.c (5bb83b98dbde8326de7b8221ef899ca38ddb3180) | chown.c (0be12df092c099736caf781501b02233cbdaa6ff) |
---|---|
1/* 2 * Copyright (c) 1988, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 72 unchanged lines hidden (view full) --- 81 FTSENT *p; 82 int Hflag, Lflag, Pflag, ch, fts_options, hflag, rval; 83 char *cp; 84 85 myname = (cp = rindex(*argv, '/')) ? cp + 1 : *argv; 86 ischown = myname[2] == 'o'; 87 88 Hflag = Lflag = Pflag = hflag = 0; | 1/* 2 * Copyright (c) 1988, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 72 unchanged lines hidden (view full) --- 81 FTSENT *p; 82 int Hflag, Lflag, Pflag, ch, fts_options, hflag, rval; 83 char *cp; 84 85 myname = (cp = rindex(*argv, '/')) ? cp + 1 : *argv; 86 ischown = myname[2] == 'o'; 87 88 Hflag = Lflag = Pflag = hflag = 0; |
89 while ((ch = getopt(argc, argv, "HLPRfh")) != -1) | 89 while ((ch = getopt(argc, argv, "HLPRfhv")) != -1) |
90 switch (ch) { 91 case 'H': 92 Hflag = 1; 93 Lflag = Pflag = 0; 94 break; 95 case 'L': 96 Lflag = 1; 97 Hflag = Pflag = 0; --- 6 unchanged lines hidden (view full) --- 104 Rflag = 1; 105 break; 106 case 'f': 107 fflag = 1; 108 break; 109 case 'h': 110 hflag = 1; 111 break; | 90 switch (ch) { 91 case 'H': 92 Hflag = 1; 93 Lflag = Pflag = 0; 94 break; 95 case 'L': 96 Lflag = 1; 97 Hflag = Pflag = 0; --- 6 unchanged lines hidden (view full) --- 104 Rflag = 1; 105 break; 106 case 'f': 107 fflag = 1; 108 break; 109 case 'h': 110 hflag = 1; 111 break; |
112 case 'v': 113 vflag = 1; 114 break; |
|
112 case '?': 113 default: 114 usage(); 115 } 116 argv += optind; 117 argc -= optind; 118 119 if (argc < 2) --- 160 unchanged lines hidden --- | 115 case '?': 116 default: 117 usage(); 118 } 119 argv += optind; 120 argc -= optind; 121 122 if (argc < 2) --- 160 unchanged lines hidden --- |