资源简介
把libiconv-1.14源码移植到windows平台上,里面包含完整的VS2013工程,可以按照需要编译出自己的libiconv库
代码片段和文件信息
/* Copyright (C) 1999-2001 2003 2005 2008 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 write to the Free Software Foundation Inc. 51 Franklin Street
Fifth Floor Boston MA 02110-1301 USA. */
/* 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 ()
{
FILE* stdout2;
printf(“struct alias { int name; unsigned int encoding_index; };\n“);
printf(“%%struct-type\n“);
printf(“%%language=ANSI-C\n“);
printf(“%%define hash-function-name aliases_hash\n“);
printf(“%%define lookup-function-name aliases_lookup\n“);
printf(“%%7bit\n“);
printf(“%%readonly-tables\n“);
printf(“%%global-table\n“);
printf(“%%define word-array-name aliases\n“);
printf(“%%pic\n“);
printf(“%%%%\n“);
#define DEFENCODING(xxx_namesxxxxxx_ifuncs1xxx_ifuncs2xxx_ofuncs1xxx_ofuncs2) \
{ \
static const char* const names[] = BRACIFY xxx_names; \
emit_encoding(stdoutstdout2namessizeof(names)/sizeof(names[0])#xxx); \
}
#define BRACIFY(...) { __VA_ARGS__ }
#define DEFALIAS(xxx_aliasxxx) emit_alias(stdoutxxx_alias#xxx);
stdout2 = fdopen(3 “w“);
if (stdout2 == NULL)
exit(1);
#include “encodings.def“
if (fclose(stdout2))
exit(1);
stdout2 = fdopen(4 “w“);
if (stdout2 == NU
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 8229 2011-08-08 01:49 libiconv\libiconv\aliases.gperf
文件 69525 2011-08-08 01:49 libiconv\libiconv\aliases.h
文件 1271 2009-06-21 19:17 libiconv\libiconv\aliases2.h
文件 614 2011-08-08 01:49 libiconv\libiconv\aliases_aix.h
文件 824 2011-08-08 01:49 libiconv\libiconv\aliases_aix_sysaix.h
文件 1567 2011-08-08 01:49 libiconv\libiconv\aliases_dos.h
文件 525 2011-08-08 01:49 libiconv\libiconv\aliases_extra.h
文件 80 2011-08-08 01:49 libiconv\libiconv\aliases_osf1.h
文件 158 2011-08-08 01:49 libiconv\libiconv\aliases_osf1_sysosf1.h
文件 8412 2011-08-08 01:49 libiconv\libiconv\aliases_sysaix.gperf
文件 73930 2011-08-08 01:49 libiconv\libiconv\aliases_sysaix.h
文件 8447 2011-08-08 01:49 libiconv\libiconv\aliases_syshpux.gperf
文件 74862 2011-08-08 01:49 libiconv\libiconv\aliases_syshpux.h
文件 8327 2011-08-08 01:49 libiconv\libiconv\aliases_sysosf1.gperf
文件 73263 2011-08-08 01:49 libiconv\libiconv\aliases_sysosf1.h
文件 8360 2011-08-08 01:49 libiconv\libiconv\aliases_syssolaris.gperf
文件 75202 2011-08-08 01:49 libiconv\libiconv\aliases_syssolaris.h
文件 4326 2009-06-21 19:17 libiconv\libiconv\armscii_8.h
文件 1283 2009-06-21 19:17 libiconv\libiconv\ascii.h
文件 6847 2009-06-21 19:17 libiconv\libiconv\atarist.h
文件 261998 2009-06-21 19:17 libiconv\libiconv\big5.h
文件 5773 2009-06-21 19:17 libiconv\libiconv\big5hkscs1999.h
文件 6208 2009-06-21 19:17 libiconv\libiconv\big5hkscs2001.h
文件 6586 2009-06-21 19:17 libiconv\libiconv\big5hkscs2004.h
文件 6968 2010-11-24 10:24 libiconv\libiconv\big5hkscs2008.h
文件 20090 2009-06-21 19:17 libiconv\libiconv\big5_2003.h
文件 3320 2009-06-21 19:17 libiconv\libiconv\c99.h
文件 6684 2011-08-08 01:49 libiconv\libiconv\canonical.h
文件 551 2011-08-08 01:49 libiconv\libiconv\canonical_aix.h
文件 553 2011-08-08 01:49 libiconv\libiconv\canonical_aix_sysaix.h
............此处省略247个文件信息
- 上一篇:SCA103T 中文手册.pdf
- 下一篇:PLCopen part1&part2;
相关资源
- API VIEWER 2004
- Xshell3b0281Windows平台下中文版SSH连接工
- Gaussian Processes for Machine Learning.pdf
- nMaker 4.0 原Windows N in 1 Maker 制作多合一
- WindowsServer2016管理员操作手册
- Fortran快速入门教程(中文)
- Windows7扫雷文件
- MpCCI_10th_Userforum_2009
- Windows端Frp服务器一键搭建
- unity for ios 上传IOS机本地的头像 相机
- DOS_Windows汇编语言程序设计教程PPT
- RF power amplifiers for wireless communication
- PolyBoost_v4_1 for max9
- CMMI_for_Development_v1-3_Simplified_Chinese
- IUAP-STUDIO for NCCloud 3.5授权破解补丁.
- bison-2.4.1-setup.exe
- Forest D1 STM32 旋转倒立摆源码 电子竞赛
- NSE4_FGT-6.2 V9.02.pdf
- Mentor Design-for-Test Common Resources
- Windows N in 1 Maker 4.0 nMaker4.0制作多合一
- Windows+Server+2008中安装Exchange+Server+20
- myeclipse(windows)-2016-CI-7破解文件
- xlslib_for_qt(xlslib_v2.5.0)
- stegdetect for windows
- Gaussian Processes for Machine Learning - Rasm
- dspack for delphi 2010
- SOFA库含fortan和c版程序
- C8051仿真驱动For Keil
- Reinforcement Learning: An Introduction 2nd so
- Portal+for+ArcGIS入门教程
评论
共有 条评论