const int BUFLEN = 132;
const size_t BUFLEN = 132;
get_resource_meta(const char* rsc_type,  const char* provider){	char ra_pathname[RA_MAX_NAME_LENGTH];	FILE * fp;	gboolean next_continue;	GString * meta_data;	const int BUFLEN = 132;	char buffer[BUFLEN];	char * provides  = NULL,	     * req_start = NULL,	     * req_stop  = NULL,	     * shld_start = NULL,	     * shld_stop  = NULL,	     * dflt_start = NULL,	     * dflt_stop  = NULL,	     * s_dscrpt  = NULL;	 GString * l_dscrpt = NULL;		/* 	 * Use the following tags to find the LSb-compliant comment block.	 *  "### BEGIN INIT INFO" and "### END INIT INFO"	 */	get_ra_pathname(RA_PATH, rsc_type, NULL, ra_pathname);	if ( (fp = fopen(ra_pathname, "r")) == NULL ) {		cl_log(LOG_ERR, "Failed to open lsb RA %s. No meta-data gotten."			, rsc_type);		return NULL;	}	meta_data = g_string_new("");	next_continue = FALSE;	while (NULL != fgets(buffer, BUFLEN, fp)) {		/* Handle the lines over BUFLEN(80) columns, only		 * the first part is compared.		 */		if ( next_continue == TRUE ) {			continue;		}		if (strlen(buffer) == BUFLEN ) {			next_continue = TRUE;		} else {			next_continue = FALSE;		}		if ( 0 == strncmp(buffer , LSB_INITSCRIPT_BEGIN_TAG			, strlen(LSB_INITSCRIPT_BEGIN_TAG)) ) {			break;		}	}	/* Enter into the lsb-compliant comment block */	while ( NULL != fgets(buffer, BUFLEN, fp) ) {		/* Now suppose each of the following eight arguments contain		 * only one line 		 */		RALSB_GET_VALUE(provides,   PROVIDES)		RALSB_GET_VALUE(req_start,  REQ_START)		RALSB_GET_VALUE(req_stop,   REQ_STOP)		RALSB_GET_VALUE(shld_start, SHLD_START)		RALSB_GET_VALUE(shld_stop,  SHLD_STOP)		RALSB_GET_VALUE(dflt_start, DFLT_START)		RALSB_GET_VALUE(dflt_stop,  DFLT_STOP)		RALSB_GET_VALUE(s_dscrpt,  SHORT_DSCR)				/* Long description may cross multiple lines */		if ( (l_dscrpt == NULL) & (0 == strncmp(buffer, DESCRIPTION			, strlen(DESCRIPTION))) ) {			l_dscrpt = g_string_new(buffer+strlen(DESCRIPTION));			/* Between # and keyword, more than one space, or a tab			 * character, indicates the continuation line.			 * 	Extracted from LSB init script standatd			 */			while ( NULL != fgets(buffer, BUFLEN, fp) ) {				if ( (0 == strncmp(buffer, "#  ", 3))				  || (0 == strncmp(buffer, "#\t", 2)) ) {					buffer[0] = ' ';					l_dscrpt = g_string_append(l_dscrpt								   , buffer);				} else {					fputs(buffer, fp);					break; /* Long description ends */				}			}			continue;		}		if ( 0 == strncmp(buffer, LSB_INITSCRIPT_END_TAG			, strlen(LSB_INITSCRIPT_END_TAG)) ) {			/* Get to the out border of LSB comment block */			break;		}	}	fclose(fp);		g_string_sprintf( meta_data, meta_data_template, rsc_type			, (l_dscrpt==NULL)? rsc_type : l_dscrpt->str			, (s_dscrpt==NULL)? rsc_type : s_dscrpt			, (provides==NULL)? "" : provides			, (req_start==NULL)? "" : req_start			, (req_stop==NULL)? "" : req_stop			, (shld_start==NULL)? "" : shld_start			, (shld_stop==NULL)? "" : shld_stop			, (dflt_start==NULL)? "" : dflt_start			, (dflt_stop==NULL)? "" : dflt_stop );	if ( l_dscrpt != NULL) {		g_string_free(l_dscrpt, TRUE);		l_dscrpt = NULL;	}	ZAPGDOBJ(s_dscrpt);		ZAPGDOBJ(provides);		ZAPGDOBJ(req_start);		ZAPGDOBJ(req_stop);		ZAPGDOBJ(shld_start);		ZAPGDOBJ(shld_stop);		ZAPGDOBJ(dflt_start);		ZAPGDOBJ(dflt_stop);		return meta_data->str;}