diff --git a/.cvsignore b/.cvsignore index 15dd98c..7ee3a30 100644 --- a/.cvsignore +++ b/.cvsignore @@ -11,3 +11,4 @@ mc-4.6.1a-20050202.tar.bz2 mc-4.6.1a-20050309.tar.bz2 mc-4.6.1a-20050324.tar.bz2 mc-4.6.1a-20050504.tar.bz2 +mc-4.6.1a-20050606.tar.bz2 diff --git a/mc-64bit.patch b/mc-64bit.patch index 3c033e4..3d1d942 100644 --- a/mc-64bit.patch +++ b/mc-64bit.patch @@ -1,6 +1,6 @@ ---- mc-4.6.1-20041020/src/mountlist.c.64bit 2004-09-25 15:46:23.000000000 +0200 -+++ mc-4.6.1-20041020/src/mountlist.c 2005-04-01 16:20:27.192132368 +0200 -@@ -132,11 +132,19 @@ struct mount_entry +--- mc-4.6.1a/src/mountlist.c.64bit 2005-02-08 23:33:52.000000000 +0100 ++++ mc-4.6.1a/src/mountlist.c 2005-05-10 17:09:24.122853504 +0200 +@@ -131,11 +131,19 @@ struct mount_entry struct fs_usage { @@ -20,7 +20,7 @@ }; static int get_fs_usage (char *path, struct fs_usage *fsp); -@@ -663,6 +671,7 @@ my_statfs (struct my_statfs *myfs_stats, +@@ -665,6 +673,7 @@ my_statfs (struct my_statfs *myfs_stats, BLOCKS FROMSIZE-byte blocks, rounding away from zero. TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */ @@ -28,7 +28,7 @@ static long fs_adjust_blocks (long blocks, int fromsize, int tosize) { -@@ -670,13 +679,21 @@ fs_adjust_blocks (long blocks, int froms +@@ -672,13 +681,21 @@ fs_adjust_blocks (long blocks, int froms abort (); if (fromsize <= 0) return -1; @@ -52,19 +52,8 @@ } #if defined(_AIX) && defined(_I386) -@@ -773,9 +790,7 @@ get_fs_usage (char *path, struct fs_usag - - if (statvfs (path, &fsd) < 0) - return -1; -- /* f_frsize isn't guaranteed to be supported. */ --#define CONVERT_BLOCKS(b) \ -- fs_adjust_blocks ((b), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512) -+#define CONVERT_BLOCKS(b) fs_adjust_blocks ((b), fsd.f_frsize, 512) - #endif - - #if defined(CONVERT_BLOCKS) && !defined(STAT_STATFS2_FS_DATA) && !defined(STAT_READ_FILSYS) /* !Ultrix && !SVR2. */ ---- mc-4.6.1-20041020/acinclude.m4.64bit 2005-04-01 16:15:56.453290928 +0200 -+++ mc-4.6.1-20041020/acinclude.m4 2005-04-01 16:15:56.525279984 +0200 +--- mc-4.6.1a/acinclude.m4.64bit 2005-05-10 17:09:24.084859280 +0200 ++++ mc-4.6.1a/acinclude.m4 2005-05-10 17:09:24.124853200 +0200 @@ -501,7 +501,7 @@ dnl job is to detect a method to get fil if test $ac_cv_func_statvfs = yes; then space=yes diff --git a/mc-spaceprompt.patch b/mc-spaceprompt.patch index ccb7222..9a24953 100644 --- a/mc-spaceprompt.patch +++ b/mc-spaceprompt.patch @@ -1,6 +1,6 @@ ---- mc-4.6.1-pre3/src/main.c.jn 2005-03-19 15:55:40.000000000 +0100 -+++ mc-4.6.1-pre3/src/main.c 2005-03-19 17:04:10.000000000 +0100 -@@ -1490,9 +1490,14 @@ midnight_callback (struct Dlg_head *h, d +--- mc-4.6.1a/src/main.c.spaceprompt 2005-05-26 15:06:42.285109424 +0200 ++++ mc-4.6.1a/src/main.c 2005-05-26 15:15:15.964018360 +0200 +@@ -1490,9 +1491,15 @@ midnight_callback (struct Dlg_head *h, d if (parm == '\t') free_completions (cmdline); @@ -8,7 +8,8 @@ - send_message ((Widget *) cmdline, WIDGET_KEY, parm); - return MSG_HANDLED; + if (parm == '\n') { -+ for (i = 0; cmdline->buffer[i] && cmdline->buffer[i] == ' '; i++); ++ for (i = 0; cmdline->buffer[i] && ++ (cmdline->buffer[i] == ' ' || cmdline->buffer[i] == '\t'); i++); + if (cmdline->buffer[i]) { + send_message ((Widget *) cmdline, WIDGET_KEY, parm); + return MSG_HANDLED; @@ -18,7 +19,7 @@ } /* Ctrl-Enter and Alt-Enter */ -@@ -1527,7 +1532,7 @@ midnight_callback (struct Dlg_head *h, d +@@ -1527,7 +1534,7 @@ midnight_callback (struct Dlg_head *h, d reverse_selection_cmd (); return MSG_HANDLED; } diff --git a/mc-userhost.patch b/mc-userhost.patch index a26b1cc..4a51d9b 100644 --- a/mc-userhost.patch +++ b/mc-userhost.patch @@ -1,5 +1,5 @@ ---- mc-4.6.1a/src/main.c.hostname 2005-03-23 13:59:31.198747928 +0100 -+++ mc-4.6.1a/src/main.c 2005-03-23 16:00:49.135333392 +0100 +--- mc-4.6.1a/src/main.c.userhost 2005-06-06 13:35:08.926427736 +0200 ++++ mc-4.6.1a/src/main.c 2005-06-06 13:39:11.551543112 +0200 @@ -32,6 +32,7 @@ #include #include @@ -8,26 +8,26 @@ #include "global.h" #include "tty.h" -@@ -1612,9 +1613,22 @@ void +@@ -1611,9 +1612,22 @@ void update_xterm_title_path (void) { - unsigned char *p, *s; + char *p, *s; + char h[64]; + struct passwd *pw; if (xterm_flag && xterm_title) { p = s = g_strdup (strip_home_and_password (current_panel->cwd)); -+ if ( !gethostname (h, 64) ) { -+ h[63] = '\0'; /* Be sure the hostname is NUL terminated */ -+ s = g_strdup_printf ("%s:%s", h, s); -+ g_free (p); -+ p = s; -+ } -+ if ( (pw = getpwuid(getuid())) ) { -+ s = g_strdup_printf ("%s@%s", pw->pw_name, s); -+ g_free (p); -+ p = s; -+ } ++ if ( !gethostname (h, 64) ) { ++ h[63] = '\0'; /* Be sure the hostname is NUL terminated */ ++ s = g_strdup_printf ("%s:%s", h, s); ++ g_free (p); ++ p = s; ++ } ++ if ( (pw = getpwuid(getuid())) ) { ++ s = g_strdup_printf ("%s@%s", pw->pw_name, s); ++ g_free (p); ++ p = s; ++ } do { - if (*s < ' ') - *s = '?'; + #ifndef UTF8 + if (!is_printable ((unsigned char) *s)) diff --git a/mc-utf8.patch b/mc-utf8.patch index 8ad906b..cf21752 100644 --- a/mc-utf8.patch +++ b/mc-utf8.patch @@ -1,5 +1,5 @@ ---- mc-4.6.1a/edit/editdraw.c.utf8 2005-04-27 23:02:59.000000000 +0200 -+++ mc-4.6.1a/edit/editdraw.c 2005-05-05 09:32:02.694567152 +0200 +--- mc-4.6.1a/edit/editdraw.c.utf8 2005-05-27 05:35:12.000000000 +0200 ++++ mc-4.6.1a/edit/editdraw.c 2005-06-06 14:46:19.160253520 +0200 @@ -61,7 +61,7 @@ static void status_string (WEdit * edit, char *s, int w) @@ -227,9 +227,9 @@ print_to_widget (edit, row, start_col, start_col_real, end_col, line); } ---- mc-4.6.1a/edit/editkeys.c.utf8 2005-02-22 18:00:38.000000000 +0100 -+++ mc-4.6.1a/edit/editkeys.c 2005-05-05 09:32:02.695567000 +0200 -@@ -177,10 +177,10 @@ static long const common_key_map[] = { +--- mc-4.6.1a/edit/editkeys.c.utf8 2005-05-27 05:35:12.000000000 +0200 ++++ mc-4.6.1a/edit/editkeys.c 2005-06-06 14:46:19.161253368 +0200 +@@ -176,10 +176,10 @@ static long const common_key_map[] = { * 'command' is one of the editor commands from editcmddef.h. */ int @@ -242,7 +242,7 @@ int i = 0; static const long *key_map; -@@ -257,9 +257,30 @@ edit_translate_key (WEdit *edit, long x_ +@@ -256,9 +256,30 @@ edit_translate_key (WEdit *edit, long x_ /* an ordinary insertable character */ if (x_key < 256) { int c = convert_from_input_c (x_key); @@ -258,7 +258,7 @@ + + edit->charbuf[edit->charpoint++] = c; + -+ res = mbrtowc(&wc, edit->charbuf, edit->charpoint, &mbs); ++ res = mbrtowc(&wc, (char *)edit->charbuf, edit->charpoint, &mbs); + if (res < 0) { + if (res != -2) edit->charpoint = 0; /* broken multibyte char, skip */ + return 0; @@ -274,7 +274,7 @@ goto fin; } } -@@ -300,7 +321,7 @@ edit_translate_key (WEdit *edit, long x_ +@@ -299,7 +320,7 @@ edit_translate_key (WEdit *edit, long x_ *cmd = command; *ch = char_for_insertion; @@ -283,9 +283,21 @@ /* unchanged, key has no function here */ return 0; } ---- mc-4.6.1a/edit/wordproc.c.utf8 2005-02-22 18:00:38.000000000 +0100 -+++ mc-4.6.1a/edit/wordproc.c 2005-05-05 09:32:02.696566848 +0200 -@@ -41,7 +41,12 @@ +--- mc-4.6.1a/edit/editwidget.c.utf8 2005-05-27 05:35:12.000000000 +0200 ++++ mc-4.6.1a/edit/editwidget.c 2005-06-06 14:46:19.162253216 +0200 +@@ -349,7 +349,8 @@ edit_callback (Widget *w, widget_msg_t m + + case WIDGET_KEY: + { +- int cmd, ch; ++ int cmd; ++ mc_wint_t ch; + + /* first check alt-f, alt-e, alt-s, etc for drop menus */ + if (edit_drop_hotkey_menu (e, parm)) +--- mc-4.6.1a/edit/wordproc.c.utf8 2005-05-27 05:35:12.000000000 +0200 ++++ mc-4.6.1a/edit/wordproc.c 2005-06-06 14:46:19.162253216 +0200 +@@ -40,7 +40,12 @@ #define tab_width option_tab_spacing @@ -298,7 +310,7 @@ #define FONT_MEAN_WIDTH 1 static long -@@ -58,14 +63,21 @@ line_start (WEdit *edit, long line) +@@ -57,14 +62,21 @@ line_start (WEdit *edit, long line) p = edit_move_forward (edit, p, line - l, 0); p = edit_bol (edit, p); @@ -321,7 +333,7 @@ c = edit_get_byte (edit, p); if (c == '.') { /* `...' is acceptable */ if (edit_get_byte (edit, p + 1) == '.') -@@ -79,7 +91,13 @@ static int bad_line_start (WEdit * edit, +@@ -78,7 +90,13 @@ static int bad_line_start (WEdit * edit, return 0; /* `---' is acceptable */ return 1; } @@ -335,7 +347,7 @@ return 1; return 0; } -@@ -132,33 +150,37 @@ end_paragraph (WEdit *edit, int force) +@@ -131,33 +149,37 @@ end_paragraph (WEdit *edit, int force) i - edit->curs_line, 0)); } @@ -381,7 +393,7 @@ while (size--) { *p = *p == '\n' ? ' ' : *p; p++; -@@ -175,7 +197,7 @@ static inline int next_tab_pos (int x) +@@ -174,7 +196,7 @@ static inline int next_tab_pos (int x) { return x += tab_width - x % tab_width; } @@ -390,7 +402,7 @@ { int x = 0, c, xn = 0; for (;;) { -@@ -199,7 +221,7 @@ static int line_pixel_length (unsigned c +@@ -198,7 +220,7 @@ static int line_pixel_length (unsigned c } static int @@ -399,7 +411,7 @@ { int i; for (i = q;; i++) { -@@ -221,13 +243,13 @@ next_word_start (unsigned char *t, int q +@@ -220,13 +242,13 @@ next_word_start (unsigned char *t, int q /* find the start of a word */ static int @@ -415,7 +427,7 @@ if (!i) return -1; c = t[i - 1]; -@@ -240,7 +262,7 @@ word_start (unsigned char *t, int q) +@@ -239,7 +261,7 @@ word_start (unsigned char *t, int q) } /* replaces ' ' with '\n' to properly format a paragraph */ @@ -424,7 +436,7 @@ { int q = 0, ww; strip_newlines (t, size); -@@ -268,7 +290,7 @@ static void format_this (unsigned char * +@@ -267,7 +289,7 @@ static void format_this (unsigned char * } } @@ -433,7 +445,7 @@ { edit_cursor_move (edit, q - edit->curs1); edit_delete (edit); -@@ -277,18 +299,27 @@ static void replace_at (WEdit * edit, lo +@@ -276,18 +298,27 @@ static void replace_at (WEdit * edit, lo /* replaces a block of text */ static void @@ -463,7 +475,7 @@ p++; } else if (t[i - 1] == '\n') { long curs; -@@ -300,7 +331,11 @@ put_paragraph (WEdit * edit, unsigned ch +@@ -299,7 +330,11 @@ put_paragraph (WEdit * edit, unsigned ch p = edit->curs1; } else if (c == '\n') { edit_cursor_move (edit, p - edit->curs1); @@ -475,7 +487,7 @@ edit_delete (edit); if (cursor > edit->curs1) cursor--; -@@ -333,7 +368,7 @@ format_paragraph (WEdit *edit, int force +@@ -332,7 +367,7 @@ format_paragraph (WEdit *edit, int force { long p, q; int size; @@ -484,7 +496,7 @@ int indent = 0; if (option_word_wrap_line_length < 2) return; -@@ -343,17 +378,25 @@ format_paragraph (WEdit *edit, int force +@@ -342,17 +377,25 @@ format_paragraph (WEdit *edit, int force q = end_paragraph (edit, force); indent = test_indent (edit, p, q); t = get_paragraph (edit, p, q, indent, &size); @@ -511,18 +523,18 @@ g_free (t); return; } ---- mc-4.6.1a/edit/editcmd.c.utf8 2005-05-04 01:40:15.000000000 +0200 -+++ mc-4.6.1a/edit/editcmd.c 2005-05-05 09:32:02.701566088 +0200 -@@ -60,7 +60,7 @@ +--- mc-4.6.1a/edit/editcmd.c.utf8 2005-05-27 05:35:12.000000000 +0200 ++++ mc-4.6.1a/edit/editcmd.c 2005-06-06 14:46:19.166252608 +0200 +@@ -58,7 +58,7 @@ #define edit_get_save_file(f,h) input_expand_dialog (h, _(" Enter file name: "), f) struct selection { -- char *text; -+ mc_wchar_t *text; - int len; +- unsigned char * text; ++ mc_wchar_t *text; + int len; }; -@@ -83,12 +83,16 @@ int edit_confirm_save = 1; +@@ -81,12 +81,16 @@ int edit_confirm_save = 1; #define MAX_REPL_LEN 1024 static int edit_save_cmd (WEdit *edit); @@ -541,7 +553,7 @@ } static const char * -@@ -123,11 +127,11 @@ static void *memmove (void *dest, const +@@ -121,11 +125,11 @@ static void *memmove (void *dest, const #endif /* !HAVE_MEMMOVE */ /* #define itoa MY_itoa <---- this line is now in edit.h */ @@ -556,7 +568,7 @@ int j = i; *s-- = 0; do { -@@ -212,6 +216,48 @@ void edit_refresh_cmd (WEdit * edit) +@@ -210,6 +214,48 @@ void edit_refresh_cmd (WEdit * edit) doupdate(); } @@ -605,7 +617,7 @@ /* If 0 (quick save) then a) create/truncate file, b) save to ; if 1 (safe save) then a) save to , -@@ -319,32 +365,48 @@ edit_save_file (WEdit *edit, const char +@@ -317,32 +363,48 @@ edit_save_file (WEdit *edit, const char buf = 0; filelen = edit->last_byte; while (buf <= (edit->curs1 >> S_EDIT_BUF_SIZE) - 1) { @@ -657,7 +669,7 @@ EDIT_BUF_SIZE) != EDIT_BUF_SIZE) { filelen = -1; break; -@@ -657,13 +719,21 @@ edit_delete_macro (WEdit * edit, int k) +@@ -655,13 +717,21 @@ edit_delete_macro (WEdit * edit, int k) if (!n || n == EOF) break; n = 0; @@ -679,7 +691,7 @@ fprintf (g, ";\n"); } } -@@ -696,7 +766,11 @@ int edit_save_macro_cmd (WEdit * edit, s +@@ -694,7 +764,11 @@ int edit_save_macro_cmd (WEdit * edit, s if (f) { fprintf (f, ("key '%d 0': "), s); for (i = 0; i < n; i++) @@ -691,7 +703,7 @@ fprintf (f, ";\n"); fclose (f); if (saved_macros_loaded) { -@@ -746,10 +820,18 @@ int edit_load_macro_cmd (WEdit * edit, s +@@ -744,10 +818,18 @@ int edit_load_macro_cmd (WEdit * edit, s saved_macro[i++] = s; if (!found) { *n = 0; @@ -710,7 +722,7 @@ } fscanf (f, ";\n"); if (s == k) -@@ -896,7 +978,7 @@ int eval_marks (WEdit * edit, long *star +@@ -894,7 +976,7 @@ int eval_marks (WEdit * edit, long *star #define space_width 1 static void @@ -719,7 +731,7 @@ { long cursor; int i, col; -@@ -944,7 +1026,7 @@ edit_block_copy_cmd (WEdit *edit) +@@ -942,7 +1024,7 @@ edit_block_copy_cmd (WEdit *edit) { long start_mark, end_mark, current = edit->curs1; int size, x; @@ -728,7 +740,7 @@ edit_update_curs_col (edit); x = edit->curs_col; -@@ -989,7 +1071,7 @@ edit_block_move_cmd (WEdit *edit) +@@ -987,7 +1069,7 @@ edit_block_move_cmd (WEdit *edit) { long count; long current; @@ -737,7 +749,7 @@ long start_mark, end_mark; int deleted = 0; int x = 0; -@@ -1050,7 +1132,7 @@ edit_block_move_cmd (WEdit *edit) +@@ -1048,7 +1130,7 @@ edit_block_move_cmd (WEdit *edit) edit_push_action (edit, COLUMN_ON); column_highlighting = 0; } else { @@ -746,7 +758,7 @@ edit_cursor_move (edit, start_mark - edit->curs1); edit_scroll_screen_over_cursor (edit); count = start_mark; -@@ -1388,7 +1470,11 @@ static long sargs[NUM_REPL_ARGS][256 / s +@@ -1386,7 +1468,11 @@ static long sargs[NUM_REPL_ARGS][256 / s /* This function is a modification of mc-3.2.10/src/view.c:regexp_view_search() */ /* returns -3 on error in pattern, -1 on not found, found_len = 0 if either */ static int @@ -758,7 +770,7 @@ int match_bol, int icase, int *found_len, void *d) { static regex_t r; -@@ -1397,6 +1483,11 @@ string_regexp_search (char *pattern, cha +@@ -1395,6 +1481,11 @@ string_regexp_search (char *pattern, cha regmatch_t *pmatch; static regmatch_t s[1]; @@ -770,7 +782,7 @@ pmatch = (regmatch_t *) d; if (!pmatch) pmatch = s; -@@ -1416,13 +1507,51 @@ string_regexp_search (char *pattern, cha +@@ -1414,13 +1505,51 @@ string_regexp_search (char *pattern, cha old_type = match_type; old_icase = icase; } @@ -822,7 +834,7 @@ *found_len = pmatch[0].rm_eo - pmatch[0].rm_so; return (pmatch[0].rm_so); } -@@ -1430,13 +1559,29 @@ string_regexp_search (char *pattern, cha +@@ -1428,13 +1557,29 @@ string_regexp_search (char *pattern, cha /* thanks to Liviu Daia for getting this (and the above) routines to work properly - paul */ @@ -846,14 +858,14 @@ +#ifndef UTF8 + long l = strlen ((char *) exp); +#else /* UTF8 */ -+ mc_wchar_t *exp = mbstr_to_wchar(exp_mb); ++ mc_wchar_t *exp = mbstr_to_wchar((char *)exp_mb); + mc_wchar_t *exp_backup = exp; + long l = wcslen(exp); +#endif /* UTF8 */ int n = 0; for (p = 0; p < l; p++) /* count conversions... */ -@@ -1445,19 +1590,22 @@ edit_find_string (long start, unsigned c +@@ -1443,19 +1588,22 @@ edit_find_string (long start, unsigned c n++; if (replace_scanf || replace_regexp) { @@ -883,7 +895,7 @@ if (replace_case) { for (p = start; p < last_byte && p < start + MAX_REPL_LEN; p++) buf[p - start] = (*get_byte) (data, p); -@@ -1471,20 +1619,36 @@ edit_find_string (long start, unsigned c +@@ -1469,20 +1617,36 @@ edit_find_string (long start, unsigned c } buf[(q = p - start)] = 0; @@ -921,7 +933,7 @@ if (q + start < last_byte) { if (replace_case) { buf[q] = (*get_byte) (data, q + start); -@@ -1498,7 +1662,11 @@ edit_find_string (long start, unsigned c +@@ -1496,7 +1660,11 @@ edit_find_string (long start, unsigned c start++; buf++; /* move the window along */ if (buf == mbuf + MAX_REPL_LEN) { /* the window is about to go past the end of array, so... */ @@ -933,7 +945,7 @@ buf = mbuf; } q--; -@@ -1524,10 +1692,17 @@ edit_find_string (long start, unsigned c +@@ -1522,10 +1690,17 @@ edit_find_string (long start, unsigned c buf = mbuf; while (q) { @@ -951,7 +963,7 @@ return -3; } else if (found_start == -1) /* not found: try next line */ -@@ -1538,15 +1713,27 @@ edit_find_string (long start, unsigned c +@@ -1536,15 +1711,27 @@ edit_find_string (long start, unsigned c match_bol = 0; continue; } @@ -981,7 +993,7 @@ memmove (mbuf, buf, q); p = start + q; move_win = 1; -@@ -1556,36 +1743,59 @@ edit_find_string (long start, unsigned c +@@ -1554,36 +1741,59 @@ edit_find_string (long start, unsigned c } } } else { @@ -1049,7 +1061,7 @@ return -2; } -@@ -1599,9 +1809,14 @@ edit_find_forwards (long search_start, u +@@ -1597,9 +1807,14 @@ edit_find_forwards (long search_start, u while ((p = edit_find_string (p, exp, len, last_byte, get_byte, data, once_only, d)) >= 0) { if (replace_whole) { @@ -1064,7 +1076,7 @@ return p; if (once_only) return -2; -@@ -1633,6 +1848,7 @@ edit_find (long search_start, unsigned c +@@ -1631,6 +1846,7 @@ edit_find (long search_start, unsigned c #define is_digit(x) ((x) >= '0' && (x) <= '9') @@ -1072,7 +1084,7 @@ #define snprint(v) { \ *p1++ = *p++; \ *p1 = '\0'; \ -@@ -1640,33 +1856,48 @@ edit_find (long search_start, unsigned c +@@ -1638,33 +1854,48 @@ edit_find (long search_start, unsigned c if (n >= (size_t) (e - s)) goto nospc; \ s += n; \ } @@ -1129,7 +1141,7 @@ s += n; q = p; p1 = q1; -@@ -1694,45 +1925,78 @@ static int snprintf_p (char *str, size_t +@@ -1692,45 +1923,78 @@ static int snprintf_p (char *str, size_t *p1++ = *p++; if (*p == '*') { p++; @@ -1218,7 +1230,7 @@ snprint (*va_arg (ap, long *)); } else if (*p == 'p') { snprint (*va_arg (ap, void **)); -@@ -1741,10 +2005,17 @@ static int snprintf_p (char *str, size_t +@@ -1739,10 +2003,17 @@ static int snprintf_p (char *str, size_t q = p; } va_end (ap); @@ -1236,7 +1248,7 @@ return s + n - str; nospc: va_end (ap); -@@ -1923,8 +2194,11 @@ edit_replace_cmd (WEdit *edit, int again +@@ -1921,8 +2192,11 @@ edit_replace_cmd (WEdit *edit, int again } } if (replace_yes) { /* delete then insert new */ @@ -1249,7 +1261,7 @@ int ret = 0; /* we need to fill in sargs just like with scanf */ -@@ -1933,17 +2207,25 @@ edit_replace_cmd (WEdit *edit, int again +@@ -1931,17 +2205,25 @@ edit_replace_cmd (WEdit *edit, int again for (k = 1; k < NUM_REPL_ARGS && pmatch[k].rm_eo >= 0; k++) { @@ -1276,7 +1288,7 @@ edit-> search_start - -@@ -1960,9 +2242,15 @@ edit_replace_cmd (WEdit *edit, int again +@@ -1958,9 +2240,15 @@ edit_replace_cmd (WEdit *edit, int again sargs[k - 1][0] = 0; } if (!ret) @@ -1292,7 +1304,7 @@ if (ret >= 0) { times_replaced++; while (i--) -@@ -1982,10 +2270,18 @@ edit_replace_cmd (WEdit *edit, int again +@@ -1980,10 +2268,18 @@ edit_replace_cmd (WEdit *edit, int again times_replaced++; while (i--) edit_delete (edit); @@ -1311,7 +1323,7 @@ } /* so that we don't find the same string again */ if (replace_backwards) { -@@ -2158,16 +2454,17 @@ edit_ok_to_exit (WEdit *edit) +@@ -2157,16 +2453,17 @@ edit_ok_to_exit (WEdit *edit) #define TEMP_BUF_LEN 1024 /* Return a null terminated length of text. Result must be g_free'd */ @@ -1333,7 +1345,7 @@ x = edit_move_forward3 (edit, edit_bol (edit, start), 0, start); c = edit_get_byte (edit, start); -@@ -2200,11 +2497,15 @@ edit_save_block (WEdit * edit, const cha +@@ -2199,11 +2496,15 @@ edit_save_block (WEdit * edit, const cha return 0; if (column_highlighting) { @@ -1350,7 +1362,7 @@ if (r < 0) break; p += r; -@@ -2212,15 +2513,19 @@ edit_save_block (WEdit * edit, const cha +@@ -2211,15 +2512,19 @@ edit_save_block (WEdit * edit, const cha } g_free (block); } else { @@ -1372,7 +1384,7 @@ start = end; } g_free (buf); -@@ -2559,17 +2864,20 @@ edit_block_process_cmd (WEdit *edit, con +@@ -2558,17 +2863,20 @@ edit_block_process_cmd (WEdit *edit, con /* prints at the cursor */ /* returns the number of chars printed */ @@ -1395,7 +1407,7 @@ static void pipe_mail (WEdit *edit, char *to, char *subject, char *cc) { FILE *p = 0; -@@ -2663,15 +2971,20 @@ void edit_mail_dialog (WEdit * edit) +@@ -2662,15 +2970,20 @@ void edit_mail_dialog (WEdit * edit) /* find first character of current word */ static int edit_find_word_start (WEdit *edit, long *word_start, int *word_len) { @@ -1418,7 +1430,7 @@ return 0; /* search start of word to be completed */ -@@ -2681,11 +2994,19 @@ static int edit_find_word_start (WEdit * +@@ -2680,11 +2993,19 @@ static int edit_find_word_start (WEdit * return 0; last = c; @@ -1439,28 +1451,32 @@ return 0; *word_start = edit->curs1 - (i - 1); /* start found */ -@@ -2718,7 +3039,7 @@ edit_collect_completions (WEdit *edit, l +@@ -2717,7 +3038,7 @@ edit_collect_completions (WEdit *edit, l int *num) { int len, max_len = 0, i, skip; -- char *bufpos; +- unsigned char *bufpos; + mc_wchar_t *bufpos; /* collect max MAX_WORD_COMPLETIONS completions */ while (*num < MAX_WORD_COMPLETIONS) { -@@ -2739,7 +3060,11 @@ edit_collect_completions (WEdit *edit, l +@@ -2736,9 +3057,15 @@ edit_collect_completions (WEdit *edit, l buffers1[start >> S_EDIT_BUF_SIZE][start & M_EDIT_BUF_SIZE]; skip = 0; for (i = 0; i < *num; i++) { +#ifndef UTF8 if (strncmp + ((char *) &compl[i].text[word_len], + (char *) &bufpos[word_len], max (len, +#else /* UTF8 */ -+ if (wcsncmp ++ if (wcsncmp ++ ((wchar_t *) &compl[i].text[word_len], ++ (wchar_t *) &bufpos[word_len], max (len, +#endif /* UTF8 */ - (&compl[i].text[word_len], &bufpos[word_len], - max (len, compl[i].len) - word_len) == 0) { + compl[i].len) - + word_len) == 0) { skip = 1; -@@ -2749,7 +3074,7 @@ edit_collect_completions (WEdit *edit, l +@@ -2748,7 +3075,7 @@ edit_collect_completions (WEdit *edit, l if (skip) continue; @@ -1469,7 +1485,7 @@ compl[*num].len = len; for (i = 0; i < len; i++) compl[*num].text[i] = *(bufpos + i); -@@ -2763,6 +3088,18 @@ edit_collect_completions (WEdit *edit, l +@@ -2762,6 +3089,18 @@ edit_collect_completions (WEdit *edit, l return max_len; } @@ -1488,38 +1504,34 @@ /* let the user select its preferred completion */ static void -@@ -2772,9 +3109,13 @@ edit_completion_dialog (WEdit *edit, int - int start_x, start_y, offset, i; - char *curr = NULL; - Dlg_head *compl_dlg; -+ +@@ -2774,6 +3113,9 @@ edit_completion_dialog (WEdit * edit, in WListbox *compl_list; - int compl_dlg_h; /* completion dialog height */ - int compl_dlg_w; /* completion dialog width */ + int compl_dlg_h; /* completion dialog height */ + int compl_dlg_w; /* completion dialog width */ +#ifdef UTF8 + char *mbtext; +#endif /* UTF8 */ /* calculate the dialog metrics */ compl_dlg_h = num_compl + 2; -@@ -2810,8 +3151,16 @@ edit_completion_dialog (WEdit *edit, int +@@ -2809,8 +3151,16 @@ edit_completion_dialog (WEdit * edit, in add_widget (compl_dlg, compl_list); /* fill the listbox with the completions */ +#ifndef UTF8 for (i = 0; i < num_compl; i++) - listbox_add_item (compl_list, 0, 0, compl[i].text, NULL); + listbox_add_item (compl_list, 0, 0, (char *) compl[i].text, NULL); +#else /* UTF8 */ + for (i = 0; i < num_compl; i++) { -+ mbtext = wchar_to_mbstr(compl[i].text); -+ listbox_add_item (compl_list, 0, 0, mbtext, NULL); -+ g_free(mbtext); ++ mbtext = wchar_to_mbstr(compl[i].text); ++ listbox_add_item (compl_list, 0, 0, mbtext, NULL); ++ g_free(mbtext); + } +#endif /* UTF8 */ /* pop up the dialog */ run_dlg (compl_dlg); -@@ -2819,9 +3168,17 @@ edit_completion_dialog (WEdit *edit, int +@@ -2818,9 +3168,17 @@ edit_completion_dialog (WEdit * edit, in /* apply the choosen completion */ if (compl_dlg->ret_value == B_ENTER) { listbox_get_current (compl_list, &curr, NULL); @@ -1538,11 +1550,11 @@ } /* destroy dialog before return */ -@@ -2838,8 +3195,9 @@ edit_complete_word_cmd (WEdit *edit) +@@ -2837,8 +3195,9 @@ edit_complete_word_cmd (WEdit *edit) { int word_len = 0, i, num_compl = 0, max_len; long word_start = 0; -- char *bufpos; +- unsigned char *bufpos; - char *match_expr; + mc_wchar_t *bufpos; + mc_wchar_t *match_expr; @@ -1550,7 +1562,7 @@ struct selection compl[MAX_WORD_COMPLETIONS]; /* completions */ /* don't want to disturb another search */ -@@ -2856,16 +3214,32 @@ edit_complete_word_cmd (WEdit *edit) +@@ -2855,16 +3214,32 @@ edit_complete_word_cmd (WEdit *edit) /* prepare match expression */ bufpos = &edit->buffers1[word_start >> S_EDIT_BUF_SIZE] [word_start & M_EDIT_BUF_SIZE]; @@ -1583,9 +1595,9 @@ if (num_compl > 0) { /* insert completed word if there is only one match */ ---- mc-4.6.1a/edit/edit.c.utf8 2005-02-22 18:00:38.000000000 +0100 -+++ mc-4.6.1a/edit/edit.c 2005-05-05 09:32:02.705565480 +0200 -@@ -103,7 +103,7 @@ char *option_backup_ext = "~"; +--- mc-4.6.1a/edit/edit.c.utf8 2005-05-27 05:35:12.000000000 +0200 ++++ mc-4.6.1a/edit/edit.c 2005-06-06 14:46:19.168252304 +0200 +@@ -102,7 +102,7 @@ char *option_backup_ext = "~"; static void edit_move_to_prev_col (WEdit *edit, long p); static void user_menu (WEdit *edit); @@ -1594,7 +1606,7 @@ { unsigned long p; if (byte_index >= (edit->curs1 + edit->curs2) || byte_index < 0) -@@ -132,7 +132,7 @@ edit_init_buffers (WEdit *edit) +@@ -131,7 +131,7 @@ edit_init_buffers (WEdit *edit) edit->curs1 = 0; edit->curs2 = 0; @@ -1603,7 +1615,7 @@ } /* -@@ -157,7 +157,7 @@ edit_load_file_fast (WEdit *edit, const +@@ -156,7 +156,7 @@ edit_load_file_fast (WEdit *edit, const } if (!edit->buffers2[buf2]) @@ -1612,7 +1624,7 @@ mc_read (file, (char *) edit->buffers2[buf2] + EDIT_BUF_SIZE - -@@ -167,7 +167,7 @@ edit_load_file_fast (WEdit *edit, const +@@ -166,7 +166,7 @@ edit_load_file_fast (WEdit *edit, const for (buf = buf2 - 1; buf >= 0; buf--) { /* edit->buffers2[0] is already allocated */ if (!edit->buffers2[buf]) @@ -1621,7 +1633,7 @@ mc_read (file, (char *) edit->buffers2[buf], EDIT_BUF_SIZE); } -@@ -240,9 +240,44 @@ edit_insert_stream (WEdit * edit, FILE * +@@ -239,9 +239,44 @@ edit_insert_stream (WEdit * edit, FILE * { int c; long i = 0; @@ -1643,7 +1655,7 @@ + buf[charpos++] = c; + + memset (&mbs, 0, sizeof (mbs)); -+ size = mbrtowc(&wc, buf, charpos, &mbs); ++ size = mbrtowc(&wc, (char *)buf, charpos, &mbs); + + if (size == -2) + continue; /* incomplete */ @@ -1667,7 +1679,7 @@ } return i; } -@@ -250,9 +285,32 @@ edit_insert_stream (WEdit * edit, FILE * +@@ -249,9 +284,32 @@ edit_insert_stream (WEdit * edit, FILE * long edit_write_stream (WEdit * edit, FILE * f) { long i; @@ -1700,7 +1712,7 @@ return i; } -@@ -291,12 +349,46 @@ edit_insert_file (WEdit *edit, const cha +@@ -290,12 +348,46 @@ edit_insert_file (WEdit *edit, const cha int i, file, blocklen; long current = edit->curs1; unsigned char *buf; @@ -1724,7 +1736,7 @@ + for (i = 0; i < blocklen; ) { + mc_wchar_t wc; + int j; -+ int size = mbrtowc(&wc, buf + i, blocklen - i, &mbs); ++ int size = mbrtowc(&wc, (char *)buf + i, blocklen - i, &mbs); + if (size == -2) { /*incomplete char*/ + bufstart = blocklen - i; + memcpy(buf, buf+i, bufstart); @@ -1747,7 +1759,7 @@ } edit_cursor_move (edit, current - edit->curs1); g_free (buf); -@@ -386,7 +478,11 @@ cleanup: +@@ -385,7 +477,11 @@ cleanup: static int edit_load_file (WEdit *edit) { @@ -1759,7 +1771,7 @@ /* Cannot do fast load if a filter is used */ if (edit_find_filter (edit->filename) >= 0) -@@ -533,7 +629,7 @@ edit_init (WEdit *edit, int lines, int c +@@ -532,7 +628,7 @@ edit_init (WEdit *edit, int lines, int c edit_set_filename (edit, filename); edit->stack_size = START_STACK_SIZE; edit->stack_size_mask = START_STACK_SIZE - 1; @@ -1768,7 +1780,7 @@ if (edit_load_file (edit)) { /* edit_load_file already gives an error message */ if (to_free) -@@ -558,7 +654,7 @@ edit_init (WEdit *edit, int lines, int c +@@ -557,7 +653,7 @@ edit_init (WEdit *edit, int lines, int c edit_move_display (edit, line - 1); edit_move_to_line (edit, line - 1); } @@ -1777,7 +1789,7 @@ return edit; } -@@ -686,13 +782,23 @@ void edit_push_action (WEdit * edit, lon +@@ -685,13 +781,23 @@ void edit_push_action (WEdit * edit, lon { unsigned long sp = edit->stack_pointer; unsigned long spm1; @@ -1803,7 +1815,7 @@ if (t) { edit->undo_stack = t; edit->stack_size <<= 1; -@@ -707,7 +813,7 @@ void edit_push_action (WEdit * edit, lon +@@ -706,7 +812,7 @@ void edit_push_action (WEdit * edit, lon #ifdef FAST_MOVE_CURSOR if (c == CURS_LEFT_LOTS || c == CURS_RIGHT_LOTS) { va_list ap; @@ -1812,7 +1824,7 @@ edit->stack_pointer = (edit->stack_pointer + 1) & edit->stack_size_mask; va_start (ap, c); c = -(va_arg (ap, int)); -@@ -718,12 +824,14 @@ void edit_push_action (WEdit * edit, lon +@@ -717,12 +823,14 @@ void edit_push_action (WEdit * edit, lon && spm1 != edit->stack_bottom && ((sp - 2) & edit->stack_size_mask) != edit->stack_bottom) { int d; @@ -1832,7 +1844,7 @@ return; } } -@@ -731,19 +839,20 @@ void edit_push_action (WEdit * edit, lon +@@ -730,19 +838,20 @@ void edit_push_action (WEdit * edit, lon #ifndef NO_STACK_CURSMOVE_ANIHILATION else if ((c == CURS_LEFT && d == CURS_RIGHT) || (c == CURS_RIGHT && d == CURS_LEFT)) { /* a left then a right anihilate each other */ @@ -1858,7 +1870,7 @@ goto check_bottom; } #ifndef NO_STACK_CURSMOVE_ANIHILATION -@@ -755,7 +864,9 @@ void edit_push_action (WEdit * edit, lon +@@ -754,7 +863,9 @@ void edit_push_action (WEdit * edit, lon #endif } } @@ -1869,7 +1881,7 @@ check_bottom: edit->stack_pointer = (edit->stack_pointer + 1) & edit->stack_size_mask; -@@ -768,10 +879,10 @@ void edit_push_action (WEdit * edit, lon +@@ -767,10 +878,10 @@ void edit_push_action (WEdit * edit, lon (((unsigned long) c + 1) & edit->stack_size_mask) == edit->stack_bottom) do { edit->stack_bottom = (edit->stack_bottom + 1) & edit->stack_size_mask; @@ -1882,7 +1894,7 @@ edit->stack_bottom = edit->stack_pointer = 0; } -@@ -780,30 +891,30 @@ void edit_push_action (WEdit * edit, lon +@@ -779,30 +890,30 @@ void edit_push_action (WEdit * edit, lon then the file should be as it was when he loaded up. Then set edit->modified to 0. */ static long @@ -1924,7 +1936,7 @@ } /* is called whenever a modification is made by one of the four routines below */ -@@ -824,7 +935,7 @@ static inline void edit_modification (WE +@@ -823,7 +934,7 @@ static inline void edit_modification (WE */ void @@ -1933,7 +1945,7 @@ { /* check if file has grown to large */ if (edit->last_byte >= SIZE_LIMIT) -@@ -862,12 +973,11 @@ edit_insert (WEdit *edit, int c) +@@ -861,12 +972,11 @@ edit_insert (WEdit *edit, int c) /* add a new buffer if we've reached the end of the last one */ if (!(edit->curs1 & M_EDIT_BUF_SIZE)) edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] = @@ -1949,7 +1961,7 @@ /* update file length */ edit->last_byte++; -@@ -878,7 +988,7 @@ edit_insert (WEdit *edit, int c) +@@ -877,7 +987,7 @@ edit_insert (WEdit *edit, int c) /* same as edit_insert and move left */ @@ -1958,7 +1970,7 @@ { if (edit->last_byte >= SIZE_LIMIT) return; -@@ -901,7 +1011,7 @@ void edit_insert_ahead (WEdit * edit, in +@@ -900,7 +1010,7 @@ void edit_insert_ahead (WEdit * edit, in edit->last_get_rule += (edit->last_get_rule >= edit->curs1); if (!((edit->curs2 + 1) & M_EDIT_BUF_SIZE)) @@ -1967,7 +1979,7 @@ edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (edit->curs2 & M_EDIT_BUF_SIZE) - 1] = c; edit->last_byte++; -@@ -911,7 +1021,7 @@ void edit_insert_ahead (WEdit * edit, in +@@ -910,7 +1020,7 @@ void edit_insert_ahead (WEdit * edit, in int edit_delete (WEdit * edit) { @@ -1976,7 +1988,7 @@ if (!edit->curs2) return 0; -@@ -935,7 +1045,7 @@ int edit_delete (WEdit * edit) +@@ -934,7 +1044,7 @@ int edit_delete (WEdit * edit) edit->total_lines--; edit->force |= REDRAW_AFTER_CURSOR; } @@ -1985,7 +1997,7 @@ if (edit->curs1 < edit->start_display) { edit->start_display--; if (p == '\n') -@@ -949,7 +1059,7 @@ int edit_delete (WEdit * edit) +@@ -948,7 +1058,7 @@ int edit_delete (WEdit * edit) static int edit_backspace (WEdit * edit) { @@ -1994,7 +2006,7 @@ if (!edit->curs1) return 0; -@@ -973,7 +1083,7 @@ edit_backspace (WEdit * edit) +@@ -972,7 +1082,7 @@ edit_backspace (WEdit * edit) edit->total_lines--; edit->force |= REDRAW_AFTER_CURSOR; } @@ -2003,7 +2015,7 @@ if (edit->curs1 < edit->start_display) { edit->start_display--; -@@ -986,10 +1096,18 @@ edit_backspace (WEdit * edit) +@@ -985,10 +1095,18 @@ edit_backspace (WEdit * edit) #ifdef FAST_MOVE_CURSOR @@ -2023,7 +2035,7 @@ edit->curs_line--; next -= (unsigned long) dest; n -= next; -@@ -1002,7 +1120,7 @@ int +@@ -1001,7 +1119,7 @@ int edit_move_backward_lots (WEdit *edit, long increment) { int r, s, t; @@ -2032,7 +2044,7 @@ if (increment > edit->curs1) increment = edit->curs1; -@@ -1042,7 +1160,7 @@ edit_move_backward_lots (WEdit *edit, lo +@@ -1041,7 +1159,7 @@ edit_move_backward_lots (WEdit *edit, lo edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = p; else edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = @@ -2041,7 +2053,7 @@ } else { g_free (p); } -@@ -1080,7 +1198,7 @@ edit_move_backward_lots (WEdit *edit, lo +@@ -1079,7 +1197,7 @@ edit_move_backward_lots (WEdit *edit, lo edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = p; else edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = @@ -2050,7 +2062,7 @@ } else { g_free (p); } -@@ -1112,7 +1230,7 @@ int edit_cursor_move (WEdit * edit, long +@@ -1111,7 +1229,7 @@ int edit_cursor_move (WEdit * edit, long c = edit_get_byte (edit, edit->curs1 - 1); if (!((edit->curs2 + 1) & M_EDIT_BUF_SIZE)) @@ -2059,7 +2071,7 @@ edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (edit->curs2 & M_EDIT_BUF_SIZE) - 1] = c; edit->curs2++; c = edit->buffers1[(edit->curs1 - 1) >> S_EDIT_BUF_SIZE][(edit->curs1 - 1) & M_EDIT_BUF_SIZE]; -@@ -1137,7 +1255,7 @@ int edit_cursor_move (WEdit * edit, long +@@ -1136,7 +1254,7 @@ int edit_cursor_move (WEdit * edit, long c = edit_get_byte (edit, edit->curs1); if (!(edit->curs1 & M_EDIT_BUF_SIZE)) @@ -2068,7 +2080,7 @@ edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE][edit->curs1 & M_EDIT_BUF_SIZE] = c; edit->curs1++; c = edit->buffers2[(edit->curs2 - 1) >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - ((edit->curs2 - 1) & M_EDIT_BUF_SIZE) - 1]; -@@ -1244,7 +1362,7 @@ long edit_move_forward3 (WEdit * edit, l +@@ -1243,7 +1361,7 @@ long edit_move_forward3 (WEdit * edit, l q = edit->last_byte + 2; for (col = 0, p = current; p < q; p++) { @@ -2077,7 +2089,7 @@ if (cols != -10) { if (col == cols) return p; -@@ -1262,7 +1380,7 @@ long edit_move_forward3 (WEdit * edit, l +@@ -1261,7 +1379,7 @@ long edit_move_forward3 (WEdit * edit, l } else if (c < 32 || c == 127) col += 2; /* Caret notation for control characters */ else @@ -2086,7 +2098,7 @@ } return col; } -@@ -1395,7 +1513,7 @@ static int +@@ -1394,7 +1512,7 @@ static int is_blank (WEdit *edit, long offset) { long s, f; @@ -2095,7 +2107,7 @@ s = edit_bol (edit, offset); f = edit_eol (edit, offset) - 1; while (s <= f) { -@@ -1767,13 +1885,13 @@ static void edit_left_delete_word (WEdit +@@ -1766,13 +1884,13 @@ static void edit_left_delete_word (WEdit static void edit_do_undo (WEdit * edit) { @@ -2112,7 +2124,7 @@ case STACK_BOTTOM: goto done_undo; case CURS_RIGHT: -@@ -1794,31 +1912,33 @@ edit_do_undo (WEdit * edit) +@@ -1793,31 +1911,33 @@ edit_do_undo (WEdit * edit) case COLUMN_OFF: column_highlighting = 0; break; @@ -2159,7 +2171,7 @@ edit_update_curs_row (edit); done_undo:; -@@ -2095,7 +2215,7 @@ static void edit_goto_matching_bracket ( +@@ -2094,7 +2214,7 @@ static void edit_goto_matching_bracket ( * passed as -1. Commands are executed, and char_for_insertion is * inserted at the cursor. */ @@ -2168,7 +2180,7 @@ { if (command == CK_Begin_Record_Macro) { edit->macro_i = 0; -@@ -2130,7 +2250,7 @@ static const char * const shell_cmd[] = +@@ -2129,7 +2249,7 @@ static const char * const shell_cmd[] = all of them. It also does not check for the Undo command. */ void @@ -2177,7 +2189,7 @@ { edit->force |= REDRAW_LINE; -@@ -2163,7 +2283,7 @@ edit_execute_cmd (WEdit *edit, int comma +@@ -2162,7 +2282,7 @@ edit_execute_cmd (WEdit *edit, int comma } /* An ordinary key press */ @@ -2186,8 +2198,8 @@ if (edit->overwrite) { if (edit_get_byte (edit, edit->curs1) != '\n') edit_delete (edit); ---- mc-4.6.1a/edit/edit-widget.h.utf8 2005-05-04 01:40:15.000000000 +0200 -+++ mc-4.6.1a/edit/edit-widget.h 2005-05-05 09:32:02.706565328 +0200 +--- mc-4.6.1a/edit/edit-widget.h.utf8 2005-05-11 01:04:32.000000000 +0200 ++++ mc-4.6.1a/edit/edit-widget.h 2005-06-06 14:46:19.169252152 +0200 @@ -25,6 +25,11 @@ struct syntax_rule { unsigned char border; }; @@ -2200,21 +2212,25 @@ struct WEdit { Widget widget; -@@ -37,8 +42,11 @@ struct WEdit { +@@ -37,8 +42,17 @@ struct WEdit { /* dynamic buffers and cursor position for editor: */ long curs1; /* position of the cursor from the beginning of the file. */ long curs2; /* position from the end of the file */ -- char *buffers1[MAXBUFF + 1]; /* all data up to curs1 */ -- char *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */ -+ mc_wchar_t *buffers1[MAXBUFF + 1]; /* all data up to curs1 */ -+ mc_wchar_t *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */ ++#ifndef UTF8 + unsigned char *buffers1[MAXBUFF + 1]; /* all data up to curs1 */ + unsigned char *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */ ++#else /* UTF8 */ ++ mc_wchar_t *buffers1[MAXBUFF + 1]; /* all data up to curs1 */ ++ mc_wchar_t *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */ + + unsigned char charbuf[MB_LEN_MAX]; + int charpoint; ++#endif /* UTF8 */ ++ /* search variables */ long search_start; /* First character to start searching from */ -@@ -82,7 +90,7 @@ struct WEdit { +@@ -82,7 +96,7 @@ struct WEdit { /* undo stack and pointers */ unsigned long stack_pointer; @@ -2223,8 +2239,8 @@ unsigned long stack_size; unsigned long stack_size_mask; unsigned long stack_bottom; ---- mc-4.6.1a/edit/edit.h.utf8 2005-05-04 01:26:51.000000000 +0200 -+++ mc-4.6.1a/edit/edit.h 2005-05-05 09:32:02.707565176 +0200 +--- mc-4.6.1a/edit/edit.h.utf8 2005-05-27 05:35:12.000000000 +0200 ++++ mc-4.6.1a/edit/edit.h 2005-06-06 14:46:19.169252152 +0200 @@ -23,6 +23,27 @@ #ifndef MC_EDIT_H #define MC_EDIT_H @@ -2295,7 +2311,7 @@ }; struct WEdit; -@@ -116,8 +139,8 @@ void edit_done_menu (void); +@@ -117,8 +140,8 @@ void edit_reload_menu (void); void menu_save_mode_cmd (void); int edit_raw_key_query (const char *heading, const char *query, int cancel); int edit_file (const char *_file, int line); @@ -2306,7 +2322,7 @@ int edit_count_lines (WEdit * edit, long current, int upto); long edit_move_forward (WEdit * edit, long current, int lines, long upto); long edit_move_forward3 (WEdit * edit, long current, int cols, long upto); -@@ -142,11 +165,11 @@ int edit_block_delete_cmd (WEdit * edit) +@@ -143,11 +166,11 @@ int edit_block_delete_cmd (WEdit * edit) void edit_delete_line (WEdit * edit); int edit_delete (WEdit * edit); @@ -2320,7 +2336,7 @@ long edit_write_stream (WEdit * edit, FILE * f); char *edit_get_write_filter (const char *writename, const char *filename); int edit_save_confirm_cmd (WEdit * edit); -@@ -177,7 +200,7 @@ void edit_goto_cmd (WEdit * edit); +@@ -178,7 +201,7 @@ void edit_goto_cmd (WEdit * edit); int eval_marks (WEdit * edit, long *start_mark, long *end_mark); void edit_status (WEdit * edit); void edit_execute_key_command (WEdit *edit, int command, @@ -2329,7 +2345,7 @@ void edit_update_screen (WEdit * edit); int edit_print_string (WEdit * e, const char *s); void edit_move_to_line (WEdit * e, long line); -@@ -221,7 +244,7 @@ void edit_mail_dialog (WEdit *edit); +@@ -222,7 +245,7 @@ void edit_mail_dialog (WEdit *edit); void format_paragraph (WEdit *edit, int force); /* either command or char_for_insertion must be passed as -1 */ @@ -2338,9 +2354,9 @@ #define get_sys_error(s) (s) ---- mc-4.6.1a/src/help.c.utf8 2005-02-08 23:33:52.000000000 +0100 -+++ mc-4.6.1a/src/help.c 2005-05-05 09:32:02.709564872 +0200 -@@ -453,10 +453,28 @@ static void help_show (Dlg_head *h, cons +--- mc-4.6.1a/src/help.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/help.c 2005-06-06 14:46:19.170252000 +0200 +@@ -449,10 +449,28 @@ static void help_show (Dlg_head *h, cons #ifndef HAVE_SLANG addch (acs_map [c]); #else @@ -2369,7 +2385,7 @@ col++; break; } -@@ -779,6 +797,12 @@ interactive_display (const char *filenam +@@ -798,6 +816,12 @@ interactive_display (const char *filenam message (1, MSG_ERROR, _(" Cannot open file %s \n %s "), filename ? filename : hlpfile, unix_error_string (errno)); } @@ -2382,8 +2398,8 @@ if (!filename) g_free (hlpfile); ---- mc-4.6.1a/src/learn.c.utf8 2005-02-08 10:04:03.000000000 +0100 -+++ mc-4.6.1a/src/learn.c 2005-05-05 09:32:02.710564720 +0200 +--- mc-4.6.1a/src/learn.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/learn.c 2005-06-06 14:46:19.171251848 +0200 @@ -237,7 +237,7 @@ init_learn (void) learn_but[0].x = 78 / 2 + 4; @@ -2393,19 +2409,22 @@ learn_title = _(learn_title); i18n_flag = 1; ---- mc-4.6.1a/src/main.c.utf8 2005-02-08 20:59:45.000000000 +0100 -+++ mc-4.6.1a/src/main.c 2005-05-05 09:32:02.712564416 +0200 -@@ -1609,7 +1609,7 @@ update_xterm_title_path (void) +--- mc-4.6.1a/src/main.c.utf8 2005-05-29 13:54:22.000000000 +0200 ++++ mc-4.6.1a/src/main.c 2005-06-06 14:46:19.172251696 +0200 +@@ -1613,7 +1613,11 @@ update_xterm_title_path (void) if (xterm_flag && xterm_title) { p = s = g_strdup (strip_home_and_password (current_panel->cwd)); do { -- if (!is_printable (*s)) -+ if (*s < ' ') ++#ifndef UTF8 + if (!is_printable ((unsigned char) *s)) ++#else /* UTF8 */ ++ if (*s < ' ') ++#endif /* UTF8 */ *s = '?'; } while (*++s); fprintf (stdout, "\33]0;mc - %s\7", p); --- mc-4.6.1a/src/myslang.h.utf8 2005-03-19 18:27:36.000000000 +0100 -+++ mc-4.6.1a/src/myslang.h 2005-05-05 09:32:02.713564264 +0200 ++++ mc-4.6.1a/src/myslang.h 2005-06-06 14:46:19.173251544 +0200 @@ -11,6 +11,10 @@ #endif /* HAVE_SLANG_SLANG_H */ #endif @@ -2417,8 +2436,8 @@ enum { KEY_BACKSPACE = 400, KEY_END, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, ---- mc-4.6.1a/src/util.c.utf8 2005-04-13 20:47:12.000000000 +0200 -+++ mc-4.6.1a/src/util.c 2005-05-05 09:32:02.716563808 +0200 +--- mc-4.6.1a/src/util.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/util.c 2005-06-06 14:46:19.174251392 +0200 @@ -24,6 +24,9 @@ #include @@ -2857,9 +2876,9 @@ } *w = 0; return s; ---- mc-4.6.1a/src/util.h.utf8 2005-04-14 20:16:04.000000000 +0200 -+++ mc-4.6.1a/src/util.h 2005-05-05 09:32:02.717563656 +0200 -@@ -108,6 +108,13 @@ void init_uid_gid_cache (void); +--- mc-4.6.1a/src/util.h.utf8 2005-05-23 13:21:26.000000000 +0200 ++++ mc-4.6.1a/src/util.h 2005-06-06 14:46:19.175251240 +0200 +@@ -109,6 +109,13 @@ void init_uid_gid_cache (void); char *get_group (int); char *get_owner (int); @@ -2873,8 +2892,8 @@ #define MAX_I18NTIMELENGTH 14 #define MIN_I18NTIMELENGTH 10 #define STD_I18NTIMELENGTH 12 ---- mc-4.6.1a/src/widget.c.utf8 2005-02-08 23:33:52.000000000 +0100 -+++ mc-4.6.1a/src/widget.c 2005-05-05 09:32:02.720563200 +0200 +--- mc-4.6.1a/src/widget.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/widget.c 2005-06-06 14:51:52.342602104 +0200 @@ -35,6 +35,9 @@ #include "global.h" @@ -2885,7 +2904,7 @@ #include "color.h" #include "mouse.h" #include "dialog.h" -@@ -152,6 +155,11 @@ button_callback (WButton *b, widget_msg_ +@@ -153,6 +156,11 @@ button_callback (Widget *w, widget_msg_t if (b->hotpos >= 0) { attrset ((b->selected) ? HOT_FOCUSC : HOT_NORMALC); widget_move (&b->widget, 0, b->hotpos + off); @@ -2897,7 +2916,7 @@ addch ((unsigned char) b->text[b->hotpos]); } return MSG_HANDLED; -@@ -183,7 +191,7 @@ button_event (Gpm_Event *event, WButton +@@ -186,7 +194,7 @@ button_event (Gpm_Event *event, void *da static int button_len (const char *text, unsigned int flags) { @@ -2906,7 +2925,7 @@ switch (flags){ case DEFPUSH_BUTTON: ret += 6; -@@ -206,14 +214,36 @@ button_len (const char *text, unsigned i +@@ -209,14 +217,36 @@ button_len (const char *text, unsigned i * the button text is g_malloc()ed, we can safely change and shorten it. */ static void @@ -2918,37 +2937,37 @@ if (cp != NULL && cp[1] != '\0') { - g_strlcpy (cp, cp + 1, strlen (cp)); -- b->hotkey = tolower (*cp); +- b->hotkey = tolower ((unsigned char) *cp); - b->hotpos = cp - b->text; +#ifdef UTF8 + if (SLsmg_Is_Unicode) { -+ mbstate_t s; -+ int len; ++ mbstate_t s; ++ int len; + -+ *cp = '\0'; -+ memset (&s, 0, sizeof (s)); -+ len = mbrtowc (hotwcp, cp + 1, MB_CUR_MAX, &s); -+ if (len > 0) { -+ *hotposp = mbstrlen (text); -+ if (*hotposp < 0) { -+ *hotposp = -1; -+ } else { -+ /* FIXME */ -+ *hotkeyp = tolower (*hotwcp); -+ } -+ } ++ *cp = '\0'; ++ memset (&s, 0, sizeof (s)); ++ len = mbrtowc (hotwcp, cp + 1, MB_CUR_MAX, &s); ++ if (len > 0) { ++ *hotposp = mbstrlen (text); ++ if (*hotposp < 0) { ++ *hotposp = -1; ++ } else { ++ /* FIXME */ ++ *hotkeyp = tolower (*hotwcp); ++ } ++ } + } else +#endif + { -+ *hotkeyp = tolower (cp[1]); -+ *hotposp = cp - text; ++ *hotkeyp = tolower (cp[1]); ++ *hotposp = cp - text; + } + + memmove (cp, cp + 1, strlen (cp + 1) + 1); } } -@@ -235,8 +265,9 @@ button_new (int y, int x, int action, in +@@ -237,8 +267,9 @@ button_new (int y, int x, int action, in widget_want_hotkey (b->widget, 1); b->hotkey = 0; b->hotpos = -1; @@ -2959,7 +2978,7 @@ return b; } -@@ -249,14 +280,14 @@ button_get_text (WButton *b) +@@ -251,14 +282,14 @@ button_get_text (WButton *b) void button_set_text (WButton *b, const char *text) { @@ -2975,9 +2994,9 @@ - + /* Radio button widget */ - static int radio_event (Gpm_Event *event, WRadio *r); + static int radio_event (Gpm_Event *event, void *); -@@ -330,16 +361,37 @@ radio_callback (WRadio *r, int msg, int +@@ -333,16 +364,37 @@ radio_callback (Widget *w, widget_msg_t widget_move (&r->widget, i, 0); printw ("(%c) ", (r->sel == i) ? '*' : ' '); @@ -3024,7 +3043,7 @@ } return MSG_HANDLED; -@@ -375,7 +427,7 @@ radio_new (int y, int x, int count, cons +@@ -381,7 +433,7 @@ radio_new (int y, int x, int count, cons /* Compute the longest string */ max = 0; for (i = 0; i < count; i++){ @@ -3033,7 +3052,7 @@ if (m > max) max = m; } -@@ -436,6 +488,11 @@ check_callback (WCheck *c, widget_msg_t +@@ -442,6 +494,11 @@ check_callback (Widget *w, widget_msg_t if (c->hotpos >= 0) { attrset ((msg == WIDGET_FOCUS) ? HOT_FOCUSC : HOT_NORMALC); widget_move (&c->widget, 0, +c->hotpos + 4); @@ -3045,17 +3064,17 @@ addch ((unsigned char) c->text[c->hotpos]); } return MSG_HANDLED; -@@ -470,32 +527,18 @@ WCheck * +@@ -479,31 +536,17 @@ WCheck * check_new (int y, int x, int state, const char *text) { WCheck *c = g_new (WCheck, 1); - const char *s; - char *t; - +- - init_widget (&c->widget, y, x, 1, strlen (text), ++ + init_widget (&c->widget, y, x, 1, mbstrlen (text), - (callback_fn)check_callback, - (mouse_h) check_event); + check_callback, check_event); c->state = state ? C_BOOL : 0; c->text = g_strdup (text); c->hotkey = 0; @@ -3071,7 +3090,7 @@ - } - s++; - if (*s){ -- c->hotkey = tolower (*s); +- c->hotkey = tolower ((unsigned char) *s); - c->hotpos = t - c->text; - } - *t = *s; @@ -3081,7 +3100,7 @@ return c; } -@@ -537,7 +580,7 @@ label_callback (WLabel *l, int msg, int +@@ -546,7 +589,7 @@ label_callback (Widget *w, widget_msg_t } widget_move (&l->widget, y, 0); printw ("%s", p); @@ -3090,7 +3109,7 @@ if (xlen > 0) printw ("%*s", xlen, " "); if (!q) -@@ -571,7 +614,7 @@ label_set_text (WLabel *label, const cha +@@ -580,7 +623,7 @@ label_set_text (WLabel *label, const cha if (text){ label->text = g_strdup (text); if (label->auto_adjust_cols) { @@ -3099,7 +3118,7 @@ if (newcols > label->widget.cols) label->widget.cols = newcols; } -@@ -595,7 +638,7 @@ label_new (int y, int x, const char *tex +@@ -604,7 +647,7 @@ label_new (int y, int x, const char *tex if (!text || strchr(text, '\n')) width = 1; else @@ -3107,8 +3126,8 @@ + width = mbstrlen (text); l = g_new (WLabel, 1); - init_widget (&l->widget, y, x, 1, width, -@@ -744,13 +787,69 @@ static void draw_history_button (WInput + init_widget (&l->widget, y, x, 1, width, label_callback, NULL); +@@ -752,13 +795,69 @@ static void draw_history_button (WInput /* Pointer to killed data */ static char *kill_buffer = 0; @@ -3180,7 +3199,7 @@ if (should_show_history_button (in)) has_history = HISTORY_BUTTON_WIDTH; -@@ -760,7 +859,7 @@ update_input (WInput *in, int clear_firs +@@ -768,7 +867,7 @@ update_input (WInput *in, int clear_firs /* Make the point visible */ if ((in->point < in->first_shown) || @@ -3189,7 +3208,7 @@ in->first_shown = in->point - (in->field_len / 3); if (in->first_shown < 0) in->first_shown = 0; -@@ -780,14 +879,29 @@ update_input (WInput *in, int clear_firs +@@ -788,14 +887,29 @@ update_input (WInput *in, int clear_firs addch (' '); widget_move (&in->widget, 0, 0); @@ -3221,7 +3240,7 @@ if (clear_first) in->first = 0; -@@ -929,7 +1043,7 @@ char * +@@ -937,7 +1051,7 @@ char * show_hist (GList *history, int widget_x, int widget_y) { GList *hi, *z; @@ -3230,7 +3249,7 @@ int x, y, w, h; char *q, *r = 0; Dlg_head *query_dlg; -@@ -942,7 +1056,7 @@ show_hist (GList *history, int widget_x, +@@ -950,7 +1064,7 @@ show_hist (GList *history, int widget_x, z = g_list_first (history); hi = z; while (hi) { @@ -3239,7 +3258,7 @@ maxlen = i; count++; hi = g_list_next (hi); -@@ -1114,35 +1228,83 @@ new_input (WInput *in) +@@ -1122,35 +1236,83 @@ new_input (WInput *in) in->need_push = 1; in->buffer [0] = 0; in->point = 0; @@ -3284,7 +3303,7 @@ + + in->charbuf[in->charpoint++] = c_code; + -+ res = mbrlen(in->charbuf, in->charpoint, &mbs); ++ res = mbrlen((char *)in->charbuf, in->charpoint, &mbs); + if (res < 0) { + if (res != -2) in->charpoint = 0; /* broken multibyte char, skip */ + return 1; @@ -3326,7 +3345,7 @@ return MSG_HANDLED; } -@@ -1150,12 +1312,14 @@ static void +@@ -1158,12 +1320,14 @@ static void beginning_of_line (WInput *in) { in->point = 0; @@ -3342,7 +3361,7 @@ } static void -@@ -1163,37 +1327,92 @@ backward_char (WInput *in) +@@ -1171,18 +1335,21 @@ backward_char (WInput *in) { if (in->point) in->point--; @@ -3359,14 +3378,14 @@ } static void - forward_word (WInput *in) + forward_word (WInput * in) { +#ifndef UTF8 - unsigned char *p = in->buffer+in->point; -- - while (*p && (isspace (*p) || ispunct (*p))) - p++; - while (*p && isalnum (*p)) + char *p = in->buffer + in->point; + + while (*p +@@ -1192,11 +1359,39 @@ forward_word (WInput * in) + while (*p && isalnum ((unsigned char) *p)) p++; in->point = p - in->buffer; +#else /* UTF8 */ @@ -3375,23 +3394,23 @@ + memset (&mbs, 0, sizeof (mbs)); + + while (in->point < len) { -+ wchar_t c; -+ char *p = in->buffer + charpos(in,in->point); -+ size_t res = mbrtowc(&c, p, strlen(p), &mbs); -+ if (res <= 0 || !(iswspace (c) || iswpunct (c))) -+ break; -+ in->point++; ++ wchar_t c; ++ char *p = in->buffer + charpos(in,in->point); ++ size_t res = mbrtowc(&c, p, strlen(p), &mbs); ++ if (res <= 0 || !(iswspace (c) || iswpunct (c))) ++ break; ++ in->point++; + } + + memset (&mbs, 0, sizeof (mbs)); + + while (in->point < len) { -+ wchar_t c; -+ char *p = in->buffer + charpos(in,in->point); -+ size_t res = mbrtowc(&c, p, strlen(p), &mbs); -+ if (res <= 0 || !iswalnum (c)) -+ break; -+ in->point++; ++ wchar_t c; ++ char *p = in->buffer + charpos(in,in->point); ++ size_t res = mbrtowc(&c, p, strlen(p), &mbs); ++ if (res <= 0 || !iswalnum (c)) ++ break; ++ in->point++; + } + + in->charpoint = 0; @@ -3402,11 +3421,11 @@ backward_word (WInput *in) { +#ifndef UTF8 - unsigned char *p = in->buffer+in->point; -- - while (p-1 > in->buffer-1 && (isspace (*(p-1)) || ispunct (*(p-1)))) - p--; - while (p-1 > in->buffer-1 && isalnum (*(p-1))) + char *p = in->buffer + in->point; + + while (p - 1 > in->buffer - 1 && (isspace ((unsigned char) *(p - 1)) +@@ -1206,6 +1401,32 @@ backward_word (WInput *in) + while (p - 1 > in->buffer - 1 && isalnum ((unsigned char) *(p - 1))) p--; in->point = p - in->buffer; +#else /* UTF8 */ @@ -3414,23 +3433,23 @@ + + memset (&mbs, 0, sizeof (mbs)); + while (in->point > 0) { -+ wchar_t c; -+ char *p = in->buffer + charpos(in,in->point); -+ size_t res = mbrtowc(&c, p, strlen(p), &mbs); -+ if (*p && (res <= 0 || !(iswspace (c) || iswpunct (c)))) -+ break; -+ in->point--; ++ wchar_t c; ++ char *p = in->buffer + charpos(in,in->point); ++ size_t res = mbrtowc(&c, p, strlen(p), &mbs); ++ if (*p && (res <= 0 || !(iswspace (c) || iswpunct (c)))) ++ break; ++ in->point--; + } + + memset (&mbs, 0, sizeof (mbs)); + + while (in->point > 0) { -+ wchar_t c; -+ char *p = in->buffer + charpos(in,in->point); -+ size_t res = mbrtowc(&c, p, strlen(p), &mbs); -+ if (*p && (res <= 0 || !iswalnum (c))) -+ break; -+ in->point--; ++ wchar_t c; ++ char *p = in->buffer + charpos(in,in->point); ++ size_t res = mbrtowc(&c, p, strlen(p), &mbs); ++ if (*p && (res <= 0 || !iswalnum (c))) ++ break; ++ in->point--; + } + + in->charpoint = 0; @@ -3438,7 +3457,7 @@ } static void -@@ -1226,8 +1445,9 @@ backward_delete (WInput *in) +@@ -1238,8 +1459,9 @@ backward_delete (WInput *in) if (!in->point) return; @@ -3450,7 +3469,7 @@ in->need_push = 1; in->point--; } -@@ -1235,10 +1455,8 @@ backward_delete (WInput *in) +@@ -1247,10 +1469,8 @@ backward_delete (WInput *in) static void delete_char (WInput *in) { @@ -3463,7 +3482,7 @@ in->need_push = 1; } -@@ -1253,6 +1471,9 @@ copy_region (WInput *in, int x_first, in +@@ -1265,6 +1485,9 @@ copy_region (WInput *in, int x_first, in g_free (kill_buffer); @@ -3473,7 +3492,7 @@ kill_buffer = g_strndup(in->buffer+first,last-first); } -@@ -1261,11 +1482,13 @@ delete_region (WInput *in, int x_first, +@@ -1273,11 +1496,13 @@ delete_region (WInput *in, int x_first, { int first = min (x_first, x_last); int last = max (x_first, x_last); @@ -3489,7 +3508,7 @@ in->need_push = 1; } -@@ -1282,6 +1505,8 @@ kill_word (WInput *in) +@@ -1294,6 +1519,8 @@ kill_word (WInput *in) copy_region (in, old_point, new_point); delete_region (in, old_point, new_point); in->need_push = 1; @@ -3498,7 +3517,7 @@ } static void -@@ -1325,16 +1550,20 @@ yank (WInput *in) +@@ -1337,16 +1564,20 @@ yank (WInput *in) if (!kill_buffer) return; @@ -3521,7 +3540,7 @@ } void -@@ -1344,9 +1573,10 @@ assign_text (WInput *in, const char *tex +@@ -1356,9 +1587,10 @@ assign_text (WInput *in, const char *tex g_free (in->buffer); in->buffer = g_strdup (text); /* was in->buffer->text */ in->current_max_len = strlen (in->buffer) + 1; @@ -3533,7 +3552,7 @@ } static void -@@ -1473,6 +1703,7 @@ port_region_marked_for_delete (WInput *i +@@ -1485,6 +1717,7 @@ port_region_marked_for_delete (WInput *i *in->buffer = 0; in->point = 0; in->first = 0; @@ -3541,7 +3560,7 @@ } cb_ret_t -@@ -1501,7 +1732,11 @@ handle_char (WInput *in, int c_code) +@@ -1513,7 +1746,11 @@ handle_char (WInput *in, int c_code) } } if (!input_map [i].fn){ @@ -3553,7 +3572,7 @@ return MSG_NOT_HANDLED; if (in->first){ port_region_marked_for_delete (in); -@@ -1535,6 +1770,9 @@ input_set_point (WInput *in, int pos) +@@ -1547,6 +1784,9 @@ input_set_point (WInput *in, int pos) if (pos != in->point) free_completions (in); in->point = pos; @@ -3563,7 +3582,7 @@ update_input (in, 1); } -@@ -1574,7 +1812,7 @@ input_callback (WInput *in, widget_msg_t +@@ -1587,7 +1827,7 @@ input_callback (Widget *w, widget_msg_t return MSG_HANDLED; case WIDGET_CURSOR: @@ -3572,7 +3591,7 @@ return MSG_HANDLED; case WIDGET_DESTROY: -@@ -1596,7 +1834,7 @@ input_event (Gpm_Event * event, WInput * +@@ -1611,7 +1851,7 @@ input_event (Gpm_Event * event, void *da && should_show_history_button (in)) { do_show_hist (in); } else { @@ -3581,7 +3600,7 @@ if (event->x - in->first_shown - 1 < in->point) in->point = event->x - in->first_shown - 1; if (in->point < 0) -@@ -1654,7 +1892,8 @@ input_new (int y, int x, int color, int +@@ -1668,7 +1908,8 @@ input_new (int y, int x, int color, int in->is_password = 0; strcpy (in->buffer, def_text); @@ -3591,8 +3610,8 @@ return in; } ---- mc-4.6.1a/src/dialog.c.utf8 2005-02-08 19:25:31.000000000 +0100 -+++ mc-4.6.1a/src/dialog.c 2005-05-05 09:32:02.722562896 +0200 +--- mc-4.6.1a/src/dialog.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/dialog.c 2005-06-06 14:46:19.178250784 +0200 @@ -166,7 +166,7 @@ common_dialog_repaint (struct Dlg_head * if (h->title) { @@ -3602,8 +3621,8 @@ addstr (h->title); } } ---- mc-4.6.1a/src/hotlist.c.utf8 2005-02-08 10:04:03.000000000 +0100 -+++ mc-4.6.1a/src/hotlist.c 2005-05-05 09:32:02.724562592 +0200 +--- mc-4.6.1a/src/hotlist.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/hotlist.c 2005-06-06 14:46:19.180250480 +0200 @@ -555,7 +555,7 @@ init_i18n_stuff(int list_type, int cols) row = hotlist_but [i].y; @@ -3664,8 +3683,8 @@ char *label_string = g_strdup (current_panel->cwd); strip_password (label_string, 1); ---- mc-4.6.1a/src/panelize.c.utf8 2005-02-08 10:04:03.000000000 +0100 -+++ mc-4.6.1a/src/panelize.c 2005-05-05 09:32:02.725562440 +0200 +--- mc-4.6.1a/src/panelize.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/panelize.c 2005-06-06 14:46:19.180250480 +0200 @@ -127,7 +127,7 @@ init_panelize (void) i = sizeof (panelize_but) / sizeof (panelize_but[0]); while (i--) { @@ -3690,9 +3709,9 @@ #endif /* ENABLE_NLS */ ---- mc-4.6.1a/src/layout.c.utf8 2005-04-14 20:24:02.000000000 +0200 -+++ mc-4.6.1a/src/layout.c 2005-05-05 09:32:02.728561984 +0200 -@@ -370,36 +370,36 @@ init_layout (void) +--- mc-4.6.1a/src/layout.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/layout.c 2005-06-06 14:46:19.182250176 +0200 +@@ -369,36 +369,36 @@ init_layout (void) while (i--) { s_split_direction[i] = _(s_split_direction[i]); @@ -3736,7 +3755,7 @@ if (l1 > second_width) second_width = l1; } -@@ -413,14 +413,14 @@ init_layout (void) +@@ -412,14 +412,14 @@ init_layout (void) * * Now the last thing to do - properly space buttons... */ @@ -3756,7 +3775,7 @@ i18n_layt_flag = 1; } -@@ -688,7 +688,7 @@ setup_panels (void) +@@ -687,7 +687,7 @@ setup_panels (void) panel_do_cols (0); panel_do_cols (1); @@ -3766,7 +3785,7 @@ widget_set_size (&the_menubar->widget, 0, 0, 1, COLS); --- mc-4.6.1a/src/menu.h.utf8 2004-12-03 20:17:47.000000000 +0100 -+++ mc-4.6.1a/src/menu.h 2005-05-05 09:32:02.729561832 +0200 ++++ mc-4.6.1a/src/menu.h 2005-06-06 14:46:19.182250176 +0200 @@ -21,6 +21,8 @@ typedef struct Menu { menu_entry *entries; int start_x; /* position relative to menubar start */ @@ -3776,8 +3795,8 @@ } Menu; extern int menubar_visible; ---- mc-4.6.1a/src/screen.c.utf8 2005-05-03 17:16:57.000000000 +0200 -+++ mc-4.6.1a/src/screen.c 2005-05-05 09:32:02.732561376 +0200 +--- mc-4.6.1a/src/screen.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/screen.c 2005-06-06 14:46:19.184249872 +0200 @@ -171,22 +171,59 @@ add_permission_string (char *dest, int w static const char * string_file_name (file_entry *fe, int len) @@ -4082,7 +4101,7 @@ if (!isstatus && panel->split){ if (second_column) -@@ -1093,6 +1200,12 @@ paint_frame (WPanel *panel) +@@ -1092,6 +1199,12 @@ paint_frame (WPanel *panel) int side, width; const char *txt; @@ -4095,7 +4114,7 @@ if (!panel->split) adjust_top_file (panel); -@@ -1117,16 +1230,37 @@ paint_frame (WPanel *panel) +@@ -1116,16 +1229,37 @@ paint_frame (WPanel *panel) if (format->string_fn){ txt = format->title; @@ -4135,17 +4154,17 @@ } else { attrset (NORMAL_COLOR); one_vline (); ---- mc-4.6.1a/src/file.c.utf8 2005-02-08 10:04:03.000000000 +0100 -+++ mc-4.6.1a/src/file.c 2005-05-05 09:32:02.735560920 +0200 -@@ -165,15 +165,20 @@ static const unsigned char * - do_transform_source (FileOpContext *ctx, const unsigned char *source) +--- mc-4.6.1a/src/file.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/file.c 2005-06-06 14:46:19.185249720 +0200 +@@ -164,15 +164,20 @@ static const char * + do_transform_source (FileOpContext *ctx, const char *source) { size_t j, k, l, len; -- unsigned const char *fnsource = x_basename (source); -+ unsigned char *fnsource = g_strdup(x_basename (source)); +- const char *fnsource = x_basename (source); ++ char *fnsource = g_strdup(x_basename (source)); int next_reg; enum CaseConvs case_conv = NO_CONV; - static unsigned char fntarget[MC_MAXPATHLEN]; + static char fntarget[MC_MAXPATHLEN]; +#ifdef UTF8 + fix_utf8(fnsource); @@ -4155,11 +4174,11 @@ j = re_match (&ctx->rx, fnsource, len, 0, &ctx->regs); if (j != len) { transform_error = FILE_SKIP; -+ g_free(fnsource); ++ g_free(fnsource); return NULL; } for (next_reg = 1, j = 0, k = 0; j < strlen (ctx->dest_mask); j++) { -@@ -217,6 +222,7 @@ do_transform_source (FileOpContext *ctx, +@@ -216,6 +221,7 @@ do_transform_source (FileOpContext *ctx, || ctx->regs.start[next_reg] < 0) { message (1, MSG_ERROR, _(" Invalid target mask ")); transform_error = FILE_ABORT; @@ -4167,7 +4186,7 @@ return NULL; } for (l = (size_t) ctx->regs.start[next_reg]; -@@ -231,6 +237,7 @@ do_transform_source (FileOpContext *ctx, +@@ -230,6 +236,7 @@ do_transform_source (FileOpContext *ctx, } } fntarget[k] = 0; @@ -4175,8 +4194,8 @@ return fntarget; } ---- mc-4.6.1a/src/view.c.utf8 2005-04-27 20:39:21.000000000 +0200 -+++ mc-4.6.1a/src/view.c 2005-05-05 09:31:08.000000000 +0200 +--- mc-4.6.1a/src/view.c.utf8 2005-06-06 01:43:49.000000000 +0200 ++++ mc-4.6.1a/src/view.c 2005-06-06 14:46:19.188249264 +0200 @@ -43,6 +43,10 @@ #include #include @@ -4188,7 +4207,7 @@ #include "global.h" #include "tty.h" #include "cmd.h" /* For view_other_cmd */ -@@ -773,7 +777,7 @@ view_status (WView *view) +@@ -1410,7 +1414,7 @@ view_status (WView *view) if (!i18n_adjust) { file_label = _("File: %s"); @@ -4197,7 +4216,7 @@ } if (w < i18n_adjust + 6) -@@ -830,7 +834,11 @@ view_display_clean (WView *view, int hei +@@ -1472,7 +1476,11 @@ view_display_clean (WView *view, int hei widget_erase ((Widget *) view); } @@ -4209,7 +4228,7 @@ #define view_add_one_vline() one_vline() #define view_add_string(view,s) addstr (s) #define view_gotoyx(v,r,c) widget_move (v,r,c) -@@ -1049,6 +1057,12 @@ display (WView *view) +@@ -1690,7 +1698,43 @@ display (WView *view) view_place_cursor (view); } else { for (; row < bottom && (c = get_byte (view, from)) != -1; from++) { @@ -4219,13 +4238,6 @@ + int mblen; + wchar_t wc; +#endif /* UTF8 */ - if ((c == '\n') || (col >= right && view->text_wrap_mode)) { - col = left; - row++; -@@ -1061,7 +1075,37 @@ display (WView *view) - col = ((col - left) / 8) * 8 + 8 + left; - continue; - } +#ifndef UTF8 if (view->text_nroff_mode && c == '\b') { +#else /* UTF8 */ @@ -4260,9 +4272,9 @@ int c_prev; int c_next; -@@ -1102,12 +1146,23 @@ display (WView *view) - && col < right + view->dpy_text_start_col) { - view_gotoyx (view, row, col - view->dpy_text_start_col); +@@ -1745,12 +1789,23 @@ display (WView *view) + && (unsigned int) col < right + view->dpy_text_column) { + view_gotoyx (view, row, col - view->dpy_text_column); +#ifndef UTF8 c = convert_to_display_c (c); @@ -4286,8 +4298,8 @@ } col++; if (boldflag != MARK_NORMAL) { ---- mc-4.6.1a/src/wtools.c.utf8 2005-02-08 23:33:52.000000000 +0100 -+++ mc-4.6.1a/src/wtools.c 2005-05-05 09:32:02.738560464 +0200 +--- mc-4.6.1a/src/wtools.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/wtools.c 2005-06-06 14:46:19.189249112 +0200 @@ -49,11 +49,11 @@ create_listbox_window (int cols, int lin /* Adjust sizes */ lines = (lines > LINES - 6) ? LINES - 6 : lines; @@ -4347,8 +4359,8 @@ quick_widgets[0].x_divisions = quick_widgets[1].x_divisions = len; #endif /* ENABLE_NLS */ ---- mc-4.6.1a/src/find.c.utf8 2005-02-08 23:33:52.000000000 +0100 -+++ mc-4.6.1a/src/find.c 2005-05-05 09:32:02.739560312 +0200 +--- mc-4.6.1a/src/find.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/find.c 2005-06-06 14:46:19.190248960 +0200 @@ -217,7 +217,7 @@ find_parameters (char **start_dir, char int l1, maxlen = 0; @@ -4387,8 +4399,8 @@ fbuts[2].len += 2; /* DEFPUSH_BUTTON */ i18n_flag = 1; } ---- mc-4.6.1a/src/widget.h.utf8 2005-02-08 10:58:40.000000000 +0100 -+++ mc-4.6.1a/src/widget.h 2005-05-05 09:32:02.740560160 +0200 +--- mc-4.6.1a/src/widget.h.utf8 2005-05-24 13:50:12.000000000 +0200 ++++ mc-4.6.1a/src/widget.h 2005-06-06 14:46:19.191248808 +0200 @@ -22,6 +22,7 @@ typedef struct WButton { char *text; /* text of button */ int hotkey; /* hot KEY */ @@ -4414,16 +4426,16 @@ - int first_shown; /* Index of the first shown character */ - int current_max_len; /* Maximum length of input line */ - int field_len; /* Length of the editing field */ -+ int point; /* cursor position in the input line (mb chars)*/ -+ int mark; /* The mark position (mb chars)*/ -+ int first_shown; /* Index of the first shown character (mb chars)*/ -+ int current_max_len; /* Maximum length of input line (bytes)*/ -+ int field_len; /* Length of the editing field (mb chars)*/ ++ int point; /* cursor position in the input line (mb chars) */ ++ int mark; /* The mark position (mb chars) */ ++ int first_shown; /* Index of the first shown character (mb chars) */ ++ int current_max_len; /* Maximum length of input line (bytes) */ ++ int field_len; /* Length of the editing field (mb chars) */ int color; /* color used */ int first; /* Is first keystroke? */ int disable_update; /* Do we want to skip updates? */ int is_password; /* Is this a password input line? */ - unsigned char *buffer; /* pointer to editing buffer */ + char *buffer; /* pointer to editing buffer */ +#ifdef UTF8 + unsigned char charbuf[MB_LEN_MAX]; +#endif /* UTF8 */ @@ -4431,8 +4443,8 @@ GList *history; /* The history */ int need_push; /* need to push the current Input on hist? */ char **completions; /* Possible completions array */ ---- mc-4.6.1a/src/boxes.c.utf8 2005-02-08 10:04:03.000000000 +0100 -+++ mc-4.6.1a/src/boxes.c 2005-05-05 09:32:02.742559856 +0200 +--- mc-4.6.1a/src/boxes.c.utf8 2005-05-29 14:10:08.000000000 +0200 ++++ mc-4.6.1a/src/boxes.c 2005-06-06 14:46:19.192248656 +0200 @@ -153,23 +153,23 @@ display_init (int radio_sel, char *init_ display_title = _(display_title); for (i = 0; i < LIST_TYPES; i++) { @@ -4551,7 +4563,7 @@ NORMAL_BUTTON, cpname, sel_charset_button)); return dbits_dlg; -@@ -806,7 +806,7 @@ cd_dialog (void) +@@ -811,7 +811,7 @@ cd_dialog (void) quick_widgets [1].y_divisions = quick_widgets [0].y_divisions = Quick_input.ylen = 5; @@ -4560,7 +4572,7 @@ quick_widgets [0].relative_x = quick_widgets [1].relative_x + len + 1; -@@ -965,7 +965,7 @@ jobs_cmd (void) +@@ -970,7 +970,7 @@ jobs_cmd (void) { job_buttons [i].name = _(job_buttons [i].name); @@ -4569,7 +4581,7 @@ JOBS_X = max (JOBS_X, startx + len + 3); job_buttons [i].xpos = startx; -@@ -974,7 +974,7 @@ jobs_cmd (void) +@@ -979,7 +979,7 @@ jobs_cmd (void) /* Last button - Ok a.k.a. Cancel :) */ job_buttons [n_buttons - 1].xpos = @@ -4578,7 +4590,7 @@ i18n_flag = 1; } -@@ -1032,7 +1032,7 @@ vfs_smb_get_authinfo (const char *host, +@@ -1037,7 +1037,7 @@ vfs_smb_get_authinfo (const char *host, while (i--) { @@ -4587,7 +4599,7 @@ if (l1 > maxlen) maxlen = l1; } -@@ -1042,7 +1042,7 @@ vfs_smb_get_authinfo (const char *host, +@@ -1047,7 +1047,7 @@ vfs_smb_get_authinfo (const char *host, for (i = sizeof(buts)/sizeof(buts[0]), l1 = 0; i--; ) { @@ -4596,7 +4608,7 @@ } l1 += 15; if (l1 > dialog_x) -@@ -1051,7 +1051,7 @@ vfs_smb_get_authinfo (const char *host, +@@ -1056,7 +1056,7 @@ vfs_smb_get_authinfo (const char *host, ilen = dialog_x - 7 - maxlen; /* for the case of very long buttons :) */ istart = dialog_x - 3 - ilen; @@ -4605,8 +4617,8 @@ i18n_flag = 1; } ---- mc-4.6.1a/src/achown.c.utf8 2005-03-17 23:03:31.000000000 +0100 -+++ mc-4.6.1a/src/achown.c 2005-05-05 09:32:02.743559704 +0200 +--- mc-4.6.1a/src/achown.c.utf8 2005-05-27 05:35:14.000000000 +0200 ++++ mc-4.6.1a/src/achown.c 2005-06-06 14:46:19.193248504 +0200 @@ -579,6 +579,12 @@ init_chown_advanced (void) b_att[2] = button_new (XTRACT (6)); b_user = button_new (XTRACT (5)); @@ -4620,8 +4632,8 @@ add_widget (ch_dlg, b_group); add_widget (ch_dlg, b_user); ---- mc-4.6.1a/src/menu.c.utf8 2005-02-08 10:04:03.000000000 +0100 -+++ mc-4.6.1a/src/menu.c 2005-05-05 09:32:02.744559552 +0200 +--- mc-4.6.1a/src/menu.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/menu.c 2005-06-06 14:46:19.194248352 +0200 @@ -22,6 +22,7 @@ #include @@ -4651,10 +4663,10 @@ + memset (&s, 0, sizeof (s)); + wlen = mbsrtowcs (NULL, &str, -1, &s); + if (wlen > 0) -+ ++wlen; ++ ++wlen; + else { -+ wlen = 0; -+ memset (&s, 0, sizeof (s)); ++ wlen = 0; ++ memset (&s, 0, sizeof (s)); + } + } +#endif @@ -4663,30 +4675,30 @@ register menu_entry* mp; for (mp = entries; count--; mp++) { if (mp->text[0] != '\0') { -+ int len; ++ int len; #ifdef ENABLE_NLS mp->text = _(mp->text); #endif /* ENABLE_NLS */ cp = strchr (mp->text,'&'); +#ifdef UTF8 -+ if (SLsmg_Is_Unicode) { -+ len = mbstrlen(mp->text) + 1; -+ wlen += len; -+ menu->max_entry_len = max (len - 1, menu->max_entry_len); -+ } else ++ if (SLsmg_Is_Unicode) { ++ len = mbstrlen(mp->text) + 1; ++ wlen += len; ++ menu->max_entry_len = max (len - 1, menu->max_entry_len); ++ } else +#endif -+ len = strlen (mp->text); ++ len = strlen (mp->text); + if (cp != NULL && *(cp+1) != '\0') { - mp->hot_key = tolower (*(cp+1)); + mp->hot_key = tolower ((unsigned char) *(cp+1)); - menu->max_entry_len = max ((int) (strlen (mp->text) - 1), - menu->max_entry_len); -+ menu->max_entry_len = max (len - 1, menu->max_entry_len); ++ menu->max_entry_len = max (len - 1, menu->max_entry_len); } else { - menu->max_entry_len = max ((int) strlen (mp->text), - menu->max_entry_len); -+ menu->max_entry_len = max (len, menu->max_entry_len); ++ menu->max_entry_len = max (len, menu->max_entry_len); } } } @@ -4732,7 +4744,7 @@ menu_scan_hotkey(menu); menu->start_x = 0; @@ -112,8 +176,26 @@ static void menubar_paint_idx (WMenu *me - const unsigned char *text; + const char *text; addch((unsigned char)menu->entries [idx].first_letter); - for (text = menu->entries [idx].text; *text; text++) @@ -4784,7 +4796,7 @@ } if (menubar->dropped) -@@ -492,7 +580,13 @@ menubar_arrange(WMenu* menubar) +@@ -495,7 +583,13 @@ menubar_arrange(WMenu* menubar) for (i = 0; i < items; i++) { @@ -4799,7 +4811,7 @@ menubar->menu[i]->start_x = start_x; start_x += len + gap; } -@@ -505,7 +599,13 @@ menubar_arrange(WMenu* menubar) +@@ -508,7 +602,13 @@ menubar_arrange(WMenu* menubar) for (i = 0; i < items; i++) { /* preserve length here, to be used below */ @@ -4814,7 +4826,7 @@ } gap /= (items - 1); -@@ -529,6 +629,9 @@ menubar_arrange(WMenu* menubar) +@@ -532,6 +632,9 @@ menubar_arrange(WMenu* menubar) void destroy_menu (Menu *menu) { @@ -4824,8 +4836,8 @@ g_free (menu->name); g_free (menu->help_node); g_free (menu); ---- mc-4.6.1a/src/option.c.utf8 2005-02-08 10:04:03.000000000 +0100 -+++ mc-4.6.1a/src/option.c 2005-05-05 09:32:02.745559400 +0200 +--- mc-4.6.1a/src/option.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/option.c 2005-06-06 14:46:19.195248200 +0200 @@ -123,12 +123,12 @@ init_configure (void) title2 = _(" Pause after run... "); title3 = _(" Other options "); @@ -4873,8 +4885,8 @@ i18n_config_flag = 1; } ---- mc-4.6.1a/src/filegui.c.utf8 2005-02-08 10:04:03.000000000 +0100 -+++ mc-4.6.1a/src/filegui.c 2005-05-05 09:32:02.746559248 +0200 +--- mc-4.6.1a/src/filegui.c.utf8 2005-05-27 05:35:15.000000000 +0200 ++++ mc-4.6.1a/src/filegui.c 2005-06-06 14:46:19.196248048 +0200 @@ -65,6 +65,7 @@ #include "filegui.h" #include "key.h" /* get_event */ @@ -5020,8 +5032,8 @@ + g_free(def_text); return dest_dir; } ---- mc-4.6.1a/acinclude.m4.utf8 2005-04-26 19:29:58.000000000 +0200 -+++ mc-4.6.1a/acinclude.m4 2005-05-05 09:32:02.747559096 +0200 +--- mc-4.6.1a/acinclude.m4.utf8 2005-05-11 23:56:57.000000000 +0200 ++++ mc-4.6.1a/acinclude.m4 2005-06-06 14:46:19.197247896 +0200 @@ -769,14 +769,14 @@ AC_DEFUN([MC_WITH_SLANG], [ fi diff --git a/mc.spec b/mc.spec index 5c57b91..ae50cd4 100644 --- a/mc.spec +++ b/mc.spec @@ -1,12 +1,12 @@ Summary: User-friendly text console file manager and visual shell. Name: mc Version: 4.6.1a -Release: 0.9 +Release: 0.10 Epoch: 1 License: GPL Group: System Environment/Shells #Source0: http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-%{version}.tar.gz -%define date 20050504 +%define date 20050606 Source0: mc-%{version}-%{date}.tar.bz2 URL: http://www.ibiblio.org/mc/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -19,9 +19,9 @@ Patch1: mc-extensions.patch Patch2: mc-promptfix.patch Patch3: mc-uglydir.patch Patch4: mc-fish-upload.patch -Patch5: mc-spaceprompt.patch -Patch6: mc-userhost.patch -Patch7: mc-64bit.patch +Patch5: mc-userhost.patch +Patch6: mc-64bit.patch +Patch7: mc-fixes.patch %description Midnight Commander is a visual shell much like a file manager, only @@ -38,9 +38,9 @@ poke into RPMs for specific files. %patch2 -p1 -b .promptfix %patch3 -p1 -b .uglydir %patch4 -p1 -b .fish-upload -%patch5 -p1 -b .spaceprompt -%patch6 -p1 -b .userhost -%patch7 -p1 -b .64bit +%patch5 -p1 -b .userhost +%patch6 -p1 -b .64bit +%patch7 -p1 -b .fixes # convert files in /lib to UTF-8 pushd lib @@ -102,7 +102,7 @@ done popd %build -export CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $RPM_OPT_FLAGS -Wno-pointer-sign" +export CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $RPM_OPT_FLAGS" %configure --with-screen=slang \ --host=%{_host} --build=%{_build} \ --target=%{_target_platform} \ @@ -174,6 +174,13 @@ rm -rf $RPM_BUILD_ROOT %dir %{_datadir}/mc %changelog +* Wed Jun 06 2005 Jindrich Novy 4.6.1a-0.10 +- update from CVS +- sync with .utf8 patch and some minor gcc4 fixups +- add .fixes patch +- drop upstreamed .spaceprompt patch +- update .userhost, .64bit patch + * Thu May 04 2005 Jindrich Novy 4.6.1a-0.9 - update from CVS - sync with .utf8 patch diff --git a/sources b/sources index f01f778..ada2725 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0b513e4ddd5ac05d7ab444b6465f92d9 mc-4.6.1a-20050504.tar.bz2 +4d84248d7aa985aee2ecaf89e1b779cc mc-4.6.1a-20050606.tar.bz2