t_http_head *parse_http_header(int fd) { t_http_head *h; char *line; int out; h = NULL; out = 1; line = NULL; if (fd) { h = (t_http_head *)ft_memalloc(sizeof(t_http_head)); if (h) { while (get_next_line(fd, &line) && out) { compute_info(line, h); printf("<<<\t\t%s\n", line); if (line && line[0] == '\r') { out = 0; break; } } } } return (h); }
template<class TV> CubicHinges<TV>::CubicHinges(Array<const Vector<int,d+2>> bends, RawArray<const T> angles, RawArray<const TV> X) : bends(bends) , stiffness(0) , damping(0) , simple_hessian(false) , nodes_(bends.size()?scalar_view(bends).max()+1:0) , info(bends.size()) { GEODE_ASSERT(bends.size()==angles.size()); GEODE_ASSERT(X.size()>=nodes_); compute_info(bends,angles,X,info); }