-
大小: 15.75MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-06-26
- 语言: 其他
- 标签: libiconv-1.1
资源简介
把libiconv-1.15源码移植到win10平台上,里面包含完整的VS2015工程,可以按照需要编译出自己的libiconv库
代码片段和文件信息
/* Copyright (C) 1999-2001 2003 2005 2008 2012 Free Software Foundation Inc.
This file is part of the GNU LIBICONV Library.
The GNU LIBICONV Library is free software; you can redistribute it
and/or modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either version 2
of the License or (at your option) any later version.
The GNU LIBICONV Library is distributed in the hope that it will be
useful but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU LIBICONV Library; see the file COPYING.LIB.
If not see . */
/* Creates the aliases.gperf table. */
#include
#include
static void emit_alias (FILE* out1 const char* alias const char* c_name)
{
/* Output alias in upper case. */
const char* s = alias;
for (; *s; s++) {
unsigned char c = * (unsigned char *) s;
if (c >= 0x80)
exit(1);
if (c >= ‘a‘ && c <= ‘z‘)
c -= ‘a‘-‘A‘;
putc(c out1);
}
fprintf(out1“ ei_%s\n“ c_name);
}
static void emit_encoding (FILE* out1 FILE* out2 const char* const* names size_t n const char* c_name)
{
fprintf(out2“grep ‘sizeof(\““);
/* Output *names in upper case. */
{
const char* s = *names;
for (; *s; s++) {
unsigned char c = * (unsigned char *) s;
if (c >= 0x80)
exit(1);
if (c >= ‘a‘ && c <= ‘z‘)
c -= ‘a‘-‘A‘;
putc(c out2);
}
}
fprintf(out2“\“)‘ tmp.h | sed -e ‘s|^.*\\(stringpool_str[0-9]*\\).*$| (int)(long)\\&((struct stringpool_t *)0)->\\1|‘\n“);
for (; n > 0; names++ n--)
emit_alias(out1 *names c_name);
}
int main (int argc char* argv[])
{
char* aliases_file_name;
char* canonical_sh_file_name;
char* canonical_local_sh_file_name;
FILE* aliases_file;
FILE* canonical_sh_file;
if (argc != 4) {
fprintf(stderr “Usage: genaliases aliases.gperf canonical.sh canonical_local.sh\n“);
exit(1);
}
aliases_file_name = argv[1];
canonical_sh_file_name = argv[2];
canonical_local_sh_file_name = argv[3];
aliases_file = fopen(aliases_file_name “w“);
if (aliases_file == NULL) {
fprintf(stderr “Could not open ‘%s‘ for writing\n“ aliases_file_name);
exit(1);
}
fprintf(aliases_file “struct alias { int name; unsigned int encoding_index; };\n“);
fprintf(aliases_file “%%struct-type\n“);
fprintf(aliases_file “%%language=ANSI-C\n“);
fprintf(aliases_file “%%define hash-function-name aliases_hash\n“);
fprintf(aliases_file “%%define lookup-function-name aliases_lookup\n“);
fprintf(aliases_file “%%7bit\n“);
fprintf(aliases_file “%%readonly-tables\n“);
fprintf(aliases_file “%%global-table\n“);
fprintf(aliases_file “%%define word-array-name
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-06-06 11:30 libiconv\
目录 0 2018-06-06 10:36 libiconv\.vs\
目录 0 2018-06-06 10:36 libiconv\.vs\libiconv\
目录 0 2018-06-06 10:36 libiconv\.vs\libiconv\v14\
文件 31232 2018-06-06 11:30 libiconv\.vs\libiconv\v14\.suo
目录 0 2018-06-06 11:15 libiconv\Debug\
文件 61440 2018-06-06 11:15 libiconv\Debug\libiconv.pdb
目录 0 2018-06-06 11:22 libiconv\libiconv\
文件 1306 2018-06-06 10:36 libiconv\libiconv.sln
文件 28565504 2018-06-06 11:30 libiconv\libiconv.VC.db
文件 8286 2017-01-02 07:02 libiconv\libiconv\aliases.gperf
文件 69896 2017-01-02 07:02 libiconv\libiconv\aliases.h
文件 1198 2014-01-03 06:23 libiconv\libiconv\aliases2.h
文件 614 2017-01-02 07:03 libiconv\libiconv\aliases_aix.h
文件 824 2017-01-02 07:03 libiconv\libiconv\aliases_aix_sysaix.h
文件 1567 2017-01-02 07:03 libiconv\libiconv\aliases_dos.h
文件 525 2017-01-02 07:03 libiconv\libiconv\aliases_extra.h
文件 80 2017-01-02 07:03 libiconv\libiconv\aliases_osf1.h
文件 158 2017-01-02 07:03 libiconv\libiconv\aliases_osf1_sysosf1.h
文件 8469 2017-01-02 07:03 libiconv\libiconv\aliases_sysaix.gperf
文件 74731 2017-01-02 07:03 libiconv\libiconv\aliases_sysaix.h
文件 8504 2017-01-02 07:03 libiconv\libiconv\aliases_syshpux.gperf
文件 75273 2017-01-02 07:03 libiconv\libiconv\aliases_syshpux.h
文件 8384 2017-01-02 07:03 libiconv\libiconv\aliases_sysosf1.gperf
文件 73887 2017-01-02 07:03 libiconv\libiconv\aliases_sysosf1.h
文件 8417 2017-01-02 07:03 libiconv\libiconv\aliases_syssolaris.gperf
文件 75111 2017-01-02 07:03 libiconv\libiconv\aliases_syssolaris.h
文件 4265 2016-10-14 06:36 libiconv\libiconv\armscii_8.h
文件 1222 2016-10-14 06:36 libiconv\libiconv\ascii.h
文件 6786 2016-10-14 06:37 libiconv\libiconv\atarist.h
文件 261943 2016-10-14 06:37 libiconv\libiconv\big5.h
............此处省略282个文件信息
评论
共有 条评论