-
diff -urN mc-4.7.1-old/lib/global.h mc-4.7.1-new/lib/global.h
old
|
new
|
|
114 | 114 | #define BUF_SMALL 128 |
115 | 115 | #define BUF_TINY 64 |
116 | 116 | |
117 | | void refresh_screen (void *); |
118 | | |
119 | 117 | /* AIX compiler doesn't understand '\e' */ |
120 | 118 | #define ESC_CHAR '\033' |
121 | 119 | #define ESC_STR "\033" |
-
diff -urN mc-4.7.1-old/lib/mcconfig/get.c mc-4.7.1-new/lib/mcconfig/get.c
old
|
new
|
|
202 | 202 | } |
203 | 203 | |
204 | 204 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ |
205 | | |
206 | | gboolean * |
207 | | mc_config_get_bool_list (mc_config_t * mc_config, const gchar * group, |
208 | | const gchar * param, gsize * length) |
209 | | { |
210 | | if (!mc_config || !group || !param) |
211 | | return NULL; |
212 | | |
213 | | return g_key_file_get_boolean_list (mc_config->handle, group, param, |
214 | | length, NULL); |
215 | | } |
216 | | |
217 | | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ |
218 | | |
219 | | int * |
220 | | mc_config_get_int_list (mc_config_t * mc_config, const gchar * group, |
221 | | const gchar * param, gsize * length) |
222 | | { |
223 | | if (!mc_config || !group || !param) |
224 | | return NULL; |
225 | | |
226 | | return g_key_file_get_integer_list (mc_config->handle, group, param, |
227 | | length, NULL); |
228 | | } |
229 | | |
230 | | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ |
-
diff -urN mc-4.7.1-old/lib/mcconfig/set.c mc-4.7.1-new/lib/mcconfig/set.c
old
|
new
|
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ |
147 | | |
148 | | |
149 | | void |
150 | | mc_config_set_bool_list (mc_config_t * mc_config, const gchar * group, |
151 | | const gchar * param, gboolean value[], gsize length) |
152 | | { |
153 | | if (!mc_config || !group || !param || !value || length == 0) |
154 | | return; |
155 | | |
156 | | g_key_file_set_boolean_list (mc_config->handle, group, param, value, |
157 | | length); |
158 | | } |
159 | | |
160 | | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ |
161 | | |
162 | | void |
163 | | mc_config_set_int_list (mc_config_t * mc_config, const gchar * group, |
164 | | const gchar * param, int value[], gsize length) |
165 | | { |
166 | | if (!mc_config || !group || !param || !value || length == 0) |
167 | | return; |
168 | | |
169 | | g_key_file_set_integer_list (mc_config->handle, group, param, value, |
170 | | length); |
171 | | } |
172 | | |
173 | | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ |
-
diff -urN mc-4.7.1-old/lib/mcconfig.h mc-4.7.1-new/lib/mcconfig.h
old
|
new
|
|
57 | 57 | |
58 | 58 | gchar **mc_config_get_string_list (mc_config_t *, const gchar *, const gchar *, gsize *); |
59 | 59 | |
60 | | gboolean *mc_config_get_bool_list (mc_config_t *, const gchar *, const gchar *, gsize *); |
61 | | |
62 | | int *mc_config_get_int_list (mc_config_t *, const gchar *, const gchar *, gsize *); |
63 | | |
64 | 60 | |
65 | 61 | /* mcconfig/set.c: */ |
66 | 62 | |
… |
… |
|
79 | 75 | mc_config_set_string_list (mc_config_t *, const gchar *, |
80 | 76 | const gchar *, const gchar * const[], gsize); |
81 | 77 | |
82 | | void |
83 | | mc_config_set_bool_list (mc_config_t *, const gchar *, const gchar *, gboolean[], gsize); |
84 | | |
85 | | void |
86 | | mc_config_set_int_list (mc_config_t *, const gchar *, const gchar *, int[], gsize); |
87 | | |
88 | 78 | |
89 | 79 | /* mcconfig/dialog.c: */ |
90 | 80 | |
-
diff -urN mc-4.7.1-old/lib/search/search.c mc-4.7.1-new/lib/search/search.c
old
|
new
|
|
387 | 387 | } |
388 | 388 | |
389 | 389 | /* --------------------------------------------------------------------------------------------- */ |
390 | | |
391 | | int |
392 | | mc_search_getstart_rezult_by_num (mc_search_t * lc_mc_search, int lc_index) |
393 | | { |
394 | | if (!lc_mc_search) |
395 | | return 0; |
396 | | if (lc_mc_search->search_type == MC_SEARCH_T_NORMAL) |
397 | | return 0; |
398 | | #ifdef SEARCH_TYPE_GLIB |
399 | | { |
400 | | gint start_pos; |
401 | | gint end_pos; |
402 | | g_match_info_fetch_pos (lc_mc_search->regex_match_info, lc_index, &start_pos, &end_pos); |
403 | | return (int) start_pos; |
404 | | } |
405 | | #else /* SEARCH_TYPE_GLIB */ |
406 | | return lc_mc_search->iovector[lc_index * 2]; |
407 | | #endif /* SEARCH_TYPE_GLIB */ |
408 | | |
409 | | } |
410 | | |
411 | | /* --------------------------------------------------------------------------------------------- */ |
412 | | |
413 | | int |
414 | | mc_search_getend_rezult_by_num (mc_search_t * lc_mc_search, int lc_index) |
415 | | { |
416 | | if (!lc_mc_search) |
417 | | return 0; |
418 | | if (lc_mc_search->search_type == MC_SEARCH_T_NORMAL) |
419 | | return 0; |
420 | | #ifdef SEARCH_TYPE_GLIB |
421 | | { |
422 | | gint start_pos; |
423 | | gint end_pos; |
424 | | g_match_info_fetch_pos (lc_mc_search->regex_match_info, lc_index, &start_pos, &end_pos); |
425 | | return (int) end_pos; |
426 | | } |
427 | | #else /* SEARCH_TYPE_GLIB */ |
428 | | return lc_mc_search->iovector[lc_index * 2 + 1]; |
429 | | #endif /* SEARCH_TYPE_GLIB */ |
430 | | |
431 | | } |
432 | | |
433 | | /* --------------------------------------------------------------------------------------------- */ |
-
diff -urN mc-4.7.1-old/lib/search.h mc-4.7.1-new/lib/search.h
old
|
new
|
|
140 | 140 | |
141 | 141 | gboolean mc_search (const gchar *, const gchar *, mc_search_type_t); |
142 | 142 | |
143 | | int mc_search_getstart_rezult_by_num (mc_search_t *, int); |
144 | | int mc_search_getend_rezult_by_num (mc_search_t *, int); |
145 | | |
146 | 143 | #endif |
-
diff -urN mc-4.7.1-old/lib/skin/internal.h mc-4.7.1-new/lib/skin/internal.h
old
|
new
|
|
26 | 26 | gboolean mc_skin_ini_file_parse (mc_skin_t *); |
27 | 27 | void mc_skin_set_hardcoded_skin (mc_skin_t *); |
28 | 28 | |
29 | | gboolean mc_skin_ini_file_parse_colors (mc_skin_t *); |
30 | 29 | gboolean mc_skin_color_parse_ini_file (mc_skin_t *); |
31 | 30 | |
32 | 31 | void mc_skin_hardcoded_ugly_lines (mc_skin_t *); |
-
diff -urN mc-4.7.1-old/lib/strescape.h mc-4.7.1-new/lib/strescape.h
old
|
new
|
|
22 | 22 | char *strutils_shell_escape (const char *); |
23 | 23 | |
24 | 24 | char *strutils_glob_escape (const char *); |
25 | | char *strutils_glob_unescape (const char *); |
26 | 25 | |
27 | 26 | char *strutils_regex_escape (const char *); |
28 | | char *strutils_regex_unescape (const char *); |
29 | 27 | |
30 | 28 | gboolean strutils_is_char_escaped (const char *, const char *); |
31 | 29 | |
-
diff -urN mc-4.7.1-old/lib/strutil/strescape.c mc-4.7.1-new/lib/strutil/strescape.c
old
|
new
|
|
201 | 201 | |
202 | 202 | /* --------------------------------------------------------------------------------------------- */ |
203 | 203 | |
204 | | char * |
205 | | strutils_glob_unescape (const char *text) |
206 | | { |
207 | | return strutils_unescape (text, -1, ESCAPE_GLOB_CHARS, TRUE); |
208 | | } |
209 | | |
210 | | /* --------------------------------------------------------------------------------------------- */ |
211 | | char * |
212 | | strutils_regex_unescape (const char *text) |
213 | | { |
214 | | return strutils_unescape (text, -1, ESCAPE_REGEX_CHARS, TRUE); |
215 | | } |
216 | | |
217 | | /* --------------------------------------------------------------------------------------------- */ |
218 | | |
219 | 204 | /** Check if char in pointer contain escape'd chars |
220 | 205 | |
221 | 206 | \param start |
-
diff -urN mc-4.7.1-old/lib/strutil/strutil.c mc-4.7.1-new/lib/strutil/strutil.c
old
|
new
|
|
293 | 293 | va_end (ap); |
294 | 294 | } |
295 | 295 | |
296 | | void |
297 | | str_insert_replace_char (GString * buffer) |
298 | | { |
299 | | used_class.insert_replace_char (buffer); |
300 | | } |
301 | | |
302 | 296 | estr_t |
303 | 297 | str_translate_char (GIConv conv, const char *keys, size_t ch_size, |
304 | 298 | char *output, size_t out_size) |
… |
… |
|
492 | 486 | used_class.cprev_char (text); |
493 | 487 | } |
494 | 488 | |
495 | | char * |
496 | | str_get_next_char_safe (char *text) |
497 | | { |
498 | | used_class.cnext_char_safe ((const char **) &text); |
499 | | return text; |
500 | | } |
501 | | |
502 | 489 | const char * |
503 | 490 | str_cget_next_char_safe (const char *text) |
504 | 491 | { |
… |
… |
|
506 | 493 | return text; |
507 | 494 | } |
508 | 495 | |
509 | | void |
510 | | str_next_char_safe (char **text) |
511 | | { |
512 | | used_class.cnext_char_safe ((const char **) text); |
513 | | } |
514 | | |
515 | | void |
516 | | str_cnext_char_safe (const char **text) |
517 | | { |
518 | | used_class.cnext_char_safe (text); |
519 | | } |
520 | | |
521 | | char * |
522 | | str_get_prev_char_safe (char *text) |
523 | | { |
524 | | used_class.cprev_char_safe ((const char **) &text); |
525 | | return text; |
526 | | } |
527 | | |
528 | | const char * |
529 | | str_cget_prev_char_safe (const char *text) |
530 | | { |
531 | | used_class.cprev_char_safe (&text); |
532 | | return text; |
533 | | } |
534 | | |
535 | | void |
536 | | str_prev_char_safe (char **text) |
537 | | { |
538 | | used_class.cprev_char_safe ((const char **) text); |
539 | | } |
540 | | |
541 | | void |
542 | | str_cprev_char_safe (const char **text) |
543 | | { |
544 | | used_class.cprev_char_safe (text); |
545 | | } |
546 | | |
547 | | int |
548 | | str_next_noncomb_char (char **text) |
549 | | { |
550 | | return used_class.cnext_noncomb_char ((const char **) text); |
551 | | } |
552 | | |
553 | 496 | int |
554 | 497 | str_cnext_noncomb_char (const char **text) |
555 | 498 | { |
… |
… |
|
587 | 530 | } |
588 | 531 | |
589 | 532 | int |
590 | | str_term_char_width (const char *text) |
591 | | { |
592 | | return used_class.term_char_width (text); |
593 | | } |
594 | | |
595 | | int |
596 | 533 | str_offset_to_pos (const char *text, size_t length) |
597 | 534 | { |
598 | 535 | return used_class.offset_to_pos (text, length); |
… |
… |
|
611 | 548 | } |
612 | 549 | |
613 | 550 | int |
614 | | str_length2 (const char *text, int size) |
615 | | { |
616 | | return used_class.length2 (text, size); |
617 | | } |
618 | | |
619 | | int |
620 | | str_length_noncomb (const char *text) |
621 | | { |
622 | | return used_class.length_noncomb (text); |
623 | | } |
624 | | |
625 | | int |
626 | 551 | str_column_to_pos (const char *text, size_t pos) |
627 | 552 | { |
628 | 553 | return used_class.column_to_pos (text, pos); |
… |
… |
|
670 | 595 | return used_class.isprint (ch); |
671 | 596 | } |
672 | 597 | |
673 | | int |
674 | | str_iscombiningmark (const char *ch) |
675 | | { |
676 | | return used_class.iscombiningmark (ch); |
677 | | } |
678 | | |
679 | 598 | const char * |
680 | 599 | str_trunc (const char *text, int width) |
681 | 600 | { |
… |
… |
|
701 | 620 | return used_class.search_first (text, search, case_sen); |
702 | 621 | } |
703 | 622 | |
704 | | const char * |
705 | | str_search_last (const char *text, const char *search, int case_sen) |
706 | | { |
707 | | return used_class.search_last (text, search, case_sen); |
708 | | } |
709 | | |
710 | 623 | int |
711 | 624 | str_is_valid_string (const char *text) |
712 | 625 | { |
… |
… |
|
714 | 627 | } |
715 | 628 | |
716 | 629 | int |
717 | | str_compare (const char *t1, const char *t2) |
718 | | { |
719 | | return used_class.compare (t1, t2); |
720 | | } |
721 | | |
722 | | int |
723 | | str_ncompare (const char *t1, const char *t2) |
724 | | { |
725 | | return used_class.ncompare (t1, t2); |
726 | | } |
727 | | |
728 | | int |
729 | 630 | str_casecmp (const char *t1, const char *t2) |
730 | 631 | { |
731 | 632 | return used_class.casecmp (t1, t2); |
732 | 633 | } |
733 | 634 | |
734 | | int |
735 | | str_ncasecmp (const char *t1, const char *t2) |
736 | | { |
737 | | return used_class.ncasecmp (t1, t2); |
738 | | } |
739 | | |
740 | | int |
741 | | str_prefix (const char *text, const char *prefix) |
742 | | { |
743 | | return used_class.prefix (text, prefix); |
744 | | } |
745 | | |
746 | | int |
747 | | str_caseprefix (const char *text, const char *prefix) |
748 | | { |
749 | | return used_class.caseprefix (text, prefix); |
750 | | } |
751 | | |
752 | | void |
753 | | str_fix_string (char *text) |
754 | | { |
755 | | used_class.fix_string (text); |
756 | | } |
757 | | |
758 | 635 | char * |
759 | 636 | str_create_key (const char *text, int case_sen) |
760 | 637 | { |
-
diff -urN mc-4.7.1-old/lib/strutil.h mc-4.7.1-new/lib/strutil.h
old
|
new
|
|
188 | 188 | void |
189 | 189 | str_printf (GString *, const char *, ...); |
190 | 190 | |
191 | | /* add standard replacement character in terminal encoding |
192 | | */ |
193 | | void str_insert_replace_char (GString *); |
194 | | |
195 | 191 | /* init strings and set terminal encoding, |
196 | 192 | * if is termenc NULL, detect terminal encoding |
197 | 193 | * create all str_cnv_* and set functions for terminal encoding |
… |
… |
|
249 | 245 | * works with invalid string |
250 | 246 | * I |
251 | 247 | */ |
252 | | char *str_get_next_char_safe (char *text); |
253 | 248 | const char *str_cget_next_char_safe (const char *text); |
254 | 249 | |
255 | | /* return previous characters before text, do not call on the start of strings |
256 | | * works with invalid string |
257 | | * I |
258 | | */ |
259 | | char *str_get_prev_char_safe (char *text); |
260 | | const char *str_cget_prev_char_safe (const char *text); |
261 | | |
262 | | /* set text to next characters, do not call on the end of string |
263 | | * works with invalid string |
264 | | * I |
265 | | */ |
266 | | void str_next_char_safe (char **text); |
267 | | void str_cnext_char_safe (const char **text); |
268 | | |
269 | | /* set text to previous characters, do not call on the start of strings |
270 | | * works with invalid string |
271 | | * I |
272 | | */ |
273 | | void str_prev_char_safe (char **text); |
274 | | void str_cprev_char_safe (const char **text); |
275 | | |
276 | | /* set text to next noncombining characters, check the end of text |
277 | | * return how many characters was skipped |
278 | | * works with invalid string |
279 | | * I |
280 | | */ |
281 | | int str_next_noncomb_char (char **text); |
282 | 250 | int str_cnext_noncomb_char (const char **text); |
283 | 251 | |
284 | 252 | /* set text to previous noncombining characters, search stop at begin |
… |
… |
|
314 | 282 | */ |
315 | 283 | int str_isprint (const char *ch); |
316 | 284 | |
317 | | /* if first characters in ch is a combining mark (only in utf-8) |
318 | | * combining makrs are assumed to be zero width |
319 | | * I |
320 | | */ |
321 | | int str_iscombiningmark (const char *ch); |
322 | | |
323 | 285 | /* write lower from of fisrt characters in ch into out |
324 | 286 | * decrase remain by size of returned characters |
325 | 287 | * if out is not big enough, do nothing |
… |
… |
|
337 | 299 | */ |
338 | 300 | int str_length (const char* text); |
339 | 301 | |
340 | | /* return length of text in characters, limit to size |
341 | | * I |
342 | | */ |
343 | | int str_length2 (const char* text, int size); |
344 | | |
345 | 302 | /* return length of one char |
346 | 303 | * I |
347 | 304 | */ |
348 | 305 | int str_length_char (const char *); |
349 | 306 | |
350 | | /* return length of text in characters, count only noncombining characters |
351 | | * I |
352 | | */ |
353 | | int str_length_noncomb (const char* text); |
354 | | |
355 | | /* replace all invalid characters in text with questionmark |
356 | | * after return, text is valid string in terminal encoding |
357 | | * I |
358 | | */ |
359 | | void str_fix_string (char* text); |
360 | | |
361 | 307 | /* replace all invalid characters in text with questionmark |
362 | 308 | * replace all unprintable characters with '.' |
363 | 309 | * return static allocated string, "text" is not changed |
… |
… |
|
403 | 349 | */ |
404 | 350 | int str_term_width2 (const char *text, size_t length); |
405 | 351 | |
406 | | /* return width, that will be character occupied on terminal |
407 | | * combining characters are always zero width |
408 | | * I |
409 | | */ |
410 | | int str_term_char_width (const char *text); |
411 | | |
412 | 352 | /* convert position in characters to position in bytes |
413 | 353 | * I |
414 | 354 | */ |
… |
… |
|
439 | 379 | */ |
440 | 380 | const char *str_search_first (const char *text, const char *needle, int case_sen); |
441 | 381 | |
442 | | /* search for last occurrence of search in text |
443 | | */ |
444 | | const char *str_search_last (const char *text, const char *needle, int case_sen); |
445 | | |
446 | | /* case sensitive compare two strings |
447 | | * I |
448 | | */ |
449 | | int str_compare (const char *t1, const char *t2); |
450 | | |
451 | | /* case sensitive compare two strings |
452 | | * if one string is prefix of the other string, return 0 |
453 | | * I |
454 | | */ |
455 | | int str_ncompare (const char *t1, const char *t2); |
456 | | |
457 | 382 | /* case insensitive compare two strings |
458 | 383 | * I |
459 | 384 | */ |
460 | 385 | int str_casecmp (const char *t1, const char *t2); |
461 | 386 | |
462 | | /* case insensitive compare two strings |
463 | | * if one string is prefix of the other string, return 0 |
464 | | * I |
465 | | */ |
466 | | int str_ncasecmp (const char *t1, const char *t2); |
467 | | |
468 | | /* return, how many bytes are are same from start in text and prefix |
469 | | * both strings are decomposed befor comapring and return value is counted |
470 | | * in decomposed form, too. caling with prefix, prefix, you get size in bytes |
471 | | * of prefix in decomposed form, |
472 | | * I |
473 | | */ |
474 | | int str_prefix (const char *text, const char *prefix); |
475 | | |
476 | | /* case insensitive version of str_prefix |
477 | | * I |
478 | | */ |
479 | | int str_caseprefix (const char *text, const char *prefix); |
480 | | |
481 | 387 | /* create a key that is used by str_key_collate |
482 | 388 | * I |
483 | 389 | */ |
-
diff -urN mc-4.7.1-old/lib/tty/color.c mc-4.7.1-new/lib/tty/color.c
old
|
new
|
|
239 | 239 | /* --------------------------------------------------------------------------------------------- */ |
240 | 240 | |
241 | 241 | void |
242 | | tty_color_free_all_non_tmp (void) |
243 | | { |
244 | | tty_color_free_all (FALSE); |
245 | | } |
246 | | |
247 | | /* --------------------------------------------------------------------------------------------- */ |
248 | | |
249 | | void |
250 | 242 | tty_color_set_defaults (const char *fgcolor, const char *bgcolor) |
251 | 243 | { |
252 | 244 | g_free (tty_color_defaults__fg); |
-
diff -urN mc-4.7.1-old/lib/tty/color.h mc-4.7.1-new/lib/tty/color.h
old
|
new
|
|
31 | 31 | int tty_try_alloc_color_pair2 (const char *, const char *, gboolean); |
32 | 32 | |
33 | 33 | void tty_color_free_all_tmp (void); |
34 | | void tty_color_free_all_non_tmp (void); |
35 | 34 | |
36 | 35 | void tty_setcolor (int color); |
37 | 36 | void tty_lowlevel_setcolor (int color); |
-
diff -urN mc-4.7.1-old/lib/tty/key.h mc-4.7.1-new/lib/tty/key.h
old
|
new
|
|
63 | 63 | /* Channel manipulation */ |
64 | 64 | void add_select_channel (int fd, select_fn callback, void *info); |
65 | 65 | void delete_select_channel (int fd); |
66 | | void remove_select_channel (int fd); |
67 | 66 | |
68 | 67 | /* Activate/deactivate the channel checking */ |
69 | 68 | void channels_up (void); |
-
diff -urN mc-4.7.1-old/lib/tty/tty.c mc-4.7.1-new/lib/tty/tty.c
old
|
new
|
|
126 | 126 | } |
127 | 127 | |
128 | 128 | void |
129 | | tty_print_one_hline (void) |
130 | | { |
131 | | tty_print_alt_char (mc_tty_ugly_frm[MC_TTY_FRM_thinhoriz]); |
132 | | } |
133 | | |
134 | | void |
135 | 129 | tty_print_one_vline (void) |
136 | 130 | { |
137 | 131 | tty_print_alt_char (mc_tty_ugly_frm[MC_TTY_FRM_thinvert]); |
-
diff -urN mc-4.7.1-old/lib/tty/tty.h mc-4.7.1-new/lib/tty/tty.h
old
|
new
|
|
72 | 72 | extern void tty_printf (const char *s, ...); |
73 | 73 | |
74 | 74 | extern void tty_print_one_vline (void); |
75 | | extern void tty_print_one_hline (void); |
76 | 75 | extern void tty_draw_hline (int y, int x, int ch, int len); |
77 | 76 | extern void tty_draw_vline (int y, int x, int ch, int len); |
78 | 77 | extern void tty_draw_box (int y, int x, int rows, int cols); |
-
diff -urN mc-4.7.1-old/lib/util.c mc-4.7.1-new/lib/util.c
old
|
new
|
|
1588 | 1588 | } |
1589 | 1589 | |
1590 | 1590 | #undef TMP_SUFFIX |
1591 | | extern const char * |
1592 | | cstrcasestr (const char *haystack, const char *needle) |
1593 | | { |
1594 | | char *nee = str_create_search_needle (needle, 0); |
1595 | | const char *result = str_search_first (haystack, nee, 0); |
1596 | | str_release_search_needle (nee, 0); |
1597 | | return result; |
1598 | | } |
1599 | | |
1600 | | const char * |
1601 | | cstrstr (const char *haystack, const char *needle) |
1602 | | { |
1603 | | return strstr (haystack, needle); |
1604 | | } |
1605 | 1591 | |
1606 | 1592 | extern char * |
1607 | 1593 | str_unconst (const char *s) |
-
diff -urN mc-4.7.1-old/lib/util.h mc-4.7.1-new/lib/util.h
old
|
new
|
|
22 | 22 | |
23 | 23 | /* String managing functions */ |
24 | 24 | |
25 | | extern const char *cstrcasestr (const char *haystack, const char *needle); |
26 | | extern const char *cstrstr (const char *haystack, const char *needle); |
27 | | |
28 | 25 | void str_replace(char *s, char from, char to); |
29 | 26 | int is_printable (int c); |
30 | 27 | void msglen (const char *text, /*@out@*/ int *lines, /*@out@*/ int *columns); |
-
diff -urN mc-4.7.1-old/lib/vfs/mc-vfs/gc.c mc-4.7.1-new/lib/vfs/mc-vfs/gc.c
old
|
new
|
|
271 | 271 | * seconds until the next item times out. |
272 | 272 | */ |
273 | 273 | int |
274 | | vfs_timeouts () |
| 274 | vfs_timeouts (void) |
275 | 275 | { |
276 | 276 | return stamps ? 10 : 0; |
277 | 277 | } |
-
diff -urN mc-4.7.1-old/lib/vfs/mc-vfs/vfs-impl.h mc-4.7.1-new/lib/vfs/mc-vfs/vfs-impl.h
old
|
new
|
|
127 | 127 | |
128 | 128 | struct vfs_class *vfs_get_class (const char *path); |
129 | 129 | struct vfs_class *vfs_split (char *path, char **inpath, char **op); |
130 | | char *vfs_path (const char *path); |
131 | 130 | int vfs_file_class_flags (const char *filename); |
132 | 131 | |
133 | 132 | void vfs_fill_names (fill_names_f); |
-
diff -urN mc-4.7.1-old/src/charsets.h mc-4.7.1-new/src/charsets.h
old
|
new
|
|
31 | 31 | const char *init_translation_table (int cpsource, int cpdisplay); |
32 | 32 | void convert_to_display (char *str); |
33 | 33 | void convert_from_input (char *str); |
34 | | void convert_string (unsigned char *str); |
35 | 34 | /* |
36 | 35 | * Converter from utf to selected codepage |
37 | 36 | * param str, utf char |
-
diff -urN mc-4.7.1-old/src/ecs.c mc-4.7.1-new/src/ecs.c
old
|
new
|
|
104 | 104 | (cf(c)) |
105 | 105 | #endif |
106 | 106 | |
107 | | extern gboolean ecs_isalnum(ecs_char c) |
108 | | { |
109 | | return ECS_CTYPE(iswalnum, isalnum, c); |
110 | | } |
111 | | |
112 | | extern gboolean ecs_isalpha(ecs_char c) |
113 | | { |
114 | | return ECS_CTYPE(iswalpha, isalpha, c); |
115 | | } |
116 | | |
117 | | extern gboolean ecs_iscntrl(ecs_char c) |
118 | | { |
119 | | return ECS_CTYPE(iswcntrl, iscntrl, c); |
120 | | } |
121 | | |
122 | | extern gboolean ecs_isdigit(ecs_char c) |
123 | | { |
124 | | return ECS_CTYPE(iswdigit, isdigit, c); |
125 | | } |
126 | | |
127 | | extern gboolean ecs_isgraph(ecs_char c) |
128 | | { |
129 | | return ECS_CTYPE(iswgraph, isgraph, c); |
130 | | } |
131 | | |
132 | | extern gboolean ecs_islower(ecs_char c) |
133 | | { |
134 | | return ECS_CTYPE(iswlower, islower, c); |
135 | | } |
136 | | |
137 | 107 | extern gboolean ecs_isprint(ecs_char c) |
138 | 108 | { |
139 | 109 | return ECS_CTYPE(iswprint, isprint, c); |
140 | 110 | } |
141 | 111 | |
142 | | extern gboolean ecs_ispunct(ecs_char c) |
143 | | { |
144 | | return ECS_CTYPE(iswpunct, ispunct, c); |
145 | | } |
146 | | |
147 | | extern gboolean ecs_isspace(ecs_char c) |
148 | | { |
149 | | return ECS_CTYPE(iswspace, isspace, c); |
150 | | } |
151 | | |
152 | | extern gboolean ecs_isupper(ecs_char c) |
153 | | { |
154 | | return ECS_CTYPE(iswupper, isupper, c); |
155 | | } |
156 | | |
157 | | extern gboolean ecs_isxdigit(ecs_char c) |
158 | | { |
159 | | return ECS_CTYPE(iswxdigit, isxdigit, c); |
160 | | } |
161 | | |
162 | 112 | #undef ECS_CTYPE |
163 | 113 | |
164 | 114 | /* |
… |
… |
|
231 | 181 | } |
232 | 182 | } |
233 | 183 | |
234 | | size_t |
235 | | ecs_strspn(const ecs_char *s, const ecs_char *chars) |
236 | | { |
237 | | size_t i; |
238 | | |
239 | | for (i = 0; s[i] != ECS_CHAR('\0'); i++) { |
240 | | if (ecs_strchr(chars, s[i]) == NULL) |
241 | | break; |
242 | | } |
243 | | return i; |
244 | | } |
245 | | |
246 | 184 | ecs_char * |
247 | 185 | ecs_strstr(const ecs_char *s, const ecs_char *sub) |
248 | 186 | { |
-
diff -urN mc-4.7.1-old/src/ecs.h mc-4.7.1-new/src/ecs.h
old
|
new
|
|
66 | 66 | * Replacements for the ISO C90 <ctype.h> functions. |
67 | 67 | */ |
68 | 68 | |
69 | | extern gboolean ecs_isalnum(ecs_char); |
70 | | extern gboolean ecs_isalpha(ecs_char); |
71 | | extern gboolean ecs_iscntrl(ecs_char); |
72 | | extern gboolean ecs_isdigit(ecs_char); |
73 | | extern gboolean ecs_isgraph(ecs_char); |
74 | | extern gboolean ecs_islower(ecs_char); |
75 | 69 | extern gboolean ecs_isprint(ecs_char); |
76 | | extern gboolean ecs_ispunct(ecs_char); |
77 | | extern gboolean ecs_isspace(ecs_char); |
78 | | extern gboolean ecs_isupper(ecs_char); |
79 | | extern gboolean ecs_isxdigit(ecs_char); |
80 | 70 | |
81 | 71 | /* |
82 | 72 | * Replacements for the ISO C90 <string.h> functions. |
… |
… |
|
94 | 84 | extern size_t ecs_strcspn(const ecs_char *, const ecs_char *); |
95 | 85 | /* left out: ecs_strpbrk */ |
96 | 86 | extern ecs_char *ecs_strrchr(const ecs_char *, ecs_char); |
97 | | extern size_t ecs_strspn(const ecs_char *, const ecs_char *); |
98 | 87 | extern ecs_char *ecs_strstr(const ecs_char *, const ecs_char *); |
99 | 88 | /* left out: ecs_strtok */ |
100 | 89 | extern size_t ecs_strlen(const ecs_char *); |
-
diff -urN mc-4.7.1-old/src/editor/edit-impl.h mc-4.7.1-new/src/editor/edit-impl.h
old
|
new
|
|
235 | 235 | int edit_load_forward_cmd (WEdit * edit); |
236 | 236 | void edit_block_process_cmd (WEdit * edit, const char *shell_cmd, int block); |
237 | 237 | void edit_refresh_cmd (WEdit * edit); |
238 | | void edit_date_cmd (WEdit * edit); |
239 | 238 | void edit_goto_cmd (WEdit * edit); |
240 | 239 | int eval_marks (WEdit * edit, long *start_mark, long *end_mark); |
241 | 240 | void edit_status (WEdit * edit); |
… |
… |
|
245 | 244 | int edit_print_string (WEdit * e, const char *s); |
246 | 245 | void edit_move_to_line (WEdit * e, long line); |
247 | 246 | void edit_move_display (WEdit * e, long line); |
248 | | void edit_word_wrap (WEdit * edit); |
249 | 247 | int edit_sort_cmd (WEdit * edit); |
250 | 248 | int edit_ext_cmd (WEdit * edit); |
251 | 249 | void edit_help_cmd (WEdit * edit); |
… |
… |
|
274 | 272 | |
275 | 273 | void book_mark_insert (WEdit * edit, int line, int c); |
276 | 274 | int book_mark_query_color (WEdit * edit, int line, int c); |
277 | | int book_mark_query_all (WEdit * edit, int line, int *c); |
278 | 275 | struct _book_mark *book_mark_find (WEdit * edit, int line); |
279 | 276 | int book_mark_clear (WEdit * edit, int line, int c); |
280 | 277 | void book_mark_flush (WEdit * edit, int c); |
-
diff -urN mc-4.7.1-old/src/setup.c mc-4.7.1-new/src/setup.c
old
|
new
|
|
474 | 474 | } |
475 | 475 | |
476 | 476 | static void |
477 | | load_layout () |
| 477 | load_layout (void) |
478 | 478 | { |
479 | 479 | int i; |
480 | 480 | |
-
diff -urN mc-4.7.1-old/src/viewer/internal.h mc-4.7.1-new/src/viewer/internal.h
old
|
new
|
|
312 | 312 | |
313 | 313 | /* nroff.c: */ |
314 | 314 | void mcview_display_nroff (mcview_t * view); |
315 | | int mcview__get_nroff_real_len (mcview_t * view, off_t, off_t p); |
| 315 | int mcview_get_nroff_real_len (mcview_t * view, off_t, off_t p); |
316 | 316 | |
317 | 317 | mcview_nroff_t *mcview_nroff_seq_new_num (mcview_t * view, off_t p); |
318 | 318 | mcview_nroff_t *mcview_nroff_seq_new (mcview_t * view); |
-
diff -urN mc-4.7.1-old/src/viewer/nroff.c mc-4.7.1-new/src/viewer/nroff.c
old
|
new
|
|
220 | 220 | /* --------------------------------------------------------------------------------------------- */ |
221 | 221 | |
222 | 222 | int |
223 | | mcview__get_nroff_real_len (mcview_t * view, off_t start, off_t length) |
| 223 | mcview_get_nroff_real_len (mcview_t * view, off_t start, off_t length) |
224 | 224 | { |
225 | 225 | mcview_nroff_t *nroff; |
226 | 226 | int ret = 0; |
-
diff -urN mc-4.7.1-old/src/viewer/search.c mc-4.7.1-new/src/viewer/search.c
old
|
new
|
|
113 | 113 | { |
114 | 114 | |
115 | 115 | view->search_start = view->search->normal_offset + |
116 | | mcview__get_nroff_real_len (view, |
| 116 | mcview_get_nroff_real_len (view, |
117 | 117 | view->search->start_buffer, |
118 | 118 | view->search->normal_offset - view->search->start_buffer); |
119 | 119 | |
… |
… |
|
121 | 121 | view->search_start++; |
122 | 122 | |
123 | 123 | view->search_end = view->search_start + match_len + |
124 | | mcview__get_nroff_real_len (view, view->search_start - 1, match_len); |
| 124 | mcview_get_nroff_real_len (view, view->search_start - 1, match_len); |
125 | 125 | |
126 | 126 | if (view->hex_mode) |
127 | 127 | { |
… |
… |
|
231 | 231 | { |
232 | 232 | search_start = (mcview_search_options.backwards) ? -2 : 2; |
233 | 233 | search_start = view->search_start + search_start + |
234 | | mcview__get_nroff_real_len (view, view->search_start, 2) * search_start; |
| 234 | mcview_get_nroff_real_len (view, view->search_start, 2) * search_start; |
235 | 235 | } |
236 | 236 | else |
237 | 237 | { |
-
diff -urN mc-4.7.1-old/src/widget.c mc-4.7.1-new/src/widget.c
old
|
new
|
|
338 | 338 | return b; |
339 | 339 | } |
340 | 340 | |
341 | | const char * |
342 | | button_get_text (const WButton *b) |
343 | | { |
344 | | if (b->text.hotkey != NULL) |
345 | | return g_strconcat (b->text.start, "&", b->text.hotkey, |
346 | | b->text.end, (char *) NULL); |
347 | | else |
348 | | return g_strdup (b->text.start); |
349 | | } |
350 | | |
351 | 341 | void |
352 | 342 | button_set_text (WButton *b, const char *text) |
353 | 343 | { |
-
diff -urN mc-4.7.1-old/src/widget.h mc-4.7.1-new/src/widget.h
old
|
new
|
|
209 | 209 | void new_input (WInput *in); |
210 | 210 | void stuff (WInput *in, const char *text, int insert_extra_space); |
211 | 211 | void input_disable_update (WInput *in); |
212 | | void input_set_prompt (WInput *in, int field_len, const char *prompt); |
213 | 212 | void input_enable_update (WInput *in); |
214 | 213 | void input_set_point (WInput *in, int pos); |
215 | | void input_show_cursor (WInput *in); |
216 | 214 | void assign_text (WInput *in, const char *text); |
217 | 215 | cb_ret_t input_callback (Widget *, widget_msg_t msg, int parm); |
218 | 216 | |
… |
… |
|
225 | 223 | |
226 | 224 | /* Buttons */ |
227 | 225 | /* return copy of button text */ |
228 | | const char *button_get_text (const WButton *b); |
229 | 226 | void button_set_text (WButton *b, const char *text); |
230 | 227 | int button_get_len (const WButton *b); |
231 | 228 | |
232 | | /* Listbox manager */ |
233 | | WLEntry *listbox_get_data (WListbox *l, int pos); |
234 | | |
235 | 229 | /* search text int listbox entries */ |
236 | 230 | int listbox_search_text (WListbox *l, const char *text); |
237 | 231 | void listbox_select_entry (WListbox *l, int dest); |