tinyows 1.2.2
buffer.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include <regex.h>
#include "../ows/ows.h"
Include dependency graph for buffer.c:

Go to the source code of this file.

Macros

#define SIZE_MAX   (~(size_t)0)

Functions

static void buffer_realloc (buffer *buf)
bufferbuffer_init ()
void buffer_free (buffer *buf)
void buffer_empty (buffer *buf)
void buffer_flush (buffer *buf, FILE *output)
void buffer_add (buffer *buf, char c)
bufferbuffer_ftoa (double f)
void buffer_add_double (buffer *buf, double f)
void buffer_add_int (buffer *buf, int i)
bufferbuffer_itoa (int i)
bufferbuffer_from_str (const char *str)
void buffer_add_head (buffer *buf, char c)
void buffer_add_head_str (buffer *buf, char *str)
void buffer_add_str (buffer *buf, const char *str)
void buffer_add_nstr (buffer *buf, const char *str, size_t n)
bool buffer_cmp (const buffer *buf, const char *str)
bool buffer_ncmp (const buffer *buf, const char *str, size_t n)
bool buffer_case_cmp (const buffer *buf, const char *str)
void buffer_copy (buffer *dest, const buffer *src)
bufferbuffer_clone (buffer *buf)
void buffer_pop (buffer *buf, size_t len)
void buffer_shift (buffer *buf, size_t len)
bufferbuffer_replace (buffer *buf, char *before, char *after)
long int buffer_chr (const buffer *buf, char c)
long int buffer_rchr (const buffer *buf, char c)
bufferbuffer_encode_xml_entities_str (const char *str)
bufferbuffer_encode_json_str (const char *str)

Macro Definition Documentation

◆ SIZE_MAX

#define SIZE_MAX   (~(size_t)0)

Definition at line 37 of file buffer.c.

Referenced by buffer_realloc().

Function Documentation

◆ buffer_add()

◆ buffer_add_double()

void buffer_add_double ( buffer * buf,
double f )

Definition at line 158 of file buffer.c.

References buffer_copy(), buffer_free(), and buffer_ftoa().

Referenced by ows_bbox_to_query().

Here is the call graph for this function:

◆ buffer_add_head()

void buffer_add_head ( buffer * buf,
char c )

Definition at line 217 of file buffer.c.

References Buffer::buf, buffer_realloc(), Buffer::size, and Buffer::use.

Referenced by buffer_add_head_str(), and ows_parse_config_layer().

Here is the call graph for this function:

◆ buffer_add_head_str()

void buffer_add_head_str ( buffer * buf,
char * str )

Definition at line 239 of file buffer.c.

References buffer_add_head().

Referenced by cgi_parse_xml(), ows_parse_config_layer(), wfs_gml_display_hits(), wfs_request_check_sortby(), and wfs_retrieve_typename().

Here is the call graph for this function:

◆ buffer_add_int()

◆ buffer_add_nstr()

void buffer_add_nstr ( buffer * buf,
const char * str,
size_t n )

Definition at line 271 of file buffer.c.

References Buffer::buf, buffer_realloc(), Buffer::size, and Buffer::use.

Referenced by list_split().

Here is the call graph for this function:

◆ buffer_add_str()

void buffer_add_str ( buffer * buf,
const char * str )

Definition at line 254 of file buffer.c.

References Buffer::buf, buffer_realloc(), Buffer::size, and Buffer::use.

