亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? grep2msg.c

?? tc3 考試系統
?? C
字號:
/*
   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 <commands> | grep2msg | TC IDE

    Compile using Turbo C++ in the LARGE memory model

    tcc -ml grep2msg
*/

#include <dir.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <alloc.h>
#include <io.h>
#include <dos.h>
#include "filter.h"

#define TRUE  1
#define FALSE 0

char     NewFileText[] = "File ";
unsigned BufSize,CurBufLen;
char     *InBuffer,
         *OutBuffer,
         *CurInPtr,
         *CurOutPtr,
         *LinePtr;
char     Line[133];
long int InOff;
char     EndMark;
int      NoLines;

/************************************************************************
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(0,InOff,0);                 /* seek to the next section for read */
      InOff += BufSize;                 /* increment pointer to next block */
      if ((CurBufLen = read(0,InBuffer,BufSize)) !=0)
         return NextChar();             /* recursive call returns first
                                           character in buffer after read */
      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.
**************************************************************************/
void flushOut(unsigned Size)
{
  if (Size != 0)                 /* don't flush an empty buffer */
  {
    CurOutPtr = OutBuffer;       /* reset pointer to beginning of buffer */
    lseek(1,0,2);                /* seek output stream to end */
    write(1,OutBuffer,Size);     /* write out Size bytes */
  }
}

/**************************************************************************
Function  : Put
Parameters: S     pointer to a string of characters
            Len   length of the string of characters
Returns   : Nothing.

Put places bytes into OutBuffer so they may be later flushed out into the
standard output stream using flushOut.
*************************************************************************/
void Put(char *S,int Len)
{
  int i;

  for (i = 0; i < Len; i++)
  {
    *CurOutPtr++ = S[i];                     /* place byte in buffer */
    if (CurOutPtr >= OutBuffer+BufSize)      /* if buffer overflows */
      flushOut(BufSize);                     /* flush to the stream */
  }
}

/**************************************************************************
Function  : ProcessLine
Parameters: Line   a pointer to the character line to be analyzed
Returns   : Nothing.

Filters lines output from grep into a format usable in the Turbo C++
environment message window.  Lines are simply sent straight through
with format characters for the message window.
**************************************************************************/
void ProcessLine(char *Line)
{
  char Type;
  unsigned i;
  char *s;

  if (Line[0] == 0)                            /* ignore blank line */
    return;

  /* check for new file name */
  if (strncmp(Line,NewFileText,strlen(NewFileText)) == 0)
  {
    if (NoLines)                             /* if no lines from last file */
    {
      Type = MsgNewLine;                     /* put some space in window */
      i = 1;
      Put(&Type,1);
      Put((char *)&i,2);
      Put((char *)&i,2);
      Put(" ",2);
    }
    Type = MsgNewFile;                       /* indicate new file */
    Line[strlen(Line)-1] = 0;                /* remove ":" */
    memmove(Line,&Line[strlen(NewFileText)],strlen(Line));
    Put(&Type,1);
    Put(Line,strlen(Line)+1);                /* write filename */
    NoLines = TRUE;
  }
  else
  {
    NoLines = FALSE;                         /* message lines output */
    Type = MsgNewLine;                       /* new line in message window */
    s = strchr(Line,' ');
    if (s != NULL)
    {
      s++;
      if (strncmp(s,"lines match",11) == 0)  /* special case lines matching */
      {
        i = 1;
        Put(&Type,1);                        /* output two newlines */
        Put((char *)&i,2);
        Put((char *)&i,2);                   /* to message window */
        Put(Line,strlen(Line)+1);            /* and the line */
      }
      else
      {
        s--;
        *s = 0;
        i = atoi(Line);
        *s = ' ';
        if (i != 0)
        {
          Put(&Type,1);
          Put((char *)&i,2);                 /* output line number */
          i = 1;                             /* Column */
          Put((char *)&i,2);                 /* set column over */
          s++;
          memmove(Line,s,strlen(s)+1);
          while (Line[0] == ' ' && Line[0] != 0)  /* strip leading spaces */
            memmove(Line,&Line[1],strlen(Line));  /* from remaining line */
          Put(Line,strlen(Line)+1);               /* and put out the line */
        }
      }
    }
  }
}

