SCCS-vsn: usr.bin/make/cond.c 5.5
SCCS-vsn: usr.bin/make/config.h 5.6
SCCS-vsn: usr.bin/make/parse.c 5.4
-static char sccsid[] = "@(#)cond.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)cond.c 5.5 (Berkeley) %G%";
#endif /* not lint */
/*-
#endif /* not lint */
/*-
Boolean value;
int level; /* Level at which to report errors. */
Boolean value;
int level; /* Level at which to report errors. */
- /*
- * Set the error level. When SPECIAL_CHAR is #, there is an ambiguity
- * because of the need to keep # as the comment character. In such a case
- * it is impossible to tell, for example, if the user has simply begun
- * a commented sentence with "else" or has forgotten the initial "if".
- * For this reason, we make the errors only warnings. If the lead-in
- * character is anything else, however, we can be certain the user
- * is in error.
- */
-#if SPECIAL_CHAR == '#'
- level = PARSE_WARNING;
-#else
for (line++; *line == ' ' || *line == '\t'; line++) {
continue;
for (line++; *line == ' ' || *line == '\t'; line++) {
continue;
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)config.h 5.5 (Berkeley) %G%
+ * @(#)config.h 5.6 (Berkeley) %G%
*/
#define DEFSHELL 1 /* Bourne shell */
*/
#define DEFSHELL 1 /* Bourne shell */
#define INCLUDES
#define LIBRARIES
#define INCLUDES
#define LIBRARIES
-/*
- * SPECIAL_CHAR
- * The character that leads into conditionals and include directives
- * and the like.
- */
-#define SPECIAL_CHAR '#'
-
/*
* DEF_OLD_VARS
* If defined, variable substitution follows the make style. PMake-style
/*
* DEF_OLD_VARS
* If defined, variable substitution follows the make style. PMake-style
-static char sccsid[] = "@(#)parse.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)parse.c 5.4 (Berkeley) %G%";
#endif /* not lint */
/*-
#endif /* not lint */
/*-
if (*cp != endc) {
Parse_Error (PARSE_FATAL,
if (*cp != endc) {
Parse_Error (PARSE_FATAL,
- "Unclosed %cinclude filename. '%c' expected",
- SPECIAL_CHAR, endc);
+ "Unclosed .include filename. '%c' expected", endc);
while(1) {
c = ParseReadc();
while(1) {
c = ParseReadc();
- if ((c == '\t') || (c == SPECIAL_CHAR)) {
+ if ((c == '\t') || (c == '.')) {
ignComment = ignDepOp = TRUE;
break;
} else if (c == '\n') {
ignComment = ignDepOp = TRUE;
break;
} else if (c == '\n') {
line = (char *)Buf_GetAll (buf, &lineLength);
Buf_Destroy (buf, FALSE);
line = (char *)Buf_GetAll (buf, &lineLength);
Buf_Destroy (buf, FALSE);
- if (line[0] == SPECIAL_CHAR) {
/*
* The line might be a conditional. Ask the conditional module
* about it and act accordingly
/*
* The line might be a conditional. Ask the conditional module
* about it and act accordingly
* Skip lines until get to one that begins with a
* special char.
*/
* Skip lines until get to one that begins with a
* special char.
*/
- while ((c != SPECIAL_CHAR) && (c != EOF)) {
+ while ((c != '.') && (c != EOF)) {
while (((c != '\n') || (lastc == '\\')) &&
(c != EOF))
{
while (((c != '\n') || (lastc == '\\')) &&
(c != EOF))
{
do {
while (line = ParseReadLine ()) {
do {
while (line = ParseReadLine ()) {
- if (*line == SPECIAL_CHAR) {
/*
* Lines that begin with the special character are either
* include or undef directives.
/*
* Lines that begin with the special character are either
* include or undef directives.
- /*
- * If we're this far, the line must be a comment, even if
- * SPECIAL_CHAR is '#'
- */
+ /* If we're this far, the line must be a comment. */