|
LibreDWG API 0.13.4
LibreDWG API - The DWG Library
|
#include "config.h"#include <wchar.h>#include <stdio.h>#include <string.h>#include <stddef.h>#include <stdbool.h>#include "common.h"#include "dwg.h"Go to the source code of this file.
Data Structures | |
| struct | _bit_chain |
Macros | |
| #define | MAX_MEM_ALLOC 0x10000000000 |
| #define | EMPTY_CHAIN(size) |
| #define | IS_FROM_TU(dat) |
| #define | IS_FROM_TU_DWG(dwg) |
| #define | TU_to_int(b) |
| #define | bit_read_RLLd(dat) |
| #define | bit_write_RLLd(dat, value) |
| #define | bit_read_BLd(dat) |
| #define | bit_chain_set_version(to, from) |
Typedefs | |
| typedef struct _bit_chain | Bit_Chain |
Functions | |
| void | bit_advance_position (Bit_Chain *dat, long advance) |
| size_t | bit_position (Bit_Chain *dat) |
| void | bit_set_position (Bit_Chain *dat, size_t bitpos) |
| void | bit_reset_chain (Bit_Chain *dat) |
| BITCODE_B | bit_read_B (Bit_Chain *dat) |
| void | bit_write_B (Bit_Chain *dat, unsigned char value) |
| BITCODE_BB | bit_read_BB (Bit_Chain *dat) |
| void | bit_write_BB (Bit_Chain *dat, unsigned char value) |
| BITCODE_4BITS | bit_read_4BITS (Bit_Chain *dat) |
| void | bit_write_4BITS (Bit_Chain *dat, unsigned char value) |
| BITCODE_RC | bit_read_RC (Bit_Chain *dat) |
| void | bit_write_RC (Bit_Chain *dat, unsigned char value) |
| BITCODE_RS | bit_read_RS (Bit_Chain *dat) |
| void | bit_write_RS (Bit_Chain *dat, BITCODE_RS value) |
| BITCODE_BS | bit_read_RS_BE (Bit_Chain *dat) |
| void | bit_write_RS_BE (Bit_Chain *dat, BITCODE_BS value) |
| BITCODE_RL | bit_read_RL (Bit_Chain *dat) |
| BITCODE_RL | bit_read_RL_BE (Bit_Chain *dat) |
| void | bit_write_RL (Bit_Chain *dat, BITCODE_RL value) |
| void | bit_write_RL_BE (Bit_Chain *dat, BITCODE_RL value) |
| BITCODE_RLL | bit_read_RLL (Bit_Chain *dat) |
| BITCODE_RLL | bit_read_RLL_BE (Bit_Chain *dat) |
| void | bit_write_RLL (Bit_Chain *dat, BITCODE_RLL value) |
| void | bit_write_RLL_BE (Bit_Chain *dat, BITCODE_RLL value) |
| BITCODE_RD | bit_read_RD (Bit_Chain *dat) |
| void | bit_write_RD (Bit_Chain *dat, BITCODE_RD value) |
| BITCODE_BS | bit_read_BS (Bit_Chain *dat) |
| void | bit_write_BS (Bit_Chain *dat, BITCODE_BS value) |
| BITCODE_BL | bit_read_BL (Bit_Chain *dat) |
| void | bit_write_BL (Bit_Chain *dat, BITCODE_BL value) |
| void | bit_write_BLd (Bit_Chain *dat, BITCODE_BLd value) |
| BITCODE_BS | bit_read_BOT (Bit_Chain *dat) |
| void | bit_write_BOT (Bit_Chain *dat, BITCODE_BS value) |
| BITCODE_BLL | bit_read_BLL (Bit_Chain *dat) |
| void | bit_write_BLL (Bit_Chain *dat, BITCODE_BLL value) |
| BITCODE_BD | bit_read_BD (Bit_Chain *dat) |
| void | bit_write_BD (Bit_Chain *dat, BITCODE_BD value) |
| BITCODE_MC | bit_read_MC (Bit_Chain *dat) |
| void | bit_write_MC (Bit_Chain *dat, BITCODE_MC value) |
| BITCODE_UMC | bit_read_UMC (Bit_Chain *dat) |
| void | bit_write_UMC (Bit_Chain *dat, BITCODE_UMC value) |
| BITCODE_MS | bit_read_MS (Bit_Chain *dat) |
| void | bit_write_MS (Bit_Chain *dat, BITCODE_MS value) |
| void | bit_read_BE (Bit_Chain *__restrict__ dat, double *__restrict__ x, double *__restrict__ y, double *__restrict__ z) |
| void | bit_write_BE (Bit_Chain *dat, double x, double y, double z) |
| void | normalize_BE (BITCODE_3BD ext) |
| BITCODE_DD | bit_read_DD (Bit_Chain *dat, double default_value) |
| BITCODE_BB | bit_write_DD (Bit_Chain *dat, double value, double default_value) |
| int | bit_eq_DD (double value, double default_value) |
| BITCODE_BT | bit_read_BT (Bit_Chain *dat) |
| void | bit_write_BT (Bit_Chain *dat, double value) |
| int | bit_read_H (Bit_Chain *__restrict__ dat, Dwg_Handle *__restrict__ handle) |
| void | bit_write_H (Bit_Chain *__restrict__ dat, Dwg_Handle *__restrict__ handle) |
| void | bit_H_to_dat (Bit_Chain *__restrict__ dat, Dwg_Handle *__restrict__ handle) |
| uint16_t | bit_read_CRC (Bit_Chain *dat) |
| int | bit_check_CRC (Bit_Chain *dat, size_t start_address, const uint16_t seed) |
| uint16_t | bit_write_CRC (Bit_Chain *dat, size_t start_address, const uint16_t seed) |
| uint16_t | bit_write_CRC_BE (Bit_Chain *dat, size_t start_address, const uint16_t seed) |
| uint16_t | bit_calc_CRC (const uint16_t seed, unsigned char *adr, size_t len) |
| uint32_t | bit_calc_CRC32 (const uint32_t seed, unsigned char *adr, size_t len) |
| int | bit_read_fixed (Bit_Chain *__restrict__ dat, BITCODE_RC *__restrict__ dest, size_t length) |
| BITCODE_TF | bit_read_TF (Bit_Chain *dat, size_t length) __attribute__((malloc)) |
| BITCODE_TF | bit_read_bits (Bit_Chain *dat, size_t bits) __attribute__((malloc)) |
| void | bit_write_bits (Bit_Chain *__restrict__ dat, BITCODE_TF __restrict__ bits, size_t numbits) |
| void | bit_write_TF (Bit_Chain *__restrict__ dat, BITCODE_TF __restrict__ chain, size_t length) |
| void | bit_write_TFv (Bit_Chain *__restrict__ dat, BITCODE_TF __restrict__ chain, size_t length) |
| BITCODE_TV | bit_read_TV (Bit_Chain *__restrict__ dat) |
| void | bit_write_TV (Bit_Chain *__restrict__ dat, BITCODE_TV __restrict__ value) |
| BITCODE_TU | bit_read_TU (Bit_Chain *__restrict__ dat) __attribute__((malloc)) |
| BITCODE_TU | bit_read_TU_len (Bit_Chain *__restrict__ dat, unsigned int *lenp) __attribute__((malloc)) |
| BITCODE_TU | bit_read_TU_size (Bit_Chain *__restrict__ dat, unsigned int len) __attribute__((malloc)) |
| BITCODE_TV | bit_read_T16 (Bit_Chain *__restrict__ dat) __attribute__((malloc)) |
| BITCODE_TU | bit_read_TU16 (Bit_Chain *__restrict__ dat) __attribute__((malloc)) |
| BITCODE_TV | bit_read_T32 (Bit_Chain *__restrict__ dat) __attribute__((malloc)) |
| BITCODE_TV | bit_read_TU32 (Bit_Chain *__restrict__ dat) __attribute__((malloc)) |
| void | bit_write_TU (Bit_Chain *__restrict__ dat, BITCODE_TU __restrict__ value) |
| void | bit_write_TU16 (Bit_Chain *__restrict__ dat, BITCODE_TU __restrict__ value) |
| void | bit_write_T16 (Bit_Chain *__restrict__ dat, BITCODE_TV __restrict__ value) |
| void | bit_write_T32 (Bit_Chain *__restrict__ dat, BITCODE_TV __restrict__ value) |
| void | bit_write_TU32 (Bit_Chain *__restrict__ dat, BITCODE_TV __restrict__ value) |
| BITCODE_TV | bit_read_T (Bit_Chain *__restrict__ dat) __attribute__((malloc)) |
| void | bit_write_T (Bit_Chain *__restrict__ dat, BITCODE_TV __restrict__ chain) |
| char * | bit_embed_TU (BITCODE_TU __restrict__ wstr) __attribute__((malloc)) |
| char * | bit_embed_TU_size (BITCODE_TU __restrict__ wstr, const int len) __attribute__((malloc)) |
| size_t | bit_wcs2len (const BITCODE_TU __restrict__ wstr) |
| size_t | bit_wcs2nlen (const BITCODE_TU __restrict__ wstr, const size_t maxlen) |
| BITCODE_TU | bit_wcs2cpy (BITCODE_TU __restrict__ dest, const BITCODE_TU __restrict__ src) |
| BITCODE_TU | bit_wcs2dup (const BITCODE_TU __restrict__ src) |
| int | bit_wcs2cmp (BITCODE_TU __restrict__ s1, const BITCODE_TU __restrict__ s2) |
| char * | bit_convert_TU (const BITCODE_TU __restrict__ wstr) __attribute__((malloc)) |
| char * | bit_TU_to_utf8_len (const BITCODE_TU __restrict__ wstr, const int len) __attribute__((malloc)) |
| char * | bit_utf8_to_TV (char *__restrict__ dest, const unsigned char *__restrict__ src, const size_t destlen, const size_t srclen, const unsigned cquoted, const BITCODE_RS codepage) |
| char * | bit_TV_to_utf8 (const char *__restrict__ src, const BITCODE_RS codepage) __attribute__((malloc)) |
| BITCODE_TU | bit_utf8_to_TU (char *__restrict__ str, const unsigned cquoted) __attribute__((malloc)) |
| const char * | bit_u_expand (const char *src) |
| int | bit_eq_T (Bit_Chain *__restrict__ dat, const BITCODE_TV __restrict__ str1, const char *__restrict__ str2) |
| int | bit_eq_TU (const char *str, BITCODE_TU __restrict__ wstr) |
| int | bit_empty_T (Bit_Chain *__restrict__ dat, BITCODE_TV __restrict__ str) |
| BITCODE_TV | bit_set_T (Bit_Chain *__restrict__ dat, const char *__restrict__ src) |
| BITCODE_TIMEBLL | bit_read_TIMEBLL (Bit_Chain *dat) |
| void | bit_write_TIMEBLL (Bit_Chain *dat, BITCODE_TIMEBLL date) |
| BITCODE_TIMERLL | bit_read_TIMERLL (Bit_Chain *dat) |
| void | bit_write_TIMERLL (Bit_Chain *dat, BITCODE_TIMERLL date) |
| int | bit_read_CMC (Bit_Chain *dat, Bit_Chain *str_dat, Dwg_Color *__restrict__ color) |
| void | bit_write_CMC (Bit_Chain *dat, Bit_Chain *str_dat, Dwg_Color *__restrict__ color) |
| void | bit_downconvert_CMC (Bit_Chain *dat, Dwg_Color *__restrict__ color) |
| void | bit_upconvert_CMC (Bit_Chain *dat, Dwg_Color *__restrict__ color) |
| void | bit_read_ENC (Bit_Chain *dat, Bit_Chain *hdl_dat, Bit_Chain *str_dat, Dwg_Color *__restrict__ color) |
| void | bit_write_ENC (Bit_Chain *dat, Bit_Chain *hdl_dat, Bit_Chain *str_dat, Dwg_Color *__restrict__ color) |
| int | bit_search_sentinel (Bit_Chain *dat, const unsigned char sentinel[16]) |
| void | bit_chain_init (Bit_Chain *dat, const size_t size) |
| void | bit_chain_init_dat (Bit_Chain *__restrict__ dat, const size_t size, const Bit_Chain *__restrict__ from_dat) |
| void | bit_chain_alloc (Bit_Chain *dat) |
| void | bit_chain_alloc_size (Bit_Chain *dat, const size_t size) |
| void | bit_chain_free (Bit_Chain *dat) |
| void | bit_print (Bit_Chain *dat, size_t size) |
| void | bit_write_bits1 (Bit_Chain *__restrict__ dat, const char *__restrict__ bits) |
| long | bit_write_hexbits (Bit_Chain *__restrict__ dat, const char *__restrict__ bytes) |
| void | bit_print_bits (unsigned char *bits, size_t bitsize) |
| void | bit_fprint_bits (FILE *fp, unsigned char *bits, size_t bitsize) |
| void | bit_explore_chain (Bit_Chain *dat, size_t from, size_t size) |
| BITCODE_BD | bit_nan (void) |
| int | bit_isnan (BITCODE_BD number) |
| bool | does_cross_unicode_datversion (Bit_Chain *__restrict__ dat) |
| void | bit_copy_chain (Bit_Chain *__restrict__ orig_dat, Bit_Chain *__restrict__ tmp_dat) |
| size_t | in_hex2bin (unsigned char *__restrict__ dest, char *__restrict__ src, size_t destlen) |
| bool | bit_TF_contains_high (char *s, size_t len) |
| #define bit_chain_set_version | ( | to, | |
| from ) |
| #define bit_read_BLd | ( | dat | ) |
| #define bit_read_RLLd | ( | dat | ) |
| #define bit_write_RLLd | ( | dat, | |
| value ) |
| #define EMPTY_CHAIN | ( | size | ) |
| #define IS_FROM_TU | ( | dat | ) |
| #define IS_FROM_TU_DWG | ( | dwg | ) |
| #define MAX_MEM_ALLOC 0x10000000000 |
The position of bits within bytes is numerically ordered as depicted below:
(i.e. little endian)
| #define TU_to_int | ( | b | ) |
| typedef struct _bit_chain Bit_Chain |
Structure for DWG-files raw data streams.
| void bit_advance_position | ( | Bit_Chain * | dat, |
| long | advance ) |
| uint16_t bit_calc_CRC | ( | const uint16_t | seed, |
| unsigned char * | adr, | ||
| size_t | len ) |
| uint32_t bit_calc_CRC32 | ( | const uint32_t | seed, |
| unsigned char * | adr, | ||
| size_t | len ) |
| void bit_chain_alloc | ( | Bit_Chain * | dat | ) |
| void bit_chain_alloc_size | ( | Bit_Chain * | dat, |
| const size_t | size ) |
| void bit_chain_free | ( | Bit_Chain * | dat | ) |
| void bit_chain_init | ( | Bit_Chain * | dat, |
| const size_t | size ) |
| void bit_chain_init_dat | ( | Bit_Chain *__restrict__ | dat, |
| const size_t | size, | ||
| const Bit_Chain *__restrict__ | from_dat ) |
| int bit_check_CRC | ( | Bit_Chain * | dat, |
| size_t | start_address, | ||
| uint16_t | seed ) |
Read and check old 16bit CRC.
| char * bit_convert_TU | ( | const BITCODE_TU __restrict__ | wstr | ) |
| char * bit_embed_TU | ( | BITCODE_TU __restrict__ | wstr | ) |
| char * bit_embed_TU_size | ( | BITCODE_TU __restrict__ | wstr, |
| const int | len ) |
| int bit_empty_T | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_TV __restrict__ | str ) |
| int bit_eq_DD | ( | double | value, |
| double | default_value ) |
| int bit_eq_T | ( | Bit_Chain *__restrict__ | dat, |
| const BITCODE_TV __restrict__ | str1, | ||
| const char *__restrict__ | str2 ) |
| int bit_eq_TU | ( | const char * | str, |
| BITCODE_TU __restrict__ | wstr ) |
| void bit_explore_chain | ( | Bit_Chain * | dat, |
| size_t | from, | ||
| size_t | size ) |
| void bit_fprint_bits | ( | FILE * | fp, |
| unsigned char * | bits, | ||
| size_t | bitsize ) |
| void bit_H_to_dat | ( | Bit_Chain *__restrict__ | dat, |
| Dwg_Handle *__restrict__ | handle ) |
| int bit_isnan | ( | BITCODE_BD | number | ) |
| BITCODE_BD bit_nan | ( | void | ) |
| size_t bit_position | ( | Bit_Chain * | dat | ) |
| void bit_print | ( | Bit_Chain * | dat, |
| size_t | size ) |
| void bit_print_bits | ( | unsigned char * | bits, |
| size_t | bitsize ) |
| BITCODE_4BITS bit_read_4BITS | ( | Bit_Chain * | dat | ) |
Read 4 bits.
| BITCODE_BB bit_read_BB | ( | Bit_Chain * | dat | ) |
Read 2 bits.
| BITCODE_BD bit_read_BD | ( | Bit_Chain * | dat | ) |
Read 1 bitdouble (compacted data).
| void bit_read_BE | ( | Bit_Chain *__restrict__ | dat, |
| double *__restrict__ | x, | ||
| double *__restrict__ | y, | ||
| double *__restrict__ | z ) |
Read bit-extrusion.
| BITCODE_TF bit_read_bits | ( | Bit_Chain * | dat, |
| size_t | bits ) |
| BITCODE_BL bit_read_BL | ( | Bit_Chain * | dat | ) |
Read 1 bitlong (compacted data).
| BITCODE_BLL bit_read_BLL | ( | Bit_Chain * | dat | ) |
Read 1 bitlonglong (compacted uint64_t) for REQUIREDVERSIONS, preview_size. ODA doc bug. ODA say 1-3 bits until the first 0 bit. See 3BLL below. The first 3 bits indicate the length len (see paragraph 2.1). Then len bytes follow, which represent the number (the least significant byte is first).
| BITCODE_BS bit_read_BOT | ( | Bit_Chain * | dat | ) |
Read object type 2010+ (BB + 1 or 2 bytes). par 2.12
| BITCODE_BS bit_read_BS | ( | Bit_Chain * | dat | ) |
Read 1 bitshort (compacted data).
| BITCODE_BT bit_read_BT | ( | Bit_Chain * | dat | ) |
Read bit-thickness.
| uint16_t bit_read_CRC | ( | Bit_Chain * | dat | ) |
Only read old 16bit CRC-numbers, without checking, only in order to go to the next byte, while skipping non-aligned bits.
| BITCODE_DD bit_read_DD | ( | Bit_Chain * | dat, |
| double | default_value ) |
Read bit-double with default.
| void bit_read_ENC | ( | Bit_Chain * | dat, |
| Bit_Chain * | hdl_dat, | ||
| Bit_Chain * | str_dat, | ||
| Dwg_Color *__restrict__ | color ) |
Read entity color (2004+) (truecolor rgb and alpha support) Does also references, DBCOLOR lookups.
| int bit_read_fixed | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_RC *__restrict__ | dest, | ||
| size_t | length ) |
| int bit_read_H | ( | Bit_Chain *__restrict__ | dat, |
| Dwg_Handle *__restrict__ | handle ) |
Read handle-references. Returns error code: DWG_ERR_INVALIDHANDLE or 0 on success.
| BITCODE_MC bit_read_MC | ( | Bit_Chain * | dat | ) |
Read 1 modular char (max 5 bytes, signed). Read bytes until the high bit of the byte is 0, drop the highest bit and pad with 0. If the last byte has 0x40 set, it's negative. Since the result is int32_t (4 byte), but there needs to be the high/follow bit set, the stream can be max 5 byte long (5*7 = 35 bit) 10000000 10000000 10000000 10000000 00000100 => 0000000 0000000 0000000 0000000 0000100 (5*7 = 35) => 00001000 00000000 00000000 00000000 (4*8 = 32)
| BITCODE_MS bit_read_MS | ( | Bit_Chain * | dat | ) |
Read 1 modular short (max 2 words).
| BITCODE_RC bit_read_RC | ( | Bit_Chain * | dat | ) |
Read 1 byte (raw char).
| BITCODE_RD bit_read_RD | ( | Bit_Chain * | dat | ) |
Read 1 raw double (8 bytes, IEEE-754).
| BITCODE_RL bit_read_RL | ( | Bit_Chain * | dat | ) |
Read 1 raw long (4 byte, LE).
| BITCODE_RL bit_read_RL_BE | ( | Bit_Chain * | dat | ) |
Read 1 raw long (4 byte, BE).
| BITCODE_RLL bit_read_RLL | ( | Bit_Chain * | dat | ) |
Read 1 raw 64bit long (8 byte, LE).
| BITCODE_RLL bit_read_RLL_BE | ( | Bit_Chain * | dat | ) |
Read 1 raw 64bit long (8 byte, BE).
| BITCODE_RS bit_read_RS | ( | Bit_Chain * | dat | ) |
Read 1 raw short (LE).
| BITCODE_BS bit_read_RS_BE | ( | Bit_Chain * | dat | ) |
Read 1 raw short (BE).
| BITCODE_TV bit_read_T | ( | Bit_Chain *__restrict__ | dat | ) |
| BITCODE_TV bit_read_T16 | ( | Bit_Chain *__restrict__ | dat | ) |
| BITCODE_TV bit_read_T32 | ( | Bit_Chain *__restrict__ | dat | ) |
| BITCODE_TF bit_read_TF | ( | Bit_Chain * | dat, |
| size_t | length ) |
| BITCODE_TIMEBLL bit_read_TIMEBLL | ( | Bit_Chain * | dat | ) |
Read 2 time BL bitlong (compacted data). julian days + milliseconds since midnight used for TDCREATE, TDUPDATE, and all other DATE variables. pre-R13 read 2xRL
| BITCODE_TIMERLL bit_read_TIMERLL | ( | Bit_Chain * | dat | ) |
| BITCODE_TU bit_read_TU | ( | Bit_Chain *__restrict__ | dat | ) |
| BITCODE_TU bit_read_TU16 | ( | Bit_Chain *__restrict__ | dat | ) |
| BITCODE_TV bit_read_TU32 | ( | Bit_Chain *__restrict__ | dat | ) |
| BITCODE_TU bit_read_TU_len | ( | Bit_Chain *__restrict__ | dat, |
| unsigned int * | lenp ) |
| BITCODE_TU bit_read_TU_size | ( | Bit_Chain *__restrict__ | dat, |
| unsigned int | len ) |
| BITCODE_TV bit_read_TV | ( | Bit_Chain *__restrict__ | dat | ) |
| BITCODE_UMC bit_read_UMC | ( | Bit_Chain * | dat | ) |
Read unsigned modular char (max 5 bytes, unsigned). Can be quite large if there are many deleted handles.
| void bit_reset_chain | ( | Bit_Chain * | dat | ) |
| int bit_search_sentinel | ( | Bit_Chain * | dat, |
| const unsigned char | sentinel[16] ) |
Search for a sentinel; if found, positions "dat->byte" immediately after it and returns -1
| void bit_set_position | ( | Bit_Chain * | dat, |
| size_t | bitpos ) |
| BITCODE_TV bit_set_T | ( | Bit_Chain *__restrict__ | dat, |
| const char *__restrict__ | src ) |
| bool bit_TF_contains_high | ( | char * | s, |
| size_t | len ) |
| char * bit_TU_to_utf8_len | ( | const BITCODE_TU __restrict__ | wstr, |
| const int | len ) |
| char * bit_TV_to_utf8 | ( | const char *__restrict__ | src, |
| const BITCODE_RS | codepage ) |
converts old codepage'd strings to UTF-8. convert \U+XXXX or \MnXXXX also if representable. returns NULL on errors, or the unchanged src string, or a copy.
| const char * bit_u_expand | ( | const char * | src | ) |
| BITCODE_TU bit_utf8_to_TU | ( | char *__restrict__ | str, |
| const unsigned | cquoted ) |
Converts UTF-8 to UCS-2. Returns a copy. Needed by dwg importers, writers (e.g. dxf2dwg) cquoted is needed by in_json, to unquote "
| char * bit_utf8_to_TV | ( | char *__restrict__ | dest, |
| const unsigned char *__restrict__ | src, | ||
| const size_t | destlen, | ||
| const size_t | srclen, | ||
| const unsigned | cquoted, | ||
| const BITCODE_RS | codepage ) |
Converts UTF-8 (dxf,json) to ASCII TV. \uxxxx or other unicode => \U+XXXX if not representable in this codepage. If cquoted unquotes " to ", undo json_cquote(), Returns NULL if not enough room in dest. converts UTF-8 (dxf,json) to ASCII TV. optionally unquotes \" to ", \ to \, undo json_cquote(), \uxxxx or other unicode => \U+XXXX. codepage conversion, MIF not yet (needs version arg) Returns NULL if not enough room in dest.
| int bit_wcs2cmp | ( | BITCODE_TU __restrict__ | s1, |
| const BITCODE_TU __restrict__ | s2 ) |
| BITCODE_TU bit_wcs2cpy | ( | BITCODE_TU __restrict__ | dest, |
| const BITCODE_TU __restrict__ | src ) |
| BITCODE_TU bit_wcs2dup | ( | const BITCODE_TU __restrict__ | src | ) |
| size_t bit_wcs2len | ( | const BITCODE_TU __restrict__ | wstr | ) |
| size_t bit_wcs2nlen | ( | const BITCODE_TU __restrict__ | wstr, |
| const size_t | maxlen ) |
| void bit_write_4BITS | ( | Bit_Chain * | dat, |
| unsigned char | value ) |
Write 4 bits.
| void bit_write_B | ( | Bit_Chain * | dat, |
| unsigned char | value ) |
Write 1 bit.
| void bit_write_BB | ( | Bit_Chain * | dat, |
| unsigned char | value ) |
Write 2 bits.
| void bit_write_BD | ( | Bit_Chain * | dat, |
| double | value ) |
Write 1 bitdouble (compacted data).
| void bit_write_BE | ( | Bit_Chain * | dat, |
| double | x, | ||
| double | y, | ||
| double | z ) |
Write bit-extrusion.
| void bit_write_bits | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_TF __restrict__ | bits, | ||
| size_t | numbits ) |
| void bit_write_bits1 | ( | Bit_Chain *__restrict__ | dat, |
| const char *__restrict__ | bits ) |
| void bit_write_BL | ( | Bit_Chain * | dat, |
| BITCODE_BL | value ) |
Write 1 bitlong (compacted data).
| void bit_write_BLd | ( | Bit_Chain * | dat, |
| BITCODE_BLd | value ) |
Write signed bitlong (compacted data).
| void bit_write_BLL | ( | Bit_Chain * | dat, |
| BITCODE_BLL | value ) |
Write 1 bitlonglong (compacted data). max 7 byte by design.
| void bit_write_BOT | ( | Bit_Chain * | dat, |
| BITCODE_BS | value ) |
Write object type 2010+ (BB + 1 or 2 bytes).
| void bit_write_BS | ( | Bit_Chain * | dat, |
| BITCODE_BS | value ) |
Write 1 bitshort (compacted data).
| void bit_write_BT | ( | Bit_Chain * | dat, |
| double | value ) |
Write bit-thickness.
Write color
| uint16_t bit_write_CRC | ( | Bit_Chain * | dat, |
| size_t | start_address, | ||
| uint16_t | seed ) |
Create and write old 16bit CRC.
| uint16_t bit_write_CRC_BE | ( | Bit_Chain * | dat, |
| size_t | start_address, | ||
| const uint16_t | seed ) |
| BITCODE_BB bit_write_DD | ( | Bit_Chain * | dat, |
| double | value, | ||
| double | default_value ) |
Write bit-double with default.
| void bit_write_ENC | ( | Bit_Chain * | dat, |
| Bit_Chain * | hdl_dat, | ||
| Bit_Chain * | str_dat, | ||
| Dwg_Color *__restrict__ | color ) |
Write entity color (2004+)
| void bit_write_H | ( | Bit_Chain *__restrict__ | dat, |
| Dwg_Handle *__restrict__ | handle ) |
Write handle-references. TODO separate SoftPtr: BB 0 + RL HardPtr: BB 1 + RL SoftOwner: BB 2 + RL HardOwner: BB 3 + RL downconvert relative handles to abs. 4 to r2000
| long bit_write_hexbits | ( | Bit_Chain *__restrict__ | dat, |
| const char *__restrict__ | bytes ) |
| void bit_write_MC | ( | Bit_Chain * | dat, |
| BITCODE_MC | val ) |
Write 1 modular char (max 5 bytes, signed).
| void bit_write_MS | ( | Bit_Chain * | dat, |
| BITCODE_MS | value ) |
Write 1 modular short (max 2 words).
| void bit_write_RC | ( | Bit_Chain * | dat, |
| unsigned char | value ) |
Write 1 byte (raw char).
| void bit_write_RD | ( | Bit_Chain * | dat, |
| double | value ) |
Write 1 raw double (8 bytes, IEEE-754).
| void bit_write_RL | ( | Bit_Chain * | dat, |
| BITCODE_RL | value ) |
Write 1 raw long (4 byte, LE).
| void bit_write_RL_BE | ( | Bit_Chain * | dat, |
| BITCODE_RL | value ) |
Write 1 raw long (4 byte, BE).
| void bit_write_RLL | ( | Bit_Chain * | dat, |
| BITCODE_RLL | value ) |
Write 1 raw 64bit long (8 byte, LE).
| void bit_write_RLL_BE | ( | Bit_Chain * | dat, |
| BITCODE_RLL | value ) |
Write 1 raw 64bit long (8 byte, BE).
| void bit_write_RS | ( | Bit_Chain * | dat, |
| BITCODE_RS | value ) |
Write 1 raw short (LE).
| void bit_write_RS_BE | ( | Bit_Chain * | dat, |
| BITCODE_RS | value ) |
Write 1 raw short (BE).
| void bit_write_T | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_TV __restrict__ | s ) |
Write ASCII or Unicode text.
| void bit_write_T16 | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_TV __restrict__ | chain ) |
String16: Write ASCII/Unicode prefixed by a RS length, up-converts to TU16
| void bit_write_T32 | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_TV __restrict__ | value ) |
| void bit_write_TF | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_TF __restrict__ | chain, | ||
| size_t | length ) |
Write fixed-length text.
| void bit_write_TFv | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_TF __restrict__ | chain, | ||
| size_t | length ) |
Write fixed-length text from variable length string (possibly downgraded from shorter string).
| void bit_write_TIMEBLL | ( | Bit_Chain * | dat, |
| BITCODE_TIMEBLL | date ) |
Write 2 time BL bitlong (compacted data). Ignores the double value.
| void bit_write_TIMERLL | ( | Bit_Chain * | dat, |
| BITCODE_TIMERLL | date ) |
| void bit_write_TU | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_TU __restrict__ | chain ) |
Write UCS-2 unicode text. Must be zero-delimited.
| void bit_write_TU16 | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_TU __restrict__ | value ) |
| void bit_write_TU32 | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_TV __restrict__ | value ) |
| void bit_write_TV | ( | Bit_Chain *__restrict__ | dat, |
| BITCODE_TV __restrict__ | chain ) |
Write ASCIIZ text. Starting with r2004 as writer (not target version) acad always writes a terminating zero, and includes it in the length. On DWG_OPTS_INJSON (imported from JSON), convert from UTF-8 to the codepage.
| void bit_write_UMC | ( | Bit_Chain * | dat, |
| BITCODE_UMC | val ) |
Write 1 modular char (max 8 bytes, unsigned).
| bool does_cross_unicode_datversion | ( | Bit_Chain *__restrict__ | dat | ) |
| size_t in_hex2bin | ( | unsigned char *__restrict__ | dest, |
| char *__restrict__ | src, | ||
| size_t | destlen ) |
| void normalize_BE | ( | BITCODE_3BD | ext | ) |