cvs commit: ALFS/nALFS/src handlers.c

kpfleming at linuxfromscratch.org kpfleming at linuxfromscratch.org
Fri Feb 13 20:30:21 PST 2004


kpfleming    04/02/13 21:30:21

  Modified:    nALFS/src handlers.c
  Log:
  provide functions for handlers to check parameters/attributes/content for common conditions (initially just check for empty)
  
  Revision  Changes    Path
  1.19      +33 -0     ALFS/nALFS/src/handlers.c
  
  Index: handlers.c
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/src/handlers.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- handlers.c	13 Feb 2004 07:08:59 -0000	1.18
  +++ handlers.c	14 Feb 2004 04:30:21 -0000	1.19
  @@ -535,3 +535,36 @@
   
   	return *string;
   }
  +
  +char *parse_string_attribute(const char * const value,
  +			     const char * const message)
  +{
  +	if (strlen(value)) {
  +		return xstrdup(value);
  +	} else {
  +		Nprint_err(message);
  +		return NULL;
  +	}
  +}
  +
  +char *parse_string_parameter(const char * const value,
  +			     const char * const message)
  +{
  +	if (strlen(value)) {
  +		return xstrdup(value);
  +	} else {
  +		Nprint_err(message);
  +		return NULL;
  +	}
  +}
  +
  +char *parse_string_content(const char * const value,
  +			   const char * const message)
  +{
  +	if (strlen(value)) {
  +		return xstrdup(value);
  +	} else {
  +		Nprint_err(message);
  +		return NULL;
  +	}
  +}
  
  
  



More information about the alfs-log mailing list