Esempio n. 1
0
// There is no scenario requiring a public key, we support it for completeness.
bool create_key_pair(encrypted_private& out_private,
    encrypted_public& out_public, ec_compressed& out_point,
    const encrypted_token& token, const ek_seed& seed, uint8_t version,
    bool compressed)
{
    const parse_encrypted_token parse(token);
    if (!parse.valid())
        return false;

    const auto point = splice(parse.sign(), parse.data());
    auto point_copy = point;
    const auto factor = bitcoin_hash(seed);
    if (!ec_multiply(point_copy, factor))
        return false;

    ek_salt salt;
    if (!address_salt(salt, point_copy, version, compressed))
        return false;

    const auto salt_entropy = splice(salt, parse.entropy());
    const auto derived = split(scrypt_pair(point, salt_entropy));
    const auto flags = set_flags(compressed, parse.lot_sequence(), true);

    if (!create_public_key(out_public, flags, salt, parse.entropy(),
        derived.left, derived.right, factor, version))
        return false;

    create_private_key(out_private, flags, salt, parse.entropy(), derived.left,
        derived.right, seed, version);

    out_point = point_copy;
    return true;
}
Esempio n. 2
0
void ppp_recv_config (int unit,int mru,u_int32_t asyncmap,int pcomp,int accomp)
  {
    u_int x;

    MAINDEBUG ((LOG_DEBUG, "recv_config: mru = %d\n", mru));
/*
 * If we were called because the link has gone down then there is nothing
 * which may be done. Just return without incident.
 */
    if (!still_ppp())
      {
	return;
      }
/*
 * Set the receiver parameters
 */
    if (ioctl(fd, PPPIOCSMRU, (caddr_t) &mru) < 0)
      {
	syslog(LOG_ERR, "ioctl(PPPIOCSMRU): %m");
      }

    MAINDEBUG ((LOG_DEBUG, "recv_config: asyncmap = %lx\n", asyncmap));
    if (ioctl(fd, PPPIOCSRASYNCMAP, (caddr_t) &asyncmap) < 0)
      {
        syslog(LOG_ERR, "ioctl(PPPIOCSRASYNCMAP): %m");
	quit();
      }

    x = get_flags();
    x = accomp ? x & ~SC_REJ_COMP_AC : x | SC_REJ_COMP_AC;
    set_flags (x);
  }
