cfg_set error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

cfg_set error

wangsong
Hi:
I have a question about the cfg_setstr() function, while I use the function, it can't work, the file dosen't change at all.
While I use cfg_parse_fp, I set fp as "a" mode, but the cfg_parse_fp sends an error to me "input in flex scanner failed ".
 

Thanks a lot.
By Jacky

_______________________________________________
Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: cfg_set error

Martin Hedenfalk-4
7 jan 2014 kl. 08:45 skrev wangsong <[hidden email]>:

> Hi:
> I have a question about the cfg_setstr() function, while I use the function, it can't work, the file dosen't change at all.

cfg_setstr does not write the changes back to the file, it only changes the in-memory representation. You can try cfg_print().

> While I use cfg_parse_fp, I set fp as "a" mode, but the cfg_parse_fp sends an error to me "input in flex scanner failed ".

"a" only opens the file for writing. Try "a+".

        .martin

> Thanks a lot.
> By Jacky
> _______________________________________________
> Confuse-devel mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/confuse-devel


_______________________________________________
Confuse-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/confuse-devel