[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] Task FS#36
From: |
gerel |
Subject: |
Re: [pdf-devel] Task FS#36 |
Date: |
Wed, 30 Apr 2008 21:56:22 -0300 |
Well, before I change the API and (maybe) the implementation of each module, I
send you the info doc so we agree on what should be "const" and what not.
I'd like to remark 2 things,
1. I just declared "const" those parameters that from a "logical point of view"
should not be altered in a given procedure according to that procedure task
and _NOT_ according to its implementation.
2. I have decided to not declare "const" those parameter variables passed to a
"destroy/free" procedure since from a "logical point of view" they're being
altered, thus destroyed/freed (except for pdf_dealloc() but I'm not sure).
Wait for comments, patch following,
Index: doc/gnupdf.texi
===================================================================
RCS file: /sources/pdf/libgnupdf/doc/gnupdf.texi,v
retrieving revision 1.51
diff -u -r1.51 gnupdf.texi
--- doc/gnupdf.texi 21 Apr 2008 20:12:37 -0000 1.51
+++ doc/gnupdf.texi 1 May 2008 00:44:27 -0000
@@ -172,7 +172,7 @@
@node Error Reporting procedures
@subsection Error Reporting procedures
address@hidden void pdf_perror (pdf_status_t @var{status}, const char
address@hidden)
address@hidden void pdf_perror (const pdf_status_t @var{status}, const char
address@hidden)
Prints the message corresponding to @var{status} to stderr followed by
@var{str}.
@@ -200,7 +200,7 @@
@end table
@end deftypefun
address@hidden void pdf_error (pdf_status_t @var{status}, FILE address@hidden,
const char address@hidden, @var{...})
address@hidden void pdf_error (const pdf_status_t @var{status}, const FILE
address@hidden, const char address@hidden, @var{...})
Prints a message with `fprintf (@var{fd}, @var{format}, ...)';
if @var{status} is nonzero, also prints the corresponding message.
@@ -281,7 +281,7 @@
allocation and deallocation. The usual malloc/free/realloc schema is
used to provide this service.
address@hidden void* pdf_alloc (size_t @var{size})
address@hidden void* pdf_alloc (const size_t @var{size})
Allocates heap memory.
@@ -308,7 +308,7 @@
@end table
@end deftypefun
address@hidden void pdf_dealloc (void address@hidden)
address@hidden void pdf_dealloc (const void address@hidden)
Deallocates heap memory.
@@ -335,7 +335,7 @@
@end table
@end deftypefun
address@hidden void* pdf_realloc (void address@hidden, int @var{size})
address@hidden void* pdf_realloc (const void address@hidden, const int
@var{size})
Reallocates memory.
@@ -456,7 +456,7 @@
A variable of type pdf_i64_t is capabable of representing 64 bit signed
integers.
@end deftp
address@hidden pdf_i64_t pdf_i64_new (pdf_i32_t @var{high}, pdf_u32_t
@var{low})
address@hidden pdf_i64_t pdf_i64_new (const pdf_i32_t @var{high}, const
pdf_u32_t @var{low})
Create a new i64 variable from one 32 bit signed integer and a 32 bit unsigned
integer.
@@ -479,7 +479,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_i64_assign (pdf_i64_t address@hidden, pdf_i32_t
@var{high}, pdf_u32_t @var{low})
address@hidden pdf_status_t pdf_i64_assign (pdf_i64_t address@hidden, const
pdf_i32_t @var{high}, const pdf_u32_t @var{low})
Assign a value coming from one 32 bit signed integer and a 32 bit unsigned
integer to a i64 integer.
@@ -515,7 +515,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_i64_assign_quick (pdf_i64_t address@hidden,
pdf_i32_t @var{value})
address@hidden pdf_status_t pdf_i64_assign_quick (pdf_i64_t address@hidden,
const pdf_i32_t @var{value})
Assign a value coming from one 32 bit signed integer to a i64 integer.
@@ -548,7 +548,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_i64_copy (pdf_i64_t @var{orig}, pdf_i64_t
address@hidden)
address@hidden pdf_status_t pdf_i64_copy (const pdf_i64_t @var{orig}, pdf_i64_t
address@hidden)
Copies the data from orig to copy.
@@ -580,7 +580,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_i64_add (pdf_i64_t address@hidden, pdf_i64_t
@var{addend_1}, pdf_i64_t @var{addend_2})
address@hidden pdf_status_t pdf_i64_add (pdf_i64_t address@hidden, const
pdf_i64_t @var{addend_1}, const pdf_i64_t @var{addend_2})
Adds two 64 bit numbers
@@ -620,7 +620,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_i64_subtraction (pdf_i64_t address@hidden,
pdf_i64_t @var{minuend}, pdf_i64_t @var{subtrahend})
address@hidden pdf_status_t pdf_i64_subtraction (pdf_i64_t address@hidden,
const pdf_i64_t @var{minuend}, const pdf_i64_t @var{subtrahend})
Finds the difference between two 64 bit numbers
@@ -660,7 +660,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_i64_mult (pdf_i64_t address@hidden, pdf_i64_t
@var{factor_1}, pdf_i64_t @var{factor_2})
address@hidden pdf_status_t pdf_i64_mult (pdf_i64_t address@hidden, const
pdf_i64_t @var{factor_1}, const pdf_i64_t @var{factor_2})
Multiplication of two 64 bit numbers
@@ -700,7 +700,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_i64_div (pdf_i64_t address@hidden, pdf_i64_t
@var{dividend}, pdf_i64_t @var{divisor})
address@hidden pdf_status_t pdf_i64_div (pdf_i64_t address@hidden, const
pdf_i64_t @var{dividend}, const pdf_i64_t @var{divisor})
Division of two 64 bit numbers
@@ -737,7 +737,7 @@
@end deftypefun
address@hidden pdf_status_t pdf_i64_mod (pdf_i64_t address@hidden, pdf_i64_t
@var{dividend}, pdf_i64_t @var{divisor})
address@hidden pdf_status_t pdf_i64_mod (pdf_i64_t address@hidden, const
pdf_i64_t @var{dividend}, const pdf_i64_t @var{divisor})
Returns the remainder of the division between two 64 bit numbers
@@ -777,7 +777,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_i64_abs (pdf_i64_t address@hidden, pdf_i64_t
@var{number})
address@hidden pdf_status_t pdf_i64_abs (pdf_i64_t address@hidden, const
pdf_i64_t @var{number})
Returns the absolute value
@@ -813,7 +813,7 @@
@end table
@end deftypefun
address@hidden int pdf_i64_cmp (pdf_i64_t @var{number_1}, pdf_i64_t
@var{number_2})
address@hidden int pdf_i64_cmp (const pdf_i64_t @var{number_1}, const pdf_i64_t
@var{number_2})
Compares two 64 bit integers
@@ -848,7 +848,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_i64_neg (pdf_i64_t address@hidden, pdf_i64_t
@var{number})
address@hidden pdf_status_t pdf_i64_neg (pdf_i64_t address@hidden, const
pdf_i64_t @var{number})
Changes sign of 64 bit integer
@@ -920,7 +920,7 @@
@node Creating and Destroying Hash Tables
@subsection Creating and Destroying Hash Tables
address@hidden pdf_status_t pdf_hash_create (pdf_hash_key_dispose_fn_t
@var{dispose_key_fn}, pdf_hash_element_dispose_fn_t @var{dispose_fn},
pdf_hash_t @var{*table})
address@hidden pdf_status_t pdf_hash_create (const pdf_hash_key_dispose_fn_t
@var{dispose_key_fn}, const pdf_hash_element_dispose_fn_t @var{dispose_fn},
pdf_hash_t @var{*table})
Create a new empty hash table. When some element is removed @var{dispose_fn}
and @var{dispose_key_fn} are called, can be NULL.
@@ -979,7 +979,7 @@
@node Hash Table properties
@subsection Hash Table properties
address@hidden pdf_size_t pdf_hash_size (pdf_hash_t @var{table})
address@hidden pdf_size_t pdf_hash_size (const pdf_hash_t @var{table})
Returns the number of entries in @var{table}.
@@ -1001,7 +1001,7 @@
@node Working with keys
@subsection Working with keys
address@hidden pdf_bool_t pdf_hash_key_p (pdf_hash_t @var{table}, const char
address@hidden)
address@hidden pdf_bool_t pdf_hash_key_p (const pdf_hash_t @var{table}, const
char address@hidden)
Returns a boolean value indicating whether an element with key @var{key}
exists in @var{table}.
@@ -1125,7 +1125,7 @@
@node Searching elements
@subsection Searching elements
address@hidden pdf_status_t pdf_hash_search (pdf_hash_t @var{table}, const char
@var{*key}, const void address@hidden)
address@hidden pdf_status_t pdf_hash_search (const pdf_hash_t @var{table},
const char @var{*key}, const void address@hidden)
Searches for the element associated with the given @var{key} in @var{table}
and store it in @var{elem_pointer}.
@@ -1159,7 +1159,7 @@
@node Working with iterators
@subsection Working with iterators
address@hidden pdf_status_t pdf_hash_iterator (pdf_hash_t @var{table},
pdf_hash_iterator_t @var{*iterator})
address@hidden pdf_status_t pdf_hash_iterator (const pdf_hash_t @var{table},
pdf_hash_iterator_t @var{*iterator})
Creates an iterator over the keys of @var{table} and saves it in
@var{iterator}. Keys composed only by numbers are returned first followed by
keys in the order imposed by the ``strcmp()'' function.
@@ -1293,7 +1293,7 @@
@node Creating and Destroying Lists
@subsection Creating and Destroying Lists
address@hidden pdf_status_t pdf_list_create (pdf_list_element_equals_fn_t
@var{equals_fn}, pdf_list_element_dipose_fn_t @var{dispose_fn}, pdf_bool_t
@var{allow_duplicates}, pdf_list_t @var{*list})
address@hidden pdf_status_t pdf_list_create (const pdf_list_element_equals_fn_t
@var{equals_fn}, const pdf_list_element_dipose_fn_t @var{dispose_fn}, const
pdf_bool_t @var{allow_duplicates}, pdf_list_t @var{*list})
Create a new list containing no elements.
@@ -1367,7 +1367,7 @@
@node Managing List Properties
@subsection Managing List Properties
address@hidden pdf_size_t pdf_list_size (pdf_list_t @var{list})
address@hidden pdf_size_t pdf_list_size (const pdf_list_t @var{list})
Get the number of elements contained into a given list.
@@ -1393,7 +1393,7 @@
@node Searching for List Elements
@subsection Searching for List Elements
address@hidden pdf_status_t pdf_list_search (pdf_list_t @var{list}, const void*
@var{element}, pdf_list_node_t @var{*node})
address@hidden pdf_status_t pdf_list_search (const pdf_list_t @var{list}, const
void* @var{element}, pdf_list_node_t @var{*node})
Search whether an element is already in the list.
@@ -1424,7 +1424,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_search_from (pdf_list_t @var{list},
pdf_size_t @var{start_index}, const void* @var{element}, pdf_list_node_t
@var{*node})
address@hidden pdf_status_t pdf_list_search_from (const pdf_list_t @var{list},
const pdf_size_t @var{start_index}, const void* @var{element}, pdf_list_node_t
@var{*node})
Search whether an element is already in the list, at a position >=
@var{start_index}.
@@ -1457,7 +1457,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_search_from_to (pdf_list_t @var{list},
pdf_size_t @var{start_index}, pdf_size_t @var{end_index}, const void*
@var{element}, pdf_list_node_t @var{*node})
address@hidden pdf_status_t pdf_list_search_from_to (const pdf_list_t
@var{list}, const pdf_size_t @var{start_index}, const pdf_size_t
@var{end_index}, const void* @var{element}, pdf_list_node_t @var{*node})
Search whether an element is already in the list, at a position >=
@var{start_index} and < @var{end_index}.
@@ -1495,7 +1495,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_next_node (pdf_list_t @var{list},
pdf_list_node_t @var{node}, pdf_list_node_t @var{*next})
address@hidden pdf_status_t pdf_list_next_node (const pdf_list_t @var{list},
const pdf_list_node_t @var{node}, pdf_list_node_t @var{*next})
Return the node immediately after the given node in the list.
@@ -1526,7 +1526,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_previous_node (pdf_list_t @var{list},
pdf_list_node_t @var{node}, pdf_list_node_t @var{*prev})
address@hidden pdf_status_t pdf_list_previous_node (const pdf_list_t
@var{list}, const pdf_list_node_t @var{node}, pdf_list_node_t @var{*prev})
Return the node immediately before the given node in the list.
@@ -1557,7 +1557,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_indexof (pdf_list_t @var{list}, const
void* @var{element}, pdf_size_t @var{*position})
address@hidden pdf_status_t pdf_list_indexof (const pdf_list_t @var{list},
const void* @var{element}, pdf_size_t @var{*position})
Search whether an element is already in the list.
@@ -1588,7 +1588,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_indexof_from (pdf_list_t @var{list},
pdf_size_t @var{start_index}, const void* @var{element}, pdf_size_t
@var{*position})
address@hidden pdf_status_t pdf_list_indexof_from (const pdf_list_t @var{list},
const pdf_size_t @var{start_index}, const void* @var{element}, pdf_size_t
@var{*position})
Search whether an element is already in the list, at a position >=
@var{start_index}.
@@ -1623,7 +1623,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_indexof_from_to (pdf_list_t @var{list},
pdf_size_t @var{start_index}, pdf_size_t @var{end_index}, const void*
@var{element}, pdf_size_t @var{*position})
address@hidden pdf_status_t pdf_list_indexof_from_to (const pdf_list_t
@var{list}, const pdf_size_t @var{start_index}, const pdf_size_t
@var{end_index}, const void* @var{element}, pdf_size_t @var{*position})
Search whether an element is already in the list, at a position >=
@var{start_index} and < @var{end_index}.
@@ -1663,7 +1663,7 @@
@node Setting and Getting List Elements
@subsection Setting and Getting List Elements
address@hidden {void *} pdf_list_node_value (pdf_list_t @var{list},
pdf_list_node_t @var{node})
address@hidden {void *} pdf_list_node_value (const pdf_list_t @var{list}, const
pdf_list_node_t @var{node})
Get the element value represented by a list node.
@@ -1684,7 +1684,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_get_at (pdf_list_t @var{list}, pdf_size_t
@var{position}, const void @var{**value})
address@hidden pdf_status_t pdf_list_get_at (const pdf_list_t @var{list}, const
pdf_size_t @var{position}, const void @var{**value})
Get the element at a given position in the list.
@@ -1716,7 +1716,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_set_at (pdf_list_t @var{list}, pdf_size_t
@var{position}, const void* @var{element}, pdf_list_node_t @var{*node})
address@hidden pdf_status_t pdf_list_set_at (pdf_list_t @var{list}, const
pdf_size_t @var{position}, const void* @var{element}, pdf_list_node_t
@var{*node})
Replace the element at a given position in a list.
@@ -1816,7 +1816,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_add_at (pdf_list_t @var{list}, pdf_size_t
@var{position}, const void* @var{element}, pdf_list_node_t @var{*node})
address@hidden pdf_status_t pdf_list_add_at (pdf_list_t @var{list}, const
pdf_size_t @var{position}, const void* @var{element}, pdf_list_node_t
@var{*node})
Add an element at a given position in the list.
@@ -1851,7 +1851,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_remove_node (pdf_list_t @var{list},
pdf_list_node_t @var{node})
address@hidden pdf_status_t pdf_list_remove_node (pdf_list_t @var{list}, const
pdf_list_node_t @var{node})
Remove an element from the list.
@@ -1875,7 +1875,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_remove_at (pdf_list_t @var{list},
pdf_size_t @var{position})
address@hidden pdf_status_t pdf_list_remove_at (pdf_list_t @var{list}, const
pdf_size_t @var{position})
Remove an element at a given position from the list.
@@ -1934,7 +1934,7 @@
@node Working with sorted lists
@subsection Working with sorted lists
address@hidden pdf_status_t pdf_list_sorted_add (pdf_list_t @var{list},
pdf_list_element_compar_fn_t @var{compar_fn}, const void* @var{element},
pdf_list_node_t @var{* element_node})
address@hidden pdf_status_t pdf_list_sorted_add (pdf_list_t @var{list}, const
pdf_list_element_compar_fn_t @var{compar_fn}, const void* @var{element},
pdf_list_node_t @var{* element_node})
Add an element to the list.
@@ -1965,7 +1965,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_sorted_remove (pdf_list_t @var{list},
pdf_list_element_compar_fn_t @var{compar_fn}, const void * @var{element})
address@hidden pdf_status_t pdf_list_sorted_remove (pdf_list_t @var{list},
const pdf_list_element_compar_fn_t @var{compar_fn}, const void * @var{element})
Search and remove an element from the list.
@@ -1996,7 +1996,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_sorted_search (pdf_list_t @var{list},
pdf_list_element_compar_fn_t @var{compar_fn}, const void* @var{element},
pdf_list_node_t @var{*node})
address@hidden pdf_status_t pdf_list_sorted_search (const pdf_list_t
@var{list}, const pdf_list_element_compar_fn_t @var{compar_fn}, const void*
@var{element}, pdf_list_node_t @var{*node})
Search whether an element is already in the list.
@@ -2029,7 +2029,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_sorted_search_from_to (pdf_list_t
@var{list}, pdf_list_element_compar_fn_t @var{compar_fn}, pdf_size_t
@var{start_index}, pdf_size_t @var{end_index}, const void* @var{element},
pdf_list_node_t @var{*node})
address@hidden pdf_status_t pdf_list_sorted_search_from_to (const pdf_list_t
@var{list}, const pdf_list_element_compar_fn_t @var{compar_fn}, const
pdf_size_t @var{start_index}, const pdf_size_t @var{end_index}, const void*
@var{element}, pdf_list_node_t @var{*node})
Search whether an element is already in the list, at a position >=
@var{start_index} and < @var{end_index}.
@@ -2069,7 +2069,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_sorted_indexof (pdf_list_t @var{list},
pdf_list_element_compar_fn_t @var{compar_fn}, const void* @var{element},
pdf_size_t @var{*position})
address@hidden pdf_status_t pdf_list_sorted_indexof (const pdf_list_t
@var{list}, const pdf_list_element_compar_fn_t @var{compar_fn}, const void*
@var{element}, pdf_size_t @var{*position})
Search whether an element is already in the list.
@@ -2102,7 +2102,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_sorted_indexof_from_to (pdf_list_t
@var{list}, pdf_list_element_compar_fn_t @var{compar_fn}, pdf_size_t
@var{start_index}, pdf_size_t @var{end_index}, const void* @var{element},
pdf_size_t @var{*position})
address@hidden pdf_status_t pdf_list_sorted_indexof_from_to (const pdf_list_t
@var{list}, const pdf_list_element_compar_fn_t @var{compar_fn}, const
pdf_size_t @var{start_index}, const pdf_size_t @var{end_index}, const void*
@var{element}, pdf_size_t @var{*position})
Search whether an element is already in the list, at a position >=
@var{start_index} and < @var{end_index}.
@@ -2145,7 +2145,7 @@
@node Working with Iterators
@subsection Working with Iterators
address@hidden pdf_status_t pdf_list_iterator (pdf_list_t @var{list},
pdf_list_iterator_t @var{*itr})
address@hidden pdf_status_t pdf_list_iterator (const pdf_list_t @var{list},
pdf_list_iterator_t @var{*itr})
Create an iterator traversing a list.
@@ -2177,7 +2177,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_list_iterator_from_to (pdf_list_t @var{list},
pdf_size_t @var{start_index}, pdf_size_t @var{end_index}, pdf_list_iterator_t
@var{*itr})
address@hidden pdf_status_t pdf_list_iterator_from_to (const pdf_list_t
@var{list}, const pdf_size_t @var{start_index}, const pdf_size_t
@var{end_index}, pdf_list_iterator_t @var{*itr})
Create an iterator traversing the element with indices @code{i},
@code{start_index <= i < end_index}, of a list.
@@ -2371,19 +2371,19 @@
@node Matrix Manipulation Functions
@subsection Matrix Manipulation Functions
address@hidden pdf_status_t pdf_fp_matrix_concat (pdf_matrix_t @var{result},
pdf_matrix_t @var{m1}, pdf_matrix_t @var{m2})
address@hidden pdf_status_t pdf_fp_matrix_concat (pdf_matrix_t @var{result},
const pdf_matrix_t @var{m1}, const pdf_matrix_t @var{m2})
@end deftypefun
address@hidden pdf_status_t pdf_fp_matrix_invert (pdf_matrix_t @var{result},
pdf_matrix_t @var{m})
address@hidden pdf_status_t pdf_fp_matrix_invert (pdf_matrix_t @var{result},
const pdf_matrix_t @var{m})
@end deftypefun
address@hidden pdf_status_t pdf_fp_matrix_transform (pdf_point_t @var{result},
pdf_matrix_t @var{m}, pdf_point_t @var{p})
address@hidden pdf_status_t pdf_fp_matrix_transform (pdf_point_t @var{result},
const pdf_matrix_t @var{m}, const pdf_point_t @var{p})
@end deftypefun
address@hidden pdf_status_t pdf_fp_matrix_transform_rect (pdf_rect_t
@var{result}, pdf_matrix_t @var{m}, pdf_rect_t @var{rect})
address@hidden pdf_status_t pdf_fp_matrix_transform_rect (pdf_rect_t
@var{result}, const pdf_matrix_t @var{m}, const pdf_rect_t @var{rect})
@end deftypefun
@@ -2555,7 +2555,7 @@
@end table
@end deftypefun
address@hidden pdf_text_t pdf_text_dup (pdf_text_t @var{text})
address@hidden pdf_text_t pdf_text_dup (const pdf_text_t @var{text})
Dup a new text object from a existing one.
@@ -2621,7 +2621,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_text_new_from_pdf_string (pdf_text_t
address@hidden, const pdf_char_t address@hidden, pdf_size_t @var{size},
pdf_char_t address@hidden, pdf_size_t address@hidden)
address@hidden pdf_status_t pdf_text_new_from_pdf_string (pdf_text_t
address@hidden, const pdf_char_t address@hidden, const pdf_size_t @var{size},
pdf_char_t address@hidden, pdf_size_t address@hidden)
Create a new text object and initialize it with a given `PDF string'
text representation. This `PDF string' can be either encoded in UTF-16BE, with
@@ -2682,7 +2682,7 @@
@end table
@end deftypefun
address@hidden pdf_text_t pdf_text_new_from_unicode (pdf_text_t address@hidden,
const pdf_char_t address@hidden, const pdf_size_t @var{size}, const enum
pdf_text_unicode_encoding_e @var{enc})
address@hidden pdf_status_t pdf_text_new_from_unicode (pdf_text_t
address@hidden, const pdf_char_t address@hidden, const pdf_size_t @var{size},
const enum pdf_text_unicode_encoding_e @var{enc})
Create a new text object from a string of Unicode characters in a
given unicode encoding. The Unicode string can be given with or without BOM,
@@ -2766,7 +2766,7 @@
@node Managing Text Properties
@subsection Managing Text Properties
address@hidden {const pdf_char_t *} pdf_text_get_country (pdf_text_t @var{text})
address@hidden {const pdf_char_t *} pdf_text_get_country (const pdf_text_t
@var{text})
Return the `ISO-3166-1 alpha-2' country code associated with a text variable,
as a
NUL-terminated string. The returned string should not be modified, as it is
@@ -2792,7 +2792,7 @@
@end table
@end deftypefun
address@hidden {const pdf_char_t *} pdf_text_get_language (pdf_text_t
@var{text})
address@hidden {const pdf_char_t *} pdf_text_get_language (const pdf_text_t
@var{text})
Return the `ISO-639-1' language code associated with a text variable, as a
NUL-terminated string. The returned string should not be modified, as it is
@@ -2871,7 +2871,7 @@
@end table
@end deftypefun
address@hidden {inline pdf_bool_t} pdf_text_empty_p (pdf_text_t @var{text})
address@hidden {inline pdf_bool_t} pdf_text_empty_p (const pdf_text_t
@var{text})
Determine if a given text variable is empty (contains no text).
@@ -3285,7 +3285,7 @@
@node Comparing Text Variables
@subsection Comparing Text Variables
address@hidden pdf_i32_t pdf_text_cmp (pdf_text_t @var{text1}, pdf_text_t
@var{text2}, pdf_bool_t @var{case_sensitive}, pdf_status_t address@hidden)
address@hidden pdf_i32_t pdf_text_cmp (const pdf_text_t @var{text1}, const
pdf_text_t @var{text2}, const pdf_bool_t @var{case_sensitive}, pdf_status_t
address@hidden)
Compare the contents of two text variables.
@@ -3546,7 +3546,7 @@
@end table
@end deftypefun
address@hidden pdf_time_t pdf_time_dup (pdf_time_t @var{orig})
address@hidden pdf_time_t pdf_time_dup (const pdf_time_t @var{orig})
Dup a new time variable from a given one, allocating memory.
@table @strong
@@ -3605,7 +3605,7 @@
@node Managing Time Values
@subsection Managing Time Values
address@hidden pdf_status_t pdf_time_copy (pdf_time_t orig, pdf_time_t
@var{copy})
address@hidden pdf_status_t pdf_time_copy (const pdf_time_t orig, pdf_time_t
@var{copy})
Copies the data from @var{orig} to @var{copy}.
@table @strong
@@ -3671,7 +3671,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_add_cal_span (pdf_time_t @var{time},
struct pdf_time_cal_span_s @var{cal_span})
address@hidden pdf_status_t pdf_time_add_cal_span (pdf_time_t @var{time}, const
struct pdf_time_cal_span_s @var{cal_span})
Add the time span represented by @var{cal_span} to @var{time}.
@table @strong
@@ -3719,7 +3719,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_sub_cal_span (pdf_time_t @var{time},
struct pdf_time_cal_span_s @var{cal_span})
address@hidden pdf_status_t pdf_time_sub_cal_span (pdf_time_t @var{time}, const
struct pdf_time_cal_span_s @var{cal_span})
Subtract the time span represented by @var{cal_span} to @var{time}.
@table @strong
@@ -3777,7 +3777,7 @@
@end deftypefun
address@hidden pdf_status_t pdf_time_add_span (pdf_time_t @var{time},
pdf_time_span_t @var{time_span})
address@hidden pdf_status_t pdf_time_add_span (pdf_time_t @var{time}, const
pdf_time_span_t @var{time_span})
Add the time span contained in @var{time_span} to @var{time}.
@table @strong
@@ -3811,7 +3811,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_sub_span (pdf_time_t @var{time},
pdf_time_span_t @var{time_span})
address@hidden pdf_status_t pdf_time_sub_span (pdf_time_t @var{time}, const
pdf_time_span_t @var{time_span})
Subtract the time span contained in @var{time_span} to @var{time}.
@table @strong
@@ -3845,7 +3845,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_get_local_cal (pdf_time_t @var{time},
struct pdf_time_cal_s @var{local_cal})
address@hidden pdf_status_t pdf_time_get_local_cal (const pdf_time_t
@var{time}, struct pdf_time_cal_s @var{local_cal})
Fill @var{local_cal} with the local calendar time of @var{time}.
@table @strong
@@ -3877,7 +3877,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_get_utc_cal (pdf_time_t @var{time}, struct
pdf_time_cal_s @var{cal_time})
address@hidden pdf_status_t pdf_time_get_utc_cal (const pdf_time_t @var{time},
struct pdf_time_cal_s @var{cal_time})
Get the UTC calendar time of a given time variable.
@table @strong
@@ -3909,7 +3909,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_from_cal (pdf_time_t @var{time}, struct
pdf_time_cal_s @var{cal_time})
address@hidden pdf_status_t pdf_time_from_cal (const pdf_time_t @var{time},
struct pdf_time_cal_s @var{cal_time})
Set the value of a time variable to a given calendar time.
@table @strong
@@ -3987,7 +3987,7 @@
@node Getting Time Intervals
@subsection Getting Time Intervals
address@hidden pdf_status_t pdf_time_diff_cal (pdf_time_t @var{time1},
pdf_time_t @var{time2}, struct pdf_time_cal_span_s @var{cal_span})
address@hidden pdf_status_t pdf_time_diff_cal (const pdf_time_t @var{time1},
const pdf_time_t @var{time2}, struct pdf_time_cal_span_s @var{cal_span})
Calculate the time span that goes from @var{time1} to @var{time2} and
store it in @var{cal_span}.
@@ -4025,7 +4025,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_diff (pdf_time_t @var{time1}, pdf_time_t
@var{time2}, pdf_time_span_t @var{time_span})
address@hidden pdf_status_t pdf_time_diff (const pdf_time_t @var{time1}, const
pdf_time_t @var{time2}, pdf_time_span_t @var{time_span})
Calculate the time span between two dates.
@table @strong
@@ -4065,7 +4065,7 @@
@node Time Comparison
@subsection Time Comparison
address@hidden pdf_i32_t pdf_time_cmp (pdf_time_t @var{time1}, pdf_time_t
@var{time2})
address@hidden pdf_i32_t pdf_time_cmp (const pdf_time_t @var{time1}, const
pdf_time_t @var{time2})
Compares two times.
@table @strong
@@ -4126,7 +4126,7 @@
@node Time Printing and Parsing
@subsection Time Printing and Parsing
address@hidden char* pdf_time_to_string (pdf_time_t @var{time}, enum
pdf_time_format_e @var{time_format})
address@hidden char* pdf_time_to_string (const pdf_time_t @var{time}, const
enum pdf_time_format_e @var{time_format})
Create a string representation of a given time.
@table @strong
@@ -4155,7 +4155,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_from_string (pdf_time_t mytime, char
address@hidden, enum pdf_time_format_e @var{time_format})
address@hidden pdf_status_t pdf_time_from_string (pdf_time_t mytime, const char
address@hidden, const enum pdf_time_format_e @var{time_format})
Get a string containing a time specification in some format and fill a
time variable with the parsed values.
@@ -4284,7 +4284,7 @@
@end table
@end deftypefun
address@hidden pdf_time_span_t pdf_time_span_dup (pdf_time_span_t @var{span})
address@hidden pdf_time_span_t pdf_time_span_dup (const pdf_time_span_t
@var{span})
Allocate and dup a new time span from an existing one. The new time
span has the same value as the base time span.
@@ -4344,7 +4344,7 @@
@node Managing Time Span Values
@subsection Managing Time Span Values
address@hidden pdf_status_t pdf_time_span_set (pdf_time_span_t @var{span},
pdf_i32_t @var{high_value}, pdf_u32_t @var{low_value})
address@hidden pdf_status_t pdf_time_span_set (pdf_time_span_t @var{span},
const pdf_i32_t @var{high_value}, const pdf_u32_t @var{low_value})
Set the value of a time span. The internal representation of the time
span is 64 bits long (signed).
@@ -4378,7 +4378,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_span_set_from_i32 (pdf_time_span_t
@var{span}, pdf_i32_t @var{seconds})
address@hidden pdf_status_t pdf_time_span_set_from_i32 (pdf_time_span_t
@var{span}, const pdf_i32_t @var{seconds})
Set the value of a time span from a 32 bits signed number.
@@ -4440,7 +4440,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_span_add (pdf_time_span_t @var{span1},
pdf_time_span_t @var{span2}, pdf_time_span_t @var{result})
address@hidden pdf_status_t pdf_time_span_add (const pdf_time_span_t
@var{span1}, const pdf_time_span_t @var{span2}, pdf_time_span_t @var{result})
Add two time spans and store the result in another time span.
@@ -4476,7 +4476,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_span_copy (pdf_time_span_t @var{orig},
pdf_time_span_t @var{dest})
address@hidden pdf_status_t pdf_time_span_copy (const pdf_time_span_t
@var{orig}, pdf_time_span_t @var{dest})
Copy the value of a time span into another time span.
@@ -4510,7 +4510,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_span_diff (pdf_time_span_t @var{span1},
pdf_time_span_t @var{span2}, pdf_time_span_t @var{result})
address@hidden pdf_status_t pdf_time_span_diff (const pdf_time_span_t
@var{span1}, const pdf_time_span_t @var{span2}, pdf_time_span_t @var{result})
Difference two time spans and store the result (maybe negative) into
another time span.
@@ -4548,7 +4548,7 @@
@end table
@end deftypefun
address@hidden pdf_i32_t pdf_time_span_to_secs (pdf_time_span_t @var{span})
address@hidden pdf_i32_t pdf_time_span_to_secs (const pdf_time_span_t
@var{span})
Get the value of a time span in seconds.
@@ -4578,7 +4578,7 @@
@node Time Span Comparison
@subsection Time Span Comparison
address@hidden pdf_i32_t pdf_time_span_cmp (pdf_time_span_t @var{span1},
pdf_time_span_t @var{span2})
address@hidden pdf_i32_t pdf_time_span_cmp (const pdf_time_span_t @var{span1},
const pdf_time_span_t @var{span2})
Compare the length two time spans.
@@ -4634,7 +4634,7 @@
@node Calendar Spans Management
@subsection Calendar Spans Management
address@hidden pdf_status_t pdf_time_add_cal_span_with_base (struct
pdf_time_cal_span_s @var{span1}, struct pdf_time_cal_span_s @var{span2},
pdf_time_t @var{base_time}, struct pdf_time_cal_span_s @var{result})
address@hidden pdf_status_t pdf_time_add_cal_span_with_base (const struct
pdf_time_cal_span_s @var{span1}, const struct pdf_time_cal_span_s @var{span2},
const pdf_time_t @var{base_time}, struct pdf_time_cal_span_s @var{result})
Add two calendar spans. Since the calendar spans are relative (some
years has more days than another) the calendar spans are first
@@ -4686,7 +4686,7 @@
@end deftypefun
address@hidden pdf_i32_t pdf_time_cal_span_cmp (struct pdf_time_cal_span_s
@var{span1}, struct pdf_time_cal_span_s @var{span2}, pdf_time_t @var{base_time})
address@hidden pdf_i32_t pdf_time_cal_span_cmp (const struct
pdf_time_cal_span_s @var{span1}, const struct pdf_time_cal_span_s @var{span2},
const pdf_time_t @var{base_time})
Compare two calendar spans previously resolved with a given base time.
@@ -4746,7 +4746,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_time_cal_span_diff (struct pdf_time_cal_span_s
@var{span1}, struct pdf_time_cal_span_s @var{span2}, pdf_time_t
@var{base_time}, struct pdf_time_cal_span_s @var{result})
address@hidden pdf_status_t pdf_time_cal_span_diff (const struct
pdf_time_cal_span_s @var{span1}, const struct pdf_time_cal_span_s @var{span2},
const pdf_time_t @var{base_time}, struct pdf_time_cal_span_s @var{result})
Compute the difference between two calendar spans relative to a given
base time and store it in a given calendar span.
@@ -4965,7 +4965,7 @@
@node Opening and Closing Files
@subsubsection Opening and Closing Files
address@hidden pdf_status_t pdf_fsys_open (pdf_fsys_t @var{filesystem},
pdf_text_t @var{path_name}, enum pdf_fsys_file_mode_e @var{mode},
pdf_fsys_file_t @var{file})
address@hidden pdf_status_t pdf_fsys_open (const pdf_fsys_t @var{filesystem},
const pdf_text_t @var{path_name}, const enum pdf_fsys_file_mode_e @var{mode},
pdf_fsys_file_t @var{file})
Open a file in @var{filesystem} identified by @var{path_name} using
the specified @var{mode} and store a new open file variable in
@@ -5005,7 +5005,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_fsys_close (pdf_fsys_t @var{filesystem},
pdf_fsys_file_t @var{file})
address@hidden pdf_status_t pdf_fsys_close (const pdf_fsys_t @var{filesystem},
pdf_fsys_file_t @var{file})
Close @var{file} releasing any used resource.
@@ -5035,7 +5035,7 @@
@node Folder Management
@subsubsection Folder Management
address@hidden pdf_status_t pdf_fsys_create_folder (pdf_fsys_t
@var{filesystem}, pdf_text_t @var{path_name})
address@hidden pdf_status_t pdf_fsys_create_folder (const pdf_fsys_t
@var{filesystem}, const pdf_text_t @var{path_name})
Create a folder named @var{path_name}.
@@ -5064,7 +5064,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_fsys_get_folder_contents (pdf_fsys_t
@var{filesystem}, pdf_text_t @var{path_name}, pdf_list_t @var{item_list})
address@hidden pdf_status_t pdf_fsys_get_folder_contents (const pdf_fsys_t
@var{filesystem}, const pdf_text_t @var{path_name}, pdf_list_t @var{item_list})
Get a list with the path names of the items contained in a given folder.
@@ -5096,7 +5096,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_fsys_get_parent (pdf_fsys_t @var{filesystem},
pdf_text_t @var{path_name}, pdf_text_t @var{parent_path})
address@hidden pdf_status_t pdf_fsys_get_parent (const pdf_fsys_t
@var{filesystem}, const pdf_text_t @var{path_name}, pdf_text_t
@var{parent_path})
Get the path name of the father of a given item in the filesystem.
@@ -5131,7 +5131,7 @@
@end table
@end deftypefun
address@hidden pdf_status_t pdf_fsys_remove_folder (pdf_fsys_t
@var{filesystem}, pdf_text_t @var{path_name})
address@hidden pdf_status_t pdf_fsys_remove_folder (const pdf_fsys_t
@var{filesystem}, const pdf_text_t @var{path_name})
Remove an empty folder from the filesystem.
@@ -5164,7 +5164,7 @@
@subsubsection Filesystem Utility Functions
address@hidden pdf_status_t pdf_fsys_item_props_to_hash (struct
pdf_fsys_item_props_s @var{item_props}, pdf_hash_t @var{props_hash}
address@hidden pdf_status_t pdf_fsys_item_props_to_hash (const struct
pdf_fsys_item_props_s @var{item_props}, pdf_hash_t @var{props_hash}
Get a PDF hash variable containing the properties of a filesystem
item.
@@ -5275,7 +5275,7 @@
The following functions provides synchronous input/output for open
files.
address@hidden pdf_size_t pdf_fsys_file_read (pdf_fsys_file_t @var{file},
pdf_size_t @var{elem_size}, pdf_size_t @var{elem_count}, void address@hidden)
address@hidden pdf_size_t pdf_fsys_file_read (pdf_fsys_file_t @var{file}, const
pdf_size_t @var{elem_size}, const pdf_size_t @var{elem_count}, void
address@hidden)
Synchronously read data from an open file item.
@@ -5301,7 +5301,7 @@
@end table
@end deftypefun
address@hidden pdf_size_t pdf_fsys_file_write (pdf_fsys_file_t @var{file},
pdf_size_t @var{elem_size}, pdf_size_t @var{elem_count}, void address@hidden)
address@hidden pdf_size_t pdf_fsys_file_write (pdf_fsys_file_t @var{file},
const pdf_size_t @var{elem_size}, const pdf_size_t @var{elem_count}, void
address@hidden)
Synchronously write data to an open file item.
@@ -5756,7 +5756,7 @@
@node Real Object Creation
@subsection Real Object Creation
address@hidden pdfo_obj_t pdfo_create_real (pdfo_doc_t @var{doc}, pdf_bool_t
@var{indirect}, pdf_real_t @var{value})
address@hidden pdfo_obj_t pdfo_create_real (const pdfo_doc_t @var{doc}, const
pdf_bool_t @var{indirect}, const pdf_real_t @var{value})
Creates a new real object.
@@ -5790,7 +5790,7 @@
@node Managing Real Object Attributes
@subsection Managing Real Object Attributes
address@hidden pdf_real_t pdfo_get_real (pdfo_obj_t @var{object})
address@hidden pdf_real_t pdfo_get_real (const pdfo_obj_t @var{object})
Gets the real value of a real object.
@@ -5814,7 +5814,7 @@
@end table
@end deftypefun
address@hidden void pdfo_set_real (pdfo_obj_t @var{object}, pdf_real_t
@var{value})
address@hidden void pdfo_set_real (pdfo_obj_t @var{object}, const pdf_real_t
@var{value})
Set a new real value in a real object.
-gerel