ohcount
Macros | Functions
licenses.h File Reference
#include "sourcefile.h"

Go to the source code of this file.

Macros

#define LIC_ACADEMIC   "academic"
 
#define LIC_ADAPTIVE   "adaptive"
 
#define LIC_AFFERO   "affero"
 
#define LIC_APACHE   "apache"
 
#define LIC_APACHE2   "apache_2"
 
#define LIC_APPLE_OPEN_SOURCE   "apple_open_source"
 
#define LIC_ARTISTIC   "artistic"
 
#define LIC_ATTRIBUTION_ASSURANCE   "attribution_assurance"
 
#define LIC_BOOST   "boost"
 
#define LIC_BSD   "bsd"
 
#define LIC_CECILL   "cecill"
 
#define LIC_CECILL_B   "cecill_b"
 
#define LIC_CECILL_C   "cecill_c"
 
#define LIC_COMPUTER_ASSOCIATES_TRUSTED   "computer_associates_trusted"
 
#define LIC_COMMON_DEVELOPMENT_AND_DISTRIBUTION    "common_development_and_distribution"
 
#define LIC_COMMON_PUBLIC   "common_public"
 
#define LIC_CUA_OFFICE   "cua_office"
 
#define LIC_EU_DATAGRID   "eu_datagrid"
 
#define LIC_ECLIPSE   "eclipse"
 
#define LIC_EDUCATIONAL   "educational"
 
#define LIC_EIFFEL   "eiffel"
 
#define LIC_EIFFEL2   "eiffel_2"
 
#define LIC_ENTESSA   "entessa"
 
#define LIC_FAIR   "fair"
 
#define LIC_FRAMEWORX   "frameworx"
 
#define LIC_GPL3_OR_LATER   "gpl3_or_later"
 
#define LIC_GPL3   "gpl3"
 
#define LIC_LGPL3   "lgpl3"
 
#define LIC_GPL   "gpl"
 
#define LIC_LGPL   "lgpl"
 
#define LIC_HISTORICAL   "historical"
 
#define LIC_I9   "i9_license"
 
#define LIC_IBM_PUBLIC   "ibm_public"
 
#define LIC_INTEL_OPEN_SOURCE   "intel_open_source"
 
#define LIC_JABBER_OPEN_SOURCE   "jabber_open_source"
 
#define LIC_LUCENT_PLAN9   "lucent_plan9"
 
#define LIC_LUCENT_PUBLIC   "lucent_public"
 
#define LIC_MIT   "mit"
 
#define LIC_MITRE   "mitre"
 
#define LIC_MOTOSOTO   "motosoto"
 
#define LIC_MOZILLA_PUBLIC1   "mozilla_public_1"
 
#define LIC_MOZILLA_PUBLIC11   "mozilla_public_1_1"
 
#define LIC_NASA_OPEN   "nasa_open"
 
#define LIC_NAUMEN   "naumen"
 
#define LIC_NETHACK   "nethack"
 
#define LIC_NOKIA_OPEN_SOURCE   "nokia_open_source"
 
#define LIC_OCLC_RESEARCH   "oclc_research"
 
#define LIC_OPEN_GROUP_TEST   "open_group_test"
 
#define LIC_OPEN_SOFTWARE   "open_software"
 
#define LIC_PHP_LICENSE   "php_license"
 
#define LIC_PYTHON_LICENSE   "python_license"
 
#define LIC_PYTHON_SOFTWARE_FOUNDATION   "python_software_foundation"
 
#define LIC_QT_PUBLIC   "qt_public"
 
#define LIC_REALNETWORKS_PUBLIC_SOURCE   "realnetworks_public_source"
 
#define LIC_RECIPROCAL_PUBLIC   "reciprocal_public"
 
#define LIC_RICOH_SOURCE   "ricoh_source"
 
#define LIC_SLEEPYCAT   "sleepycat"
 
#define LIC_SUGARCRM113   "sugarcrm_1_1_3"
 
#define LIC_SUN_INDUSTRY_STANDARDS   "sun_industry_standards"
 
#define LIC_SUN_PUBLIC   "sun_public"
 
#define LIC_SYBASE_OPEN_WATCOM   "sybase_open_watcom"
 
#define LIC_U_OF_I_NCSA   "u_of_i_ncsa"
 
#define LIC_VOVIDA_SOFTWARE   "vovida_software"
 
#define LIC_W3C   "w3c"
 
#define LIC_WXWINDOWS   "wx_windows"
 
#define LIC_XNET   "x_net"
 
