Deleted Added
full compact
cond.c (144894) cond.c (145627)
1/*-
2 * Copyright (c) 1988, 1989, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1988, 1989 by Adam de Boor
5 * Copyright (c) 1989 by Berkeley Softworks
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

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

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 * @(#)cond.c 8.2 (Berkeley) 1/2/94
40 */
41
42#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1988, 1989, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1988, 1989 by Adam de Boor
5 * Copyright (c) 1989 by Berkeley Softworks
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

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

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 * @(#)cond.c 8.2 (Berkeley) 1/2/94
40 */
41
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/usr.bin/make/cond.c 144894 2005-04-11 07:20:10Z harti $");
43__FBSDID("$FreeBSD: head/usr.bin/make/cond.c 145627 2005-04-28 15:37:25Z harti $");
44
45/*
46 * Functions to handle conditionals in a makefile.
47 *
48 * Interface:
49 * Cond_Eval Evaluate the conditional in the passed line.
50 */
51

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

1118 */
1119void
1120Cond_Else(char *line __unused, int code __unused, int lineno __unused)
1121{
1122
1123 while (isspace((u_char)*line))
1124 line++;
1125
44
45/*
46 * Functions to handle conditionals in a makefile.
47 *
48 * Interface:
49 * Cond_Eval Evaluate the conditional in the passed line.
50 */
51

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

1118 */
1119void
1120Cond_Else(char *line __unused, int code __unused, int lineno __unused)
1121{
1122
1123 while (isspace((u_char)*line))
1124 line++;
1125
1126 if (*line != '\0') {
1127 Parse_Error(PARSE_WARNING, "junk after .else ignored '%s'", line);
1126 if (*line != '\0' && (warnflags & WARN_DIRSYNTAX)) {
1127 Parse_Error(PARSE_WARNING, "junk after .else ignored '%s'",
1128 line);
1128 }
1129
1130 if (condTop == MAXIF) {
1131 Parse_Error(PARSE_FATAL, "if-less else");
1132 return;
1133 }
1134 if (skipIfLevel != 0)
1135 return;

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

1158 */
1159void
1160Cond_Endif(char *line __unused, int code __unused, int lineno __unused)
1161{
1162
1163 while (isspace((u_char)*line))
1164 line++;
1165
1129 }
1130
1131 if (condTop == MAXIF) {
1132 Parse_Error(PARSE_FATAL, "if-less else");
1133 return;
1134 }
1135 if (skipIfLevel != 0)
1136 return;

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

1159 */
1160void
1161Cond_Endif(char *line __unused, int code __unused, int lineno __unused)
1162{
1163
1164 while (isspace((u_char)*line))
1165 line++;
1166
1166 if (*line != '\0') {
1167 Parse_Error(PARSE_WARNING, "junk after .endif ignored '%s'", line);
1167 if (*line != '\0' && (warnflags & WARN_DIRSYNTAX)) {
1168 Parse_Error(PARSE_WARNING, "junk after .endif ignored '%s'",
1169 line);
1168 }
1170 }
1171
1169 /*
1170 * End of a conditional section. If skipIfLevel is non-zero,
1171 * that conditional was skipped, so lines following it should
1172 * also be skipped. Hence, we return COND_SKIP. Otherwise,
1173 * the conditional was read so succeeding lines should be
1174 * parsed (think about it...) so we return COND_PARSE, unless
1175 * this endif isn't paired with a decent if.
1176 */

--- 44 unchanged lines hidden ---
1172 /*
1173 * End of a conditional section. If skipIfLevel is non-zero,
1174 * that conditional was skipped, so lines following it should
1175 * also be skipped. Hence, we return COND_SKIP. Otherwise,
1176 * the conditional was read so succeeding lines should be
1177 * parsed (think about it...) so we return COND_PARSE, unless
1178 * this endif isn't paired with a decent if.
1179 */

--- 44 unchanged lines hidden ---