Skip to content

Commit

Permalink
autodocs and add section general to the manual
Browse files Browse the repository at this point in the history
  • Loading branch information
dajobe committed Nov 19, 2011
1 parent 98fae87 commit e8296db
Show file tree
Hide file tree
Showing 13 changed files with 149 additions and 23 deletions.
4 changes: 4 additions & 0 deletions docs/redland-changes.tsv
Expand Up @@ -15,6 +15,10 @@
1.0.13 - - - 1.0.14 unsigned char* librdf_utf8_to_latin1 (const unsigned char *input, int length, int *output_length) -
1.0.13 - - - 1.0.14 unsigned char* librdf_latin1_to_utf8 (const unsigned char *input, int length, int *output_length) -
1.0.13 - - - 1.0.14 void librdf_utf8_print (const unsigned char *input, int length, FILE *stream) -
1.0.14 - - - 1.0.15 void librdf_free_memory (void *ptr) -
1.0.14 - - - 1.0.15 void* librdf_alloc_memory (size_t size) -
1.0.14 - - - 1.0.15 void* librdf_calloc_memory (size_t nmemb, size_t size) -
1.0.14 - - - 1.0.15 librdf_statement* librdf_new_statement_from_statement2 (librdf_statement* statement) -
#
# Types
#
Expand Down
1 change: 1 addition & 0 deletions docs/redland-docs.xml
Expand Up @@ -123,6 +123,7 @@

<xi:include href="redland-chapter-objects.xml"/>
<xi:include href="xml/world.xml"/>
<xi:include href="xml/general.xml"/>
<xi:include href="xml/concepts.xml"/>
<xi:include href="xml/digest.xml"/>
<xi:include href="xml/files.xml"/>
Expand Down
9 changes: 8 additions & 1 deletion docs/redland-sections.txt
@@ -1,5 +1,5 @@
<SECTION>
<FILE>section-general</FILE>
<FILE>general</FILE>
LIBRDF_VERSION
LIBRDF_VERSION_MAJOR
LIBRDF_VERSION_MINOR
Expand All @@ -9,6 +9,12 @@ librdf_version_decimal
librdf_version_major
librdf_version_release
librdf_version_minor
librdf_version_string
librdf_copyright_string
librdf_short_copyright_string
librdf_alloc_memory
librdf_calloc_memory
librdf_free_memory
REDLAND_DEPRECATED
</SECTION>

Expand Down Expand Up @@ -360,6 +366,7 @@ librdf_statement
librdf_statement_part
librdf_new_statement
librdf_new_statement_from_statement
librdf_new_statement_from_statement2
librdf_new_statement_from_nodes
librdf_statement_init
librdf_statement_clear
Expand Down
52 changes: 49 additions & 3 deletions docs/tmpl/section-general.sgml → docs/tmpl/general.sgml
@@ -1,12 +1,13 @@
<!-- ##### SECTION Title ##### -->
General library facilities
General

<!-- ##### SECTION Short_Description ##### -->
Version static variables.
Static variables and memory handling.

<!-- ##### SECTION Long_Description ##### -->
<para>
Version static variables.
Static variables for version numbers and strings, copyright strings and
home page. Functions for in-library memory allocation and deallocation.
</para>

<!-- ##### SECTION See_Also ##### -->
Expand Down Expand Up @@ -79,6 +80,51 @@ Version static variables.
</para>


<!-- ##### VARIABLE librdf_version_string ##### -->
<para>

</para>


<!-- ##### VARIABLE librdf_copyright_string ##### -->
<para>

</para>


<!-- ##### VARIABLE librdf_short_copyright_string ##### -->
<para>

</para>


<!-- ##### FUNCTION librdf_alloc_memory ##### -->
<para>

</para>

@size:
@Returns:


<!-- ##### FUNCTION librdf_calloc_memory ##### -->
<para>

</para>

@nmemb:
@size:
@Returns:


<!-- ##### FUNCTION librdf_free_memory ##### -->
<para>

</para>

@ptr:


<!-- ##### MACRO REDLAND_DEPRECATED ##### -->
<para>
When defined before a function, indicates that the function
Expand Down
10 changes: 10 additions & 0 deletions docs/tmpl/hash.sgml
Expand Up @@ -33,6 +33,16 @@ disk and with persistence. Keys may have multiple and duplicate values.
</para>


<!-- ##### FUNCTION librdf_new_hash ##### -->
<para>

</para>

@world:
@name:
@Returns:


<!-- ##### FUNCTION librdf_new_hash_from_string ##### -->
<para>

Expand Down
2 changes: 1 addition & 1 deletion docs/tmpl/log.sgml
@@ -1,5 +1,5 @@
<!-- ##### SECTION Title ##### -->
Logging.
Logging

<!-- ##### SECTION Short_Description ##### -->
Message and error logging.
Expand Down
9 changes: 9 additions & 0 deletions docs/tmpl/statement.sgml
Expand Up @@ -56,6 +56,15 @@ form for use in storage.
@Returns:


