|
PLplot 5.15.0
|
#include "pldll.h"Go to the source code of this file.
Classes | |
| struct | PDFstrm |
| struct | PLiodev |
Macros | |
| #define | U_CHAR unsigned char |
| #define | U_SHORT unsigned short |
| #define | U_INT unsigned int |
| #define | U_LONG unsigned long |
| #define | PDF_ERROR 1 |
| #define | PDF_FNOPEN 2 |
| #define | PDF_FAOPEN 3 |
| #define | PDF_BADUN 4 |
| #define | PDF_BADNBITS 5 |
| #define | PDF_RDERR 6 |
| #define | PDF_WRERR 7 |
| #define | PDF_NOTPDF 8 |
| PLDLLIMPEXP PDFstrm * pdf_bopen | ( | U_CHAR * | buffer, |
| size_t | bufmax ) |
Initializes a PDFstrm for reading/writing to a memory buffer. If buffer is NULL, a standard buffer is allocated.
| buffer | User allocated memory, can be NULL. |
| bufmax | Size of buffer, or the desired buffer. |
Definition at line 152 of file pdfutils.c.
| PLDLLIMPEXP int pdf_close | ( | PDFstrm * | pdfs | ) |
Closes a PDFstrm. Used exactly like fclose().
| pdfs | The file stream to close. |
Definition at line 238 of file pdfutils.c.
| PLDLLIMPEXP PDFstrm * pdf_finit | ( | FILE * | file | ) |
Initializes a PDFstrm for a file oriented device. Like pdf_fopen() but an existing file handle is specified.
| file | A open file handle. |
Definition at line 204 of file pdfutils.c.
| PLDLLIMPEXP PDFstrm * pdf_fopen | ( | PLCHAR_VECTOR | filename, |
| PLCHAR_VECTOR | mode ) |
Initializes a PDFstrm for a file oriented device. Used exactly like fopen().
| filename | The filename of the file to open. |
| mode | File access mode, as would be used by fopen. |
Definition at line 74 of file pdfutils.c.
| PLDLLIMPEXP int pdf_getc | ( | PDFstrm * | pdfs | ) |
Reads a single character.
| pdfs | The stream to read the character from. |
Definition at line 325 of file pdfutils.c.
| int pdf_putc | ( | int | c, |
| PDFstrm * | pdfs ) |
Writes a single character.
| c | The character to write. |
| pdfs | The stream to write it to. |
Definition at line 276 of file pdfutils.c.
| PLDLLIMPEXP int pdf_rd_1byte | ( | PDFstrm * | pdfs, |
| U_CHAR * | ps ) |
Reads a single byte, storing into a U_CHAR.
| pdfs | The stream to read the byte from. |
| ps | Storage for the byte. |
Definition at line 660 of file pdfutils.c.
| PLDLLIMPEXP int pdf_rd_2bytes | ( | PDFstrm * | pdfs, |
| U_SHORT * | ps ) |
Reads a U_SHORT from two single bytes, low end first.
| pdfs | The stream to read the two bytes from. |
| ps | Pre-allocated storage for the two bytes. |
Definition at line 710 of file pdfutils.c.
| PLDLLIMPEXP int pdf_rd_2nbytes | ( | PDFstrm * | pdfs, |
| U_SHORT * | s, | ||
| PLINT | n ) |
Reads n U_SHORT's from 2n single bytes, low end first.
| pdfs | The stream to read the shorts from. |
| s | Pre-allocated storage for the shorts. |
| n | Size of s. |
Definition at line 771 of file pdfutils.c.
| PLDLLIMPEXP int pdf_rd_4bytes | ( | PDFstrm * | pdfs, |
| U_LONG * | ps ) |
Reads an unsigned long from 4 single bytes, low end first.
| pdfs | The stream to read the unsigned long from. |
| ps | Pre-allocated storage for the unsigned long. |
Definition at line 832 of file pdfutils.c.
| PLDLLIMPEXP int pdf_rd_header | ( | PDFstrm * | pdfs, |
| char * | header ) |
Reads a newline-terminated header string from PDFstrm *pdfs, and converts to a usual NULL-terminated string. 80 chars maximum assumed.
| pdfs | The stream to read the header from. |
| header | Pre-allocated storage for the header. |
Definition at line 542 of file pdfutils.c.
| PLDLLIMPEXP int pdf_rd_ieeef | ( | PDFstrm * | pdfs, |
| float * | pf ) |
Reads a float from a IEEE single precision (32 bit) format.
| pdfs | The stream to read the float from. |
| pf | Pre-allocated storage for the float. |
Definition at line 992 of file pdfutils.c.
| int pdf_rd_string | ( | PDFstrm * | pdfs, |
| char * | string, | ||
| int | nmax ) |
Reads a null-terminated string from PDFstrm *pdfs. A max of nmax chars are read.
| pdfs | The stream to read the string from. |
| string | Pre-allocated storage for the string. |
| nmax | The size of string. |
Definition at line 604 of file pdfutils.c.
Reads a record.
| x | Storage for the data to read. |
| nitems | The length of the x. |
| pdfs | The stream to read it from. |
Definition at line 464 of file pdfutils.c.
| void pdf_set | ( | char * | option, |
| int | value ) |
Set an option. Pretty sparse right now but you never know.
| option | The option string. |
| value | The value to set it to. |
Definition at line 56 of file pdfutils.c.
| PLDLLIMPEXP int pdf_ungetc | ( | int | c, |
| PDFstrm * | pdfs ) |
Push back the last command read.
| c | The character to pushback. |
| pdfs | The stream to push it back into. |
Definition at line 365 of file pdfutils.c.
| PLDLLIMPEXP int pdf_wr_1byte | ( | PDFstrm * | pdfs, |
| U_CHAR | s ) |
Writes a U_CHAR as a single byte.
| pdfs | The stream to write the byte too. |
| s | The byte to write. |
Definition at line 636 of file pdfutils.c.
| PLDLLIMPEXP int pdf_wr_2bytes | ( | PDFstrm * | pdfs, |
| U_SHORT | s ) |
Writes a U_SHORT as two single bytes, low end first.
| pdfs | The stream to write the two bytes to. |
| s | The two bytes to write. |
Definition at line 684 of file pdfutils.c.
| PLDLLIMPEXP int pdf_wr_2nbytes | ( | PDFstrm * | pdfs, |
| U_SHORT * | s, | ||
| PLINT | n ) |
Writes n U_SHORT's as 2n single bytes, low end first.
| pdfs | The stream to write the shorts to. |
| s | An array of shorts. |
| n | Size of s. |
Definition at line 741 of file pdfutils.c.
| PLDLLIMPEXP int pdf_wr_4bytes | ( | PDFstrm * | pdfs, |
| U_LONG | s ) |
Writes an unsigned long as four single bytes, low end first.
| pdfs | The stream to write the unsigned long to. |
| s | The unsigned long to write. |
Definition at line 804 of file pdfutils.c.
| PLDLLIMPEXP int pdf_wr_header | ( | PDFstrm * | pdfs, |
| PLCHAR_VECTOR | header ) |
Writes a header string. Input string must be NULL-terminated. The written string is terminated by a new-line, not a NULL. This is done so you can type e.g. "% strings <file> | head" and get sensible output.
| pdfs | The stream to which to write the header. |
| header | The header. |
Definition at line 509 of file pdfutils.c.
| PLDLLIMPEXP int pdf_wr_ieeef | ( | PDFstrm * | pdfs, |
| float | f ) |
Writes a float in IEEE single precision (32 bit) format.
| pdfs | The stream to write the float to. |
| f | The float. |
Definition at line 916 of file pdfutils.c.
| int pdf_wr_string | ( | PDFstrm * | pdfs, |
| PLCHAR_VECTOR | string ) |
Writes a null-terminated string.
| pdfs | The stream to write the string to. |
| string | The string to write. |
Definition at line 574 of file pdfutils.c.
| PDFstrm * plLibOpenPdfstrm | ( | PLCHAR_VECTOR | fn | ) |