资源简介
zint-源代码.zip

代码片段和文件信息
/* 2of5.c - Handles Code 2 of 5 barcodes */
/*
libzint - the open source barcode library
Copyright (C) 2008 Robin Stuart
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not write to the Free Software Foundation Inc.
51 Franklin Street Fifth Floor Boston MA 02110-1301 USA.
*/
#include
#include
#include
#include “common.h“
const char *C25MatrixTable[10] = {“113311“ “311131“ “131131“ “331111“ “113131“ “313111“
“133111“ “111331“ “311311“ “131311“};
const char *C25IndustTable[10] = {“1111313111“ “3111111131“ “1131111131“ “3131111111“ “1111311131“
“3111311111“ “1131311111“ “1111113131“ “3111113111“ “1131113111“};
const char *C25InterTable[10] = {“11331“ “31113“ “13113“ “33111“ “11313“ “31311“ “13311“ “11133“
“31131“ “13131“};
static inline char check_digit(unsigned int count)
{
return itoc((10 - (count % 10)) % 10);
}
int matrix_two_of_five(struct zint_symbol *symbol uint8_t source[] int length)
{ /* Code 2 of 5 Standard (Code 2 of 5 Matrix) */
int error_number;
char dest[512]; /* 6 + 80 * 6 + 6 + 1 ~ 512*/
error_number = 0;
if(length > 80) {
strcpy(symbol->errtxt “Input too long“);
return ZERROR_TOO_LONG;
}
error_number = is_sane(NEON source length);
if(error_number == ZERROR_INVALID_DATA) {
strcpy(symbol->errtxt “Invalid characters in data“);
return error_number;
}
/* start character */
strcpy(dest “411111“);
for(int i = 0; i < length; i++) {
lookup(NEON C25MatrixTable source[i] dest);
}
/* Stop character */
concat (dest “41111“);
expand(symbol dest);
ustrcpy(symbol->text source);
return error_number;
}
int industrial_two_of_five(struct zint_symbol *symbol uint8_t source[] int length)
{ /* Code 2 of 5 Industrial */
int error_number;
char dest[512]; /* 6 + 40 * 10 + 6 + 1 */
error_number = 0;
if(length > 45) {
strcpy(symbol->errtxt “Input too long“);
return ZERROR_TOO_LONG;
}
error_number = is_sane(NEON source length);
if(error_number == ZERROR_INVALID_DATA) {
strcpy(symbol->errtxt “Invalid character in data“);
return error_number;
}
/* start character */
strcpy(dest “313111“);
for(int i = 0; i < length; i++) {
lookup(NEON C25IndustTable source[i] dest);
}
/* Stop character */
concat (dest “31113“);
expand(symbol dest);
ustrcpy(symbol->text source);
return error_number;
}
int iata_two_of_five(stru
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-07-09 06:38 zint-master\
文件 40 2013-07-09 06:38 zint-master\.gitignore
文件 3724 2013-07-09 06:38 zint-master\CMakeLists.txt
文件 35147 2013-07-09 06:38 zint-master\COPYING
文件 2461 2013-07-09 06:38 zint-master\INSTALL
文件 4149 2013-07-09 06:38 zint-master\README
文件 16874 2013-07-09 06:38 zint-master\SetPaths.cmake
文件 1070 2013-07-09 06:38 zint-master\TODO
目录 0 2013-07-09 06:38 zint-master\backend\
文件 8661 2013-07-09 06:38 zint-master\backend\2of5.c
文件 1022 2013-07-09 06:38 zint-master\backend\CMakeLists.txt
文件 1991 2013-07-09 06:38 zint-master\backend\DEVELOPER
文件 6872 2013-07-09 06:38 zint-master\backend\auspost.c
文件 37373 2013-07-09 06:38 zint-master\backend\aztec.c
文件 122229 2013-07-09 06:38 zint-master\backend\aztec.h
文件 15510 2013-07-09 06:38 zint-master\backend\code.c
文件 42727 2013-07-09 06:38 zint-master\backend\code1.c
文件 3195 2013-07-09 06:38 zint-master\backend\code1.h
文件 24848 2013-07-09 06:38 zint-master\backend\code128.c
文件 16643 2013-07-09 06:38 zint-master\backend\code16k.c
文件 9134 2013-07-09 06:38 zint-master\backend\code49.c
文件 62924 2013-07-09 06:38 zint-master\backend\code49.h
文件 8294 2013-07-09 06:38 zint-master\backend\common.c
文件 2706 2013-07-09 06:38 zint-master\backend\common.h
文件 57080 2013-07-09 06:38 zint-master\backend\composite.c
文件 2066 2013-07-09 06:38 zint-master\backend\composite.h
文件 783 2013-07-09 06:38 zint-master\backend\dllversion.c
文件 24862 2013-07-09 06:38 zint-master\backend\dmatrix.c
文件 4156 2013-07-09 06:38 zint-master\backend\dmatrix.h
文件 56889 2013-07-09 06:38 zint-master\backend\font.h
文件 127495 2013-07-09 06:38 zint-master\backend\gb2312.h
............此处省略112个文件信息
- 上一篇:FPXHUSB-ok.rar
- 下一篇:IEEE5.doc
相关资源
- PID_AutoTune_v0.rar
- vspd7.2.308.zip
- 价值2k的H漫画小说系统
- Pythonamp;课堂amp;笔记(高淇amp;400;集第
- ddos压力测试工具99657
- UML建模大全
- 开源1A锂电池充电板TP4056原理图+PCB
- m1卡 ic卡可选择扇区初始化加密软件
- TSCC.exe
- FTP课程设计(服务端+客户端)
- 计算机图形学 边填充算法实现代码
- 电力系统潮流计算程序集合
- oracle数据迁移项目实施方案
- Web Api 通过文件流 文件到本地
- Visio图标-最新最全的网络通信图标库
- Spire API文档
- OpenGL参考手册
- Python中Numpy库最新教程
- SPD博士V5.3.exe
- 直流无刷电机方波驱动 stm32 例程代码
- layui后台管理模板
- 仿知乎界面小程序源代码
- 云平台-阿里云详细介绍
- photoshop经典1000例
- scratch垃圾分类源码(最终版本).sb
- IAR ARM 7.8破解
- TI CCS V5.4 安装步骤及破解文件
- 松下plc FP-XH的驱动
- 局域网硬件信息收集工具
- 加快Windows XP操作系统开机速度
评论
共有 条评论