Commit Graph

19 Commits

Author SHA1 Message Date
Roland Illig
5c4add0e6e * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 22:38:06 +00:00
Pavel Roskin
5c0691349c * charsets.c (convert_to_display): Don't crash on empty read
only strings.
(convert_from_input): Likewise.
Reported by David Martin <dmartina@excite.com>
2002-11-11 14:48:37 +00:00
Pavel Roskin
517243efa0 * charset.h [!HAVE_CHARSET]: Provide dummy macros for
convert_to_display and convert_from_input.  Eliminate uchar
definition, use unsigned char, adjust dependencies.
* charsets.c (convert_to_display): Tolerate NULL argument.
(convert_from_input): Likewise.
2002-10-30 23:14:26 +00:00
Andrew V. Samoilov
001f9ec607 * charsets.c (init_translation_table): Use g_snprintf() instead of sprintf(). 2002-10-07 07:14:09 +00:00
Pavel Roskin
9514de4ed7 * charsets.c: Add disclaimer of warranty.
* filenot.c: Likewise.
* fileopctx.c: Likewise.
* mfmt.c: Likewise.
* selcodepage.c: Likewise.
* text.c: Likewise.
* textconf.c: Likewise.
2002-08-27 05:27:11 +00:00
Pavel Roskin
e2a37d3809 * charsets.c: Unconditionally enable finalization code that was
only used with HAVE_MAD.
* color.c: Likewise.
* color.h: Likewise.
* key.c: Likewise.
* main.c: Likewise.
* slint.c: Likewise.
* subshell.c (exit_subshell): Free subshell_prompt.
2002-08-01 20:31:52 +00:00
Andrew V. Samoilov
aa2832dff9 * util.c [!HAVE_TRUNCATE] (truncate): Close fd if my_ftruncate
fails.

* util.c [HAVE_CHARSET] (is_printable): Eliminate printable.
* setup.c [HAVE_CHARSET] (load_setup): Don't use
init_printable_table().

* charset.c (printable): Removed.
(init_printable_table): Removed.
2002-02-04 18:09:42 +00:00
Andrew V. Samoilov
4b84517072 * charsets.c (translate_character): Use ICONV_CONST. 2002-01-29 15:10:00 +00:00
Andrew V. Samoilov
1cd0a043a7 * charsets.c (load_codepages_list): Use glib memory allocation
functions.
(free_codepages_list) [HAVE_MAD]: New function to release
memory allocated in load_codepages_list.
* charsets.h: Declare free_codepages_list.

* main.c [HAVE_CHARSET]: Include charsets.h.
(main) [HAVE_MAD && HAVE_CHARSET]: Call free_codepages_list.
(program_name): Commented out.
2001-10-29 13:40:00 +00:00
Pavel Roskin
a8ef641beb * x.h: Remove. Adjust all users. Make sure that global.h is
included instead.  Don't include sys/param.h unconditionally -
rely on global.h taking care of it.
* Makefile.in: Remove x.h.
2001-09-03 05:07:40 +00:00
Pavel Roskin
849fecec4c * charsets.c (load_codepages_list): Print a warning if
mc.charset cannot be opened.
* setup.c (load_setup) [HAVE_CHARSET]: Remove all popup messages
because it's to early to use them - ncurses would crash.
2001-08-16 21:01:12 +00:00
Pavel Roskin
689c3fb9ac Replace "Can't" with "Cannot" everywhere. 2001-08-14 00:55:34 +00:00
Pavel Roskin
0177db2941 * charsets.c (load_codepages_list): Use concat_dir_and_file(). 2001-08-12 03:27:27 +00:00
Pavel Roskin
2a6be49822 * charsets.c: Warning fixes.
* charsets.h: Likewise.
* selcodepage.c: Likewise.
* selcodepage.h: Likewise.
2001-07-31 05:54:39 +00:00
Andrew V. Samoilov
46e9007ea3 * charsets.h: Define CHARSETS_INDEX without leading LIBDIR.
* charsets.c (translate_character): Warning fix.
(init_translation_table): Don't deal with printable.
This one is initialized by init_printable_table ().
(load_codepages_list): Use CHARSETS_INDEX.

* selcodepage.c (do_select_codepage): Messages marked for i18n.
* setup.c (load_setup): Eliminate errbuf. Fix error message.
2001-06-07 22:36:45 +00:00
Pavel Roskin
d3b2663c2e * charsets.c (get_codepage_index): Warning fix.
(init_printable_table): New function.
* charsets.h: Declare init_printable_table().
* setup.c (load_setup): Uncomment init_printable_table().
2001-06-07 20:04:03 +00:00
Andrew V. Samoilov
2c2744b763 * charsets.c (load_codepages_list): Lines in mc.charset beginning
with a # are comments. Use "default character_set_name" in mc.charset
to set default codepage for your system.
(xstrncpy): Eliminate.
2001-06-05 01:00:26 +00:00
Pavel Roskin
0866d8c3e0 * charsets.c: Include config.h before everything else.
* selcodepage.c: Likewise.
2001-05-31 23:56:27 +00:00
Pavel Roskin
e72a150ac9 * charsets.c: New file for charset conversion support.
From Walery Studennikov.
* charsets.h: Likewise.
* selcodepage.c: Likewise.
* selcodepage.h: Likewise.
2001-05-31 01:27:20 +00:00