Referenced by buffer_copy(), buffer_encode_json_str(), buffer_encode_xml_entities_str(), buffer_from_str(), buffer_replace(), cgi_add_att(), cgi_add_buffer(), cgi_add_into_buffer(), cgi_add_node(), cgi_add_sortby(), cgi_add_xml_into_buffer(), cgi_parse_xml(), fe_aggregate_functions(), fe_bbox(), fe_bbox_layer(), fe_binary_comparison_op(), fe_binary_logical_op(), fe_distance_functions(), fe_envelope(), fe_expression(), fe_fct_abs(), fe_fct_acos(), fe_fct_asin(), fe_fct_atan(), fe_fct_avg(), fe_fct_cbrt(), fe_fct_ceil(), fe_fct_cos(), fe_fct_cot(), fe_fct_count(), fe_fct_degrees(), fe_fct_exp(), fe_fct_floor(), fe_fct_length(), fe_fct_ln(), fe_fct_log(), fe_fct_max(), fe_fct_min(), fe_fct_radians(), fe_fct_round(), fe_fct_sin(), fe_fct_sqrt(), fe_fct_tan(), fe_fct_trunc(), fe_feature_id(), fe_filter(), fe_functions(), fe_functions_capabilities(), fe_kvp_bbox(), fe_kvp_featureid(), fe_property_is_between(), fe_property_is_like(), fe_property_is_null(), fe_spatial_functions(), fe_unary_logical_op(), fill_fe_error(), list_add_str(), list_implode(), main(), ows_bbox_boundaries(), ows_bbox_set_from_str(), ows_bbox_to_query(), ows_bbox_transform(), ows_geobbox_compute(), ows_layer_storage_fill(), ows_layers_storage_fill(), ows_parse_config_abstract(), ows_parse_config_contact(), ows_parse_config_layer(), ows_parse_config_metadata(), ows_parse_config_pg(), ows_parse_config_tinyows(), ows_psql_column_character_maximum_length(), ows_psql_column_check_constraint(), ows_psql_column_constraint_name(), ows_psql_column_name(), ows_psql_generate_id(), ows_psql_geometry_srid(), ows_psql_gml_to_sql(), ows_psql_is_geometry_valid(), ows_psql_number_features(), ows_psql_timestamp_to_xml_time(), ows_srs_get_from_a_srid(), ows_srs_set(), ows_srs_set_from_srid(), ows_srs_set_geobbox(), ows_storage_fill_attributes(), ows_storage_fill_not_null(), ows_storage_fill_pkey(), wfs_delete(), wfs_delete_xml(), wfs_execute_transaction_request(), wfs_generate_schema(), wfs_geojson_display_results(), wfs_get_capabilities_110(), wfs_gml_display_hits(), wfs_insert_xml(), wfs_parse_operation(), wfs_request_check_output(), wfs_request_check_resulttype(), wfs_request_check_sortby(), wfs_retrieve_sql_request_list(), wfs_retrieve_sql_request_select(), wfs_retrieve_typename(), wfs_retrieve_value(), and wfs_update_xml().

Here is the call graph for this function:

◆ buffer_case_cmp()

◆ buffer_chr()

long int buffer_chr ( const buffer * buf,
char c )

Definition at line 456 of file buffer.c.

References Buffer::buf, and Buffer::use.

Referenced by list_split().

◆ buffer_clone()

buffer * buffer_clone ( buffer * buf)

Definition at line 362 of file buffer.c.

References Buffer::buf, buffer_copy(), and buffer_init().

Here is the call graph for this function:

◆ buffer_cmp()

◆ buffer_copy()

◆ buffer_empty()

◆ buffer_encode_json_str()

buffer * buffer_encode_json_str ( const char * str)

Definition at line 544 of file buffer.c.

References buffer_add(), buffer_add_str(), and buffer_init().

Referenced by wfs_geojson_display_results().

Here is the call graph for this function:

◆ buffer_encode_xml_entities_str()

buffer * buffer_encode_xml_entities_str ( const char * str)

Definition at line 501 of file buffer.c.

References buffer_add(), buffer_add_str(), and buffer_init().

Referenced by wfs_gml_display_feature().

Here is the call graph for this function:

◆ buffer_flush()

void buffer_flush ( buffer * buf,
FILE * output )

Definition at line 112 of file buffer.c.

References Buffer::buf.

Referenced by wfs_complex_type(), wfs_describe_feature_type(), and wfs_feature_type_list().

◆ buffer_free()

void buffer_free ( buffer * buf)

Definition at line 83 of file buffer.c.

References Buffer::buf.

Referenced by alist_free(), array_free(), buffer_add_double(), buffer_add_int(), buffer_replace(), cgi_parse_kvp(), cgi_parse_xml(), fe_bbox(), fe_binary_comparison_op(), fe_distance_functions(), fe_envelope(), fe_feature_id(), fe_filter(), fe_functions_capabilities(), fe_property_is_between(), fe_property_is_like(), fe_property_name(), fe_spatial_functions(), fe_xpath_property_name(), filter_encoding_free(), list_node_free(), mlist_explode(), ows_bbox_boundaries(), ows_bbox_set_from_str(), ows_bbox_transform(), ows_contact_free(), ows_free(), ows_geobbox_compute(), ows_layer_free(), ows_layer_storage_fill(), ows_layer_storage_free(), ows_layers_storage_fill(), ows_metadata_fill(), ows_metadata_free(), ows_psql_column_character_maximum_length(), ows_psql_column_constraint_name(), ows_psql_column_name(), ows_psql_generate_id(), ows_psql_geometry_srid(), ows_psql_gml_to_sql(), ows_psql_is_geometry_valid(), ows_psql_number_features(), ows_request_check(), ows_srs_free(), ows_srs_get_from_a_srid(), ows_srs_set(), ows_srs_set_from_srid(), ows_storage_fill_attributes(), ows_storage_fill_not_null(), ows_storage_fill_pkey(), wfs_complex_type(), wfs_delete(), wfs_delete_xml(), wfs_execute_transaction_request(), wfs_feature_type_list(), wfs_geojson_display_results(), wfs_get_capabilities_110(), wfs_gml_display_feature(), wfs_gml_display_hits(), wfs_gml_display_results(), wfs_insert_xml(), wfs_parse_operation(), wfs_request_check_filter(), wfs_request_free(), wfs_retrieve_sql_request_list(), wfs_retrieve_value(), and wfs_update_xml().

