Deleted Added
full compact
dd.c (5701) dd.c (5702)
1/*-
2 * Copyright (c) 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Keith Muller of the University of California, San Diego and Lance
7 * Visser of Convex Computer Corporation.
8 *

--- 20 unchanged lines hidden (view full) ---

29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
1/*-
2 * Copyright (c) 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Keith Muller of the University of California, San Diego and Lance
7 * Visser of Convex Computer Corporation.
8 *

--- 20 unchanged lines hidden (view full) ---

29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * $Id: dd.c,v 1.2 1994/09/24 02:54:52 davidg Exp $
37 * $Id: dd.c,v 1.3 1995/01/17 22:55:59 ache Exp $
38 */
39
40#ifndef lint
41static char copyright[] =
42"@(#) Copyright (c) 1991, 1993, 1994\n\
43 The Regents of the University of California. All rights reserved.\n";
44#endif /* not lint */
45

--- 126 unchanged lines hidden (view full) ---

172 /*
173 * If converting case at the same time as another conversion, build a
174 * table that does both at once. If just converting case, use the
175 * built-in tables.
176 */
177 if (ddflags & (C_LCASE|C_UCASE))
178 if (ddflags & C_ASCII)
179 if (ddflags & C_LCASE) {
38 */
39
40#ifndef lint
41static char copyright[] =
42"@(#) Copyright (c) 1991, 1993, 1994\n\
43 The Regents of the University of California. All rights reserved.\n";
44#endif /* not lint */
45

--- 126 unchanged lines hidden (view full) ---

172 /*
173 * If converting case at the same time as another conversion, build a
174 * table that does both at once. If just converting case, use the
175 * built-in tables.
176 */
177 if (ddflags & (C_LCASE|C_UCASE))
178 if (ddflags & C_ASCII)
179 if (ddflags & C_LCASE) {
180 for (cnt = 0; cnt < 0377; ++cnt)
180 for (cnt = 0; cnt <= 0377; ++cnt)
181 if (isupper(ctab[cnt]))
182 ctab[cnt] = tolower(ctab[cnt]);
183 } else {
181 if (isupper(ctab[cnt]))
182 ctab[cnt] = tolower(ctab[cnt]);
183 } else {
184 for (cnt = 0; cnt < 0377; ++cnt)
184 for (cnt = 0; cnt <= 0377; ++cnt)
185 if (islower(ctab[cnt]))
186 ctab[cnt] = toupper(ctab[cnt]);
187 }
188 else if (ddflags & C_EBCDIC)
189 if (ddflags & C_LCASE) {
185 if (islower(ctab[cnt]))
186 ctab[cnt] = toupper(ctab[cnt]);
187 }
188 else if (ddflags & C_EBCDIC)
189 if (ddflags & C_LCASE) {
190 for (cnt = 0; cnt < 0377; ++cnt)
190 for (cnt = 0; cnt <= 0377; ++cnt)
191 if (isupper(cnt))
192 ctab[cnt] = ctab[tolower(cnt)];
193 } else {
191 if (isupper(cnt))
192 ctab[cnt] = ctab[tolower(cnt)];
193 } else {
194 for (cnt = 0; cnt < 0377; ++cnt)
194 for (cnt = 0; cnt <= 0377; ++cnt)
195 if (islower(cnt))
196 ctab[cnt] = ctab[toupper(cnt)];
197 }
198 else {
199 ctab = ddflags & C_LCASE ? u2l : l2u;
200 if (ddflags & C_LCASE) {
195 if (islower(cnt))
196 ctab[cnt] = ctab[toupper(cnt)];
197 }
198 else {
199 ctab = ddflags & C_LCASE ? u2l : l2u;
200 if (ddflags & C_LCASE) {
201 for (cnt = 0; cnt < 0377; ++cnt)
201 for (cnt = 0; cnt <= 0377; ++cnt)
202 if (isupper(cnt))
203 ctab[cnt] = tolower(cnt);
202 if (isupper(cnt))
203 ctab[cnt] = tolower(cnt);
204 else
205 ctab[cnt] = cnt;
204 } else {
206 } else {
205 for (cnt = 0; cnt < 0377; ++cnt)
207 for (cnt = 0; cnt <= 0377; ++cnt)
206 if (islower(cnt))
207 ctab[cnt] = toupper(cnt);
208 if (islower(cnt))
209 ctab[cnt] = toupper(cnt);
210 else
211 ctab[cnt] = cnt;
208 }
209 }
210 (void)time(&st.start); /* Statistics timestamp. */
211}
212
213static void
214getfdtype(io)
215 IO *io;

--- 192 unchanged lines hidden ---
212 }
213 }
214 (void)time(&st.start); /* Statistics timestamp. */
215}
216
217static void
218getfdtype(io)
219 IO *io;

--- 192 unchanged lines hidden ---