JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.0p0 Hot Tips | CONFIDENTIAL | CodeSecure Inc |
Defines a set of cs_directory operations for CodeSonar.
| #define CS_DIRECTORY_H | ||
| #define CS_DIRECTORY_NULL | (cs_directory_get_null()) | The null cs_directory. |
| #define CS_DIRECTORY_INL_H |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
|||
|---|---|---|---|---|
| Returns | CS_SUCCESS on successful close. |
| Parameters |
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
|||
|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
|||
|---|---|---|---|---|
| Returns | CS_SUCCESS on successful close. |
| Parameters |
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
|||
|---|---|---|---|---|
| Returns | CS_SUCCESS on successful close. |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
| Parameters |
|
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
||||||||||||
| Notes | Retrieves the normalized path of the directory associated with a cs_directory and writes it to dirpath. If path is not large enough to hold the entire name, the name is truncated to fit into dirpath.
Call this function with dirpath NULL and capacity_bytes 0 to obtain the required capacity of dirpath. |
| Parameters |
|
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Returns |
A cs_result:
|
||||||||||||
| Notes | Retrieves the path of the directory associated with a cs_directory and writes it to path. If dirpath is not large enough to hold the entire name, the name is truncated to fit into dirpath.
Call this function with dirpath NULL and capacity_bytes 0 to obtain the required capacity of path. |
| Parameters |
|
|||
|---|---|---|---|---|
| Returns |
A pointer to a buffer containing the path of the directory associated with dir (as a char*). The buffer is only valid until another API function is invoked.
|
|||
| Notes | Do not modify or free the returned buffer.
This function entails less user overhead than cs_directory_normalized_path(), and so can be more convenient to use; the tradeoff is that the returned value is not under user control and has a constrained lifetime. |
| Parameters |
|
|||
|---|---|---|---|---|
| Returns | A pointer to a buffer containing the path of the directory associated with dir (as a char*). The buffer is only valid until another API function is invoked. | |||
| Notes | Do not modify or free the returned buffer.
This function entails less user overhead than cs_directory_path(), and so can be more convenient to use; the tradeoff is that the returned value is not under user control and has a constrained lifetime. |
| Parameters |
|
|||
|---|---|---|---|---|
| Returns | A hash derived from the contents of dir. | |||
| Notes | This hash value is stable in the following sense. Suppose there are two analyses A1 and A2 generated with exactly the same inputs (including identical analyzed code, underlying build commands and ordering, command line and configuration settings, increment order and contents). Let d1 be a cs_directory in A1, and d2 be the cs_directory in A2 that corresponds to d1. Then cs_directory_stable_hash(d1)==cs_directory_stable_hash(d2).
If you do not need hash values to be stable across analyses, use cs_directory_hash(): it has better performance. |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
An integer N, such that:
|
||||||
| Notes | This function is provided so cs_directory values can be stored in ordered containers that provide stable iteration order.
The comparison is stable in the following sense. Suppose there are two analyses A1 and A2 generated with exactly the same inputs (including identical analyzed code, underlying build commands and ordering, command line and configuration settings, increment order and contents). Let a1 and b1 be two cs_directory values in A1, and a2 and b2 be the cs_directory values in A2 that correspond to a1 and b1 respectively. Then cs_directory_stable_compare(a1,b1)==cs_directory_stable_compare(a2,b2). If you do not need comparison results to be stable across different analyses, use cs_directory_compare(): it has better performance. |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns | cs_true if dir1 and dir2 are equal; cs_false if not. |
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Returns |
An integer N, such that:
|
||||||
| Notes | This function is provided so cs_directory objects can be stored in ordered containers. It is not based on any user-perceivable ordering.
For fixed cs_directory values a and b in a single analysis, cs_directory_compare(a,b) will always return the same value. However, cs_directory_compare() will not necessarily return this same value when called on the corresponding cs_directory values a' and b' in a different analysis. Function cs_directory_stable_compare() provides some degree of stability across analyses, although restrictions still apply. If you do not need comparison results to be stable across different analyses, use cs_directory_compare(): it has better performance. |
| Parameters |
|
|||
|---|---|---|---|---|
| Returns | A hash of dir. | |||
| Notes | For a fixed cs_directory d in a single analysis, cs_directory_hash(d) will always return the same value. However, cs_directory_hash() will not necessarily return this same value when called on the corresponding cs_directory d' in a different analysis. Function cs_directory_stable_hash() provides some degree of stability across analyses, although restrictions still apply. If you do not need hash values to be stable across different analyses, use cs_directory_hash(): it has better performance. |
| Parameters |
|
|||
|---|---|---|---|---|
| Returns | cs_true if dir is null, cs_false otherwise. |
| Returns | A null cs_directory. |
|---|