◆ buffer_from_str()

buffer * buffer_from_str ( const char * str)

◆ buffer_ftoa()

buffer * buffer_ftoa ( double f)

Definition at line 138 of file buffer.c.

References Buffer::buf, buffer_init(), buffer_realloc(), Buffer::size, and Buffer::use.

Referenced by buffer_add_double(), and fe_distance_functions().

Here is the call graph for this function:

◆ buffer_init()

buffer * buffer_init ( )

Definition at line 61 of file buffer.c.

References Buffer::buf, BUFFER_SIZE_INIT, Buffer::realloc, Buffer::size, and Buffer::use.

Referenced by buffer_clone(), buffer_encode_json_str(), buffer_encode_xml_entities_str(), buffer_from_str(), buffer_ftoa(), buffer_itoa(), buffer_replace(), cgi_add_att(), cgi_add_buffer(), cgi_add_node(), cgi_add_sortby(), cgi_parse_kvp(), cgi_parse_xml(), fe_bbox(), fe_binary_comparison_op(), fe_distance_functions(), fe_envelope(), fe_feature_id(), fe_filter(), fe_functions_capabilities(), fe_kvp_bbox(), fe_kvp_featureid(), fe_property_is_between(), fe_property_is_like(), fill_fe_error(), filter_encoding_init(), list_add_by_copy(), list_add_list(), list_add_str(), list_explode(), list_explode_start_end(), list_explode_str(), list_explode_str_trim(), list_split(), main(), mlist_explode(), ows_bbox_boundaries(), ows_bbox_set_from_str(), ows_bbox_transform(), ows_geobbox_compute(), ows_init(), ows_layer_init(), ows_layer_list_namespaces(), ows_layer_storage_fill(), ows_layer_storage_init(), ows_layers_storage_fill(), ows_metadata_fill(), ows_parse_config_abstract(), ows_parse_config_contact(), ows_parse_config_layer(), ows_parse_config_metadata(), ows_parse_config_tinyows(), ows_psql_column_character_maximum_length(), ows_psql_column_check_constraint(), ows_psql_column_constraint_name(), ows_psql_column_name(), ows_psql_generate_id(), ows_psql_gml_to_sql(), ows_psql_is_geometry_valid(), ows_psql_number_features(), ows_psql_timestamp_to_xml_time(), ows_srs_get_from_a_srid(), ows_srs_init(), ows_srs_set(), ows_srs_set_from_srid(), ows_storage_fill_attributes(), ows_storage_fill_not_null(), ows_storage_fill_pkey(), wfs_delete(), wfs_delete_xml(), wfs_execute_transaction_request(), wfs_feature_type_list(), wfs_generate_schema(), wfs_geojson_display_results(), wfs_get_capabilities_110(), wfs_gml_display_results(), wfs_insert_xml(), wfs_parse_operation(), wfs_request_check_filter(), wfs_request_check_operation(), wfs_request_check_output(), wfs_request_check_resulttype(), wfs_request_check_sortby(), wfs_retrieve_sql_request_list(), wfs_retrieve_sql_request_select(), wfs_retrieve_typename(), and wfs_update_xml().

◆ buffer_itoa()

buffer * buffer_itoa ( int i)

Definition at line 188 of file buffer.c.

References Buffer::buf, buffer_init(), buffer_realloc(), Buffer::size, and Buffer::use.

Referenced by buffer_add_int().

Here is the call graph for this function:

◆ buffer_ncmp()

bool buffer_ncmp ( const buffer * buf,
const char * str,
size_t n )

◆ buffer_pop()

void buffer_pop ( buffer * buf,
size_t len )

Definition at line 379 of file buffer.c.

References Buffer::buf, and Buffer::use.

Referenced by buffer_replace(), cgi_add_buffer(), fe_binary_comparison_op(), and fe_xpath_property_name().

◆ buffer_rchr()

long int buffer_rchr ( const buffer * buf,
char c )

Definition at line 475 of file buffer.c.

References Buffer::buf, and Buffer::use.

Referenced by list_split().

◆ buffer_realloc()

void buffer_realloc ( buffer * buf)
static

◆ buffer_replace()

buffer * buffer_replace ( buffer * buf,
char * before,
char * after )

◆ buffer_shift()


Generated for tinyows by doxygen 1.14.0