Esempio n. 3
0
bool CubeMap::_set(const StringName& p_name, const Variant& p_value) {

	if (p_name=="side/left") {
		set_side(SIDE_LEFT,p_value);
	} else if (p_name=="side/right") {
		set_side(SIDE_RIGHT,p_value);
	} else if (p_name=="side/bottom") {
		set_side(SIDE_BOTTOM,p_value);
	} else if (p_name=="side/top") {
		set_side(SIDE_TOP,p_value);
	} else if (p_name=="side/front") {
		set_side(SIDE_FRONT,p_value);
	} else if (p_name=="side/back") {
		set_side(SIDE_BACK,p_value);
	} else if (p_name=="flags") {
		set_flags(p_value);
	} else if (p_name=="storage") {
		storage=Storage(p_value.operator int());
	} else if (p_name=="lossy_quality") {
		lossy_storage_quality=p_value;
	} else
		return false;

	return true;

}
Esempio n. 4
0
void
perfroll::on_realize()
{
    // we need to do the default realize
    Gtk::DrawingArea::on_realize();

    set_flags( Gtk::CAN_FOCUS );

    // Now we can allocate any additional resources we need
    m_window = get_window();
    m_gc = Gdk::GC::create( m_window );
    m_window->clear();

    update_sizes();

    m_hadjust->signal_value_changed().connect( mem_fun( *this, &perfroll::change_horz ));
    m_vadjust->signal_value_changed().connect( mem_fun( *this, &perfroll::change_vert ));

    /*
        This creation of m_background needs to be set to the max width for proper drawing of zoomed
        measures or they will get truncated with high beats per measure and low beat width. Since this
        is a constant size, it cannot be adjusted later for zoom. The constant c_perfroll_background_x
        is set to the max amount by default for use here. The drawing functions fill_background_pixmap()
        and draw_background_on() which use c_perfroll_background_x also, could be adjusted by zoom with
        a substituted variable. Not sure if there is any benefit to doing the adjustment...
        Perhaps a small benefit in speed? Maybe FIXME if really, really bored...
    */

    m_background = Gdk::Pixmap::create( m_window,
                                        c_perfroll_background_x,
                                        c_names_y, -1 );

    /* and fill the background ( dotted lines n' such ) */
    fill_background_pixmap();
}
Esempio n. 5
0
void 
gen_faq_doc( const char *source_dir, const char *dest_dir, ASDocType doc_type )
{
	ASXMLInterpreterState state;
	char *faq_dir = NULL ;
	ASFlagType doc_class_mask = DOC_CLASS_None	;
	struct direntry  **list = NULL;
	int list_len, i ;

	faq_dir = make_file_name( source_dir, "FAQ" );

	if( !start_doc_file( dest_dir, "afterstep_faq", NULL, doc_type, 
						 "afterstep_faq", 
						 "AfterStep FAQ",
						 "This document is an ever growing set of questions, statements, ideas and complaints about AfterStep version 2.0", 
						 &state, doc_class_mask, DocClass_FAQ ) )	 
		return ;
	
	/* BODY *************************************************************************/
	set_flags( state.flags, ASXMLI_OrderSections );
	list_len = my_scandir ((char*)faq_dir, &list, ignore_dots, NULL);
	for (i = 0; i < list_len; i++)
	{	
		if ( !S_ISDIR (list[i]->d_mode) )
			convert_xml_file( faq_dir, list[i]->d_name, &state );
		free(list[i]);
	}
	if( list ) 
		free( list );   
	
	/* FOOTER ***********************************************************************/
	end_doc_file( &state );	 	
	
	free( faq_dir );
}
Esempio n. 6
0
bool encrypt(encrypted_private& out_private, const ec_secret& secret,
    const std::string& passphrase, uint8_t version, bool compressed)
{
    ek_salt salt;
    if (!address_salt(salt, secret, version, compressed))
        return false;

    const auto derived = split(scrypt_private(normal(passphrase), salt));
    const auto prefix = parse_encrypted_private::prefix_factory(version,
        false);

    auto encrypted1 = xor_data<half>(secret, derived.left);
    aes256_encrypt(derived.right, encrypted1);

    auto encrypted2 = xor_data<half>(secret, derived.left, half);
    aes256_encrypt(derived.right, encrypted2);

    return build_checked_array(out_private,
    {
        prefix,
        set_flags(compressed),
        salt,
        encrypted1,
        encrypted2
    });
}
// ---------------------------------------------------------------------------
// Constructeur
// ------------
bXMapTopoCheck	::bXMapTopoCheck(bGenericXMLBaseElement* elt, bGenericMacMapApp* gapp, CFBundleRef bndl)
                :bStdXMap(elt,gapp,bndl)
                ,_types(sizeof(bGenericType*)){
    setclassname("topocheck");
    set_flags(kXMapNeedEvents);
    _prm.types=&_types;
}
Esempio n. 8
0
static void
setttymode(int raw)
{
	int off = 0;

	(void)tcflush(STDIN_FILENO, TCIOFLUSH);	/* clear out the crap */
	ioctl(STDIN_FILENO, FIONBIO, &off);	/* turn off non-blocking mode */
	ioctl(STDIN_FILENO, FIOASYNC, &off);	/* ditto for async mode */

	if (IS)
		cfsetispeed(&tmode, speed(IS));
	else if (SP)
		cfsetispeed(&tmode, speed(SP));
	if (OS)
		cfsetospeed(&tmode, speed(OS));
	else if (SP)
		cfsetospeed(&tmode, speed(SP));
	set_flags(0);
	setchars();
	if (raw)
		cfmakeraw(&tmode);
	if (tcsetattr(STDIN_FILENO, TCSANOW, &tmode) < 0) {
		syslog(LOG_ERR, "tcsetattr %s: %m", ttyn);
		exit(1);
	}
}
Esempio n. 9
0
/**Looks at the different args passed into the program
 *
 *This method looks at all other arguments passed into the program
 *besides the first one (program name) to ascertain
 *which flags are present. It checks for the '-' char to indicate
 *a flag, as well as for a directory name. 
 *@param[in] argc the total number of args
 *@param[in] argv the list of command line args passed to main
 */
