Pajdeg
0.2.2
Pajdeg
|
Internal definitions for Pajdeg. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "PDDefines.h"
#include "PDOperator.h"
#include <assert.h>
Go to the source code of this file.
Data Structures | |
struct | PDObject |
struct | PDObjectStreamElement |
struct | PDObjectStream |
struct | PDContentStream |
struct | PDPage |
struct | PDEnv |
struct | pd_btree |
struct | PDOperator |
struct | PDParser |
struct | PDPageReference |
struct | PDCatalog |
struct | PDScannerSymbol |
struct | PDScanner |
struct | pd_stack |
struct | PDArray |
struct | PDDictionaryNode |
struct | PDDictionary |
struct | PDDictionaryStack |
struct | PDFontDictionary |
struct | PDFont |
struct | PDCMap |
struct | PDCryptoInstance |
struct | pd_crypto |
struct | PDState |
struct | PDStaticHash |
struct | PDTask |
struct | PDTwinStream |
struct | PDPipe |
struct | PDReference |
struct | PDNumber |
struct | PDString |
struct | PDStringConv |
Macros | |
#define | true 1 |
#define | false 0 |
Typedefs | |
Conversion (PDF specification) | |
typedef struct PDStringConv * | PDStringConvRef |
Functions | |
Construction | |
PDObjectRef | PDObjectCreate (PDInteger obid, PDInteger genid) |
Environment | |
void | PDEnvDestroy (PDEnvRef env) |
Twin streams | |
void | PDPipeCloseFileStream (FILE *stream) |
FILE * | PDPipeOpenInputStream (const char *path) |
FILE * | PDPipeOpenOutputStream (const char *path) |
String | |
void | PDStringAttachCryptoInstance (PDStringRef string, PDCryptoInstanceRef ci, PDBool encrypted) |
void | PDArrayAttachCryptoInstance (PDArrayRef array, PDCryptoInstanceRef ci, PDBool encrypted) |
void | PDDictionaryAttachCryptoInstance (PDDictionaryRef dictionary, PDCryptoInstanceRef ci, PDBool encrypted) |
Private structs | |
#define | PDTYPE_PTR_LEN 4 |
#define | PDAlloc(s, d, z) PDAllocTyped(PDInstanceTypeUnset,s,d,z) |
#define | PDTYPE_ASSERT(ob) PDAssert(((PDTypeRef)ob - 1)->pdc == PDC) |
typedef struct PDCryptoInstance * | PDCryptoInstanceRef |
typedef void(* | PDInstanceCryptoExchange) (void *inst, PDCryptoInstanceRef ci, PDBool encrypted) |
typedef struct PDObjectStreamElement * | PDObjectStreamElementRef |
char * | PDC |
PDInstanceCryptoExchange | PDInstanceCryptoExchanges [] |
void * | PDAllocTyped (PDInstanceType it, PDSize size, void *dealloc, PDBool zeroed) |
void | PDFlush (void) |
void | PDFlushUntil (void *ob) |
PDCryptoInstanceRef | PDCryptoInstanceCreate (pd_crypto crypto, PDInteger obid, PDInteger gennum) |
PDObjectStreamRef | PDObjectStreamCreateWithObject (PDObjectRef object) |
PDBool | PDObjectStreamParseRawObjectStream (PDObjectStreamRef obstm, char *rawBuf) |
void | PDObjectStreamParseExtractedObjectStream (PDObjectStreamRef obstm, char *buf) |
void | PDObjectStreamCommit (PDObjectStreamRef obstm) |
Parser | |
enum | PDParserState { PDParserStateBase, PDParserStateObjectDefinition, PDParserStateObjectAppendix, PDParserStateObjectPostStream } |
typedef struct PDXTable * | PDXTableRef |
typedef struct PDPageReference | PDPageReference |
Scanner | |
enum | PDScannerSymbolType { PDScannerSymbolTypeDefault = PDOperatorSymbolGlobRegular, PDScannerSymbolTypeWhitespace = PDOperatorSymbolGlobWhitespace, PDScannerSymbolTypeDelimiter = PDOperatorSymbolGlobDelimiter, PDScannerSymbolTypeNumeric = PDOperatorSymbolExtNumeric, PDScannerSymbolTypeEOB = PDOperatorSymbolExtEOB, PDScannerSymbolTypeFake = PDOperatorSymbolExtFake } |
typedef struct PDScannerSymbol * | PDScannerSymbolRef |
Stack | |
#define | PD_STACK_STRING 0 |
Stack string type. | |
#define | PD_STACK_ID 1 |
Stack identifier type. | |
#define | PD_STACK_STACK 2 |
Stack stack type. | |
#define | PD_STACK_PDOB 3 |
Stack object (PDTypeRef managed) type. | |
#define | PD_STACK_FREEABLE 4 |
Stack freeable type. | |
typedef struct PDDictionaryNode * | PDDictionaryNodeRef |
typedef struct PDCMapRange | PDCMapRange |
Private structure for ranges (<hex> <hex>), where multi-byte ranges are rectangles, not sequences (see PDF specification) | |
typedef struct PDCMapRangeMapping | PDCMapRangeMapping |
Private structure for range mappings (<hex> <hex> <hex>) | |
typedef struct PDCMapCharMapping | PDCMapCharMapping |
Private structure for individual char mappings (<hex> <hex>) | |
Macros / convenience | |
#define | PDDEF const void*[] |
#define | PDDef(defs...) (PDDEF){(void*)defs, NULL} |
#define | PD_WARNINGS |
#define | PDError(args...) |
#define | PD_WARNINGS |
#define | PDWarn(args...) |
#define | PDNotice(args...) |
#define | PDAssert(args...) |
#define | PDRequire(state, retval, msg...) |
#define | as(type, expr...) ((type)(expr)) |
#define | PDInstancePrinterRequire(b, r) |
#define | PDInstancePrinterInit(itype, b, r) |
#define | fmatox(x, ato) |
void | _PDBreak () |
void | PDTwinStreamAsserts (PDTwinStreamRef ts) |
fmatox (long long, atoll) fmatox(long | |
Internal definitions for Pajdeg.
#define false 0 |
The false value.
#define PDAlloc | ( | s, | |
d, | |||
z | |||
) | PDAllocTyped(PDInstanceTypeUnset,s,d,z) |
// IGNORE Allocate a new PDType object, with given size and deallocator.
s | Size of object. |
d | Dealloc method as a (*)(void*). |
z | Whether the allocated block should be zeroed or not. If true, calloc is used to allocate the memory. |
A macro for asserting that an object is a proper PDType.
#define PDTYPE_PTR_LEN 4 |
The length of PDType, in pointers.
#define true 1 |
The truth value.
typedef struct PDCryptoInstance* PDCryptoInstanceRef |
Crypto instance for arrays/dicts.
typedef void(* PDInstanceCryptoExchange) (void *inst, PDCryptoInstanceRef ci, PDBool encrypted) |
Crypto object exchange function signature.
Used to hand crypto information to arbitrary objects.
void* PDAllocTyped | ( | PDInstanceType | it, |
PDSize | size, | ||
void * | dealloc, | ||
PDBool | zeroed | ||
) |
Allocate a new PDType object with a defined instance type, with given size and deallocator.
it | Instance type. |
size | Size of object. |
dealloc | Dealloc method as a (*)(void*). |
zeroed | Whether the allocated block should be zeroed or not. If true, calloc is used to allocate the memory. |
void PDFlush | ( | void | ) |
Flush autorelease pool.
void PDFlushUntil | ( | void * | ob | ) |
Flush until the given object is encountered, or until the autorelease pool is exhausted. The object is released as well.
ob | Termination marker for flush |
PDObjectRef PDObjectCreate | ( | PDInteger | obid, |
PDInteger | genid | ||
) |
Create PDObjectRef with given ID and generation number.
obid | Object ID |
genid | Generation number |
char* PDC |
Identifier for PD type checking.
PDInstanceCryptoExchange PDInstanceCryptoExchanges[] |
Crypto object exchange function array, matching up with all non-negative PDInstanceType entries.