<!-- ##### FUNCTION librdf_new_statement_from_statement2 ##### -->
<para>

</para>

@statement:
@Returns:


<!-- ##### FUNCTION librdf_new_statement_from_nodes ##### -->
<para>

Expand Down
2 changes: 1 addition & 1 deletion docs/tmpl/storage.sgml
@@ -1,5 +1,5 @@
<!-- ##### SECTION Title ##### -->
Triple stores.
Triple stores

<!-- ##### SECTION Short_Description ##### -->
RDF Triple stores
Expand Down
2 changes: 1 addition & 1 deletion docs/tmpl/unused.sgml
Expand Up @@ -107,7 +107,7 @@ Internal.
@facility:
@locator:
@message:
@Varargs:
@...:


<!-- ##### FUNCTION librdf_log_simple ##### -->
Expand Down
44 changes: 44 additions & 0 deletions src/librdf.h.in
Expand Up @@ -295,18 +295,62 @@ typedef struct librdf_serializer_factory_s librdf_serializer_factory;


/* Public statics */

/**
* librdf_short_copyright_string:
*
* Short copyright string (one line).
*/
REDLAND_API
extern const char * const librdf_short_copyright_string;

/**
* librdf_copyright_string:
*
* Copyright string (multiple lines).
*/
REDLAND_API
extern const char * const librdf_copyright_string;

/**
* librdf_version_string:
*
* Raptor version as a string.
*/
REDLAND_API
extern const char * const librdf_version_string;

/**
* librdf_version_major:
*
* Raptor major version number.
*/
REDLAND_API
extern const unsigned int librdf_version_major;

/**
* librdf_version_minor:
*
* Raptor minor version number.
*/
REDLAND_API
extern const unsigned int librdf_version_minor;

/**
* librdf_version_release:
*
* Rasqal release version number.
*/
REDLAND_API
extern const unsigned int librdf_version_release;

/**
* librdf_version_decimal:
*
* Rasqal version as a decimal number.
*
* Format: major * 10000 + minor * 100 + release
*/
REDLAND_API
extern const unsigned int librdf_version_decimal;

Expand Down
31 changes: 18 additions & 13 deletions src/rdf_init.c
Expand Up @@ -653,9 +653,10 @@ librdf_basename(const char *name)
* @ptr: pointer to free
*
* Free memory allocated in the library.
* Required for some runtimes where memory must be freed within the same shared object
* it was allocated in.
*/
*
* Required for some runtimes where memory must be freed within the same
* shared object it was allocated in.
**/
void
librdf_free_memory(void *ptr)
{
Expand All @@ -668,12 +669,14 @@ librdf_free_memory(void *ptr)
* @size: alloc size
*
* Allocate memory inside the library similar to malloc().
* Required for some runtimes where memory must be freed within the same shared object
* it was allocated in.
*
* @return pointer to memory or NULL on failure
*/
void *librdf_alloc_memory(size_t size)
* Required for some runtimes where memory must be freed within the same
* shared object it was allocated in.
*
* Return value: pointer to memory or NULL on failure
**/
void*
librdf_alloc_memory(size_t size)
{
return raptor_alloc_memory(size);
}
Expand All @@ -684,12 +687,14 @@ void *librdf_alloc_memory(size_t size)
* @size: size of member
*
* Allocate zeroed array of items inside the library similar to calloc().
* Required for some runtimes where memory must be freed within the same shared object
* it was allocated in.
*
* Required for some runtimes where memory must be freed within the same
* shared object it was allocated in.
*
* @return pointer to memory or NULL on failure
*/
void *librdf_calloc_memory(size_t nmemb, size_t size)
* Return value: pointer to memory or NULL on failure
**/
void*
librdf_calloc_memory(size_t nmemb, size_t size)
{
return raptor_calloc_memory(nmemb, size);
}
Expand Down
4 changes: 2 additions & 2 deletions src/rdf_init.h
Expand Up @@ -70,9 +70,9 @@ void librdf_world_set_digest(librdf_world* world, const char *name);
REDLAND_API
void librdf_free_memory(void *ptr);
REDLAND_API
void *librdf_alloc_memory(size_t size);
void* librdf_alloc_memory(size_t size);
REDLAND_API
void *librdf_calloc_memory(size_t nmemb, size_t size);
void* librdf_calloc_memory(size_t nmemb, size_t size);

/**
* LIBRDF_WORLD_FEATURE_GENID_BASE:
Expand Down
2 changes: 1 addition & 1 deletion src/rdf_log.c
Expand Up @@ -154,7 +154,7 @@ librdf_log_simple(librdf_world* world, int code,
* @facility: #librdf_log_facility log facility
* @locator: raptor_locator if available or NULL
* @message: message to record
* @Varargs: message parameters
* @...: message parameters
*
* Log a message.
*
Expand Down

0 comments on commit e8296db

Please sign in to comment.