osprey/driver/string_utils.h File Reference

#include <stdio.h>
#include <string.h>
#include "basic.h"

Include dependency graph for string_utils.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Types

type  string_item_rec
type  string_list_rec
type  string_pair_item_rec
type  string_pair_list_rec

Defines

#define same_string_prefix(x, y)   (strncmp(x,y,strlen(y)) == 0)
#define FOREACH_STRING(p, list)   for (p = list->head; p != NULL; p = p->next)
#define STRING_NAME(p)   (p->name)
#define FOREACH_STRING_PAIR(p, list)   for (p = list->head; p != NULL; p = p->next)
#define STRING_PAIR_KEY(p)   (p->key)
#define STRING_PAIR_VAL(p)   (p->val)

Typedefs

typedef struct string_item_rec string_item_t
typedef struct string_list_rec string_list_t
typedef struct string_pair_item_rec string_pair_item_t
typedef struct string_pair_list_rec string_pair_list_t

Functions/Subroutines

char * string_copy (char *s)
char * substring_copy (char *s, int i, int len)
char * concat_strings (const char *a, const char *b)
char * get_suffix (const char *s)
char * change_suffix (char *s, char *suffix)
boolean has_blank (char *s)
char * expand_template_string (char *template, char *arg)
void replace_substring (char *base, char *old_pattern, char *new_pattern)
string_list_tinit_string_list (void)
int string_list_size (const string_list_t *l)
void add_string (string_list_t *list, char *s)
void add_after_string (string_list_t *list, string_item_t *item, char *s)
void add_multi_strings (string_list_t *list, char *s)
void add_string_if_new (string_list_t *list, char *s)
void replace_string (string_list_t *list, char *old, char *new)
void append_string_lists (string_list_t *a, string_list_t *b)
void print_string_list (FILE *f, string_list_t *list)
const char * ends_with (const char *s, const char *sfx)
string_pair_list_tinit_string_pair_list (void)
void add_string_pair (string_pair_list_t *list, char *key, char *val)


Define Documentation

#define FOREACH_STRING ( p,
list   )     for (p = list->head; p != NULL; p = p->next)

Definition at line 123 of file string_utils.h.

Referenced by save_cpp_output(), and string_list_size().

#define FOREACH_STRING_PAIR ( p,
list   )     for (p = list->head; p != NULL; p = p->next)

Definition at line 145 of file string_utils.h.

Referenced by cleanup_temp_objects(), and get_object_file().

#define same_string_prefix ( x,
 )     (strncmp(x,y,strlen(y)) == 0)

Definition at line 72 of file string_utils.h.

Referenced by Process_Default_Group().

#define STRING_NAME ( p   )     (p->name)

Definition at line 125 of file string_utils.h.

Referenced by save_cpp_output().

#define STRING_PAIR_KEY ( p   )     (p->key)

Definition at line 147 of file string_utils.h.

Referenced by get_object_file().

#define STRING_PAIR_VAL ( p   )     (p->val)

Definition at line 148 of file string_utils.h.

Referenced by cleanup_temp_objects(), and get_object_file().


Typedef Documentation


Function Documentation

void add_after_string ( string_list_t list,
string_item_t item,
char *  s 
)

Definition at line 180 of file string_utils.c.

References malloc, string_item_rec::name, string_item_rec::next, p, and string_list_rec::tail.

Referenced by postprocess_ld_args().

void add_multi_strings ( string_list_t list,
char *  s 
)

Definition at line 202 of file string_utils.c.

References add_existing_string(), BLANK, has_blank(), NIL, s, and string_copy().

Referenced by add_implied_string(), and add_ipl_cmd_string().

void add_string ( string_list_t list,
char *  s 
)

void add_string_if_new ( string_list_t list,
char *  s 
)

void add_string_pair ( string_pair_list_t list,
char *  key,
char *  val 
)

void append_string_lists ( string_list_t a,
string_list_t b 
)

char* change_suffix ( char *  s,
char *  suffix 
)

char* concat_strings ( const char *  a,
const char *  b 
)

const char* ends_with ( const char *  s,
const char *  sfx 
)

Definition at line 282 of file string_utils.c.

References len, NULL, strcmp(), and strlen().

Referenced by print_magic_path().

char* expand_template_string ( char *  template,
char *  arg 
)

Definition at line 142 of file string_utils.c.

References concat_strings(), NIL, NULL, percent, PERCENT, strchr, and string_copy().

Referenced by add_derived_option().

char* get_suffix ( const char *  s  ) 

boolean has_blank ( char *  s  ) 

Definition at line 118 of file string_utils.c.

References BLANK, FALSE, NIL, p, and TRUE.

Referenced by add_multi_strings(), and option_has_blank().

string_list_t* init_string_list ( void   ) 

string_pair_list_t* init_string_pair_list ( void   ) 

Definition at line 295 of file string_utils.c.

References string_pair_list_rec::head, malloc, NULL, p, and string_pair_list_rec::tail.

Referenced by init_temp_files().

void print_string_list ( FILE f,
string_list_t list 
)

Definition at line 272 of file string_utils.c.

References fprintf(), string_list_rec::head, string_item_rec::name, string_item_rec::next, NULL, and p.

Referenced by dump_objects(), and run_phase().

void replace_string ( string_list_t list,
char *  old,
char *  new 
)

void replace_substring ( char *  base,
char *  old_pattern,
char *  new_pattern 
)

Definition at line 130 of file string_utils.c.

References p, strlen(), strncpy(), and strstr().

char* string_copy ( char *  s  ) 

int string_list_size ( const string_list_t l  ) 

Definition at line 320 of file string_utils.c.

References FOREACH_STRING, i, and len.

Referenced by save_cpp_output().

char* substring_copy ( char *  s,
int  i,
int  len 
)

Definition at line 63 of file string_utils.c.

References malloc, NULL, and strncpy().

Referenced by directory_path().


Generated on Wed Apr 8 15:07:30 2009 for Open64 by  doxygen 1.5.6