/[gcl]/gcl/o/mingwin.c
ViewVC logotype

Diff of /gcl/o/mingwin.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wfs, Sat Dec 9 07:10:35 2000 UTC revision 1.2 by mjthomas, Tue Jul 30 02:51:51 2002 UTC
# Line 580  error: Line 580  error:
580   *----------------------------------------------------------------------   *----------------------------------------------------------------------
581   */   */
582    
583   int  int
584  TcpOutputProc(fd, buf, toWrite, errorCodePtr,block )  TcpOutputProc ( int fd, char *buf, int toWrite, int *errorCodePtr, int block )
585    #if 0    
586       int fd;       /* socket */       int fd;       /* socket */
587      char *buf;                          /* Where to get data. */      char *buf;                          /* Where to get data. */
588      int toWrite;                        /* Maximum number of bytes to write. */      int toWrite;                        /* Maximum number of bytes to write. */
589      int *errorCodePtr;                  /* Where to store error codes. */      int *errorCodePtr;                  /* Where to store error codes. */
590       int block;       int block;
591    #endif    
592  {  {
593      int bytesWritten;      int bytesWritten;
594      int error;      int error;
# Line 731  getCharGclSocket(strm,block) Line 733  getCharGclSocket(strm,block)
733    }    }
734  }  }
735    
736  tcpCloseSocket(SOCKET fd)  void tcpCloseSocket(SOCKET fd)
737  {  {
738    
739   (*winSock.closesocket)(fd);   (*winSock.closesocket)(fd);
740    
741  }  }
742    
743  ungetCharGclSocket(c,strm)  void ungetCharGclSocket ( int c, object strm)
      int c;       /* the character to unget */  
      object strm; /* stream */  
744  {  object bufp = SOCKET_STREAM_BUFFER(strm);  {  object bufp = SOCKET_STREAM_BUFFER(strm);
745    if (c == EOF) return;    if (c == EOF) return;
746    dprintf("pushing back %c\n",c);    dprintf("pushing back %c\n",c);
# Line 751  ungetCharGclSocket(c,strm) Line 751  ungetCharGclSocket(c,strm)
751    }    }
752  }  }
753    
754  doReverse(s,n)  void doReverse ( char *s, int n )
755       char *s;  {
756  { char *p=&s[n-1];      char *p=&s[n-1];
757    int m = n/2;      int m = n/2;
758    while (--m>=0) {      while (--m>=0) {
759      int tem = *s;          int tem = *s;
760      *s = *p;          *s = *p;
761      *p = tem;          *p = tem;
762      s++; p--;          s++; p--;
763    }      }
764  }  }
765    
766    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26