ohcount
Functions
detector.h File Reference
#include "sourcefile.h"

Go to the source code of this file.

Functions

const char * ohcount_detect_language (SourceFile *sourcefile)
 
int ohcount_is_binary_filename (const char *filename)
 
void escape_path (char *safe, const char *unsafe)
 

Function Documentation

◆ escape_path()

void escape_path ( char *  safe,
const char *  unsafe 
)

◆ ohcount_detect_language()

const char * ohcount_detect_language ( SourceFile sourcefile)

Attempts to detect the programming language used by the given file. The returned pointer is used internally and must not be 'free'd.

Parameters
sourcefileA SourceFile created by ohcount_sourcefile_new().
Returns
pointer to a string with the detected language or NULL.

◆ ohcount_is_binary_filename()

int ohcount_is_binary_filename ( const char *  filename)