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

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

?? coco2msg.c

?? 自己寫的關于編譯原理的實驗報告的源代碼
?? C
字號:
/*
  SOURCE CODE FOR COCO2MSG FILTER

  Coco2Msg.C
  Adapted from Borland Sample by Frankie Arzu.
  Compiler:  Borland C++ 3.1

  Coco2Msg - Message filter from Coco to the 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 COCO, and
  the output stream is connected to the message window of the IDE.
  This filter is invoked through the IDE transfer mechanism as

        cocor <commands> | coco2msg | IDE message window

  Since cocor does not write its output to stdout but to stderr,
  I had to do a little trick to fool the IDE.
  First compile coco2msg.c to generate coco2msg.exe, then copy coco2msg.exe to
  &coco2msg.exe, so the filter is invoked as

        cocor <commands> |&coco2msg | IDE message window

  This causes a redirection of the stderr instead of the stdout.  The
  &coco2msg.exe is used so the IDE finds the filter &coco2msg, but the real
  filter is coco2msg.exe
 
  Compile using the LARGE memory model.
*/
 
#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     CurFile[MAXPATH] ;
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 cocor into a format usable in the Borland C++
environment message window.  Lines are simply sent straight through
with format characters for the message window.

Cocor Error Format: "filename", Line XXX, Col XXX : Message
**************************************************************************/
void ProcessLine(char *Line)
{
   static int HavePutFile = FALSE;
   char     Type;
   unsigned line,col;
   char     *s,*d;
   char     fn[MAXPATH];

/* don't try to process a NULL line */
   if (Line[0] == 0)
     return ;

   if (Line[0] == '*') {           /* Warning Line */
         if( !HavePutFile )  {
          Type = MsgNewFile;       /* indicate by sending type
                                      out to message window */
          *CurFile = '\0';
          Put(&Type,1);
          Put(CurFile,1);          /* along with null filename */
          HavePutFile = TRUE;
          }

      Type = MsgNewLine;           /* Fake line # etc.  */
      line = 32000;
      col = 1;
      Put(&Type,1);
      Put((char *)&line,2);
      Put((char *)&col,2);
      Put(Line,strlen(Line)+1);
      return ;
   }


  s = strchr(Line,'"');                     /* find "filename" */
  d = strchr(s+1,'"');
  if (d != NULL)                            /* if no "filename" : invalid line */
  {
     memmove(fn,s+1,(unsigned)(d-s-1));     /* save filename */
     fn[(unsigned)(d-s-1)] = 0;             /* null terminate name */
     memmove(Line,d+1,100);                 /* shift line left */
     if (strcmp(fn,CurFile) != 0)           /* if new filename */
     {
       Type = MsgNewFile;                   /* indicate by sending type
                                               out to message window */
       strcpy(CurFile,fn);
       Put(&Type,1);
       Put(CurFile,strlen(CurFile)+1);      /* along with the new name */
       HavePutFile = TRUE;
     }
     s = strchr(Line,'L');                  /* Find "Line" */
     memmove(Line,s+1,100);                 /* shift line left */
     s = strchr(Line,' ');                  /* Find " XXX" */
     memmove(Line,s+1,100);                 /* shift line left */

     s = strchr(Line,',');
     *s = 0;
     line = atoi(Line);                     /* if number is found convert string to integer */
     memmove(Line,s+1,100);                 /* shift line left */

     s = strchr(Line,'C');                  /* Find "Col" */
     memmove(Line,s+1,100);                 /* shift line left */
     s = strchr(Line,' ');                  /* Find " XXX" */
     memmove(Line,s+1,100);                 /* shift line left */
     s = strchr(Line,':');                  /* Find ":" */
     *s = 0;
     col = atoi(Line);                      /* if number is found convert string to integer */
     memmove(Line,s+1,100);                 /* shift line left */

     Type = MsgNewLine;                     /* set type to new line */
     Put(&Type,1);                          /* indicate need for new line */
     Put((char *)&line,2);                  /* put the number out */
     Put((char *)&col,2);                   /* tab over to put message */

     while (Line[0] == ' ' && Line[0] != 0) /* strip spaces from line */
       memmove(Line,&Line[1],strlen(Line));
     Put(Line,strlen(Line)+1);              /* output the message */
     return ;
  }

  if( !HavePutFile )
  {
        /* IDE expects the first message to
          be preceded by a filename.  Since
          we don't have one, fake it by
          sending a NULL file before the
          message.
        */
        Type = MsgNewFile;                  /* indicate by sending type
                                               out to message window */
        *CurFile = '\0';
        Put(&Type,1);
        Put(CurFile,1);                     /* along with null filename */
        HavePutFile = TRUE;
  }

      Type = MsgNewLine;                    /* Fake line # etc. */
      line    = 1;
      Put(&Type,1);
      Put((char *)&line,2);
      Put((char *)&line,2);
      while (Line[0] == ' ' && Line[0] != 0)
        memmove(Line,&Line[1],strlen(Line));
      Put(Line,strlen(Line)+1);
      return ;
}