int check_args(int argc, char** argv)
{
        paths = malloc(2);
        paths[0] = ".";
        int num_paths = 0;
        int size = 0;
        //for each command line arg
        for(int i = 1; i < argc; i++)
        {
                char* arg = argv[i];
               
                //if flag
                if(arg[0] == '-')
                {
                       set_flags(arg);
                }
                else
                {
                        size += strlen(arg) +1;
                        paths = realloc(paths, size); 
                        if(path != NULL) paths[num_paths++] = arg;
                }
        }
        return num_paths == 0 ? 1 : num_paths;        
}
Esempio n. 10
0
extern void twistbc(double *theta,double sign)
{
   int ibc,i,mu;
   su3_dble *u;
   int Lmu[4];

   if( (fabs(*(theta+0))<1e-10) && (fabs(*(theta+1))<1e-10) && 
       (fabs(*(theta+2))<1e-10) && (fabs(*(theta+3))<1e-10) )
     return ;

   message("Twisting the boundaries\n");

   ibc=query_flags(BCD_FLIPPED);
   if (ibc==1)
     flipbcd();

   Lmu[0]=NPROC0*L0;
   Lmu[1]=NPROC1*L1;
   Lmu[2]=NPROC2*L2;
   Lmu[3]=NPROC3*L3;
   u=pud[VOLUME/2][0];
   for (i=0;i<VOLUME/2;i++)
   {
      for(mu=0;mu<4;mu++){
      su3_appl_twist(u+8*i+2*mu  ,(double)(sign*(*(theta+mu))/Lmu[mu]));
      su3_appl_twist(u+8*i+2*mu+1,(double)(sign*(*(theta+mu))/Lmu[mu]));
      }
   }
   assign_ud2u();
   set_flags(NEW_UD);

   if (ibc==1)
     flipbcd();
}
Esempio n. 11
0
DimRegionChooser::DimRegionChooser()
{
    // get_window() would return 0 because the Gdk::Window has not yet been realized
    // So we can only allocate the colors here - the rest will happen in on_realize().
    Glib::RefPtr<Gdk::Colormap> colormap = get_default_colormap();

    black = Gdk::Color("black");
    white = Gdk::Color("white");
    red = Gdk::Color("#8070ff");
    blue = Gdk::Color("blue");
    green = Gdk::Color("green");

    colormap->alloc_color(black);
    colormap->alloc_color(white);
    colormap->alloc_color(red);
    colormap->alloc_color(blue);
    colormap->alloc_color(green);
    instrument = 0;
    region = 0;
    dimregno = -1;
    focus_line = 0;
    resize.active = false;
    cursor_is_resize = false;
    h = 20;
    w = 800;
    set_flags(Gtk::CAN_FOCUS);
    add_events(Gdk::BUTTON_PRESS_MASK | Gdk::POINTER_MOTION_MASK |
               Gdk::POINTER_MOTION_HINT_MASK);

    for (int i = 0 ; i < 256 ; i++) dimvalue[i] = 0;
}
Esempio n. 12
0
static void
restore_internal_state (struct terminal_state_recording * s,
       struct terminal_state_recording * es)
{
  /* When we recorded the internal state, we had a recording of the
     external state.  But since we've stopped Scheme and restarted it,
     we may no longer have a current recording of the external state.
     If we don't, then we can't restore the internal state.

     The usual reason that we don't have a recording is that Scheme is
     in the background.  In that case it would be nice to preserve the
     previous internal state until we go back to the foreground.  But
     doing that transparently would also require tracking all
     attempted state changes in the recording, which is a pain.  So if
     we can't restore the internal state, we just thrown it away. */
  if (s -> recorded_p)
    {
      if (es -> recorded_p)
	{
	  set_terminal_state ((s -> fd), (& (s -> state)));
	  set_flags ((s -> fd), (& (s -> flags)));
	}
      (s -> recorded_p) = 0;
    }
}
Esempio n. 13
0
int main( int argc, char** argv )
{
  struct cell *cells_local[N];
  int arg;
  size_t i;
  struct pool *p      = allocate_pool();
  struct cell **cells = static_roots ? cells_static : cells_local;

  assert(argc == 2);
  assert(argv[1]);
  assert(strlen(argv[1]) == 1);
  assert(argv[1][0] >= '0' && argv[1][0] <= '5');
  arg = atoi( argv[1] );
  set_flags( arg );

  memset(cells_static, 0, sizeof(cells_static));
  memset(cells_local,  0, sizeof(cells_local));

  for (i = 0; i < N; ++i) {
    cells[i] = allocate_from_pool(p, sizeof(struct cell));  
  }

  if (trim_pool)
  VALGRIND_MEMPOOL_TRIM(p, 
			p->buf+(10 * sizeof(struct cell)), 
			20 * sizeof(struct cell) + 2);

  if (destroy_pool)
  VALGRIND_DESTROY_MEMPOOL(p);

  return 0;
}
Esempio n. 14
0
/**
 *
 Creates a hashtable, and inserts words into it.
 The table is then printed before we free the memory allocated to it.

 Note: The tablesize of the hashtable is determined by the first command line
 argument if there is one, with a default table tablesize of 113.
 The number of statistical snapshots to print is determined by the second
 command line argument if there is one, with a default number of 10.

 tablesize = the maximum number of positions in the hash table.
 word      = the string to be inserted into the hash table.
 ht        = the hash table using eith double hashing or linear probing.
 snapshots = the number of statistical snapshots to be used.

 @param argc the number of command-line arguments.
 @param argv an array of strings containing the command-line arguments.

 @return EXIT_SUCCESS if the program is successful.

*/
int main(int argc, char **argv) {
  time_t start,end;
  bool_t entire_table = FALSE, double_hashing = FALSE, print_stats = FALSE,
    do_spell_check = FALSE;
  int tablesize = 113, snapshots = 10;
  char word[256];
  char *filename;
  htable ht;

  set_flags(argc, argv, &do_spell_check, &filename, &double_hashing, &entire_table,
	    &print_stats, &snapshots, &tablesize);

  ht = htable_new(tablesize, (double_hashing) ? DOUBLE_H : LINEAR_P);
  start = clock();
  while (getword(word, sizeof word, stdin) != EOF) {
    htable_insert(ht, word);
  }
  end = clock();
  if(do_spell_check) {
    spell_check(ht,filename,(end-start)/(double)CLOCKS_PER_SEC);
  }
  if (entire_table) {
    htable_print_entire_table(ht, stderr);
  }
  if (print_stats) {
    htable_print_stats(ht, stdout, snapshots);
  } else if (!do_spell_check){ /* print words and frequencies */
    htable_print(ht, stdout);
  }
  htable_delete(ht);

  return EXIT_SUCCESS;
}
Esempio n. 15
0
bool ImageTexture::_set(const StringName& p_name, const Variant& p_value) {

	if (p_name=="image" && p_value.get_type()==Variant::IMAGE)
		create_from_image( p_value,flags );
	else if (p_name=="flags")
		if (w*h==0)
			flags=p_value;
		else
			set_flags(p_value);
	else if (p_name=="size") {
		Size2 s = p_value;
		w=s.width;
		h=s.height;
		VisualServer::get_singleton()->texture_set_size_override(texture,w,h);
	} else if (p_name=="storage") {
		storage=Storage(p_value.operator int());
	} else if (p_name=="lossy_quality") {
		lossy_storage_quality=p_value;
	} else if (p_name=="_data") {
		_set_data(p_value);
	} else
		return false;

	return true;

}
Esempio n. 16
0
File: ximage.c Progetto: 0x0all/ROOT
ASImage      *
picture2asimage(ASVisual *asv, Pixmap rgb, Pixmap a , int x, int y, unsigned int width, unsigned int height, unsigned long plane_mask, Bool keep_cache, unsigned int compression)
{
#ifndef X_DISPLAY_MISSING
	XImage       *xim = ASGetXImage (asv, rgb, x, y, width, height, plane_mask);
	XImage       *alpha_xim = (a==None)?NULL:ASGetXImage (asv, a, x, y, width, height, 0xFFFFFFFF);
	ASImage      *im = NULL;

	if (xim)
	{
		im = picture_ximage2asimage (asv, xim, alpha_xim, compression);
		if( keep_cache )
		{
			im->alt.ximage = xim ;
			if( alpha_xim )
			{
				im->alt.mask_ximage = alpha_xim ;
				if( alpha_xim->depth == 8 )
					set_flags( im->flags, ASIM_XIMAGE_8BIT_MASK );
			}
		}else
		{
			XDestroyImage (xim);
			if( alpha_xim )
				XDestroyImage (alpha_xim);
		}
	}
	return im;
#else
    return NULL ;
#endif
}
Esempio n. 17
0
 rpc_channel_c::rpc_channel_c( common::connection_iface_sptr c )
     :common::rpc_channel(direct_call_type, callback_type)
     ,impl_(new impl(c))
 {
     impl_->parent_ = this;
     set_flags( common::rpc_channel::DEFAULT );
 }