#define LIC_ZOPE   "zope"
 
#define LIC_ZLIB_LIBPNG   "zlib_libpng"
 
#define LIC_APACHE_ISH   "apache_ish"
 
#define LIC_BSD_ISH   "bsd_ish"
 
#define LIC_BSD_2CLAUSE_ISH   "bsd_2clause_ish"
 
#define LIC_WTFPL2   "wtfpl_2"
 

Functions

LicenseListohcount_detect_license (SourceFile *sourcefile)
 
LicenseListohcount_license_list_new ()
 
void ohcount_license_list_free (LicenseList *list)
 

Macro Definition Documentation

◆ LIC_ACADEMIC

#define LIC_ACADEMIC   "academic"

◆ LIC_ADAPTIVE

#define LIC_ADAPTIVE   "adaptive"

◆ LIC_AFFERO

#define LIC_AFFERO   "affero"

◆ LIC_APACHE

#define LIC_APACHE   "apache"

◆ LIC_APACHE2

#define LIC_APACHE2   "apache_2"

◆ LIC_APACHE_ISH

#define LIC_APACHE_ISH   "apache_ish"

◆ LIC_APPLE_OPEN_SOURCE

#define LIC_APPLE_OPEN_SOURCE   "apple_open_source"

◆ LIC_ARTISTIC

#define LIC_ARTISTIC   "artistic"

◆ LIC_ATTRIBUTION_ASSURANCE

#define LIC_ATTRIBUTION_ASSURANCE   "attribution_assurance"

◆ LIC_BOOST

#define LIC_BOOST   "boost"

◆ LIC_BSD

#define LIC_BSD   "bsd"

◆ LIC_BSD_2CLAUSE_ISH

#define LIC_BSD_2CLAUSE_ISH   "bsd_2clause_ish"

◆ LIC_BSD_ISH

#define LIC_BSD_ISH   "bsd_ish"

◆ LIC_CECILL

#define LIC_CECILL   "cecill"

◆ LIC_CECILL_B

#define LIC_CECILL_B   "cecill_b"

◆ LIC_CECILL_C

#define LIC_CECILL_C   "cecill_c"

◆ LIC_COMMON_DEVELOPMENT_AND_DISTRIBUTION

#define LIC_COMMON_DEVELOPMENT_AND_DISTRIBUTION    "common_development_and_distribution"

◆ LIC_COMMON_PUBLIC

#define LIC_COMMON_PUBLIC   "common_public"

◆ LIC_COMPUTER_ASSOCIATES_TRUSTED

#define LIC_COMPUTER_ASSOCIATES_TRUSTED   "computer_associates_trusted"

◆ LIC_CUA_OFFICE

#define LIC_CUA_OFFICE   "cua_office"

◆ LIC_ECLIPSE

#define LIC_ECLIPSE   "eclipse"

◆ LIC_EDUCATIONAL

#define LIC_EDUCATIONAL   "educational"

◆ LIC_EIFFEL

#define LIC_EIFFEL   "eiffel"

◆ LIC_EIFFEL2

#define LIC_EIFFEL2   "eiffel_2"

◆ LIC_ENTESSA

#define LIC_ENTESSA   "entessa"

◆ LIC_EU_DATAGRID

#define LIC_EU_DATAGRID   "eu_datagrid"

◆ LIC_FAIR

#define LIC_FAIR   "fair"

◆ LIC_FRAMEWORX

#define LIC_FRAMEWORX   "frameworx"

◆ LIC_GPL

#define LIC_GPL   "gpl"

◆ LIC_GPL3

#define LIC_GPL3   "gpl3"

◆ LIC_GPL3_OR_LATER

#define LIC_GPL3_OR_LATER   "gpl3_or_later"

◆ LIC_HISTORICAL

#define LIC_HISTORICAL   "historical"

◆ LIC_I9

#define LIC_I9   "i9_license"

◆ LIC_IBM_PUBLIC

#define LIC_IBM_PUBLIC   "ibm_public"

◆ LIC_INTEL_OPEN_SOURCE

#define LIC_INTEL_OPEN_SOURCE   "intel_open_source"

◆ LIC_JABBER_OPEN_SOURCE

#define LIC_JABBER_OPEN_SOURCE   "jabber_open_source"

◆ LIC_LGPL

#define LIC_LGPL   "lgpl"

◆ LIC_LGPL3

#define LIC_LGPL3   "lgpl3"

◆ LIC_LUCENT_PLAN9