/************************************************************************
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一区二区三区免费野_久草精品视频
亚洲欧美精品午睡沙发| 国产一区二区三区四区五区入口 | 国产精品欧美久久久久一区二区| 亚洲美女区一区| 久久精工是国产品牌吗| 97久久超碰国产精品| 久久综合久久鬼色| 日本不卡一区二区三区| 色婷婷综合久久久中文一区二区| 精品欧美一区二区在线观看| 亚洲一区二区中文在线| 成人的网站免费观看| 精品盗摄一区二区三区| 丝袜美腿一区二区三区| 在线亚洲精品福利网址导航| 国产欧美日韩在线视频| 久久精品国产第一区二区三区| 欧美在线啊v一区| 亚洲人快播电影网| 成人高清av在线| 欧美国产成人精品| 国产美女主播视频一区| 精品入口麻豆88视频| 天堂资源在线中文精品| 欧美主播一区二区三区美女| 亚洲人成精品久久久久久| gogogo免费视频观看亚洲一| 国产三级一区二区| 国产精品白丝jk白祙喷水网站| 欧美一区二区三区视频免费| 亚洲超碰97人人做人人爱| 欧美性色黄大片| 亚洲最新视频在线播放| 欧美日韩在线综合| 日韩中文字幕麻豆| 在线电影国产精品| 蜜臀av性久久久久蜜臀aⅴ流畅 | 亚洲夂夂婷婷色拍ww47| 在线看国产日韩| 亚洲chinese男男1069| 欧美色综合网站| 污片在线观看一区二区| 日韩视频永久免费| 国精品**一区二区三区在线蜜桃| 精品少妇一区二区三区| 国产成人亚洲综合a∨婷婷图片| 国产午夜精品久久| 成人精品视频一区二区三区| 亚洲欧美日韩在线| 欧美探花视频资源| 老色鬼精品视频在线观看播放| 久久亚洲综合av| 成人av电影免费观看| 亚洲视频你懂的| 欧美美女一区二区| 丰满放荡岳乱妇91ww| 国产精品家庭影院| 欧美日韩精品三区| 国产一区二区电影| 亚洲精品中文字幕乱码三区| 欧美日韩亚洲综合一区 | 久久午夜色播影院免费高清| 成人高清免费在线播放| 香蕉成人伊视频在线观看| 精品va天堂亚洲国产| 97久久精品人人做人人爽| 日本免费新一区视频| 国产精品理论片| 日韩欧美aaaaaa| 97久久超碰国产精品电影| 久久精品国产99国产| 亚洲人成小说网站色在线| 日韩欧美资源站| 91免费视频网| 国产精品系列在线播放| 亚洲不卡av一区二区三区| 中文字幕不卡在线播放| 91精品在线免费观看| 春色校园综合激情亚洲| 五月天久久比比资源色| 国产精品高潮久久久久无| 日韩免费电影一区| 91久久香蕉国产日韩欧美9色| 激情成人午夜视频| 午夜精品久久久久久久99水蜜桃| 久久精品视频免费| 日韩一区二区在线看| 欧美在线免费观看亚洲| 国产成人精品一区二区三区四区 | 欧洲一区在线电影| 国产不卡免费视频| 美国毛片一区二区三区| 一区二区日韩av| 国产精品国产三级国产普通话蜜臀| 欧美一级搡bbbb搡bbbb| 欧美视频一区二区在线观看| 成人18精品视频| 成人精品高清在线| 国产精品一区一区| 国产一区二区视频在线播放| 青草国产精品久久久久久| 亚洲电影一级黄| 亚洲第一主播视频| 一区二区三区不卡视频| 亚洲图片欧美激情| 久久人人97超碰com| 精品日本一线二线三线不卡| 7777精品伊人久久久大香线蕉完整版| 一本到不卡精品视频在线观看| 成人a免费在线看| 成人性生交大片免费看视频在线 | 亚洲综合久久av| 亚洲精品乱码久久久久久| 最新高清无码专区| 中文字幕av资源一区| 国产欧美一区二区三区鸳鸯浴| 久久网站热最新地址| 久久精品一区二区三区不卡牛牛 | 精品欧美一区二区久久| 欧美电影精品一区二区| 精品日韩一区二区三区 | 亚洲综合久久久| 五月天婷婷综合| 日韩一区精品视频| 久久精品国产99| 国产成人精品一区二| 91在线视频免费91| 欧美日韩小视频| 欧美电视剧免费观看| 久久美女艺术照精彩视频福利播放| 久久人人97超碰com| 国产精品免费观看视频| 亚洲激情图片小说视频| 午夜精品久久一牛影视| 精品中文av资源站在线观看| 国产成+人+日韩+欧美+亚洲| 一本大道久久a久久综合| 4438成人网| 久久久久久久久99精品| 中文字幕一区二区5566日韩| 亚洲国产视频网站| 精品亚洲国内自在自线福利| 国产成人一级电影| 欧美日韩一区不卡| 日韩一区二区三区视频在线观看| 久久久久久久久岛国免费| 专区另类欧美日韩| 天天射综合影视| 从欧美一区二区三区| 欧美久久婷婷综合色| 亚洲欧美国产毛片在线| 午夜精品福利一区二区三区蜜桃| 日韩高清不卡在线| 韩国一区二区三区| 欧美亚洲国产一区二区三区va| 日韩亚洲欧美中文三级| 国产精品久久久久久久久动漫| 亚洲电影一区二区| 成人精品视频网站| 在线91免费看| 亚洲欧洲日韩在线| 久久精品国产在热久久| 欧洲色大大久久| 国产午夜亚洲精品理论片色戒| 亚洲精品成人精品456| 韩国视频一区二区| 欧美亚洲动漫制服丝袜| 欧美激情在线免费观看| 热久久国产精品| 欧美色图第一页| 成人免费一区二区三区视频| 韩国女主播一区| 欧美日韩国产小视频| 中文字幕在线观看一区二区| 紧缚捆绑精品一区二区| 欧美日韩国产一二三| 依依成人精品视频| 成人av在线资源网| 久久综合丝袜日本网| 日韩成人av影视| 精品视频色一区| 一区二区三区色| 91在线免费播放| 国产精品美女久久久久aⅴ| 国产呦萝稀缺另类资源| 日韩视频一区二区三区| 首页综合国产亚洲丝袜| 欧美日韩视频一区二区| 一区二区三区日韩欧美精品| 91香蕉视频在线| 日韩精品欧美精品| 日本道免费精品一区二区三区| 欧美激情在线一区二区| 国产成人免费在线观看不卡| 久久综合给合久久狠狠狠97色69| 奇米四色…亚洲| 欧美一卡二卡三卡四卡| 日韩精品免费专区| 555www色欧美视频| 免费的国产精品|