/************************************************************************
Function  : Main

Returns   : zero on successful execution
               3 on an error condition

The main routine allocates memory for the input and output buffers.
Characters are then read from the input buffer building the line buffer
that will be sent to the filter processor.  Lines are read and filtered
until the end of input is reached.
************************************************************************/
int main(void)
{
   char c;
   int i, Type;
   unsigned long core;

   setmode(1,O_BINARY);               /* set standard out to binary mode */
   NoLines = FALSE;                   /* No lines have been read yet */
   core = farcoreleft();              /* get available memory */
   if (core > 64000U)                 /* limit buffers to total of 64000 */
      BufSize = 64000U;               /* bytes */
   else
      BufSize = (unsigned)core;
   if ((InBuffer = malloc(BufSize)) == NULL) /* allocate buffer space */
      exit(3);                        /* abort if error occured */
   CurInPtr = InBuffer;               /* split buffer */
   BufSize = BufSize/2;               /* between input and output buffers */
   OutBuffer = InBuffer + BufSize;
   CurOutPtr = OutBuffer;
   LinePtr = Line;                    /* set line buffer pointer */
   CurBufLen = 0;                     /* and reset buffer size to zero */
   Put(PipeId,PipeIdLen);             /* Identify process to message window */
   while ((c = NextChar()) != 0)      /* read characters */
   {
      if ((c == 13) || (c == 10))     /* build line until new line is seen */
      {
         *LinePtr = 0;
         ProcessLine(Line);           /* then filter the line */
         LinePtr = Line;
      }
      /* characters are added to line only up to 132 characters */
      else if ((FP_OFF(LinePtr) - FP_OFF(&Line)) < 132)
      {
         *LinePtr = c;
         LinePtr++;
      }
   }
   *LinePtr = 0;
   ProcessLine(Line);                  /* filter last line */
   if (NoLines)                        /* if no lines */
   {
      Type = MsgNewLine;               /* send something to the */
      i = 1;                           /* message window */
      Put((char *)&Type,1);
      Put((char *)&i,2);
      Put((char *)&i,2);
      Put(" ",2);
   }
   EndMark = MsgEoFile;                /* indicate end of input to */
   Put(&EndMark,1);                    /* message window */
   flushOut((unsigned)(CurOutPtr-OutBuffer));  /* flush out remaining buffer */

   return  0;                          /* everything went ok */
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩午夜电影在线观看| 亚洲男人的天堂在线aⅴ视频| 日韩一级免费一区| 日本一区二区三级电影在线观看| 亚洲激情六月丁香| 成人午夜视频网站| 欧美一级免费观看| 亚洲一区二区美女| eeuss鲁片一区二区三区在线观看| 欧美日韩国产乱码电影| 亚洲精品高清在线| 国产成人精品免费网站| 日韩欧美国产小视频| 性欧美疯狂xxxxbbbb| 色哟哟欧美精品| 国产精品国产三级国产| 懂色av一区二区夜夜嗨| 精品免费日韩av| 麻豆91在线观看| 4438亚洲最大| 天使萌一区二区三区免费观看| 97se亚洲国产综合自在线不卡| 2023国产精华国产精品| 琪琪久久久久日韩精品| 欧美精品vⅰdeose4hd| 亚洲成av人片观看| 在线观看免费视频综合| 亚洲欧美日韩在线| 91丨porny丨蝌蚪视频| 国产精品不卡视频| 99久免费精品视频在线观看| 国产日韩欧美精品一区| 粉嫩蜜臀av国产精品网站| 国产欧美一区二区三区在线看蜜臀 | 亚洲国产日韩一区二区| 99久久国产综合精品女不卡| 亚洲免费毛片网站| 欧美在线制服丝袜| 五月婷婷激情综合网| 欧美久久久影院| 青青草97国产精品免费观看无弹窗版| 日韩亚洲欧美在线观看| 国产精一区二区三区| 欧美国产乱子伦| 91久久人澡人人添人人爽欧美| 一区二区不卡在线播放| 91精品国产综合久久国产大片| 蜜桃免费网站一区二区三区| 久久综合九色欧美综合狠狠| 成人性视频免费网站| 亚洲精品乱码久久久久| 欧美一区三区四区| 成人久久久精品乱码一区二区三区| 国产精品福利影院| 欧美日韩免费不卡视频一区二区三区| 国产91精品在线观看| 99久久伊人精品| 中文字幕永久在线不卡| 麻豆一区二区三| 国产日产精品1区| 91激情五月电影| 九九国产精品视频| 亚洲欧洲综合另类在线| 日韩午夜av电影| www.性欧美| 欧美久久一区二区| 国产精品久久三| 日日骚欧美日韩| 91久久精品一区二区三区| 日韩欧美中文字幕制服| 中文字幕视频一区二区三区久| 久久久久久久精| 中文无字幕一区二区三区| 亚洲国产一区二区在线播放| 国产91精品在线观看| 亚洲一区二区精品3399| 国产日韩精品久久久| 亚洲影视资源网| 精品裸体舞一区二区三区| 色婷婷综合久色| 国产成人在线视频免费播放| 性做久久久久久免费观看欧美| 国产女人18毛片水真多成人如厕| 欧美美女激情18p| 91在线视频网址| 国产一区二区h| 久久国产精品99久久人人澡| 亚洲一区日韩精品中文字幕| 国产精品久久777777| 精品国产乱码久久久久久图片 | 国产麻豆午夜三级精品| 亚洲精品国久久99热| 日本一区二区久久| 久久在线免费观看| 欧美va亚洲va| 日韩一区二区三区在线视频| 欧美亚一区二区| 成人av网站在线观看免费| 九九视频精品免费| 秋霞影院一区二区| 天使萌一区二区三区免费观看| 一区二区三区在线免费| 1024成人网| 亚洲色图19p| 国产精品久久久久久久浪潮网站| 欧美经典一区二区三区| 久久久国际精品| 久久精品日产第一区二区三区高清版| 精品久久久久久综合日本欧美| 日韩一区二区视频在线观看| 日韩免费看网站| 欧美成人女星排名| 精品国产人成亚洲区| 久久久影院官网| 国产欧美日韩一区二区三区在线观看 | 精品福利在线导航| 日韩一区二区三区高清免费看看| 欧美一级黄色录像| 精品国产免费久久| 国产欧美一区二区精品仙草咪| 欧美国产亚洲另类动漫| 国产精品免费aⅴ片在线观看| 国产精品美日韩| 亚洲视频每日更新| 亚洲国产aⅴ成人精品无吗| 青娱乐精品视频| 国产剧情一区二区| 成人sese在线| 精品视频一区二区不卡| 欧美一级精品大片| 国产欧美日韩三级| 一区二区三区四区亚洲| 亚洲成人在线免费| 激情综合色丁香一区二区| 国产suv精品一区二区883| 91麻豆成人久久精品二区三区| 欧美性xxxxx极品少妇| 日韩一区二区麻豆国产| 久久精品视频免费| 亚洲国产综合色| 韩国精品主播一区二区在线观看 | 中文字幕av不卡| 亚洲国产日韩一级| 国产中文一区二区三区| 99在线精品免费| 欧美丰满少妇xxxbbb| 国产日韩av一区二区| 亚洲一级不卡视频| 国产精品系列在线观看| 欧美三级中文字幕在线观看| 欧美成人一区二区三区片免费| 成人免费小视频| 麻豆精品精品国产自在97香蕉| aaa欧美色吧激情视频| 欧美一二三在线| 综合久久久久综合| 国内精品第一页| 欧美中文字幕不卡| 国产拍欧美日韩视频二区| 亚洲成精国产精品女| 成人性生交大合| 日韩欧美美女一区二区三区| 亚洲免费观看高清完整版在线观看熊| 蜜桃91丨九色丨蝌蚪91桃色| 91麻豆精东视频| 久久免费美女视频| 日精品一区二区| 色哟哟精品一区| 欧美极品美女视频| 精品综合久久久久久8888| 欧美日韩国产综合草草| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 亚洲成人精品在线观看| 成人三级伦理片| 国产午夜亚洲精品理论片色戒 | 精品国产电影一区二区| 天堂一区二区在线| 欧美图片一区二区三区| 中文字幕一区二区在线播放 | 亚洲欧洲色图综合| 国产+成+人+亚洲欧洲自线| 欧美v亚洲v综合ⅴ国产v| 视频一区二区中文字幕| 欧美三级午夜理伦三级中视频| 国产精品成人免费在线| 国产精品一品二品| 久久综合九色综合97婷婷| 久久国产三级精品| 精品日韩在线一区| 老司机午夜精品| 精品久久久久久久一区二区蜜臀| 老司机免费视频一区二区| 欧美精品九九99久久| 亚洲动漫第一页| 3751色影院一区二区三区| 香蕉成人啪国产精品视频综合网| 欧美日韩免费一区二区三区视频| 一区二区三区免费网站| 欧美色涩在线第一页| 天天操天天综合网|