Deleted Added
full compact
bcd.c (2491) bcd.c (28979)
1/*
2 * Copyright (c) 1989, 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 * Steve Hayman of the Indiana University Computer Science Dept.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

126{
127 char cardline[80];
128
129 /*
130 * The original bcd prompts with a "%" when reading from stdin,
131 * but this seems kind of silly. So this one doesn't.
132 */
133
1/*
2 * Copyright (c) 1989, 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 * Steve Hayman of the Indiana University Computer Science Dept.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

126{
127 char cardline[80];
128
129 /*
130 * The original bcd prompts with a "%" when reading from stdin,
131 * but this seems kind of silly. So this one doesn't.
132 */
133
134 /* revoke privs */
135 setegid(getgid());
136 setgid(getgid());
137
134 if (argc > 1) {
135 while (--argc)
136 printcard(*++argv);
137 } else
138 while (fgets(cardline, sizeof(cardline), stdin))
139 printcard(cardline);
140 exit(0);
141}

--- 72 unchanged lines hidden ---
138 if (argc > 1) {
139 while (--argc)
140 printcard(*++argv);
141 } else
142 while (fgets(cardline, sizeof(cardline), stdin))
143 printcard(cardline);
144 exit(0);
145}

--- 72 unchanged lines hidden ---