资源简介
snappy-1.1.1.tar.gz
代码片段和文件信息
#ifndef lint
static char Rcs_Id[] =
“$Id: fields.cv 1.7 1994/01/06 05:26:37 geoff Exp $“;
#endif
/*
* $Log: fields.cv $
* Revision 1.7 1994/01/06 05:26:37 geoff
* Get rid of all references to System V string routines for portability
* (sigh).
*
* Revision 1.6 1994/01/05 20:13:43 geoff
* Add the maxf parameter
*
* Revision 1.5 1994/01/04 02:40:21 geoff
* Make the increments settable (field_line_inc and field_field_inc).
* Add support for the FLD_NOSHRINK flag.
*
* Revision 1.4 1993/09/27 17:48:02 geoff
* Fix some lint complaints and some parenthesization errors.
*
* Revision 1.3 1993/09/09 01:11:11 geoff
* Add a return value to fieldwrite. Add support for backquotes and for
* unstripped backslashes.
*
* Revision 1.2 1993/08/26 00:02:50 geoff
* Fix a stupid null-pointer bug
*
* Revision 1.1 1993/08/25 21:32:05 geoff
* Initial revision
*
*/
#include
#include “config.h“
#include “fields.h“
field_t * fieldread P ((FILE * file char * delims
int flags int maxf));
/* Read a line with fields from a file */
field_t * fieldmake P ((char * line int allocated char * delims
int flags int maxf));
/* Make a field structure from a line */
static field_t * fieldparse P ((field_t * fieldp char * line char * delims
int flags int maxf));
/* Parse the fields in a line */
static int fieldbackch P ((char * str char ** out int strip));
/* Process backslash sequences */
int fieldwrite P ((FILE * file field_t * fieldp int delim));
/* Write a line with fields to a file */
void fieldfree P ((field_t * fieldp));
/* Free a field returned by fieldread */
unsigned int field_field_inc = 20; /* Increment to increase # fields by */
unsigned int field_line_inc = 512; /* Incr to increase line length by */
#ifndef USG
#define strchr index
#endif /* USG */
extern void free ();
extern char * malloc ();
extern char * realloc ();
extern char * strchr ();
extern int strlen ();
/*
* Read one line of the given file into a buffer break it up into
* fields and return them to the caller. The field_t structure
* returned must eventually be freed with fieldfree.
*/
field_t * fieldread (file delims flags maxf)
FILE * file; /* File to read lines from */
char * delims; /* Characters to use for field delimiters */
int flags; /* Option flags; see fields.h */
int maxf; /* Maximum number of fields to parse */
{
register char * linebuf; /* Buffer to hold the line read in */
int linemax; /* Maximum line buffer size */
int linesize; /* Current line buffer size */
linebuf = (char *) malloc (field_line_inc);
if (linebuf == NULL)
return NULL;
linemax = field_line_inc;
linesize = 0;
/*
* Read in the line.
*/
while (fgets (&linebuf[linesize] linemax - linesize file)
!= NULL)
{
linesize += strlen (&linebuf[linesize]);
if (linebuf[linesize - 1] == ‘\n‘)
break;
else
{
lin
相关资源
-
flashpla
yer_activex_11.1.102.63 - openssl1.1.1RSA、ECC、SM2身份认证Demo及文
- hadoop 2.9.1 native包 含snappy
- 自助点餐小程序 deam_food 1.1.16 全开源
- 致中变形观测数据处理软件2011.1.1版
- 最新USGS 遥感图像批量工具 Bulk Downl
- cydia_1.1.12deb文件及依赖包
- openssl1.1.1源码
- hadoop 2.6 native snappy
- ZXV10 T800V1.1.1常用操作指导
- 1.1.18萤火小程序商业版合集完整包.
- Win64OpenSSL-1.1.1
- 志汇同城小程序11.1.1
- GeoStudio 2018 R2 v9.1.1.16749破解
- Saleae Logic Setup 1.1.16 (32-bit)
- saleae逻辑分析仪应用软件Logic Setup 1
- openssl-1.1.1库win32-64
- OpenSSL 1.1.1a for Windows32位、64位,已编
- 网页游戏FLASH插件Flash11.1.102.63(最好
- 智能车多功能调试助手V1.1.1
- robot3t 1.1.1-windows
- Navicat11.1.13.rar
- torque-6.1.1.1.tar.gz
- hadoop-2.5.0-cdh5.3.6的native包-含snappy
- virtio-win-1.1.16.iso
- Win32OpenSSL-1_1_1g.exe
- Azure-Kinect-Sensor-SDK-v1.1.1.tar.gz
- SteamVR Plugin 1.0.8/1.1.0 /1.1.1/1.2.0./1.2.1
- safari浏览器11版本的安装包11.1.1版本
- Cognex ViDi Suite Installer v3.1.1.10701
评论
共有 条评论