void distribute(basic_format<Ch,Tr>& self, T x) { // call put(x, ..) on every occurence of the current argument : if(self.cur_arg_ >= self.num_args_) { if( self.exceptions() & too_many_args_bit ) boost::throw_exception(too_many_args()); // too many variables supplied else return; } for(unsigned long i=0; i < self.items_.size(); ++i) { if(self.items_[i].argN_ == self.cur_arg_) { put<Ch, Tr, T> (x, self.items_[i], self.items_[i].res_, self.oss_ ); } } }
/* config parser for global "tune.zlibwindowsize" */ static int zlib_parse_global_windowsize(char **args, int section_type, struct proxy *curpx, struct proxy *defpx, const char *file, int line, char **err) { if (too_many_args(1, args, err, NULL)) return -1; if (*(args[1]) == 0) { memprintf(err, "'%s' expects a numeric value between 8 and 15.", args[0]); return -1; } global_tune_zlibwindowsize = atoi(args[1]); if (global_tune_zlibwindowsize < 8 || global_tune_zlibwindowsize > 15) { memprintf(err, "'%s' expects a numeric value between 8 and 15.", args[0]); return -1; } return 0; }
/* config parser for global "tune.zlibmemlevel" */ static int zlib_parse_global_memlevel(char **args, int section_type, struct proxy *curpx, struct proxy *defpx, const char *file, int line, char **err) { if (too_many_args(1, args, err, NULL)) return -1; if (*(args[1]) == 0) { memprintf(err, "'%s' expects a numeric value between 1 and 9.", args[0]); return -1; } global_tune_zlibmemlevel = atoi(args[1]); if (global_tune_zlibmemlevel < 1 || global_tune_zlibmemlevel > 9) { memprintf(err, "'%s' expects a numeric value between 1 and 9.", args[0]); return -1; } return 0; }