Esempio n. 18
0
int set_dev_down(char *dev)
{
	u_int mask=0, flags=0;
	
	mask |= IFF_UP;
	flags &= ~IFF_UP;
	return set_flags(dev, flags, mask);
}
Esempio n. 19
0
void		active_flags(char *s, t_env *e)
{
	(void)e;
	if (check_invalid_options(s))
		exit(0);
	while (*(++s))
		set_flags(*s, e);
}
Esempio n. 20
0
 rpc_channel_c::rpc_channel_c( common::connection_iface_sptr c,
                               unsigned opts )
     :common::rpc_channel(direct_call_type, callback_type)
     ,impl_(new impl(c))
 {
     impl_->parent_ = this;
     set_flags( opts );
 }
Esempio n. 21
0
static void	flags(char *format, int *i, t_env *e)
{
	while (format[*i] != '\0' && is_flag(format[*i]))
	{
		set_flags(format[*i], e);
		*i = *i + 1;
	}
}
Esempio n. 22
0
void ConstantPoolCacheEntry::set_interface_call(methodHandle method, int index) {
  klassOop interf = method->method_holder();
  assert(instanceKlass::cast(interf)->is_interface(), "must be an interface");
  set_f1(interf);
  set_f2(index);
  set_flags(as_flags(as_TosState(method->result_type()), method->is_final_method(), false, false, false, true) | method()->size_of_parameters());
  set_bytecode_1(Bytecodes::_invokeinterface);  
}
// ---------------------------------------------------------------------------
// Constructeur
// ------------
bXMapNetClean	::bXMapNetClean(bGenericXMLBaseElement* elt, bGenericMacMapApp* gapp, CFBundleRef bndl)
                :bStdXMap(elt,gapp,bndl)
                ,_nodes(sizeof(bGenericType*))
                ,_edges(sizeof(bGenericType*))
                ,_nitr(sizeof(it_prm))
                ,_eitr(sizeof(it_prm)){
    setclassname("netclean");
    set_flags(kXMapNeedEvents);
}
Esempio n. 24
0
void ccp_flags_set (int unit, int isopen, int isup)
{
    if (still_ppp()) {
	int x = get_flags(ppp_dev_fd);
	x = isopen? x | SC_CCP_OPEN : x &~ SC_CCP_OPEN;
	x = isup?   x | SC_CCP_UP   : x &~ SC_CCP_UP;
	set_flags (ppp_dev_fd, x);
    }
}
Esempio n. 25
0
	void set_flags(T val, Args... args) {
		switch(val) {
		case borders::top:    top   =true; break;
		case borders::bottom: bottom=true; break;
		case borders::left:   left  =true; break;
		case borders::right:  right =true; break;
		}
		set_flags(args...);
	}
