osprey/driver/string_utils.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include "string_utils.h"

Include dependency graph for string_utils.c:

Go to the source code of this file.

Defines

#define BLANK   ' '
#define DOT   '.'
#define SLASH   '/'
#define PERCENT   '%'

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)
void replace_substring (char *base, char *old_pattern, char *new_pattern)
char * expand_template_string (char *template, char *arg)
string_list_tinit_string_list (void)
static void add_existing_string (string_list_t *list, char *s)
void add_after_string (string_list_t *list, string_item_t *item, char *s)
void add_string (string_list_t *list, 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)
int string_list_size (const string_list_t *l)


Define Documentation

#define BLANK   ' '

Definition at line 46 of file string_utils.c.

#define DOT   '.'

Definition at line 47 of file string_utils.c.

#define PERCENT   '%'

Definition at line 49 of file string_utils.c.

#define SLASH   '/'

Definition at line 48 of file string_utils.c.


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().

static void add_existing_string ( string_list_t list,
char *  s 
) [static]

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:29 2009 for Open64 by  doxygen 1.5.6