/* Copyright 2005 Garrett Rooney. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "apr_template.h" #include #include #ifndef APR_ARRAY_PUSH #define APR_ARRAY_PUSH(ary,type) (*((type *)apr_array_push(ary))) #endif static apr_template_variable_t * make_int_array (int start, int end, apr_pool_t *pool) { apr_template_variable_t *a = apr_template_make_array (end - start, pool); int i; for (i = start; i < end; ++i) { APR_ARRAY_PUSH (a->contents.a, apr_template_variable_t *) = apr_template_make_int (i, pool); } return a; } int main (int argc, char *argv[]) { apr_bucket_alloc_t *alloc; apr_bucket_brigade *out; apr_hash_t *environment; apr_template_t *tmpl; apr_status_t apr_err; apr_pool_t *pool; apr_initialize (); atexit (apr_terminate); if (argc != 3) { fprintf (stdout, "usage: compare