=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/main.c,v retrieving revision 1.14 retrieving revision 1.15 diff -c -r1.14 -r1.15 *** src/usr.bin/make/main.c 1998/12/05 00:06:28 1.14 --- src/usr.bin/make/main.c 1999/01/09 16:45:02 1.15 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.14 1998/12/05 00:06:28 espie Exp $ */ /* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.15 1999/01/09 16:45:02 espie Exp $ */ /* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */ /* *************** *** 49,55 **** #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else ! static char rcsid[] = "$OpenBSD: main.c,v 1.14 1998/12/05 00:06:28 espie Exp $"; #endif #endif /* not lint */ --- 49,55 ---- #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else ! static char rcsid[] = "$OpenBSD: main.c,v 1.15 1999/01/09 16:45:02 espie Exp $"; #endif #endif /* not lint */ *************** *** 196,206 **** compatMake = TRUE; break; #ifdef REMOTE ! case 'L': ! maxLocal = atoi(optarg); Var_Append(MAKEFLAGS, "-L", VAR_GLOBAL); Var_Append(MAKEFLAGS, optarg, VAR_GLOBAL); break; #endif case 'P': usePipes = FALSE; --- 196,215 ---- compatMake = TRUE; break; #ifdef REMOTE ! case 'L': { ! char *endptr; ! ! maxLocal = strtol(optarg, &endptr, 0); ! if (endptr == optarg) { ! fprintf(stderr, ! "make: illegal argument to -L option -- %s -- not a number\n", ! optarg); ! usage(); ! } Var_Append(MAKEFLAGS, "-L", VAR_GLOBAL); Var_Append(MAKEFLAGS, optarg, VAR_GLOBAL); break; + } #endif case 'P': usePipes = FALSE; *************** *** 276,283 **** ignoreErrors = TRUE; Var_Append(MAKEFLAGS, "-i", VAR_GLOBAL); break; ! case 'j': forceJobs = TRUE; maxJobs = atoi(optarg); #ifndef REMOTE maxLocal = maxJobs; --- 285,301 ---- ignoreErrors = TRUE; Var_Append(MAKEFLAGS, "-i", VAR_GLOBAL); break; ! case 'j': { ! char *endptr; ! forceJobs = TRUE; + maxJobs = strtol(optarg, &endptr, 0); + if (endptr == optarg) { + fprintf(stderr, + "make: illegal argument to -j option -- %s -- not a number\n", + optarg); + usage(); + } maxJobs = atoi(optarg); #ifndef REMOTE maxLocal = maxJobs; *************** *** 285,290 **** --- 303,309 ---- Var_Append(MAKEFLAGS, "-j", VAR_GLOBAL); Var_Append(MAKEFLAGS, optarg, VAR_GLOBAL); break; + } case 'k': keepgoing = TRUE; Var_Append(MAKEFLAGS, "-k", VAR_GLOBAL);