[liblouis-liblouisxml] Re: Using user defined config file

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 5 Mar 2008 14:44:31 -0600

Jeff,

This is a quirk of strncpy. You can just replace it with strcpy, since 
the value has a null terminating character. This one is at line 776, but 
it would be a good idea to change the others in readconfig.c, as I am 
doing.

Thanks for finding that bug!

John

On Wed, Mar 05, 2008 at 02:16:14PM -0600, Jeff Dittel wrote:
> John,
>  
> It looks like when the default.cfg value for xmlheader is copied into the
> UserData a terminal null character is not being added, because I noticed
> that my new header is there immediately followed by the remainder of the
> original header.  
> 
> Remember, I am running in VC6 in Windows.
> 
> Jeff
> 
> 
> 
> -----Original Message-----
> From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx
> [mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of John J.
> Boyer
> Sent: Wednesday, March 05, 2008 1:10 PM
> To: liblouis-liblouisxml@xxxxxxxxxxxxx
> Subject: [liblouis-liblouisxml] Re: Using user defined config file
> 
> Jeff,
> 
> This should work. Please send your configuration file and the code you 
> are using to call lbx_translateString. You do not have to call 
> lbx_inisialize first unless you wish to use the data in the user-data 
> structure in your own program.
> 
> Thanks,
> John
> 
> On Wed, Mar 05, 2008 at 10:04:22AM -0600, Jeff Dittel wrote:
> > 
> > Hello,
> > 
> > I am using LibLouisXML and I am trying to change some of the settings in
> > canonical.cfg.  In the configuration file passed into lbx_initialize() and
> > lbx_translateString() I have made the changes:
> > 
> > xml
> >     xmlheader "<?xml version="1.0"?>"
> >     semanticFiles QSI.sem
> > 
> > First, the new smlheader does not seem to be in the UserData structure
> > passed back by lbx_initialize().  Isn't it supposed to be?
> > 
> > Second, I don't think my .sem file is being utilized either.  What do I
> have
> > to do to use my new QSI.sem file?
> > 
> > Thanks,
> > 
> > Jeff
> > 
> > Jeff Dittel, President
> > ~~~~~~~~~~~~~~~~~~~~~~
> > Britlan, Ltd.
> > 516 East Birch Avenue
> > Whitefish Bay, WI 53217
> > jeff@xxxxxxxxxxx
> > U.S. Office: (414)962-2281
> > Costa Rica Office: (414)290-0574
> > 
> > 
> 
> 
> 
> -- 
> John J. boyer; President, Chief Software Developer
> JJB Software, Inc.
> http://www.jjb-software.com
> Madison, WI USA
> Developing software for people with disabilities
> 
> For a description of the software and to download it go to
> http://www.jjb-software.com
> 
> For a description of the software and to download it go to
> http://www.jjb-software.com

-- 
John J. boyer; President, Chief Software Developer
JJB Software, Inc.
http://www.jjb-software.com
Madison, WI USA
Developing software for people with disabilities

For a description of the software and to download it go to
http://www.jjb-software.com

Other related posts: