Deleted Added
full compact
mk-amd-map.c (38495) mk-amd-map.c (38500)
1/*
2 * Copyright (c) 1997-1998 Erez Zadok
3 * Copyright (c) 1990 Jan-Simon Pendry
4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

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

33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * %W% (Berkeley) %G%
40 *
1/*
2 * Copyright (c) 1997-1998 Erez Zadok
3 * Copyright (c) 1990 Jan-Simon Pendry
4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

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

33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
39 * %W% (Berkeley) %G%
40 *
41 * $Id: mk-amd-map.c,v 5.2.2.1 1992/02/09 15:09:18 jsp beta $
41 * $Id: mk-amd-map.c,v 1.1.1.1 1998/08/23 22:07:21 obrien Exp $
42 */
43
44/*
45 * Convert a file map into an ndbm map
46 */
47
48#ifdef HAVE_CONFIG_H
49# include <config.h>

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

224 int len;
225 char *sl;
226 int printit = 0;
227 int usage = 0;
228 int ch;
229 extern int optind;
230
231 /* test options */
42 */
43
44/*
45 * Convert a file map into an ndbm map
46 */
47
48#ifdef HAVE_CONFIG_H
49# include <config.h>

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

224 int len;
225 char *sl;
226 int printit = 0;
227 int usage = 0;
228 int ch;
229 extern int optind;
230
231 /* test options */
232 while ((ch = getopt(argc, argv, "p")) != EOF)
232 while ((ch = getopt(argc, argv, "p")) != -1)
233 switch (ch) {
234 case 'p':
235 printit = 1;
236 break;
237 default:
238 usage++;
239 break;
240 }

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

296 /* ignore ^C if debuggung is on (but why?) */
297 signal(SIGINT, SIG_IGN);
298#endif /* not DEBUG */
299
300 if (mapd || printit) {
301 int error = read_file(mapf, map, mapd);
302 (void) close(mapfd);
303 (void) fclose(mapf);
233 switch (ch) {
234 case 'p':
235 printit = 1;
236 break;
237 default:
238 usage++;
239 break;
240 }

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

296 /* ignore ^C if debuggung is on (but why?) */
297 signal(SIGINT, SIG_IGN);
298#endif /* not DEBUG */
299
300 if (mapd || printit) {
301 int error = read_file(mapf, map, mapd);
302 (void) close(mapfd);
303 (void) fclose(mapf);
304 dbm_close(mapd);
304 if (printit) {
305 if (error) {
306 fprintf(stderr, "Error creating ndbm map for %s\n", map);
307 rc = 1;
308 }
309 } else {
310
311 if (error) {

--- 45 unchanged lines hidden ---
305 if (printit) {
306 if (error) {
307 fprintf(stderr, "Error creating ndbm map for %s\n", map);
308 rc = 1;
309 }
310 } else {
311
312 if (error) {

--- 45 unchanged lines hidden ---