op_string.h File Reference

#include <string.h>
Include dependency graph for op_string.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * op_xstrndup (char const *s, size_t len)
size_t op_hash_string (char const *s)
int strisprefix (char const *str, char const *prefix)
char const * skip_ws (char const *c)
char const * skip_nonws (char const *c)
int empty_line (char const *c)
int comment_line (char const *c)

Detailed Description

general purpose C string handling declarations.

Remarks:
Copyright 2003 OProfile authors
Read the file COPYING
Author:
John Levon
Philippe Elie

Definition in file op_string.h.


Function Documentation

int comment_line ( char const *  c  ) 
Parameters:
c,: input string

return non zero if c string is a comment. Comment are lines with optional blank space at left then a '#' character. Blank space are in " \t\n"

Definition at line 59 of file op_string.c.

References skip_ws().

Referenced by get_mapping(), main(), read_events(), and read_unit_masks().

Here is the call graph for this function:

Here is the caller graph for this function:

int empty_line ( char const *  c  ) 
Parameters:
c,: input string

return non zero if c string contains only blank space where blank space are in " \t\n"

Definition at line 53 of file op_string.c.

References skip_ws().

Referenced by get_mapping(), ibs_init(), main(), read_events(), and read_unit_masks().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t op_hash_string ( char const *  s  ) 
Parameters:
s,: string to hash

Generate a hash code from a string

Definition at line 22 of file op_string.c.

Referenced by add_image_filter(), is_image_ignored(), odb_open(), and opd_hash_image().

Here is the caller graph for this function:

char* op_xstrndup ( char const *  s,
size_t  len 
)
Parameters:
s,: input string
len,: len char to copy

Allocate and copy len character from s to a newly allocated buffer then append a '' terminator. Return the newly allocated string

Definition at line 16 of file op_string.c.

Referenced by _process_events_list(), copy_token(), ibs_init(), ibs_parse_and_set_events(), ibs_parse_counts(), next_part(), next_token(), opd_ext_initialize(), opd_parse_image_filter(), opd_parse_verbose(), and parse_um().

Here is the caller graph for this function:

char const* skip_nonws ( char const *  c  ) 
Parameters:
c,: input string

return a pointer to the first location in c which is a blank space where blank space are in " \t\n"

Definition at line 45 of file op_string.c.

Referenced by main(), next_token(), parse_um(), and parse_um_entry().

Here is the caller graph for this function:

char const* skip_ws ( char const *  c  ) 
Parameters:
c,: input string

return a pointer to the first location in c which is not a blank space where blank space are in " \t\n"

Definition at line 37 of file op_string.c.

Referenced by comment_line(), empty_line(), ibs_init(), main(), next_token(), parse_counter_mask(), parse_um(), parse_um_entry(), and read_events().

Here is the caller graph for this function:

int strisprefix ( char const *  str,
char const *  prefix 
)
Parameters:
str,: string to test
prefix,: prefix string

return non zero if prefix parameters is a prefix of str

Definition at line 31 of file op_string.c.

Referenced by main(), parse_extra(), parse_um(), and parse_um_entry().

Here is the caller graph for this function:


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1