mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* charsets.c: Warning fixes.
* charsets.h: Likewise. * selcodepage.c: Likewise. * selcodepage.h: Likewise.
This commit is contained in:
parent
1ae4e4e1cb
commit
2a6be49822
@ -1,5 +1,10 @@
|
||||
2001-07-31 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* charsets.c: Warning fixes.
|
||||
* charsets.h: Likewise.
|
||||
* selcodepage.c: Likewise.
|
||||
* selcodepage.h: Likewise.
|
||||
|
||||
* Makefile.in: Move most logic around gindex.pl into gindex.pl.
|
||||
Don't use maintainer-only rules since mc.hlp won't be removed
|
||||
now if perl is missing or gindex.pl fails.
|
||||
|
@ -17,7 +17,7 @@ uchar conv_displ[256];
|
||||
uchar conv_input[256];
|
||||
uchar printable[256];
|
||||
|
||||
int load_codepages_list()
|
||||
int load_codepages_list(void)
|
||||
{
|
||||
int result = -1;
|
||||
FILE *f;
|
||||
@ -104,7 +104,7 @@ static char translate_character( iconv_t cd, char c )
|
||||
char outbuf[4], *obuf;
|
||||
size_t ibuflen, obuflen, count;
|
||||
|
||||
const char *ibuf = &c;
|
||||
char *ibuf = &c;
|
||||
obuf = outbuf;
|
||||
ibuflen = 1; obuflen = 4;
|
||||
|
||||
@ -126,7 +126,6 @@ char errbuf[255];
|
||||
char* init_printable_table( int cpdisplay )
|
||||
{
|
||||
int i;
|
||||
uchar ch = (cpdisplay == CP_ASCII) ? 0 : 1;
|
||||
|
||||
/* Fill printable characters table */
|
||||
for (i=0; i<=127; ++i)
|
||||
@ -143,7 +142,6 @@ char* init_translation_table( int cpsource, int cpdisplay )
|
||||
{
|
||||
int i;
|
||||
iconv_t cd;
|
||||
uchar ch;
|
||||
char *cpsour, *cpdisp;
|
||||
|
||||
/* Fill inpit <-> display tables */
|
||||
@ -186,6 +184,7 @@ char* init_translation_table( int cpsource, int cpdisplay )
|
||||
}
|
||||
|
||||
for (i=128; i<=255; ++i) {
|
||||
uchar ch;
|
||||
ch = translate_character( cd, i );
|
||||
conv_input[i] = (ch == UNKNCHAR) ? i : ch;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ extern struct codepage_desc *codepages;
|
||||
|
||||
char *get_codepage_id( int n );
|
||||
int get_codepage_index( const char *id );
|
||||
int load_codepages_list();
|
||||
int load_codepages_list(void);
|
||||
char* init_printable_table( int cpdisplay );
|
||||
char* init_translation_table( int cpsource, int cpdisplay );
|
||||
void convert_to_display( char *str );
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "widget.h"
|
||||
#include "wtools.h"
|
||||
#include "charsets.h"
|
||||
#include "selcodepage.h"
|
||||
#include "main.h"
|
||||
|
||||
#define ENTRY_LEN 35
|
||||
@ -17,7 +18,7 @@
|
||||
int source_codepage = -1;
|
||||
int display_codepage = -1;
|
||||
|
||||
unsigned char get_hotkey( int n )
|
||||
static unsigned char get_hotkey( int n )
|
||||
{
|
||||
return (n <= 9) ? '0' + n : 'a' + n - 10;
|
||||
}
|
||||
@ -66,7 +67,7 @@ int select_charset( int current_charset, int seldisplay )
|
||||
/* Helper functions for codepages support */
|
||||
|
||||
|
||||
int do_select_codepage()
|
||||
int do_select_codepage(void)
|
||||
{
|
||||
#ifndef HAVE_ICONV
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#define __SELCODEPAGE_H__
|
||||
|
||||
int select_charset( int current_charset, int seldisplay );
|
||||
int do_select_codepage();
|
||||
int do_select_codepage(void);
|
||||
|
||||
#endif /* __SELCODEPAGE_H__ */
|
||||
#endif /* HAVE_CHARSET */
|
||||
|
Loading…
Reference in New Issue
Block a user