CUBRID Engine  latest
adjustable_array.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include "porting.h"
Include dependency graph for adjustable_array.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  adj_array
 

Macros

#define ADJ_AR_EOA   -1
 

Typedefs

typedef enum adj_err_code ADJ_ERR_CODE
 
typedef struct adj_array ADJ_ARRAY
 

Enumerations

enum  adj_err_code {
  ADJ_NOERROR = 0, ADJ_ERR_BAD_START = -1, ADJ_ERR_BAD_END = -2, ADJ_ERR_BAD_NFROM = -3,
  ADJ_ERR_BAD_ALLOC = -4, ADJ_ERR_BAD_ELEMENT = -5, ADJ_ERR_BAD_MIN = -6, ADJ_ERR_BAD_RATE = -7,
  ADJ_ERR_BAD_INIT = -8, ADJ_ERR_BAD_INITIAL = -9, ADJ_ERR_BAD_LENGTH = -10, ADJ_ERR_BAD_ADJ_ARR_PTR = -99
}
 

Functions

const char * adj_ar_concat_strings (const char *string1, const char *string2,...)
 
ADJ_ARRAYadj_ar_new (int element_size, int min, float growth_rate)
 
void adj_ar_free (ADJ_ARRAY *adj_array_p)
 
int adj_ar_reset (ADJ_ARRAY *adj_array_p, int element_size, int min, float growth_rate)
 
int adj_ar_initialize (ADJ_ARRAY *adj_array_p, const void *initial, int initial_length)
 
int adj_ar_replace (ADJ_ARRAY *adj_array_p, const void *src, int src_length, int start, int end)
 
int adj_ar_remove (ADJ_ARRAY *adj_array_p, int start, int end)
 
int adj_ar_insert (ADJ_ARRAY *adj_array_p, const void *src, int src_length, int start)
 
int adj_ar_append (ADJ_ARRAY *adj_array_p, const void *src, int src_length)
 
void * adj_ar_get_buffer (const ADJ_ARRAY *adj_array_p)
 
int adj_ar_length (const ADJ_ARRAY *adj_array_p)
 

Macro Definition Documentation

Typedef Documentation

typedef struct adj_array ADJ_ARRAY

Definition at line 54 of file adjustable_array.h.

typedef enum adj_err_code ADJ_ERR_CODE

Definition at line 52 of file adjustable_array.h.

Enumeration Type Documentation

Enumerator
ADJ_NOERROR 
ADJ_ERR_BAD_START 
ADJ_ERR_BAD_END 
ADJ_ERR_BAD_NFROM 
ADJ_ERR_BAD_ALLOC 
ADJ_ERR_BAD_ELEMENT 
ADJ_ERR_BAD_MIN 
ADJ_ERR_BAD_RATE 
ADJ_ERR_BAD_INIT 
ADJ_ERR_BAD_INITIAL 
ADJ_ERR_BAD_LENGTH 
ADJ_ERR_BAD_ADJ_ARR_PTR 

Definition at line 37 of file adjustable_array.h.

Function Documentation

int adj_ar_append ( ADJ_ARRAY adj_array_p,
const void *  src,
int  src_length 
)
const char* adj_ar_concat_strings ( const char *  string1,
const char *  string2,
  ... 
)

Definition at line 48 of file adjustable_array.c.

References adj_ar_append(), adj_ar_get_buffer(), adj_ar_new(), adj_ar_reset(), NULL, and strlen.

Referenced by bifmt_numeric_value(), ffmt_value(), and mfmt_value().

Here is the caller graph for this function:

void adj_ar_free ( ADJ_ARRAY adj_array_p)

Definition at line 122 of file adjustable_array.c.

References adj_array::buffer.

Referenced by cubthread::entry::clear_resources(), cnvutil_cleanup(), and co_final().

Here is the caller graph for this function:

int adj_ar_initialize ( ADJ_ARRAY adj_array_p,
const void *  initial,
int  initial_length 
)
int adj_ar_insert ( ADJ_ARRAY adj_array_p,
const void *  src,
int  src_length,
int  start 
)

Definition at line 334 of file adjustable_array.c.

References adj_ar_replace(), assert, and NULL.

Referenced by bifmt_numeric_value(), ffmt_value(), fmt_fractional_value(), mfmt_value(), and num_fmt_print().

Here is the caller graph for this function:

int adj_ar_length ( const ADJ_ARRAY adj_array_p)

Definition at line 375 of file adjustable_array.c.

References assert, adj_array::buffer, adj_array::cur_length, adj_array::element_size, and NULL.

Referenced by cnv_wcs(), and co_signalv().

Here is the caller graph for this function:

ADJ_ARRAY* adj_ar_new ( int  element_size,
int  min,
float  growth_rate 
)
int adj_ar_remove ( ADJ_ARRAY adj_array_p,
int  start,
int  end 
)

Definition at line 318 of file adjustable_array.c.

References adj_ar_replace(), assert, and NULL.

Referenced by adj_ar_initialize(), bifmt_numeric_value(), co_conversion_spec(), co_signalv(), ffmt_value(), fmt_fractional_value(), mfmt_value(), num_fmt_print(), and tfmt_new().

Here is the caller graph for this function:

int adj_ar_reset ( ADJ_ARRAY adj_array_p,
int  element_size,
int  min,
float  growth_rate 
)