#include <string.h>#include "op_libiberty.h"
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 *str) |
| 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) |
general purpose C string handling implementation.
Definition in file op_string.c.
| int comment_line | ( | char const * | c | ) |
| 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().


| int empty_line | ( | char const * | c | ) |
| 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().


| size_t op_hash_string | ( | char const * | s | ) |
| 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().

| char* op_xstrndup | ( | char const * | s, | |
| size_t | len | |||
| ) |
| 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().

| char const* skip_nonws | ( | char const * | c | ) |
| 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().

| char const* skip_ws | ( | char const * | c | ) |
| 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().

| int strisprefix | ( | char const * | str, | |
| char const * | prefix | |||
| ) |
| 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().

1.6.1