rem: write_to_file("cpl.dat", bin);
context: int encodeCPL( str *xml, str *bin){	static unsigned char buf[ENCONDING_BUFFER_SIZE];	xmlDocPtr  doc;	xmlNodePtr cur;	doc  = 0;	list = 0;	/* parse the xml */	doc = xmlParseDoc( xml->s );	if (!doc) {		LOG(L_ERR,"ERROR:cpl:encodeCPL:CPL script not parsed successfully\n");		goto error;	}	/* check the xml against dtd */	if (xmlValidateDtd(&cvp, doc, dtd)!=1) {		LOG(L_ERR,"ERROR:cpl-c:encodeCPL: CPL script do not matche DTD\n");		goto error;	}	cur = xmlDocGetRootElement(doc);	if (!cur) {		LOG(L_ERR,"ERROR:cpl-c:encodeCPL: empty CPL script!\n");		goto error;	}	bin->len = encode_node( cur, buf, buf+ENCONDING_BUFFER_SIZE);	if (bin->len<0) {		LOG(L_ERR,"ERROR:cpl-c:encodeCPL: zero lenght return by encripting"			" function\n");		goto error;	}	xmlFreeDoc(doc);	if (list) delete_list(list);	bin->s = buf;	write_to_file("cpl.dat", bin); /* only for debugging */	return 1;error:	if (doc) xmlFreeDoc(doc);	if (list) delete_list(list);	return 0;}