tail.c (35081) | tail.c (48566) |
---|---|
1/*- 2 * Copyright (c) 1991, 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 * Edward Sze-Tyan Wang. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 140 unchanged lines hidden (view full) --- 149 else if (style == FLINES) 150 style = RLINES; 151 } 152 153 /* 154 * If style not specified, the default is the whole file for -r, and 155 * the last 10 lines if not -r. 156 */ | 1/*- 2 * Copyright (c) 1991, 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 * Edward Sze-Tyan Wang. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 140 unchanged lines hidden (view full) --- 149 else if (style == FLINES) 150 style = RLINES; 151 } 152 153 /* 154 * If style not specified, the default is the whole file for -r, and 155 * the last 10 lines if not -r. 156 */ |
157 if (style == NOTSET) | 157 if (style == NOTSET) { |
158 if (rflag) { 159 off = 0; 160 style = REVERSE; 161 } else { 162 off = 10; 163 style = RLINES; 164 } | 158 if (rflag) { 159 off = 0; 160 style = REVERSE; 161 } else { 162 off = 10; 163 style = RLINES; 164 } |
165 } |
|
165 166 if (*argv) 167 for (first = 1; fname = *argv++;) { 168 if ((fp = fopen(fname, "r")) == NULL || 169 fstat(fileno(fp), &sb)) { 170 ierr(); 171 continue; 172 } --- 134 unchanged lines hidden --- | 166 167 if (*argv) 168 for (first = 1; fname = *argv++;) { 169 if ((fp = fopen(fname, "r")) == NULL || 170 fstat(fileno(fp), &sb)) { 171 ierr(); 172 continue; 173 } --- 134 unchanged lines hidden --- |