|
|
用的是kubuntu,在源里直接用包管理器安装的gftp对中文目录的支持不是很好
在设置了远程字符集之后也是只有少数站点可以正常显示中文目录,也试过hiweed网站上介绍的那个方法,好像也没能支持中文目录的显示,所以就打算自己编译了-----
在执行make的时候出现如下错误提示:
(不是很明白,大家帮忙看看是什么问题---- thx!)
gftp-text.o(.text+0x315): In function `gftp_text_ask_question':
/home/attention/MyDownloads/gftp-2.0.18/gftp-2.0.18/src/text/gftp-text.c:188:
undefined reference to `g_locale_from_utf8'
~~~~~~~~~~~~~~~~~~~~~~
collect2: ld returned 1 exit status
make[3]: *** [gftp-text] 错误 1
make[3]: Leaving directory `/home/attention/MyDownloads/gftp-2.0.18/gftp-2.0.18/src/text'
make[2]: *** [all-recursive] 错误 1
make[2]: Leaving directory `/home/attention/MyDownloads/gftp-2.0.18/gftp-2.0.18/src'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/home/attention/MyDownloads/gftp-2.0.18/gftp-2.0.18'
make: *** [all] 错误 2
另外,在gftp-text.c文件的188行及其前后的一些行,是如下的代码:
char * //这一行是第154行!
gftp_text_ask_question (const char *question, int echo, char *buf, size_t size)
{
struct termios term, oldterm;
gchar *locale_question;
sigset_t sig, sigsave;
char *pos, *termname;
int singlechar;
FILE *infd;
if (!echo)
{
sigemptyset (&sig);
sigaddset (&sig, SIGINT);
sigaddset (&sig, SIGTSTP);
sigprocmask (SIG_BLOCK, &sig, &sigsave);
termname = ctermid (NULL);
if ((infd = fopen (termname, "r+")) == NULL)
{
gftp_text_log (gftp_logging_error, NULL,
_("Cannot open controlling terminal %s\n"), termname);
return (NULL);
}
tcgetattr (0, &term);
oldterm = term;
term.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
tcsetattr (fileno (infd), TCSAFLUSH, &term);
}
else
infd = stdin;
locale_question = g_locale_from_utf8 (question, -1, NULL, NULL, NULL); //这行是第188行!!!!!
if (locale_question != NULL)
{
printf ("%s%s%s ", GFTPUI_COMMON_COLOR_BLUE, locale_question,
GFTPUI_COMMON_COLOR_DEFAULT);
g_free (locale_question);
}
else
printf ("%s%s%s ", GFTPUI_COMMON_COLOR_BLUE, question,
GFTPUI_COMMON_COLOR_DEFAULT);
if (size == 1)
{
singlechar = fgetc (infd);
*buf = singlechar;
}
else
{
if (fgets (buf, size, infd) == NULL)
return (NULL);
if (size > 1)
buf[size - 1] = '\0';
}
if (!echo)
{
printf ("\n");
tcsetattr (fileno (infd), TCSAFLUSH, &oldterm);
fclose (infd);
sigprocmask (SIG_SETMASK, &sigsave, NULL);
}
if (size > 1)
{
for (pos = buf + strlen (buf) - 1; *pos == ' ' || *pos == '\r' ||
*pos == '\n'; pos--);
*(pos+1) = '\0';
for (pos = buf; *pos == ' '; pos++);
if (*pos == '\0')
return (NULL);
return (pos);
}
else
return (buf);
} |
|