Commit Graph

26 Commits

Author SHA1 Message Date
Andrew Borodin bfbac0c5d8 Reimplemened codepages storage using GPtrArray.
Added capability to load codepage list from /usr/share/mc/mc.charsets
and /etc/mc/mc.charsets and merge them then.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-19 18:25:53 +04:00
Andrew Borodin 5007553299 Remove only supported encodings from path.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:34:40 +04:00
Andrew Borodin 7ada01bfa1 Ticket #2078: changed return value of init_translation_table() function.
init_translation_table() now returnes newly-allocated string
instead of pointer to the static buffer.

Thanks Vit Rosin for original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Slava Zanko 14be06d050 Reorganize work with files. Fixed permissions of files in mc home dir. All file names now accumulated into src/fileloc.h
* Added common functions for work with backups of main config files.
 * Fixed permissions of ~/.mc/ini;
 * Fixed permissions of ~/.mc/filepos
 * Fixed permissions of ~/.mc/hotlist
 * Fixed permissions of ~/.mc/Tree
 * Fixed ownership for ~/.mc/hotlist file
 * Changed definitions of config files. Now used constants from src/fileloc.h

Also, added ability for change mc user home dir. Just type:
{{{
make CFLAGS='-DMC_USERCONF_DIR=\".mc2\"'
}}}

And you will have different config files (very usefull for testing or development).

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-07 12:01:05 +03:00
Ilia Maslakov 4afee14f94 Ticket #1529 (remove search converter overhead)
* add: void tty_print_anychar (int c)
    * remove superfluous search converter in convert_from_utf_to_current_c,
      convert_from_8bit_to_utf_c add converter to WEdit struct
    * fix: init defaulf codesets
    * fix: segfault on replace if LANG=C

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-08-18 05:52:40 +00:00
Slava Zanko 2ebdf91079 Merge branch 'm-utf-8'
* m-utf-8: (223 commits)
  Fix wildcard pattern in file select and file find dialogs
  Project builds with option --disable-charsets
  Deleted build-glib1.sh because glib1 don't work with utf-8
  fix building without --enable-charset
  Total replacement to mc_search stuff in all places
  Search engine: if found_len parameter NULL, then mc_search_run don't try to fill them
  src/view.c: Reworked search stuff to usage src/search
  refactoring: rename edit/editcmd_dialog.c:editcmd_dialog__get_search_types_list to
  Search engine: development of hex search complete
  Search engine: remove forgotten debug string and reindent file
  Search engine:
  configure.ac: if present glib-2.14 and higher, libpcre don't linked
  Search engine: now used regexp external engines:
  src/find.c: Fixed core dump if content search pattern no present
  edit/editcmd_dialogs.c: fixed state of search type between dialog window calls
  Find files: checkbox 'Regular expression' for content search now default unchecked
  Find files: changes for usage of new search engine:
  Fix copy of current/opposite path to command line: remove charset info from path
  src/Makefile.am: add some header files to Make-tracking
  Fixed editor menu reloading.
2009-05-07 13:01:01 +03:00
Andrew Borodin 2ad5d2e919 Fixed linkage.
charset.c: cp_display and cp_source variables are made global not static and...
charset.h: ...defined here as extern.
search.h: added required #include's.
search.c: fixed cp_display and cp_source variables declaration.
2009-04-22 20:20:42 +04:00
Slava Zanko 76bbeb60b2 Fixed search with different display and source charsets 2009-04-21 14:19:42 +03:00
Ilia Maslakov 26f0e58810 fix: definition of convert_from_8bit_to_utf_c2 in src/charsets.h 2009-04-20 09:08:48 +00:00
Ilia Maslakov 7494db39ed clear some build warnings 2009-04-20 07:30:32 +00:00
Ilia Maslakov a4b354f99c fix: incorret draw files in 8-bit codeset after recode 2009-04-19 20:28:00 +00:00
Ilia Maslakov 137e3e7259 fix: incorrect convert_from_utf_to_current_c, convert_from_utf_to_current 2009-04-17 10:27:59 +00:00
Ilia Maslakov eb28a3b2b3 add convert_from_utf_to_current_c, fix little warnings 2009-04-16 21:26:08 +00:00
Ilia Maslakov 8529756be9 fix incorrect convertion from utf to display CP 2009-04-16 15:10:51 +00:00
Mikhail S. Pobolovets 758ab591d8 Simple doxygen description for files in src directory.
Mostly \file and \brief tag added.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-02-10 16:07:59 +02:00
Roland Illig e792cffb8d * *.h: Renamed multiple inclusion guards that started with a
double underscore. Added #includes for dependent files.
	* popt.c: Likewise.
	* popthelp.c: Likewise.
	* tree.c: Moved a macro from tree.h to here, as it is useless
	outside tree.c.
2004-12-03 19:17:46 +00:00
Roland Illig 2ed35b596c * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional
	changes. Patch contributed by Andrew V Samoilov.
2004-08-30 10:38:00 +00:00
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 2d3c157e52 * charset.h: Provide new inline functions convert_to_display_c()
and convert_from_input_c().
* view.c: Include charset.h unconditionally, use new conversion
functions that don't require ifdefs.
2002-10-30 23:42:21 +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 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 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 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
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