cvs commit: ALFS/nALFS/src/handlers postbuild.c prebuild.c

kpfleming at linuxfromscratch.org kpfleming at linuxfromscratch.org
Mon Mar 1 22:21:46 PST 2004


kpfleming    04/03/01 23:21:46

  Modified:    nALFS/src/handlers postbuild.c prebuild.c
  Log:
  add child element validation
  
  Revision  Changes    Path
  1.19      +16 -1     ALFS/nALFS/src/handlers/postbuild.c
  
  Index: postbuild.c
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/src/handlers/postbuild.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- postbuild.c	29 Feb 2004 04:24:59 -0000	1.18
  +++ postbuild.c	2 Mar 2004 06:21:46 -0000	1.19
  @@ -35,11 +35,25 @@
   #include "backend.h"
   #include "logging.h"
   
  -static int postbuild_setup(const element_s * element)
  +static int postbuild_setup(element_s * const element)
   {
  +	(void) element;
  +
   	return 0;
   }
   
  +static int postbuild_valid_child(const element_s * const element,
  +				 const element_s * const child)
  +{
  +	(void) element;
  +
  +	return child->handler->type & (HTYPE_NORMAL |
  +				       HTYPE_COMMENT |
  +				       HTYPE_TEXTDUMP |
  +				       HTYPE_PACKAGE |
  +				       HTYPE_EXECUTE);
  +}
  +
   static int postbuild_main(const element_s * const el)
   {
   	int i;
  @@ -67,6 +81,7 @@
   		.type = HTYPE_NORMAL,
   		.is_action = 0,
   		.setup = postbuild_setup,
  +		.valid_child = postbuild_valid_child,
   	},
   #endif
   	{
  
  
  
  1.19      +16 -1     ALFS/nALFS/src/handlers/prebuild.c
  
  Index: prebuild.c
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/src/handlers/prebuild.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- prebuild.c	29 Feb 2004 04:24:59 -0000	1.18
  +++ prebuild.c	2 Mar 2004 06:21:46 -0000	1.19
  @@ -35,11 +35,25 @@
   #include "backend.h"
   #include "logging.h"
   
  -static int prebuild_setup(const element_s * element)
  +static int prebuild_setup(element_s * const element)
   {
  +	(void) element;
  +
   	return 0;
   }
   
  +static int prebuild_valid_child(const element_s * const element,
  +				const element_s * const child)
  +{
  +	(void) element;
  +
  +	return child->handler->type & (HTYPE_NORMAL |
  +				       HTYPE_COMMENT |
  +				       HTYPE_TEXTDUMP |
  +				       HTYPE_PACKAGE |
  +				       HTYPE_EXECUTE);
  +}
  +
   static int prebuild_main(const element_s * const el)
   {
   	int i;
  @@ -68,6 +82,7 @@
   		.type = HTYPE_NORMAL,
   		.is_action = 1,
   		.setup = prebuild_setup,
  +		.valid_child = prebuild_valid_child,
   	},
   #endif
   	{
  
  
  



More information about the alfs-log mailing list