Commit Graph

17 Commits

Author SHA1 Message Date
Enrico Forestieri
04f2c93ca5 Was forgetting this
* src/support/docstring.C
	(do_get): terminate the string before using it.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16086 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-28 00:24:18 +00:00
Enrico Forestieri
1a7aec0731 Improve the num_get locale facet
* src/support/docstring.C
	(do_get): use reserve() and the += operator in order to
	avoid a possible buffer overrun.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16070 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-27 01:52:26 +00:00
Abdelrazak Younes
7aa50e8f2b * lyx_main.[Ch]
- merge exec() and priv_exec()
  - LyX constructor is now public.
  - there is no global singleton_ object anymore, only a pointer.
  - IconvProcessor(): new utf8 to ucs4 convertor.

* main.C: instantiate a LyX object and exec() it. No more use of static methods.

* docstring.C: use utf8ToUcs4() instead of a static variable.

* unicode.h: declare extern utf8ToUcs4().



  

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15967 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-18 17:47:12 +00:00
Enrico Forestieri
fa2840e72b Add locale facet in order to input numbers from wide streams on systems
where sizeof(wchar_t) == 2

	* src/support/docstring.C:
	- New class ascii_num_get_facet for inputting numbers from idocstreams.
	- Add the ascii_num_get_facet facet to the locale initializer.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15959 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-17 19:27:42 +00:00
Abdelrazak Younes
4f5432f427 * docstring.C: add a FIXME in utf8_to_ucs4() WRT static IconvProcessor and Mac
* lyx_main.C:
  - LyX::prepareExit(): avoid utf8_to_ucs4() conversion at this late stage because this can cause problem on Mac.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15955 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-17 16:58:32 +00:00
Enrico Forestieri
1c5ef229e2 Add locale facet in order to output numbers to wide streams on systems
where sizeof(wchar_t) == 2

	* src/support/docstring.C:
	- New class num_put_failure for warning about non-ascii characters.
	- New class ascii_num_put_facet for outputting numbers to odocstreams.
	- Add the ascii_num_put_facet facet to the locale initializer.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15849 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-11 00:04:28 +00:00
Georg Baum
4d814f3e73 Remove unused variable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15624 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 18:32:55 +00:00
Abdelrazak Younes
826c31a80d * unicode.[Ch]: new IconvProcessor class that enable to split iconv_convert() initialization and conversion parts.
* docstring.C: utf8_to_ucs4() makes use of IconvProcessor instead of iconv_convert.

The IconvProcessor interface will permit to switch to another processor than iconv.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15609 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-29 21:59:59 +00:00
Abdelrazak Younes
451b12d00d * LyXLex::Pimpl::buff is now a string.
* unicode.[Ch]:
 - new non template iconv_convert()
 - iconv_convert() template use above function.

* docstring.C:
 - utf8_to_ucs4(): new function, use the new iconv_convert() function above.
 - from_utf8(): use utf8_to_ucs4() function above.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15592 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-28 15:16:30 +00:00
André Pönitz
6c300f72a2 move everything into namespace lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15422 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 00:16:43 +00:00
Georg Baum
3836ff77f0 Oops, I forgot to return a reference in operator+=. This patch fixes that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15276 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-08 09:59:17 +00:00
Georg Baum
ead66c0679 Add operator += for ASCII C strings and single ASCII chars
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15274 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-08 09:44:26 +00:00
Georg Baum
fd6fa1e2af Fix crash on systems where sizeof(wchar_t) == 2 and gcc is used by adding
a working ctype<lyx::char_type> locale facet.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15223 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-03 19:27:17 +00:00
Georg Baum
59fdb31af3 s/boost::uint32_t/lyx::char_type/g except in the definition of lyx::docstring
and lyx::char_type


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14990 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-13 17:11:39 +00:00
Georg Baum
189d298d96 Add operator+ for ASCII characters and ASCII C strings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14969 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-11 07:13:56 +00:00
Lars Gullik Bjønnes
bb61b2655f More unicode work. Fixup some usages.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14968 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-10 18:34:24 +00:00
Georg Baum
1fc0c01877 convert lfun arguments to docstring
* src/support/docstring.[Ch]
	(from_ascii): new conversion function
	(from_utf8): new conversion function
	(to_utf8): new conversion function
	(operator==) new, compare docstring and ASCII C string
	(operator!=) new, compare docstring and ASCII C string

	* src/support/Makefile.am: add new file docstring.C

	* development/scons/scons_manifest.py: ditto

	* src/funcrequest.[Ch]
	(argument): change name to argument_ and type to docstring,
	add an accessor
	(FuncRequest): Add two new constructors taking a docstring argument

	* all other files: adjust to the FuncRequest changes above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14861 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-01 15:41:38 +00:00