op_string.h File Reference

general purpose C string handling declarations. More...

#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

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"

References skip_ws().

Referenced by main().

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"

References skip_ws().

Referenced by main().

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

Generate a hash code from a string

Referenced by is_image_ignored(), and odb_open().

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

Referenced by opd_ext_initialize().

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"

Referenced by main().

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"

Referenced by comment_line(), empty_line(), and main().

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

Referenced by main(), and parse_extra().


Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1