Lines Matching refs:in
94 int fillBuffer( HTTPInputSource *in )
96 if (0 < in->s)
98 in->nBufSize = recv( in->s, in->buffer, sizeof( in->buffer ), 0);
99 in->nextBytePos = 0;
100 if (in->nBufSize < sizeof( in->buffer ))
101 in->buffer[in->nBufSize] = '\0';
104 in->nBufSize = 0;
105 return in->nBufSize;
109 int openURL( HTTPInputSource *in, tmbstr pUrl )
118 in->tis.getByte = (TidyGetByteFunc) HTTPGetByte;
119 in->tis.ungetByte = (TidyUngetByteFunc) HTTPUngetByte;
120 in->tis.eof = (TidyEOFFunc) HTTPIsEOF;
121 in->tis.sourceData = (uint) in;
122 in->nextBytePos = in->nextUnGotBytePos = in->nBufSize = 0;
123 parseURL( in, pUrl );
124 if (0 == (rc = makeConnection( in )))
129 char *getCmd = MemAlloc( 48 + strlen( in->pResource ));
130 sprintf( getCmd, "GET /%s HTTP/1.0\r\nAccept: text/html\r\n\r\n", in->pResource );
131 send( in->s, getCmd, strlen( getCmd ), 0 );
135 while ( in->nextBytePos >= in->nBufSize
136 && 0 < (rc = fillBuffer( in )))
140 for (; in->nextBytePos < sizeof( in->buffer )
141 && 0 != in->buffer[ in->nextBytePos ];
142 in->nextBytePos++ )
144 ch = in->buffer[ in->nextBytePos ];
149 /* Two carriage returns or two newlines in a row,
165 ch = in->buffer[ ++in->nextBytePos ];
218 /* we have stuff in the buffer, must not be done. */
221 /* Nothing in the buffer, and the last receive failed, must be done. */