kmp_str.h File Reference

#include <string.h>
#include <stdarg.h>
#include "kmp_os.h"

Go to the source code of this file.

Data Structures

struct  kmp_str_buf
struct  kmp_str_fname
struct  kmp_str_loc

Defines

#define __kmp_str_buf_init(b)   { (b)->str = (b)->bulk; (b)->size = sizeof( (b)->bulk ); (b)->used = 0; (b)->bulk[ 0 ] = 0; }
#define TOLOWER(c)   ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) + 'a' - 'A') : (c))

Typedefs

typedef struct kmp_str_buf kmp_str_buf_t
typedef struct kmp_str_fname kmp_str_fname_t
typedef struct kmp_str_loc kmp_str_loc_t

Functions

void __kmp_str_buf_cat (kmp_str_buf_t *buffer, char const *str, int len)
void __kmp_str_buf_clear (kmp_str_buf_t *buffer)
void __kmp_str_buf_detach (kmp_str_buf_t *buffer)
void __kmp_str_buf_free (kmp_str_buf_t *buffer)
void __kmp_str_buf_print (kmp_str_buf_t *buffer, char const *format,...)
void __kmp_str_buf_print_size (kmp_str_buf_t *buffer, size_t size)
void __kmp_str_buf_reserve (kmp_str_buf_t *buffer, int size)
void __kmp_str_buf_vprint (kmp_str_buf_t *buffer, char const *format, va_list args)
int __kmp_str_eqf (char const *lhs, char const *rhs)
void __kmp_str_fname_free (kmp_str_fname_t *fname)
void __kmp_str_fname_init (kmp_str_fname_t *fname, char const *path)
int __kmp_str_fname_match (kmp_str_fname_t const *fname, char const *pattern)
char * __kmp_str_format (char const *format,...)
void __kmp_str_free (char const **str)
void __kmp_str_loc_free (kmp_str_loc_t *loc)
kmp_str_loc_t __kmp_str_loc_init (char const *psource, int init_fname)
int __kmp_str_match (char const *target, int len, char const *data)
int __kmp_str_match_false (char const *data)
int __kmp_str_match_true (char const *data)
void __kmp_str_replace (char *str, char search_for, char replace_with)
void __kmp_str_split (char *str, char delim, char **head, char **tail)
int __kmp_str_to_int (char const *str, char sentinel)
void __kmp_str_to_size (char const *str, size_t *out, size_t dfactor, char const **error)
void __kmp_str_to_uint (char const *str, kmp_uint64 *out, char const **error)
char * __kmp_str_token (char *str, char const *delim, char **buf)

Define Documentation

#define __kmp_str_buf_init (  )     { (b)->str = (b)->bulk; (b)->size = sizeof( (b)->bulk ); (b)->used = 0; (b)->bulk[ 0 ] = 0; }
#define TOLOWER (  )     ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) + 'a' - 'A') : (c))

Definition at line 66 of file kmp_str.h.

Referenced by __kmp_str_fname_init(), and __kmp_str_match().


Typedef Documentation

typedef struct kmp_str_buf kmp_str_buf_t

Definition at line 74 of file kmp_str.h.

Definition at line 101 of file kmp_str.h.

typedef struct kmp_str_loc kmp_str_loc_t

Definition at line 127 of file kmp_str.h.


Function Documentation

void __kmp_str_buf_cat ( kmp_str_buf_t buffer,
char const *  str,
int  len 
)
void __kmp_str_buf_clear ( kmp_str_buf_t buffer  ) 

Definition at line 112 of file kmp_str.c.

References KMP_STR_BUF_INVARIANT, kmp_str_buf::str, and kmp_str_buf::used.

Referenced by __kmp_vprintf().

void __kmp_str_buf_detach ( kmp_str_buf_t buffer  ) 
void __kmp_str_buf_free ( kmp_str_buf_t buffer  ) 
void __kmp_str_buf_print ( kmp_str_buf_t buffer,
char const *  format,
  ... 
)
void __kmp_str_buf_print_size ( kmp_str_buf_t buffer,
size_t  size 
)
void __kmp_str_buf_reserve ( kmp_str_buf_t buffer,
int  size 
)
void __kmp_str_buf_vprint ( kmp_str_buf_t buffer,
char const *  format,
va_list  args 
)
int __kmp_str_eqf ( char const *  lhs,
char const *  rhs 
)

Definition at line 471 of file kmp_str.c.

Referenced by __kmp_stg_parse_file(), and __kmp_str_fname_match().

void __kmp_str_fname_free ( kmp_str_fname_t fname  ) 
void __kmp_str_fname_init ( kmp_str_fname_t fname,
char const *  path 
)
int __kmp_str_fname_match ( kmp_str_fname_t const *  fname,
char const *  pattern 
)
char* __kmp_str_format ( char const *  format,
  ... 
)
void __kmp_str_free ( char const **  str  ) 
void __kmp_str_loc_free ( kmp_str_loc_t loc  ) 
kmp_str_loc_t __kmp_str_loc_init ( char const *  psource,
int  init_fname 
)
int __kmp_str_match ( char const *  target,
int  len,
char const *  data 
)
int __kmp_str_match_false ( char const *  data  ) 

Definition at line 601 of file kmp_str.c.

References __kmp_str_match().

Referenced by __kmp_ignore_mppbeg(), __kmp_ignore_mppend(), and __kmp_stg_parse_bool().

int __kmp_str_match_true ( char const *  data  ) 
void __kmp_str_replace ( char *  str,
char  search_for,
char  replace_with 
)

Definition at line 626 of file kmp_str.c.

Referenced by __kmp_str_fname_init().

void __kmp_str_split ( char *  str,
char  delim,
char **  head,
char **  tail 
)
int __kmp_str_to_int ( char const *  str,
char  sentinel 
)
void __kmp_str_to_size ( char const *  str,
size_t *  out,
size_t  dfactor,
char const **  error 
)

Definition at line 757 of file kmp_str.c.

References _case, i, KMP_DEBUG_ASSERT, KMP_I18N_STR, and KMP_SIZE_T_MAX.

Referenced by __kmp_stg_parse_size().

void __kmp_str_to_uint ( char const *  str,
kmp_uint64 *  out,
char const **  error 
)

Definition at line 862 of file kmp_str.c.

References i, KMP_DEBUG_ASSERT, KMP_I18N_STR, and KMP_SIZE_T_MAX.

Referenced by __kmp_stg_parse_int().

char* __kmp_str_token ( char *  str,
char const *  delim,
char **  buf 
)

Definition at line 671 of file kmp_str.c.

Referenced by ___kmp_env_blk_parse_string().


Generated on 25 Aug 2013 for libomp_oss by  doxygen 1.6.1