/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* read.c
*
* This file contains the makefile reader.
*/
/*
* Included files
*/
#include <unistd.h> /* close(), unlink(), read() */
#include <libintl.h>
/*
* get_next_block_fn(source)
*
* Will get the next block of text to read either
* by popping one source bVSIZEOFlock of the stack of Sources
* or by reading some more from the makefile.
*
* Return value:
* The new source block to read from
*
* Parameters:
* source The old source block
*
* Global variables used:
* file_being_read The name of the current file, error msg
*/
{
register int length;
char ch_save;
char *ptr;
return NULL;
}
((source->bytes_left_in_file <= 0) &&
/* We can't read from the makefile, so pop the source block */
if (make_state_lockfile != NULL) {
(void) unlink(make_state_lockfile);
make_state_locked = false;
}
}
}
}
source->error_converting = false;
}
return source;
}
if (source->bytes_left_in_file > 0) {
/*
* Read the whole makefile.
* Hopefully the kernel managed to prefetch the stuff.
*/
if (length == 0) {
} else {
}
}
source->bytes_left_in_file = 0;
}
/*
* Try to convert the next piece.
*/
}
break;
}
}
source->error_converting = true;
return source;
}
source->error_converting = false;
}
}
}
return source;
}