/** Store the current Point line. Leaves Point at the start of the * next line. * @param buff The buffer the Point is in. * @param[out] str The string to store the line to. * @param len The length of the string. * @return The actual length of the line. Can be > string length. */ int bstrline(struct buff *buff, char *str, int len) { int count = 0; if (len == 0) return 0; tobegline(buff); while (len > 1 && !bisend(buff) && BUFF(buff) != '\n') { *str++ = BUFF(buff); --len; ++count; bmove1(buff); } *str = 0; while (!bisend(buff) && BUFF(buff) != '\n') { ++count; bmove1(buff); } if (BUFF(buff) == '\n') bmove1(buff); return count; }
M(void, glColor4uiv, jobject v) { glColor4uiv(BUFF(GLuint, v)); }
void TcpConnection::invalidData(){ _LOG("Invalid packet ID recieved",hostName.c_str()); boost::asio::async_write(socket_, BUFF("Invalid packet ID!"), strand_.wrap(boost::bind(&TcpConnection::handle_write, shared_from_this(), PLACEHOLDER::error))); }
M(void, glGetPixelMapfv, jint map, jobject values) { glGetPixelMapfv(map, BUFF(GLfloat, values)); }
M(void, glPixelMapuiv, jint map, jint mapsize, jobject values) { glPixelMapuiv(map, mapsize, BUFF(GLuint, values)); }
M(void, glGetMaterialiv, jint face, jint pname, jobject params) { glGetMaterialiv(face, pname, BUFF(GLint, params)); }
M(void, glLightModeliv, jint pname, jobject params) { glLightModeliv(pname, BUFF(GLint, params)); }
M(void, glEdgeFlagv, jobject flag) { glEdgeFlagv(BUFF(GLboolean, flag)); }
M(void, glRasterPos4dv, jobject v) { glRasterPos4dv(BUFF(GLdouble, v)); }
M(void, glGetPolygonStipple, jobject mask) { glGetPolygonStipple(BUFF(GLubyte, mask)); }
M(void, glTexCoord4sv, jobject v) { glTexCoord4sv(BUFF(GLshort, v)); }
M(void, glTexCoord4iv, jobject v) { glTexCoord4iv(BUFF(GLint, v)); }
M(void, glTexCoord4fv, jobject v) { glTexCoord4fv(BUFF(GLfloat, v)); }
M(void, glTexCoord4dv, jobject v) { glTexCoord4dv(BUFF(GLdouble, v)); }
M(void, glColor4usv, jobject v) { glColor4usv(BUFF(GLushort, v)); }
M(void, glGetLightfv, jint light, jint pname, jobject params) { glGetLightfv(light, pname, BUFF(GLfloat, params)); }
M(void, glGetLightiv, jint light, jint pname, jobject params) { glGetLightiv(light, pname, BUFF(GLint, params)); }
M(void, glRasterPos4fv, jobject v) { glRasterPos4fv(BUFF(GLfloat, v)); }
M(void, glLightModelfv, jint pname, jobject params) { glLightModelfv(pname, BUFF(GLfloat, params)); }
M(void, glRasterPos4iv, jobject v) { glRasterPos4iv(BUFF(GLint, v)); }
M(void, glMaterialfv, jint face, jint pname, jobject params) { glMaterialfv(face, pname, BUFF(GLfloat, params)); }
M(void, glRasterPos4sv, jobject v) { glRasterPos4sv(BUFF(GLshort, v)); }
M(void, glPixelMapfv, jint map, jint mapsize, jobject values) { glPixelMapfv(map, mapsize, BUFF(GLfloat, values)); }
M(void, glRectdv, jobject v1, jobject v2) { glRectdv(BUFF(GLdouble, v1), BUFF(GLdouble, v2)); }
M(void, glPixelMapusv, jint map, jint mapsize, jobject values) { glPixelMapusv(map, mapsize, BUFF(GLushort, values)); }
M(void, glRectfv, jobject v1, jobject v2) { glRectfv(BUFF(GLfloat, v1), BUFF(GLfloat, v2)); }
void TcpConnection::read(){ socket_.async_read_some(BUFF(incomming_packet),strand_.wrap(BIND(&TcpConnection::handle_read, shared_from_this(),PLACEHOLDER::error,PLACEHOLDER::bytes_transferred))); }
M(void, glRectiv, jobject v1, jobject v2) { glRectiv(BUFF(GLint, v1), BUFF(GLint, v2)); }
M(void, glRectsv, jobject v1, jobject v2) { glRectsv(BUFF(GLshort, v1), BUFF(GLshort, v2)); }
M(void, glColor4ubv, jobject v) { glColor4ubv(BUFF(GLubyte, v)); }