Loading include/acroform.h 0 → 100644 +11 −0 Original line number Diff line number Diff line #ifndef PDF_SIGIL_ACROFORM_H #define PDF_SIGIL_ACROFORM_H #include "types.h" sigil_err_t process_acroform(sigil_t *sgl); int sigil_auxiliary_self_test(int verbosity); #endif //PDF_SIGIL_ACROFORM_H include/auxiliary.h +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ sigil_err_t pdf_peek_char(sigil_t *sgl, char *result); sigil_err_t pdf_move_pos_rel(sigil_t *sgl, ssize_t shift_bytes); sigil_err_t pdf_move_pos_abs(sigil_t *sgl, size_t position); sigil_err_t pdf_goto_obj(sigil_t *sgl, reference_t *ref); sigil_err_t get_curr_position(sigil_t *sgl, size_t *result); sigil_err_t skip_leading_whitespaces(sigil_t *sgl); sigil_err_t skip_array(sigil_t *sgl); Loading @@ -30,6 +33,9 @@ sigil_err_t parse_number(sigil_t *sgl, size_t *number); sigil_err_t parse_word(sigil_t *sgl, const char *word); sigil_err_t parse_indirect_reference(sigil_t *sgl, reference_t *ref); sigil_err_t parse_dict_key(sigil_t *sgl, dict_key_t *dict_key); sigil_err_t parse_ref_array(sigil_t *sgl, ref_array_t *ref_array); sigil_err_t reference_to_offset(sigil_t *sgl, const reference_t *ref, size_t *result); const char *sigil_err_string(sigil_err_t err); Loading include/catalog_dict.h 0 → 100644 +11 −0 Original line number Diff line number Diff line #ifndef PDF_SIGIL_CATALOG_DICT_H #define PDF_SIGIL_CATALOG_DICT_H #include "types.h" sigil_err_t process_catalog_dictionary(sigil_t *sgl); int sigil_header_self_test(int verbosity); #endif /* PDF_SIGIL_CATALOG_DICT_H */ include/config.h +3 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,9 @@ // capacity to choose for the first xref allocation #define XREF_PREALLOCATION 10 // capacity to choose for the first allocation in array of fields #define REF_ARRAY_PREALLOCATION 10 // threshold in bytes for loading whole file into buffer #define THRESHOLD_FILE_BUFFERING 10485760 Loading include/constants.h +28 −15 Original line number Diff line number Diff line Loading @@ -21,6 +21,18 @@ #define DICT_KEY_Size 1 #define DICT_KEY_Prev 2 #define DICT_KEY_Root 3 #define DICT_KEY_AcroForm 4 #define DICT_KEY_Fields 5 #define DICT_KEY_SigFlags 6 #define DICT_KEY_FT 7 #define DICT_KEY_V 8 #define DICT_KEY_SubFilter 9 #define DICT_KEY_Cert 10 #define DICT_KEY_Contents 11 #define DICT_KEY_ByteRange 12 #define SUBFILTER_UNKNOWN 0 #define SUBFILTER_adbe_x509_rsa_sha1 1 #define DEALLOCATE_FILE 0x01 #define DEALLOCATE_BUFFER 0x02 Loading @@ -33,5 +45,6 @@ #define ERR_NOT_IMPLEMENTED 5 #define ERR_NO_DATA 6 #define ERR_END_OF_DICT 7 #define ERR_NO_SIGNATURE 8 #endif /* PDF_SIGIL_CONSTANTS_H */ Loading
include/acroform.h 0 → 100644 +11 −0 Original line number Diff line number Diff line #ifndef PDF_SIGIL_ACROFORM_H #define PDF_SIGIL_ACROFORM_H #include "types.h" sigil_err_t process_acroform(sigil_t *sgl); int sigil_auxiliary_self_test(int verbosity); #endif //PDF_SIGIL_ACROFORM_H
include/auxiliary.h +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ sigil_err_t pdf_peek_char(sigil_t *sgl, char *result); sigil_err_t pdf_move_pos_rel(sigil_t *sgl, ssize_t shift_bytes); sigil_err_t pdf_move_pos_abs(sigil_t *sgl, size_t position); sigil_err_t pdf_goto_obj(sigil_t *sgl, reference_t *ref); sigil_err_t get_curr_position(sigil_t *sgl, size_t *result); sigil_err_t skip_leading_whitespaces(sigil_t *sgl); sigil_err_t skip_array(sigil_t *sgl); Loading @@ -30,6 +33,9 @@ sigil_err_t parse_number(sigil_t *sgl, size_t *number); sigil_err_t parse_word(sigil_t *sgl, const char *word); sigil_err_t parse_indirect_reference(sigil_t *sgl, reference_t *ref); sigil_err_t parse_dict_key(sigil_t *sgl, dict_key_t *dict_key); sigil_err_t parse_ref_array(sigil_t *sgl, ref_array_t *ref_array); sigil_err_t reference_to_offset(sigil_t *sgl, const reference_t *ref, size_t *result); const char *sigil_err_string(sigil_err_t err); Loading
include/catalog_dict.h 0 → 100644 +11 −0 Original line number Diff line number Diff line #ifndef PDF_SIGIL_CATALOG_DICT_H #define PDF_SIGIL_CATALOG_DICT_H #include "types.h" sigil_err_t process_catalog_dictionary(sigil_t *sgl); int sigil_header_self_test(int verbosity); #endif /* PDF_SIGIL_CATALOG_DICT_H */
include/config.h +3 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,9 @@ // capacity to choose for the first xref allocation #define XREF_PREALLOCATION 10 // capacity to choose for the first allocation in array of fields #define REF_ARRAY_PREALLOCATION 10 // threshold in bytes for loading whole file into buffer #define THRESHOLD_FILE_BUFFERING 10485760 Loading
include/constants.h +28 −15 Original line number Diff line number Diff line Loading @@ -21,6 +21,18 @@ #define DICT_KEY_Size 1 #define DICT_KEY_Prev 2 #define DICT_KEY_Root 3 #define DICT_KEY_AcroForm 4 #define DICT_KEY_Fields 5 #define DICT_KEY_SigFlags 6 #define DICT_KEY_FT 7 #define DICT_KEY_V 8 #define DICT_KEY_SubFilter 9 #define DICT_KEY_Cert 10 #define DICT_KEY_Contents 11 #define DICT_KEY_ByteRange 12 #define SUBFILTER_UNKNOWN 0 #define SUBFILTER_adbe_x509_rsa_sha1 1 #define DEALLOCATE_FILE 0x01 #define DEALLOCATE_BUFFER 0x02 Loading @@ -33,5 +45,6 @@ #define ERR_NOT_IMPLEMENTED 5 #define ERR_NO_DATA 6 #define ERR_END_OF_DICT 7 #define ERR_NO_SIGNATURE 8 #endif /* PDF_SIGIL_CONSTANTS_H */