#define LIC_LUCENT_PLAN9   "lucent_plan9"

◆ LIC_LUCENT_PUBLIC

#define LIC_LUCENT_PUBLIC   "lucent_public"

◆ LIC_MIT

#define LIC_MIT   "mit"

◆ LIC_MITRE

#define LIC_MITRE   "mitre"

◆ LIC_MOTOSOTO

#define LIC_MOTOSOTO   "motosoto"

◆ LIC_MOZILLA_PUBLIC1

#define LIC_MOZILLA_PUBLIC1   "mozilla_public_1"

◆ LIC_MOZILLA_PUBLIC11

#define LIC_MOZILLA_PUBLIC11   "mozilla_public_1_1"

◆ LIC_NASA_OPEN

#define LIC_NASA_OPEN   "nasa_open"

◆ LIC_NAUMEN

#define LIC_NAUMEN   "naumen"

◆ LIC_NETHACK

#define LIC_NETHACK   "nethack"

◆ LIC_NOKIA_OPEN_SOURCE

#define LIC_NOKIA_OPEN_SOURCE   "nokia_open_source"

◆ LIC_OCLC_RESEARCH

#define LIC_OCLC_RESEARCH   "oclc_research"

◆ LIC_OPEN_GROUP_TEST

#define LIC_OPEN_GROUP_TEST   "open_group_test"

◆ LIC_OPEN_SOFTWARE

#define LIC_OPEN_SOFTWARE   "open_software"

◆ LIC_PHP_LICENSE

#define LIC_PHP_LICENSE   "php_license"

◆ LIC_PYTHON_LICENSE

#define LIC_PYTHON_LICENSE   "python_license"

◆ LIC_PYTHON_SOFTWARE_FOUNDATION

#define LIC_PYTHON_SOFTWARE_FOUNDATION   "python_software_foundation"

◆ LIC_QT_PUBLIC

#define LIC_QT_PUBLIC   "qt_public"

◆ LIC_REALNETWORKS_PUBLIC_SOURCE

#define LIC_REALNETWORKS_PUBLIC_SOURCE   "realnetworks_public_source"

◆ LIC_RECIPROCAL_PUBLIC

#define LIC_RECIPROCAL_PUBLIC   "reciprocal_public"

◆ LIC_RICOH_SOURCE

#define LIC_RICOH_SOURCE   "ricoh_source"

◆ LIC_SLEEPYCAT

#define LIC_SLEEPYCAT   "sleepycat"

◆ LIC_SUGARCRM113

#define LIC_SUGARCRM113   "sugarcrm_1_1_3"

◆ LIC_SUN_INDUSTRY_STANDARDS

#define LIC_SUN_INDUSTRY_STANDARDS   "sun_industry_standards"

◆ LIC_SUN_PUBLIC

#define LIC_SUN_PUBLIC   "sun_public"

◆ LIC_SYBASE_OPEN_WATCOM

#define LIC_SYBASE_OPEN_WATCOM   "sybase_open_watcom"

◆ LIC_U_OF_I_NCSA

#define LIC_U_OF_I_NCSA   "u_of_i_ncsa"

◆ LIC_VOVIDA_SOFTWARE

#define LIC_VOVIDA_SOFTWARE   "vovida_software"

◆ LIC_W3C

#define LIC_W3C   "w3c"

◆ LIC_WTFPL2

#define LIC_WTFPL2   "wtfpl_2"

◆ LIC_WXWINDOWS

#define LIC_WXWINDOWS   "wx_windows"

◆ LIC_XNET

#define LIC_XNET   "x_net"

◆ LIC_ZLIB_LIBPNG

#define LIC_ZLIB_LIBPNG   "zlib_libpng"

◆ LIC_ZOPE

#define LIC_ZOPE   "zope"

Function Documentation

◆ ohcount_detect_license()

LicenseList * ohcount_detect_license ( SourceFile sourcefile)

Attempts to detect the source code licenses for a given file. It searches comment text in source files for any mention of known licenses, but unfortunately catches things like: "I find the GNU Public License dumb".

Parameters
sourcefileA SourceFile created by ohcount_sourcefile_new().
Returns
LicenseList

◆ ohcount_license_list_free()

void ohcount_license_list_free ( LicenseList list)

Frees the memory allocated for the given LicenseList.

Parameters
listA LicenseList created from ohcount_license_list_new().

◆ ohcount_license_list_new()

LicenseList * ohcount_license_list_new ( )

Creates a new LicenseList that is initially empty.

Returns
LicenseList