/Users/andy/dev/ohcount/src/parsed_language.h File Reference

#include "structs.h"

Go to the source code of this file.

Functions

ParsedLanguageohcount_parsed_language_new (const char *language, int buffer_size)
void ohcount_parsed_language_add_code (ParsedLanguage *parsed_language, char *p, int length)
void ohcount_parsed_language_add_comment (ParsedLanguage *parsed_language, char *p, int length)
void ohcount_parsed_language_free (ParsedLanguage *parsed_language)
ParsedLanguageListohcount_parsed_language_list_new ()
void ohcount_parsed_language_list_free (ParsedLanguageList *list)


Function Documentation

void ohcount_parsed_language_add_code ( ParsedLanguage parsed_language,
char *  p,
int  length 
)

Adds some code to the code buffer for the given ParsedLanguage.

Parameters:
parsed_language A ParsedLanguage created from ohcount_parsed_language_new().
p A pointer in memory to start copying code from.
length The number of characters to copy from p.

void ohcount_parsed_language_add_comment ( ParsedLanguage parsed_language,
char *  p,
int  length 
)

Adds a comment to the comment buffer for the given ParsedLanguage.

Parameters:
parsed_language A ParsedLanguage created from ohcount_parsed_language_new().
p A pointer in memory to start copying the comment from.
length The number of characters to copy from p.

void ohcount_parsed_language_free ( ParsedLanguage parsed_language  ) 

Frees the memory allocated for the given ParsedLanguage.

Parameters:
parsed_language A ParsedLanguage created from ohcount_parsed_language_new().

void ohcount_parsed_language_list_free ( ParsedLanguageList list  ) 

Frees the memory allocated for the given ParsedLanguageList.

Parameters:
list A ParsedLanguage created from ohcount_parsed_language_list_new().

ParsedLanguageList* ohcount_parsed_language_list_new (  ) 

Creates a new ParsedLanguageList that is initially empty.

Returns:
ParsedLanguageList

ParsedLanguage* ohcount_parsed_language_new ( const char *  language,
int  buffer_size 
)

Creates a new ParsedLanguage for the given language and buffer size. The given language is not copied and may not be 'free'd. Use a language defined in src/languages.h.

Parameters:
language The parsed language.
buffer_size The size of the buffers to store parsed code and comment text.
Returns:
ParsedLanguage


Generated on Fri Aug 28 15:20:08 2009 for ohcount by  doxygen 1.5.9