|
ohcount
|
#include "structs.h"Go to the source code of this file.
| void ohcount_loc_add_loc | ( | Loc * | loc, |
| Loc * | other | ||
| ) |
| void ohcount_loc_delta_add_loc_delta | ( | LocDelta * | delta, |
| LocDelta * | other | ||
| ) |
| void ohcount_loc_delta_free | ( | LocDelta * | delta | ) |
Frees the memory allocated for a given LocDelta.
| delta | A LocDelta created from ohcount_loc_delta_new(). |
| int ohcount_loc_delta_is_changed | ( | LocDelta * | delta | ) |
Returns whether or not a given LocDelta has any line changes.
| delta | A LocDelta created from ohcount_loc_delta_new(). |
| int ohcount_loc_delta_is_equal | ( | LocDelta * | delta, |
| LocDelta * | other | ||
| ) |
Returns whether or not two given LocDeltas are equivalent.
| delta | A LocDelta created from ohcount_loc_delta_new(). |
| other | Another LocDelta. |
| void ohcount_loc_delta_list_add_loc_delta | ( | LocDeltaList * | list, |
| LocDelta * | delta | ||
| ) |
Adds a given LocDelta to a LocDeltaList. The given LocDelta is copied and may be 'free'd immediately.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| delta | A LocDelta created from ohcount_loc_delta_new(). |
| void ohcount_loc_delta_list_add_loc_delta_list | ( | LocDeltaList * | list, |
| LocDeltaList * | loc_delta_list | ||
| ) |
Adds a given LocDeltaList to another LocDeltaList. The results are stored in the first LocDeltaList given. The second LocDeltaList may be 'free'd immediately.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| loc_delta_list | Another LocDeltaList. |
| int ohcount_loc_delta_list_blanks_added | ( | LocDeltaList * | list | ) |
Returns the number of blank lines added for the given LocDeltaList.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| int ohcount_loc_delta_list_blanks_removed | ( | LocDeltaList * | list | ) |
Returns the number of blank lines removed for the given LocDeltaList.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| int ohcount_loc_delta_list_code_added | ( | LocDeltaList * | list | ) |
Returns the number of lines of code added for the given LocDeltaList.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| int ohcount_loc_delta_list_code_removed | ( | LocDeltaList * | list | ) |
Returns the number of lines of code removed for the given LocDeltaList.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| int ohcount_loc_delta_list_comments_added | ( | LocDeltaList * | list | ) |
Returns the number of lines of comments added for the given LocDeltaList.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| int ohcount_loc_delta_list_comments_removed | ( | LocDeltaList * | list | ) |
Returns the number of lines of comments removed for the given LocDeltaList.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| void ohcount_loc_delta_list_free | ( | LocDeltaList * | list | ) |
Frees the memory allocated for a given LocDeltaList.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| LocDelta* ohcount_loc_delta_list_get_loc_delta | ( | LocDeltaList * | list, |
| const char * | language | ||
| ) |
Returns a LocDelta from a given LocDeltaList and language. The returned pointer is used internally and may not be 'free'd.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| language | The language of the LocDelta to retrieve. |
| int ohcount_loc_delta_list_net_blanks | ( | LocDeltaList * | list | ) |
Returns the net number of blank lines for the given LocDeltaList.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| int ohcount_loc_delta_list_net_code | ( | LocDeltaList * | list | ) |
Returns the net number of lines of code for the given LocDeltaList.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| int ohcount_loc_delta_list_net_comments | ( | LocDeltaList * | list | ) |
Returns the net number of lines of comments for the given LocDeltaList.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| int ohcount_loc_delta_list_net_total | ( | LocDeltaList * | list | ) |
Returns the net number of lines for the given LocDeltaList.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
Creates a new LocDeltaList that is initially empty. LocDeltas can be added using ohcount&oc_delta_list_add_loc_delta().
Creates a new LocDeltaList from a given one, excluding all LocDeltas with no counted lines. The given list may be 'free'd immediately.
| list | A LocDeltaList created from ohcount_loc_delta_list_new(). |
| int ohcount_loc_delta_net_blanks | ( | LocDelta * | delta | ) |
Returns the net number of blank lines in a given LocDelta.
| delta | A LocDelta created from ohcount_loc_delta_new(). |
| int ohcount_loc_delta_net_code | ( | LocDelta * | delta | ) |
Returns the net number of lines of code in a given LocDelta.
| delta | A LocDelta created from ohcount_loc_delta_new(). |
| int ohcount_loc_delta_net_comments | ( | LocDelta * | delta | ) |
Returns the net number of lines of comments in a given LocDelta.
| delta | A LocDelta created from ohcount_loc_delta_new(). |
| int ohcount_loc_delta_net_total | ( | LocDelta * | delta | ) |
Returns the net number of lines in a given LocDelta.
| delta | A LocDelta created from ohcount_loc_delta_new(). |
| LocDelta* ohcount_loc_delta_new | ( | const char * | language, |
| int | code_added, | ||
| int | code_removed, | ||
| int | comments_added, | ||
| int | comments_removed, | ||
| int | blanks_added, | ||
| int | blanks_removed | ||
| ) |
Creates a new LocDelta from the given language and lines of code, comments, and blanks added and removed. The given language is not copied and may not be 'free'd. Use a language defined in src/languages.h.
| language | The language being counted. |
| code_added | The number of lines of code added in this delta. |
| code_removed | The number of lines of code removed in this delta. |
| comments_added | The number of lines of comments added in this delta. |
| comments_removed | The number of lines of comments removed in this delta. |
| blanks_added | The number of blank lines added in this delta. |
| blanks_removed | The number of blank lines removed in this delta. |
| void ohcount_loc_free | ( | Loc * | loc | ) |
Frees the memory allocated for a given Loc.
| loc | A Loc created from ohcount_loc_new(). |
| int ohcount_loc_is_equal | ( | Loc * | loc, |
| Loc * | other | ||
| ) |
Returns whether or not two given Locs are equivalent.
| loc | A Loc created from ohcount_loc_new(). |
| other | Another Loc. |
| void ohcount_loc_list_add_loc | ( | LocList * | list, |
| Loc * | loc | ||
| ) |
Adds a given Loc to a LocList. The given Loc is copied and may be 'free'd immediately.
| list | a LocList created from ohcount_loc_list_new(). |
| loc | A Loc created from ohcount_loc_new(). |
| void ohcount_loc_list_add_loc_list | ( | LocList * | list, |
| LocList * | loc_list | ||
| ) |
Adds a given LocList to another LocList. The results are stored in the first LocList given. The second LocList may be 'free'd immediately.
| list | A LocList created from ohcount_loc_list_new(). |
| loc_list | Another LocList. |
| int ohcount_loc_list_blanks | ( | LocList * | list | ) |
Returns the number of blank lines for all Locs in this LocList.
| list | A LocList created from ohcount_loc_list_new(). |
| int ohcount_loc_list_code | ( | LocList * | list | ) |
Returns the number of lines of code for all Locs in this LocList.
| list | A LocList created from ohcount_loc_list_new(). |
| int ohcount_loc_list_comments | ( | LocList * | list | ) |
Returns the number of lines of commentsfor all Locs in this LocList.
| list | A LocList created from ohcount_loc_list_new(). |
| int ohcount_loc_list_filecount | ( | LocList * | list | ) |
Returns the number of files counted for all Locs in this LocList.
| list | A LocList created from ohcount_loc_list_new(). |
| void ohcount_loc_list_free | ( | LocList * | list | ) |
Frees the memory allocated for a given LocList.
| list | A LocList created from ohcount_loc_list_new(). |
| Loc* ohcount_loc_list_get_loc | ( | LocList * | list, |
| const char * | language | ||
| ) |
Returns a Loc from a given LocList and language. The returned pointer is used internally and may not be 'free'd.
| list | A LocList created from ohcount_loc_list_new(). |
| language | The language of the Loc to retrieve. |
Creates a new LocList that is initially empty. Locs can be added using ohcount_loc_list_add_loc().
| LocList* ohcount_loc_list_new_compact | ( | LocList * | list | ) |
Creates a new LocList from a given one, excluding all Locs with no counted lines. The given list may be 'free'd immediately.
| list | A LocList created from ohcount_loc_list_new(). |
| int ohcount_loc_list_total | ( | LocList * | list | ) |
Returns the total number of lines for all Locs in this LocList.
| list | A LocList created from ohcount_loc_list_new(). |
| Loc* ohcount_loc_new | ( | const char * | language, |
| int | code, | ||
| int | comments, | ||
| int | blanks, | ||
| int | filecount | ||
| ) |
Creates a new Loc from the given language, lines of code, comments, and blanks, and number of files counted. The given language is not copied and may not be 'free'd. Use a language defined in src/languages.h.
| language | The language being counted. |
| code | The number of lines of code counted. |
| comments | The number of lines of comments counted. |
| blanks | The number of blank lines counted. |
| filecount | The number of files counted for this set. |
| int ohcount_loc_total | ( | Loc * | loc | ) |
Returns the total number of lines counted for a given Loc.
| loc | A Loc created from ohcount_loc_new(). |
1.7.6.1