CPrintPreviewWidget::CPrintPreviewWidget( Glib::ustring &filename,
		std::list<Glib::ustring> &filelist,
		CPrintPreviewWidget **t_ptrPrintPreviewWidget) :
	Page()
	{
	set_flags(Gtk::NO_WINDOW);
	
	// tell our parent print operation who we are
	*t_ptrPrintPreviewWidget = this;

#ifdef DEBUG
	std::cout << "CPRINTPREVIEWWIDGET: constructor\n";	
	std::cout << "CPRINTPREVIEWWIDGET: pointer address: " << t_ptrPrintPreviewWidget << std::endl;
	std::cout << "CPRINTPREVIEWWIDGET: address pointed to by pointer: " << *t_ptrPrintPreviewWidget << std::endl;
#endif // DEBUG

	/* image_filelist = filelist;
	image_filename = filename;
	
	
	
	/*refPageSetup = _refPageSetup;
	refPrintSettings = _refPrintSettings;
	
	PagePreviewFrame.add(Page);
	TopHBox.pack_start(PagePreviewFrame,Gtk::PACK_SHRINK);
	

	
	/* Glib::Thread* const thread = Glib::Thread::create( 
		sigc::mem_fun(get_parent(),&CPrintPreviewWidget::populate_iconview),
		true);
		
	populate_iconview();
		
	//thread->join();

	ImageListScroller.add(ImageIconView);
	ImageListScroller.set_size_request(350,0);
	ImageListScroller.set_policy(Gtk::POLICY_AUTOMATIC,Gtk::POLICY_AUTOMATIC); */
	TopHBox.pack_start(ImageListFrame,Gtk::PACK_EXPAND_WIDGET);
	
	pack_start(TopHBox,Gtk::PACK_SHRINK);
	pack_start(PageSettingsFrame,Gtk::PACK_SHRINK);
	
	PageSetupButton.set_label( "Page Size and Orientation" );
	HButtonBox.pack_start( PageSetupButton, Gtk::PACK_SHRINK );
	pack_start(HButtonBox,Gtk::PACK_SHRINK);
	
	Page.load( filename, true );
	
	show_all_children();
	
	PageSetupButton.signal_clicked().connect(
		sigc::mem_fun(*this,&CPrintPreviewWidget::on_button_page_setup));
	}
