libiconv-1.15 for win10


把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
“ 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|‘
“);
  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
“);
    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
“ aliases_file_name);
    exit(1);
  }

  fprintf(aliases_file “struct alias { int name; unsigned int encoding_index; };
“);
  fprintf(aliases_file “%%struct-type
“);
  fprintf(aliases_file “%%language=ANSI-C
“);
  fprintf(aliases_file “%%define hash-function-name aliases_hash
“);
  fprintf(aliases_file “%%define lookup-function-name aliases_lookup
“);
  fprintf(aliases_file “%%7bit
“);
  fprintf(aliases_file “%%readonly-tables
“);
  fprintf(aliases_file “%%global-table
“);
  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.vslibiconv
     目录           0  2018-06-06 10:36  libiconv.vslibiconvv14
     文件       31232  2018-06-06 11:30  libiconv.vslibiconvv14.suo
     目录           0  2018-06-06 11:15  libiconvDebug
     文件       61440  2018-06-06 11:15  libiconvDebuglibiconv.pdb
     目录           0  2018-06-06 11:22  libiconvlibiconv
     文件        1306  2018-06-06 10:36  libiconvlibiconv.sln
     文件    28565504  2018-06-06 11:30  libiconvlibiconv.VC.db
     文件        8286  2017-01-02 07:02  libiconvlibiconvaliases.gperf
     文件       69896  2017-01-02 07:02  libiconvlibiconvaliases.h
     文件        1198  2014-01-03 06:23  libiconvlibiconvaliases2.h
     文件         614  2017-01-02 07:03  libiconvlibiconvaliases_aix.h
     文件         824  2017-01-02 07:03  libiconvlibiconvaliases_aix_sysaix.h
     文件        1567  2017-01-02 07:03  libiconvlibiconvaliases_dos.h
     文件         525  2017-01-02 07:03  libiconvlibiconvaliases_extra.h
     文件          80  2017-01-02 07:03  libiconvlibiconvaliases_osf1.h
     文件         158  2017-01-02 07:03  libiconvlibiconvaliases_osf1_sysosf1.h
     文件        8469  2017-01-02 07:03  libiconvlibiconvaliases_sysaix.gperf
     文件       74731  2017-01-02 07:03  libiconvlibiconvaliases_sysaix.h
     文件        8504  2017-01-02 07:03  libiconvlibiconvaliases_syshpux.gperf
     文件       75273  2017-01-02 07:03  libiconvlibiconvaliases_syshpux.h
     文件        8384  2017-01-02 07:03  libiconvlibiconvaliases_sysosf1.gperf
     文件       73887  2017-01-02 07:03  libiconvlibiconvaliases_sysosf1.h
     文件        8417  2017-01-02 07:03  libiconvlibiconvaliases_syssolaris.gperf
     文件       75111  2017-01-02 07:03  libiconvlibiconvaliases_syssolaris.h
     文件        4265  2016-10-14 06:36  libiconvlibiconvarmscii_8.h
     文件        1222  2016-10-14 06:36  libiconvlibiconvascii.h
     文件        6786  2016-10-14 06:37  libiconvlibiconvatarist.h
     文件      261943  2016-10-14 06:37  libiconvlibiconvig5.h
............此处省略282个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)