资源简介
PCLINT是一种代码检查工具,还包括中文文档
代码片段和文件信息
/*
EXAMPLE SOURCE CODE FOR GREP FILTER
Grep2Msg.C
Copyright (c) 1990 1991 Borland International Inc.
All rights reserved.
Grep2Msg - Message filter from Turbo Grep to Turbo C++ IDE message window
This filter accepts input through the standard input stream converts
it and outputs it to the standard output stream. The streams are linked
through pipes such that the input stream is the output from GREP and
the output stream is connected to the message window of the Turbo C++ IDE.
This filter is invoked through the Turbo C++ IDE transfer mechanism as
grep | grep2msg | TC IDE
Compile using Turbo C++ in the LARGE memory model
tcc -ml grep2msg
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include “filter.h“
#define TRUE 1
#define FALSE 0
#define STR_MAX 256
#define NAME_MAX 80
char NewFileText[] = “--- Module: “;
char IncludeText[] = “Including file “;
unsigned BufSizeCurBufLen;
char *InBuffer
*OutBuffer
*CurInPtr
*CurOutPtr
*LinePtr;
char Line[133];
long int InOff;
char EndMark;
int NoLines;
char oldfile[NAME_MAX] = ““;
int replace = 0;
/************************************************************************
Function : NextChar
Parameters: None
Returns : next character in input buffer or 0 for end of file
Input from the standard input stream is buffered in a global buffer InBuffer
which is allocated in function main. NextChar function will return
the next character in the buffer reading from the input stream when the
buffer becomes empty.
************************************************************************/
char NextChar(void)
{
if (CurInPtr < InBuffer+CurBufLen) /* if buffer is not empty */
{
return *(CurInPtr++); /* return next information */
}
else
{
CurInPtr = InBuffer; /* reset pointer to front of buffer */
lseek(0InOff0); /* seek to the next section for read */
InOff += BufSize; /* increment pointer to next block */
if ((CurBufLen = (unsigned) read(0InBufferBufSize)) !=0)
if (CurInPtr < InBuffer+CurBufLen)
return *(CurInPtr++);
return 0; /* return 0 on end of file */
}
}
/*************************************************************************
Function : flushOut
Parameters: Size The number of characters to be written out
Returns : nothing
Strings to be sent to the message window are placed in a buffer called
OutBuffer. A call to this function will write Size bytes to the
standard output stream and reset the output buffer pointer to the
beginning of the buffer. Any additional information in the buffer is
thus lost.
***********************************************
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4610 2009-12-06 17:22 pclint\DOS-ins\pharlap\cfig386.txt
文件 12371 2009-12-06 17:22 pclint\DOS-ins\pharlap\dosx.txt
文件 10246 2009-12-06 17:22 pclint\DOS-ins\lnt\gcc-readme.txt
文件 453977 2009-12-06 17:22 pclint\DOS-ins\msg.txt
文件 2941 2009-12-06 17:23 pclint\DOS-ins\readme.txt
文件 17 2009-12-06 17:23 pclint\Serial.txt
文件 3750 2009-12-06 17:22 pclint\DOS-ins\pharlap\tellme.txt
文件 783 2009-12-06 17:21 pclint\DOS-ins\lnt\co-bc5.h
文件 117 2009-12-06 17:21 pclint\DOS-ins\lnt\co-byte.h
文件 293 2009-12-06 17:21 pclint\DOS-ins\lnt\co-cosm.h
文件 937 2009-12-06 17:21 pclint\DOS-ins\lnt\co-gcc.h
文件 628 2009-12-06 17:21 pclint\DOS-ins\lnt\co-mc.h
文件 584 2009-12-06 17:21 pclint\DOS-ins\lnt\co-msc80.h
文件 584 2009-12-06 17:21 pclint\DOS-ins\lnt\co-msc90.h
文件 292 2009-12-06 17:21 pclint\DOS-ins\lnt\co-vage.h
文件 557 2009-12-06 17:22 pclint\DOS-ins\lnt\lib-bcl.h
文件 42 2009-12-06 17:22 pclint\DOS-ins\lnt\lib-in.h
文件 237 2009-12-06 17:22 pclint\DOS-ins\lnt\lib-rw.h
文件 468 2009-12-06 17:22 pclint\DOS-ins\test\test.h
文件 10011 2009-12-06 17:22 pclint\DOS-ins\lnt\lint2msg.c
文件 78 2009-12-06 17:22 pclint\DOS-ins\test\module2.c
文件 4075 2009-12-06 17:22 pclint\DOS-ins\lnt\sl-c86.c
文件 5036 2009-12-06 17:22 pclint\DOS-ins\lnt\sl-desm.c
文件 4440 2009-12-06 17:22 pclint\DOS-ins\lnt\sl-lc2.c
文件 3792 2009-12-06 17:22 pclint\DOS-ins\lnt\sl-mwc.c
文件 3876 2009-12-06 17:22 pclint\DOS-ins\lnt\sl-qc88.c
文件 4030 2009-12-06 17:22 pclint\DOS-ins\lnt\sl.c
文件 90 2009-12-06 17:22 pclint\DOS-ins\test\filea.cpp
文件 38 2009-12-06 17:22 pclint\DOS-ins\test\fileb.cpp
文件 126 2009-12-06 17:22 pclint\DOS-ins\test\module1.cpp
............此处省略177个文件信息
- 上一篇:台球游戏台球游戏台球游戏
- 下一篇:HEW开发环境使用手册
评论
共有 条评论