2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00
Files
build/jam_src/lists.h
Dave Abrahams 2a015f5761 ----------------------------------------------------------------------
committing in tools/build

Modified Files:
	build_system.htm
		Documented:
			local rules
			the RULENAMES rule
			the EXPORT rule
			the BACKTRACE rule
			new IMPORT semantics
			-d+12 Dependency Graph Output
			Crude Argument Binding
			Variable numbers of arguments

	jam_src/compile.c
		implemented RULENAMES, EXPORT, varargs support, new IMPORT semantics
		removed unused variables

	jam_src/make1.c
	jam_src/hdrmacro.c
		removed unused variables

	jam_src/jamgram.{c,h,y,yy}
		"module local x" does not change module local value of x
		if it is already set.

	jam_src/lists.[ch]
		added list_pop_front()

	new/assert.jam new/boost-build.jam
	new/build-system.jam new/errors.jam
	new/modules.jam new/os.path.jam
		beginnings of new build system

	test/check-arguments.jam
	test/check-jam-patches.jam
	test/echo_args.jam
		Added tests for recent core modifications; comments

Added Files:
	new/feature.jam new/property.jam
	new/readme.txt new/sequence.jam
	new/test.jam
		beginnings of new build system
----------------------------------------------------------------------


[SVN r11789]
2001-11-27 16:41:59 +00:00

95 lines
2.4 KiB
C

/*
* Copyright 1993, 1995 Christopher Seiwald.
*
* This file is part of Jam - see jam.c for Copyright information.
*/
/* This file is ALSO:
* (C) Copyright David Abrahams 2001. Permission to copy, use,
* modify, sell and distribute this software is granted provided this
* copyright notice appears in all copies. This software is provided
* "as is" without express or implied warranty, and with no claim as
* to its suitability for any purpose.
*/
/*
* lists.h - the LIST structure and routines to manipulate them
*
* The whole of jam relies on lists of strings as a datatype. This
* module, in conjunction with newstr.c, handles these relatively
* efficiently.
*
* Structures defined:
*
* LIST - list of strings
* LOL - list of LISTs
*
* External routines:
*
* list_append() - append a list onto another one, returning total
* list_new() - tack a string onto the end of a list of strings
* list_copy() - copy a whole list of strings
* list_sublist() - copy a subset of a list of strings
* list_free() - free a list of strings
* list_print() - print a list of strings to stdout
* list_length() - return the number of items in the list
*
* lol_init() - initialize a LOL (list of lists)
* lol_add() - append a LIST onto an LOL
* lol_free() - free the LOL and its LISTs
* lol_get() - return one of the LISTs in the LOL
* lol_print() - debug print LISTS separated by ":"
*
* 04/13/94 (seiwald) - added shorthand L0 for null list pointer
* 08/23/94 (seiwald) - new list_append()
*/
#ifndef LISTS_DWA20011022_H
# define LISTS_DWA20011022_H
/*
* LIST - list of strings
*/
typedef struct _list LIST;
struct _list {
LIST *next;
LIST *tail; /* only valid in head node */
char *string; /* private copy */
} ;
/*
* LOL - list of LISTs
*/
typedef struct _lol LOL;
# define LOL_MAX 9
struct _lol {
int count;
LIST *list[ LOL_MAX ];
} ;
LIST * list_append( LIST *l, LIST *nl );
LIST * list_copy( LIST *l, LIST *nl );
void list_free( LIST *head );
LIST * list_new( LIST *head, char *string );
void list_print( LIST *l );
int list_length( LIST *l );
LIST * list_sublist( LIST *l, int start, int count );
LIST * list_pop_front( LIST *l );
# define list_next( l ) ((l)->next)
# define L0 ((LIST *)0)
void lol_add( LOL *lol, LIST *l );
void lol_init( LOL *lol );
void lol_free( LOL *lol );
LIST * lol_get( LOL *lol, int i );
void lol_print( LOL *lol );
#endif // LISTS_DWA20011022_H