Esempio n. 27
0
bool MDTRA_Compact_PDB_File :: load( int threadnum, unsigned int format, const char *filename, int streamFlags )
{
	FILE *fp = NULL;
	char linebuf[82];
	int line_c = 0;
	int residue_c = 0;

	if (fopen_s( &fp, filename, "r" )) {
		return false;
	}

	reset();

	int fIgnoreHetatm = streamFlags & STREAM_FLAG_IGNORE_HETATM;
	int fIgnoreSolvent = streamFlags & STREAM_FLAG_IGNORE_SOLVENT;

	//count ATOM lines
	while ( !feof(fp) ) {
		linebuf[0] = 0;
		if (!fgets( linebuf, 82, fp )) break;
		if (!_strnicmp( linebuf, "ATOM  ", 6 ) || ( !fIgnoreHetatm && !_strnicmp( linebuf, "HETATM", 6 ) )) line_c++;
	}

	//allocate atoms
	m_pAtoms = (MDTRA_Compact_PDB_Atom*)UTIL_AlignedMalloc(line_c * sizeof(MDTRA_Compact_PDB_Atom));
	if (!m_pAtoms) {
		fclose( fp );
		reset();
		return false;
	}
	memset( m_pAtoms, 0, line_c * sizeof(MDTRA_Compact_PDB_Atom) );

	//load ATOM lines
	rewind(fp);
	while ( !feof(fp) ) {
		linebuf[0] = 0;
		if (!fgets( linebuf, 82, fp )) break;
		if (!_strnicmp( linebuf, "ATOM  ", 6 ) || 
			( !fIgnoreHetatm && !_strnicmp( linebuf, "HETATM", 6 ) )) {
			//parse atom
			if (!read_atom( threadnum, format, linebuf, m_pAtoms + m_iNumAtoms, residue_c )) {
				fclose( fp );
				reset();
				return false;
			}
			if ( fIgnoreSolvent && (m_pAtoms[m_iNumAtoms].atomFlags & (PDB_FLAG_WATER|PDB_FLAG_ION) ))
				continue;
			m_iNumAtoms++;
		}
	}
	fclose( fp );

	set_flags();

	return true;
}
Esempio n. 28
0
void 
start_group_tag( xml_elem_t *doc, xml_elem_t *parm, ASXMLInterpreterState *state )
{
	++(state->group_depth);	
	set_flags(state->flags, ASXMLI_FirstArg );
	if( state->doc_type == DocType_NROFF )
		fputc( ' ', state->dest_fp );
	if( check_choice( parm ) ) 
		fputc( '[', state->dest_fp );
}
Esempio n. 29
0
static void
restore_external_state (struct terminal_state_recording * s)
{
  if (s -> recorded_p)
    {
      set_terminal_state ((s -> fd), (& (s -> state)));
      set_flags ((s -> fd), (& (s -> flags)));
      (s -> recorded_p) = 0;
    }
}
Esempio n. 30
0
Bool 
convert_xml_file( const char *syntax_dir, const char *file, ASXMLInterpreterState *state )
{
	char *source_file ;
	char *doc_str ; 
	Bool empty_file = False ;
	
	source_file = make_file_name( syntax_dir, file );
	doc_str = load_file(source_file);
	LOCAL_DEBUG_OUT( "file %s loaded", source_file );
	/*LOCAL_DEBUG_OUT( "file %s loaded into {%s}", source_file, doc_str ); */
	if( doc_str != NULL )
	{
		xml_elem_t* doc;
		xml_elem_t* ptr;
		
		if( file[0] == '_' && !get_flags( state->flags, ASXMLI_ProcessingOptions )) 
			state->pre_options_size += strlen(doc_str) ;
		else
			set_flags( state->flags, ASXMLI_ProcessingOptions );

		doc = xml_parse_doc(doc_str, DocBookVocabulary);
		LOCAL_DEBUG_OUT( "file %s parsed, child is %p", source_file, doc->child );
		if( doc->child ) 
		{
			LOCAL_DEBUG_OUT( "child tag = \"%s\", childs child = %p", doc->child->tag, doc->child->child);
			empty_file  = ( doc->child->tag_id == DOCBOOK_section_ID && 
							doc->child->child == NULL );
			if( doc->child->child ) 
			{
				empty_file  = ( doc->child->child->tag_id == XML_CDATA_ID && doc->child->child->next == NULL ); 
				LOCAL_DEBUG_OUT( "childs child tag = \"%s\", parm = \"%s\"", doc->child->child->tag, doc->child->child->parm);
			}	 
	   	}	 
		LOCAL_DEBUG_OUT( "file %s %s", source_file, empty_file?"empty":"not empty" );
		if( !empty_file )
		{	
			for (ptr = doc->child ; ptr ; ptr = ptr->next) 
			{
				LOCAL_DEBUG_OUT( "converting child <%s>", ptr->tag );
	  			convert_xml_tag( ptr, NULL, state );
				LOCAL_DEBUG_OUT( "done converting child <%s>", ptr->tag );
			}
		}
		/* Delete the xml. */
		LOCAL_DEBUG_OUT( "deleting xml %p", doc );
		xml_elem_delete(NULL, doc);
		LOCAL_DEBUG_OUT( "freeing doc_str %p", doc_str );
		free( doc_str );		
	}	 	   
	LOCAL_DEBUG_OUT( "done with %s", source_file );
	free( source_file );
	fprintf( state->dest_fp, "\n" );
	return !empty_file;
}