mirror of
				https://github.com/mdbtools/mdbtools.git
				synced 2025-10-31 08:26:58 +08:00 
			
		
		
		
	apidocs with doxygen
This commit is contained in:
		
							
								
								
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -49,3 +49,9 @@ src/util/prkkd | ||||
| src/util/prole | ||||
| src/util/prtable | ||||
| src/util/updrow | ||||
|  | ||||
| ## apidocs docs related | ||||
| public/ | ||||
| .sass-cache/ | ||||
| temp-man-pages/ | ||||
|  | ||||
|   | ||||
							
								
								
									
										12
									
								
								.gitlab-ci.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								.gitlab-ci.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| image: ubuntu | ||||
|  | ||||
| pages: | ||||
|   script: | ||||
|   - apt-get update -qq | ||||
|   - apt-get install -y -qq doxygen graphviz python3 | ||||
|   - ./api_docx/build_docs.sh | ||||
|   artifacts: | ||||
|     paths: | ||||
|     - public | ||||
|   only: | ||||
|   - dev | ||||
| @@ -1,5 +1,7 @@ | ||||
| This file documents the Microsoft MDB file format for Jet3 and Jet4 databases. | ||||
| 
 | ||||
| [TOC] | ||||
| 
 | ||||
| General Notes | ||||
| ------------- | ||||
| 
 | ||||
| @@ -20,36 +22,44 @@ Terminology | ||||
| This section contains a mix of information about data structures used in the MDB | ||||
| file format along with general database terminology needed to explain these  | ||||
| structures. | ||||
| 
 | ||||
| ``` | ||||
| Page          - A fixed size region within the file on a 2 or 4K boundry. All  | ||||
|                 data in the file exists inside pages. | ||||
| 
 | ||||
| System Table  - Tables in Access generally starting with "MSys".  The 'Flags' | ||||
|                 field in the table's Catalog Entry will contain a flag in one | ||||
|                 of two positions (0x80000000 or 0x00000002).  See also the TDEF | ||||
| 		(table definition) pages for "System Table" field. | ||||
| 		        (table definition) pages for "System Table" field. | ||||
| 		         | ||||
| Catalog Entry - A row from the MSysObjects table describing another database | ||||
|                 object.  The MSysObjects table definition page is always at  | ||||
|                 page 2 of the database, and a phony tdef structure is | ||||
|                 bootstrapped to initially read the database. | ||||
|                  | ||||
| Page Split    - A process in which a row is added to a page with no space left. | ||||
|                 A second page is allocated and rows on the original page are  | ||||
| 		split between the two pages and then indexes are updated. Pages | ||||
| 		        split between the two pages and then indexes are updated. Pages | ||||
|                 can use a variety of algorithms for splitting the rows, the  | ||||
|                 most popular being a 50/50 split in which rows are divided  | ||||
|                 evenly between pages. | ||||
|                  | ||||
| Overflow Page - Instead of doing a full page split with associated index writes, | ||||
|                 a pointer to an "overflow" page can be stored at the original | ||||
|                 row's location. Compacting a database would normally rewrite | ||||
|                 overflow pages back into regular pages. | ||||
|                  | ||||
| Leaf Page     - The lowest page on an index tree.  In Access, leaf pages are of | ||||
|                 a different type than other index pages. | ||||
|                  | ||||
| UCS-2         - a two byte unicode encoding used in Jet4 files. | ||||
| 
 | ||||
| Covered Query - a query that can be satisfied by reading only index pages.  For | ||||
|                 instance if the query  | ||||
| 		"SELECT count(*) from Table1 where Column3 = 4" were run and  | ||||
| 		        "SELECT count(*) from Table1 where Column3 = 4" were run and  | ||||
|                 Column3 was indexed, the query could be satisfied by reading | ||||
|                 only indexes.  Because of the way Access hashes text columns | ||||
|                 in indexes, covered queries on text columns are not possible. | ||||
| ``` | ||||
| 
 | ||||
| Pages | ||||
| ----- | ||||
| @@ -61,6 +71,7 @@ a number of types. | ||||
| 
 | ||||
| The first byte of each page identifies the page type as follows. | ||||
| 
 | ||||
| ``` | ||||
| 0x00 Database definition page.  (Always page 0) | ||||
| 0x01 Data page | ||||
| 0x02 Table definition | ||||
| @@ -68,7 +79,7 @@ The first byte of each page identifies the page type as follows. | ||||
| 0x04 Leaf Index pages  | ||||
| 0x05 Page Usage Bitmaps (extended page usage) | ||||
| 0x08 ?? | ||||
| 
 | ||||
| ``` | ||||
| 
 | ||||
| Database Definition Page | ||||
| ------------------------ | ||||
| @@ -80,9 +91,14 @@ encryption keys, and name of the creating program.  Note, this page is | ||||
| "encrypted" with a simple rc4 key starting at offset 0x18 and extending for | ||||
| 126 (Jet3) or 128 (Jet4) bytes. | ||||
| 
 | ||||
| Offset 0x14 contains the Jet version of this database: 0x00 for 3, 0x01 for 4, | ||||
| 0x02 for 5, 0x03 for Access 2010. | ||||
| This is used by the mdb-ver utility to determine the Jet version. | ||||
| Offset 0x14 contains the Jet version of this database: | ||||
| 
 | ||||
| - 0x00 for 3 | ||||
| - 0x01 for 4 | ||||
| - 0x02 for 5 | ||||
| - 0x03 for Access 2010 | ||||
| 
 | ||||
| This is used by the `mdb-ver` utility to determine the Jet version. | ||||
| 
 | ||||
| The 20 bytes (Jet3) or 40 bytes (Jet4) starting at 0x42 are the database | ||||
| password.  In Jet4, there is an additional mask applied to this password | ||||
| @@ -102,7 +118,7 @@ Data Pages | ||||
| Data rows are all stored in data pages. | ||||
| 
 | ||||
| The header of a Jet3 data page looks like this: | ||||
| 
 | ||||
| ``` | ||||
| +--------------------------------------------------------------------------+ | ||||
| | Jet3 Data Page Definition                                                | | ||||
| +------+---------+---------------------------------------------------------+ | ||||
| @@ -118,14 +134,16 @@ The header of a Jet3 data page looks like this: | ||||
| +--------------------------------------------------------------------------+ | ||||
| | ???? | 2 bytes | offset_row | The record's location on this page         | | ||||
| +--------------------------------------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| Notes: | ||||
| . In Jet4, an additional four-byte field was added after tdef_pg.  Its purpose | ||||
| 
 | ||||
| - In Jet4, an additional four-byte field was added after tdef_pg.  Its purpose | ||||
|   is currently unknown. | ||||
| . Offsets that have 0x40 in the high order byte point to a location within the | ||||
| - Offsets that have 0x40 in the high order byte point to a location within the | ||||
|   page where a Data Pointer (4 bytes) to another data page (also known as an | ||||
|   overflow page) is stored.  Called 'lookupflag' in source code. | ||||
| . Offsets that have 0x80 in the high order byte are deleted rows.  Called | ||||
| - Offsets that have 0x80 in the high order byte are deleted rows.  Called | ||||
|   'delflag' in source code. | ||||
| 
 | ||||
| 
 | ||||
| @@ -136,6 +154,7 @@ its offset to the previous row's offset - 1, and so on. | ||||
| Decoding a row requires knowing the number and types of columns from its TDEF | ||||
| page. Decoding is handled by the routine mdb_crack_row(). | ||||
| 
 | ||||
| ``` | ||||
| +--------------------------------------------------------------------------+ | ||||
| | Jet3 Row Definition                                                      | | ||||
| +------+---------+---------------------------------------------------------+ | ||||
| @@ -150,7 +169,9 @@ page. Decoding is handled by the routine mdb_crack_row(). | ||||
| | ???? | 1 byte  | var_len    | number of variable length columns          | | ||||
| | ???? | n bytes | null_mask  | Null indicator.  See notes.                | | ||||
| +--------------------------------------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| ``` | ||||
| +--------------------------------------------------------------------------+ | ||||
| | Jet4 Row Definition                                                      | | ||||
| +------+---------+---------------------------------------------------------+ | ||||
| @@ -164,26 +185,27 @@ page. Decoding is handled by the routine mdb_crack_row(). | ||||
| | ???? | 2 bytes | var_len    | number of variable length columns          | | ||||
| | ???? | n bytes | null_mask  | Null indicator.  See notes.                | | ||||
| +--------------------------------------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| Notes: | ||||
| 
 | ||||
| . A row will always have the number of fixed columns as specified in the table | ||||
| - A row will always have the number of fixed columns as specified in the table | ||||
|   definition, but may have fewer variable columns, as rows are not updated when | ||||
|   columns are added. | ||||
| . All fixed-length columns are stored first to last, followed by non-null | ||||
| - All fixed-length columns are stored first to last, followed by non-null | ||||
|   variable-length columns stored first to last. | ||||
| . If the number of variable columns, as given in the TDEF, is 0, then the | ||||
| - If the number of variable columns, as given in the TDEF, is 0, then the | ||||
|   only items in the row are num_cols, fixed_cols, and null_mask. | ||||
| . The var_len field indicates the number of entries in the var_table[]. | ||||
| . The var_table[] and jump_table[] are stored in reverse order. | ||||
| . The eod field points at the first byte after the var_cols field.  It is used | ||||
| - The var_len field indicates the number of entries in the var_table[]. | ||||
| - The var_table[] and jump_table[] are stored in reverse order. | ||||
| - The eod field points at the first byte after the var_cols field.  It is used | ||||
|   to determine where the last var_col ends. | ||||
| . The size of the null mask is computed by (num_cols + 7)/8. | ||||
| . Fixed columns can be null (unlike some other databases). | ||||
| . The null mask stores one bit for each column, starting with the | ||||
| - The size of the null mask is computed by (num_cols + 7)/8. | ||||
| - Fixed columns can be null (unlike some other databases). | ||||
| - The null mask stores one bit for each column, starting with the | ||||
|   least-significant bit of the first byte. | ||||
| . In the null mask, 0 represents null, and 1 represents not null. | ||||
| . Values for boolean fixed columns are in the null mask: 0 - false, 1 - true. | ||||
| - In the null mask, 0 represents null, and 1 represents not null. | ||||
| - Values for boolean fixed columns are in the null mask: 0 - false, 1 - true. | ||||
| 
 | ||||
| In Jet3, offsets are stored as 1-byte fields yielding a maximum of 256 bytes. | ||||
| To get around this, offsets are computed using a jump table.  The jump table | ||||
| @@ -208,6 +230,7 @@ entries.  Thus, the jump table was (thankfully) ditched in Jet4. | ||||
| 
 | ||||
| Each memo column (or other long binary data) in a row | ||||
| 
 | ||||
| ``` | ||||
| +-------------------------------------------------------------------------+ | ||||
| | Memo Field Definition (12 bytes)                                        | | ||||
| +------+---------+-------------+------------------------------------------+ | ||||
| @@ -218,18 +241,23 @@ Each memo column (or other long binary data) in a row | ||||
| | ???? | 4 bytes | lval_dp     | Data pointer to LVAL page (if needed)    | | ||||
| | 0x00 | 4 bytes | unknown     |                                          | | ||||
| +------+---------+-------------+------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| Values for the bitmask: | ||||
| 
 | ||||
| 0x80 = the memo is in a string at the end of this header (memo_len bytes) | ||||
| 0x40 = the memo is in a unique LVAL page in a record type 1 | ||||
| 0x00 = the memo is in n LVAL pages in a record type 2 | ||||
| - 0x80 = the memo is in a string at the end of this header (memo_len bytes) | ||||
| - 0x40 = the memo is in a unique LVAL page in a record type 1 | ||||
| - 0x00 = the memo is in n LVAL pages in a record type 2 | ||||
| 
 | ||||
| If the memo is in a LVAL page, we use row_id of lval_dp to find the row. | ||||
| 
 | ||||
| ```c | ||||
| offset_start of memo = (int16*) LVAL_page[offset_num_rows + (row_id * 2) + 2] | ||||
| if (row_id = 0) | ||||
|      offset_stop of memo = 2048(jet3) or 4096(jet4) | ||||
| else | ||||
|      offset_stop of memo = (int16*) LVAL_page[offset_num_row + (row_id * 2)] | ||||
| ``` | ||||
| 
 | ||||
| The length (partial if type 2) for the memo is: | ||||
| memo_page_len = offset_stop - offset_start | ||||
| @@ -254,24 +282,30 @@ The header of a LVAL page is just like that of a regular data page, | ||||
| except that in place of the tdef_pg is the word 'LVAL'. | ||||
| 
 | ||||
| Each memo record type 1 looks like this: | ||||
| 
 | ||||
| ``` | ||||
| +------+---------+-------------+------------------------------------------+ | ||||
| | data | length  | name        | description                              | | ||||
| +------+---------+-------------+------------------------------------------+ | ||||
| | ???? | n bytes | memo_value  | A string which is the memo               | | ||||
| +-------------------------------------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| Each memo record type 2 looks like this: | ||||
| 
 | ||||
| ``` | ||||
| +------+---------+-------------+------------------------------------------+ | ||||
| | data | length  | name        | description                              | | ||||
| +------+---------+-------------+------------------------------------------+ | ||||
| | ???? | 4 bytes | lval_dp     | Next page LVAL type 2 if memo is too long| | ||||
| | ???? | n bytes | memo_value  | A string which is the memo (partial)     | | ||||
| +-------------------------------------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| In a LVAL type 2 data page, you have  | ||||
|    10 or 14 bytes for the header of the data page,  | ||||
|     2 bytes for an offset, | ||||
|     4 bytes for the next lval_pg | ||||
| - 10 or 14 bytes for the header of the data page, | ||||
| - 2 bytes for an offset, | ||||
| - 4 bytes for the next lval_pg | ||||
| 
 | ||||
| So there is a block of 2048 - (10+2+4) = 2032(jet3)  | ||||
| or 4096 - (14+2+4) = 4076(jet4) bytes max in a page. | ||||
| @@ -283,6 +317,7 @@ TDEF (Table Definition) Pages | ||||
| Every table in the database has a TDEF page.  It contains a definition of  | ||||
| the columns, types, sizes, indexes, and similar information. | ||||
| 
 | ||||
| ``` | ||||
| +-------------------------------------------------------------------------+ | ||||
| | Jet3/Jet4 TDEF Header | ||||
| +------+---------+-------------+------------------------------------------+ | ||||
| @@ -294,10 +329,12 @@ the columns, types, sizes, indexes, and similar information. | ||||
| |      |         |             | (jet4) Free space in this page minus 8   | | ||||
| | 0x00 | 4 bytes | next_pg     | Next tdef page pointer (0 if none)       | | ||||
| +------+---------+-------------+------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| TDEFs can span multiple pages for large tables, this is accomplished using the | ||||
| next_pg field. | ||||
| 
 | ||||
| ``` | ||||
| +-------------------------------------------------------------------------+ | ||||
| | Jet3 Table Definition Block (35 bytes)                                  | | ||||
| +------+---------+-------------+------------------------------------------+ | ||||
| @@ -477,26 +514,29 @@ next_pg field. | ||||
| | ???? | 4 bytes | free_pages  | Points to a similar record as above,     | | ||||
| |      |         |             | listing pages which contain free space.  | | ||||
| +-------------------------------------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| Columns flags (not complete): | ||||
| 0x01: fixed length column | ||||
| 0x02: can be null (possibly related to joins?) | ||||
| 0x04: is auto long | ||||
| 0x10: replication related field (or hidden?). These columns start with "s_" or | ||||
| 
 | ||||
| - 0x01: fixed length column | ||||
| - 0x02: can be null (possibly related to joins?) | ||||
| - 0x04: is auto long | ||||
| - 0x10: replication related field (or hidden?). These columns start with "s_" or | ||||
|       "Gen_" (the "Gen_" fields are for memo fields) | ||||
| 0x40: is auto guid | ||||
| 0x80: hyperlink. Syntax is "Link Title#http://example.com/somepage.html#" or | ||||
| - 0x40: is auto guid | ||||
| - 0x80: hyperlink. Syntax is "Link Title#http://example.com/somepage.html#" or | ||||
|       "#PAGE.HTM#" | ||||
| 
 | ||||
| In Access 2007 and Access 2010, "Complex Columns" (multivalued fields, version | ||||
| history, attachments) always have the flag byte set to exactly 0x07. | ||||
| 
 | ||||
| Index flags (not complete): | ||||
| 0x01 Unique      | ||||
| 0x02 IgnoreNuls | ||||
| 0x08 Required | ||||
| - 0x01 Unique | ||||
| - 0x02 IgnoreNuls | ||||
| - 0x08 Required | ||||
| 
 | ||||
| Column Type may be one of the following (not complete): | ||||
| 
 | ||||
| ``` | ||||
|     BOOL            = 0x01 /* Boolean         ( 1 bit ) */ | ||||
|     BYTE            = 0x02 /* Byte            ( 8 bits) */ | ||||
|     INT             = 0x03 /* Integer         (16 bits) */ | ||||
| @@ -514,6 +554,8 @@ Column Type may be one of the following (not complete): | ||||
|     REPID           = 0x0F /* GUID */ | ||||
|     NUMERIC         = 0x10 /* Scaled decimal  (17 bytes) */ | ||||
| 
 | ||||
| ``` | ||||
| 
 | ||||
| Notes on reading index metadata: | ||||
| 
 | ||||
| There are 2 types of index metadata, "physical" index info (denoted by | ||||
| @@ -566,6 +608,7 @@ have free space on them (used for inserting data). | ||||
| The table bitmaps appear to be of a fixed size for both Jet 3 and 4 (128 and 64 | ||||
| bytes respectively).  The first byte of the map is a type field. | ||||
| 
 | ||||
| ``` | ||||
| +--------------------------------------------------------------------------+ | ||||
| | Type 0 Page Usage Map                                                    | | ||||
| +------+---------+---------------------------------------------------------+ | ||||
| @@ -581,12 +624,14 @@ bytes respectively).  The first byte of the map is a type field. | ||||
| |      |         |            | Pages are stored starting with the low     | | ||||
| |      |         |            | order bit of the first byte.               | | ||||
| +--------------------------------------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| If you're paying attention then you'll realize that the relatively small size of | ||||
| the map (128*8*2048 or 64*8*4096 = 2 Meg) means that this scheme won't work with | ||||
| larger database files although the initial start page helps a bit.  To overcome | ||||
| this there is a second page usage map scheme with the map_type of 0x01. | ||||
| 
 | ||||
| ``` | ||||
| +--------------------------------------------------------------------------+ | ||||
| | Type 1 Page Usage Map                                                    | | ||||
| +------+---------+---------------------------------------------------------+ | ||||
| @@ -598,10 +643,12 @@ this there is a second page usage map scheme with the map_type of 0x01. | ||||
| +--------------------------------------------------------------------------+ | ||||
| | ???? | 4 bytes | map_page   | pointer to page type 0x05 containing map   | | ||||
| +--------------------------------------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| Note that the initial start page is gone and is reused for the first page  | ||||
| indirection.  The 0x05 type page header looks like: | ||||
| 
 | ||||
| ``` | ||||
| +--------------------------------------------------------------------------+ | ||||
| | Usage Map Page (type 0x05)                                               | | ||||
| +------+---------+---------------------------------------------------------+ | ||||
| @@ -611,6 +658,7 @@ indirection.  The 0x05 type page header looks like: | ||||
| | 0x01 | 1 byte  | unknown    | always 1 as with other page types          | | ||||
| | 0x00 | 2 bytes | unknown    |                                            | | ||||
| +------+---------+---------------------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| The rest of the page is the allocation bitmap following the same scheme (lsb | ||||
| to msb order, 1 bit per page) as a type 0 map.  This yields a maximum of | ||||
| @@ -627,6 +675,7 @@ Indices | ||||
| 
 | ||||
| Indices are not completely understood but here is what we know. | ||||
| 
 | ||||
| ``` | ||||
| +-------------------------------------------------------------------------+ | ||||
| | Index Page (type 0x03)                                                  | | ||||
| +------+---------+-------------+------------------------------------------+ | ||||
| @@ -641,6 +690,7 @@ Indices are not completely understood but here is what we know. | ||||
| | ???? | 4 bytes | tail_page   | Pointer to tail leaf page                | | ||||
| | ???? | 2 bytes | pref_len    | Length of the shared entry prefix        | | ||||
| +-------------------------------------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| Index pages come in two flavors. | ||||
| 
 | ||||
| @@ -659,14 +709,17 @@ entry begins at offset 0xf8(jet3) or 0x1e0(jet4), and is not explicitly | ||||
| indicated in the bitmask.  Note that the count in each byte begins with the | ||||
| low order bit.  For example take the data: | ||||
| 
 | ||||
| ``` | ||||
| 00 20 00 04 80 00 ... | ||||
| ``` | ||||
| 
 | ||||
| Convert the bytes to binary starting with the low order bit in each byte.  v's | ||||
| mark where each entry begins: | ||||
| 
 | ||||
| ``` | ||||
| v                v                 v                v | ||||
| 0000 0000  0000 0100  0000 0000  0010 0000  0000 0001  0000 0000 | ||||
| -- 00 ---  -- 20 ---  -- 00 ---  -- 04 ---  -- 80 ---  -- 00 --- | ||||
| ``` | ||||
| 
 | ||||
| As noted earlier, the first entry is implicit.  The second entry begins at an | ||||
| offset of 13 (0xd) bytes from the first.  The third entry 26 (0x1a) bytes from | ||||
| @@ -684,6 +737,7 @@ flexible. | ||||
| 
 | ||||
| So now we come to the index entries for type 0x03 pages which look like this: | ||||
| 
 | ||||
| ``` | ||||
| +-------------------------------------------------------------------------+ | ||||
| | Index Record                                                            | | ||||
| +------+---------+-------------+------------------------------------------+ | ||||
| @@ -698,6 +752,7 @@ So now we come to the index entries for type 0x03 pages which look like this: | ||||
| |      |         |             | entry as last entry.  Could be a leaf    | | ||||
| |      |         |             | node.                                    | | ||||
| +-------------------------------------------------------------------------+ | ||||
| ``` | ||||
| 
 | ||||
| The flag field is generally either 0x00, 0x7f, 0x80, or 0xFF.  0x80 is the | ||||
| one's complement of 0x7f and all text data in the index would then need to be | ||||
| @@ -721,24 +776,30 @@ bytes, where the first byte is the last octet of the encoded primary key field | ||||
| (integer) and the last four are the page/row pointer.  Thus if the first key | ||||
| value on the page is 1 and it points to page 261 (00 01 05) row 3, it becomes: | ||||
| 
 | ||||
| ``` | ||||
| 7f 00 00 00 01 00 01 05 03 | ||||
| 
 | ||||
| ``` | ||||
| and the next index entry can be: | ||||
| 
 | ||||
| ``` | ||||
| 02 00 01 05 04 | ||||
| 
 | ||||
| ``` | ||||
| That is, the shared prefix is [7f 00 00 00], so the actual next entry is: | ||||
| 
 | ||||
| ``` | ||||
| [7f 00 00 00] 02 00 01 05 04 | ||||
| ``` | ||||
| 
 | ||||
| so the key value is 2 (the last octet changes to 02) page 261 row 4. | ||||
| 
 | ||||
| Access stores an 'alphabetic sort order' version of the text key columns in the | ||||
| index.  Here is the encoding as we know it: | ||||
| 
 | ||||
| ``` | ||||
| 0-9: 0x56-0x5f | ||||
| A-Z: 0x60-0x79 | ||||
| a-z: 0x60-0x79 | ||||
| ``` | ||||
| 
 | ||||
| Once converted into this (non-ascii) character set, the text value can be | ||||
| sorted in 'alphabetic' order using the lexicographical order of the entry | ||||
| @@ -782,32 +843,36 @@ fields. They contain default values, description, format, required ... | ||||
| They start with a 32 bits header: 'KKD\0' in Jet3 and 'MR2\0' in Jet 4. | ||||
| 
 | ||||
| Next come chunks. Each chunk starts with: | ||||
| 32 bits length value (this includes the length) | ||||
| 16 bits chunk type (0x0080 contains the names, 0x0000 and 0x0001 contain | ||||
| 
 | ||||
| - 32 bits length value (this includes the length) | ||||
| - 16 bits chunk type (0x0080 contains the names, 0x0000 and 0x0001 contain | ||||
| 	the values.  0x0000 seems to contain information about the "main" object, | ||||
| 	e.g. the table, and 0x0001 seems to contain information about other | ||||
| 	objects, e.g. the table columns) | ||||
| 
 | ||||
| ``` | ||||
| Name chunk blocks (0x0080) simply contain occurences of: | ||||
| 16 bit name length | ||||
| name | ||||
| For instance:  | ||||
| 0x0d 0x00 and 'AccessVersion' (AccessVersion is 13 bytes, 0x0d 0x00 intel order) | ||||
| ``` | ||||
| 
 | ||||
| Value chunk blocks (0x0000 and 0x0001) contain a header: | ||||
| 32 bits length value (this includes the length) | ||||
| 16 bits name length | ||||
| name  (0x0000 chunk blocks are not usually named, 0x0001 chunk blocks have the | ||||
| - 32 bits length value (this includes the length) | ||||
| - 16 bits name length | ||||
| - name  (0x0000 chunk blocks are not usually named, 0x0001 chunk blocks have the | ||||
|       column name to which the properties belong) | ||||
| Next comes one of more chunks of data: | ||||
| 16 bit length value    (this includes the length) | ||||
| 8 bit ddl flag | ||||
| 8 bit type | ||||
| 16 bit name (index in the name array of above chunk 0x0080) | ||||
| 16 bit value length field (non-inclusive) | ||||
| value (07.53 for the AccessVersion example above) | ||||
| 
 | ||||
| See props.c for an example. | ||||
| Next comes one of more chunks of data: | ||||
| - 16 bit length value    (this includes the length) | ||||
| - 8 bit ddl flag | ||||
| - 8 bit type | ||||
| - 16 bit name (index in the name array of above chunk 0x0080) | ||||
| - 16 bit value length field (non-inclusive) | ||||
|   value (07.53 for the AccessVersion example above) | ||||
| 
 | ||||
| See ``props.c``` for an example. | ||||
| 
 | ||||
| 
 | ||||
| Text Data Type | ||||
							
								
								
									
										28
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								README.md
									
									
									
									
									
								
							| @@ -6,19 +6,19 @@ Welcome to the exciting world of MDB Tools! MDB Tools is a set of programs to | ||||
| help you extract data from Microsoft Access files in various settings. See the | ||||
| [NEWS](./NEWS) file for information about the latest release. | ||||
|  | ||||
| # Components | ||||
| ## Components | ||||
|  | ||||
| The major pieces of MDB Tools are: | ||||
|  | ||||
| ## libmdb | ||||
| ### libmdb | ||||
|  | ||||
| The core library that allows access to MDB files programatically. | ||||
|  | ||||
| ## libmdbsql | ||||
| ### libmdbsql | ||||
|  | ||||
| Builds on libmdb to provide a SQL engine (aka Jet) | ||||
|  | ||||
| ## utils | ||||
| ### utils | ||||
|  | ||||
| Provides command line utilities, including: | ||||
|  | ||||
| @@ -44,22 +44,22 @@ Provides command line utilities, including: | ||||
|  | ||||
| \* Deprecated | ||||
|  | ||||
| ## odbc | ||||
| ### odbc | ||||
|  | ||||
| An ODBC driver for use with unixODBC or iODBC driver manager. Allows one to use MDB files with PHP for example. | ||||
|  | ||||
| ## gmdb2 | ||||
| ### gmdb2 | ||||
|  | ||||
| The Gnome MDB File Viewer and debugger. Alpha quality, moved to [mdbtools/gmdb2](https://github.com/mdbtools/gmdb2). | ||||
|  | ||||
| # License | ||||
| ## License | ||||
|  | ||||
| Files in libmdb, libmdbsql, and libmdbodbc are licensed under LGPL and the | ||||
| utilities and gui program are under the GPL, see [COPYING.LIB](./COPYING.LIB) | ||||
| and [COPYING](./COPYING) files respectively. | ||||
|  | ||||
|  | ||||
| # Requirements | ||||
| ## Requirements | ||||
|  | ||||
| First, you must have reasonably current installations of: | ||||
|  | ||||
| @@ -79,23 +79,23 @@ If you want to build man pages, you'll need | ||||
| [GNU awk](https://www.gnu.org/software/gawk/). | ||||
|  | ||||
|  | ||||
| # Installation | ||||
| ## Installation | ||||
|  | ||||
| Latest version is available at https://github.com/mdbtools/mdbtools | ||||
|  | ||||
| ## Debian | ||||
| ### Debian | ||||
|  | ||||
| ``` | ||||
| apt install mdbtools | ||||
| ``` | ||||
|  | ||||
| ## Homebrew | ||||
| ### Homebrew | ||||
|  | ||||
| ```bash | ||||
| brew install mdbtools | ||||
| ``` | ||||
|  | ||||
| ## From source | ||||
| ### From source | ||||
|  | ||||
| ```bash | ||||
| $ autoreconf -i -f | ||||
| @@ -154,12 +154,12 @@ You can do that running: | ||||
| $ ldconfig | ||||
| ``` | ||||
|  | ||||
| # Hacking   | ||||
| ## Hacking | ||||
|  | ||||
| If you are interested in helping, read the [HACKING](./HACKING) file for a description of  | ||||
| where the code stands and what has been gleened of the file format. | ||||
|  | ||||
| # Contact | ||||
| ## Contact | ||||
|  | ||||
| Please send bug reports to the new github repository. | ||||
| https://github.com/mdbtools/mdbtools/issues | ||||
|   | ||||
							
								
								
									
										34
									
								
								TODO
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								TODO
									
									
									
									
									
								
							| @@ -1,34 +0,0 @@ | ||||
| Things to Do | ||||
| ------------ | ||||
|  | ||||
| file format: | ||||
|  | ||||
| . export VBA script | ||||
| . re-examine KKD records for form design (OLE streams?) | ||||
| . write support (understood, not coded) | ||||
|  | ||||
| libmdb: | ||||
|  | ||||
| . Complete the list of datatypes | ||||
| . Straighten out which functions in libmdb are meant to be used and which    | ||||
|   ones should be static. | ||||
| . Create an API reference for libmdb (maybe some man pages). | ||||
| . Sargs need to support all datatypes | ||||
| . Add support for index scanning when using sargs (partial) | ||||
| . write support | ||||
|  | ||||
| utils: | ||||
|  | ||||
| . need program to unpack VBA script to file (see prole) | ||||
| . Access forms to glade converter ? | ||||
| . need --version flag (done using -M flag on mdb-ver) | ||||
|  | ||||
| SQL Engine: | ||||
|  | ||||
| . Joins | ||||
| . insert/updates | ||||
| . bogus column name in where clause not caught | ||||
|  | ||||
| ODBC: | ||||
|  | ||||
| . many unimplemented funtions | ||||
							
								
								
									
										34
									
								
								TODO.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								TODO.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | ||||
| TODO | ||||
| ---- | ||||
|  | ||||
| ### file format: | ||||
|  | ||||
| - export VBA script | ||||
| - re-examine KKD records for form design (OLE streams?) | ||||
| - write support (understood, not coded) | ||||
|  | ||||
| ### libmdb: | ||||
|  | ||||
| - Complete the list of datatypes | ||||
| - Straighten out which functions in libmdb are meant to be used and which | ||||
|   ones should be static. | ||||
| - Create an API reference for libmdb (maybe some man pages). | ||||
| - Sargs need to support all datatypes | ||||
| - Add support for index scanning when using sargs (partial) | ||||
| - write support | ||||
|  | ||||
| ### utils: | ||||
|  | ||||
| - need program to unpack VBA script to file (see prole) | ||||
| - Access forms to glade converter ? | ||||
| - need --version flag (done using -M flag on mdb-ver) | ||||
|  | ||||
| ### SQL Engine: | ||||
|  | ||||
| - Joins | ||||
| - insert/updates | ||||
| - bogus column name in where clause not caught | ||||
|  | ||||
| ### ODBC: | ||||
|  | ||||
| - many unimplemented funtions | ||||
							
								
								
									
										1
									
								
								api_docx/COPYING.md
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								api_docx/COPYING.md
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | ||||
| ../COPYING | ||||
							
								
								
									
										231
									
								
								api_docx/DoxygenLayout.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										231
									
								
								api_docx/DoxygenLayout.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,231 @@ | ||||
| <doxygenlayout version="1.0"> | ||||
|   <!-- Generated by doxygen 1.8.17 --> | ||||
|   <!-- Navigation index tabs for HTML output --> | ||||
|   <navindex> | ||||
|     <tab type="mainpage" visible="yes" title=""/> | ||||
|     <tab type="pages" visible="yes" title="" intro=""/> | ||||
|     <tab type="modules" visible="yes" title="" intro=""/> | ||||
|     <tab type="namespaces" visible="yes" title=""> | ||||
|       <tab type="namespacelist" visible="yes" title="" intro=""/> | ||||
|       <tab type="namespacemembers" visible="yes" title="" intro=""/> | ||||
|     </tab> | ||||
|     <tab type="interfaces" visible="yes" title=""> | ||||
|       <tab type="interfacelist" visible="yes" title="" intro=""/> | ||||
|       <tab type="interfaceindex" visible="$ALPHABETICAL_INDEX" title=""/>  | ||||
|       <tab type="interfacehierarchy" visible="yes" title="" intro=""/> | ||||
|     </tab> | ||||
|     <tab type="classes" visible="yes" title=""> | ||||
|       <tab type="classlist" visible="yes" title="" intro=""/> | ||||
|       <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>  | ||||
|       <tab type="hierarchy" visible="yes" title="" intro=""/> | ||||
|       <tab type="classmembers" visible="yes" title="" intro=""/> | ||||
|     </tab> | ||||
|     <tab type="structs" visible="yes" title=""> | ||||
|       <tab type="structlist" visible="yes" title="" intro=""/> | ||||
|       <tab type="structindex" visible="$ALPHABETICAL_INDEX" title=""/>  | ||||
|     </tab> | ||||
|     <tab type="exceptions" visible="yes" title=""> | ||||
|       <tab type="exceptionlist" visible="yes" title="" intro=""/> | ||||
|       <tab type="exceptionindex" visible="$ALPHABETICAL_INDEX" title=""/>  | ||||
|       <tab type="exceptionhierarchy" visible="yes" title="" intro=""/> | ||||
|     </tab> | ||||
|     <tab type="files" visible="yes" title=""> | ||||
|       <tab type="filelist" visible="yes" title="" intro=""/> | ||||
|       <tab type="globals" visible="yes" title="" intro=""/> | ||||
|     </tab> | ||||
|     <tab type="examples" visible="yes" title="" intro=""/> | ||||
|     <tab type="user" url="@ref man-pages" title="Man Pages"/> | ||||
|     <tab type="user" url="https://github.com/mdbtools/mdbtools" title="Code"/> | ||||
|     <tab type="user" url="https://github.com/mdbtools/mdbtools/issues" title="Bugs+Issues"/> | ||||
|     <tab type="user" url="https://mdbtools.github.io/" title="Home"/> | ||||
|  | ||||
|   </navindex> | ||||
|  | ||||
|   <!-- Layout definition for a class page --> | ||||
|   <class> | ||||
|     <briefdescription visible="yes"/> | ||||
|     <includes visible="$SHOW_INCLUDE_FILES"/> | ||||
|     <inheritancegraph visible="$CLASS_GRAPH"/> | ||||
|     <collaborationgraph visible="$COLLABORATION_GRAPH"/> | ||||
|     <memberdecl> | ||||
|       <nestedclasses visible="yes" title=""/> | ||||
|       <publictypes title=""/> | ||||
|       <services title=""/> | ||||
|       <interfaces title=""/> | ||||
|       <publicslots title=""/> | ||||
|       <signals title=""/> | ||||
|       <publicmethods title=""/> | ||||
|       <publicstaticmethods title=""/> | ||||
|       <publicattributes title=""/> | ||||
|       <publicstaticattributes title=""/> | ||||
|       <protectedtypes title=""/> | ||||
|       <protectedslots title=""/> | ||||
|       <protectedmethods title=""/> | ||||
|       <protectedstaticmethods title=""/> | ||||
|       <protectedattributes title=""/> | ||||
|       <protectedstaticattributes title=""/> | ||||
|       <packagetypes title=""/> | ||||
|       <packagemethods title=""/> | ||||
|       <packagestaticmethods title=""/> | ||||
|       <packageattributes title=""/> | ||||
|       <packagestaticattributes title=""/> | ||||
|       <properties title=""/> | ||||
|       <events title=""/> | ||||
|       <privatetypes title=""/> | ||||
|       <privateslots title=""/> | ||||
|       <privatemethods title=""/> | ||||
|       <privatestaticmethods title=""/> | ||||
|       <privateattributes title=""/> | ||||
|       <privatestaticattributes title=""/> | ||||
|       <friends title=""/> | ||||
|       <related title="" subtitle=""/> | ||||
|       <membergroups visible="yes"/> | ||||
|     </memberdecl> | ||||
|     <detaileddescription title=""/> | ||||
|     <memberdef> | ||||
|       <inlineclasses title=""/> | ||||
|       <typedefs title=""/> | ||||
|       <enums title=""/> | ||||
|       <services title=""/> | ||||
|       <interfaces title=""/> | ||||
|       <constructors title=""/> | ||||
|       <functions title=""/> | ||||
|       <related title=""/> | ||||
|       <variables title=""/> | ||||
|       <properties title=""/> | ||||
|       <events title=""/> | ||||
|     </memberdef> | ||||
|     <allmemberslink visible="yes"/> | ||||
|     <usedfiles visible="$SHOW_USED_FILES"/> | ||||
|     <authorsection visible="yes"/> | ||||
|   </class> | ||||
|  | ||||
|   <!-- Layout definition for a namespace page --> | ||||
|   <namespace> | ||||
|     <briefdescription visible="yes"/> | ||||
|     <memberdecl> | ||||
|       <nestednamespaces visible="yes" title=""/> | ||||
|       <constantgroups visible="yes" title=""/> | ||||
|       <interfaces visible="yes" title=""/> | ||||
|       <classes visible="yes" title=""/> | ||||
|       <structs visible="yes" title=""/> | ||||
|       <exceptions visible="yes" title=""/> | ||||
|       <typedefs title=""/> | ||||
|       <sequences title=""/> | ||||
|       <dictionaries title=""/> | ||||
|       <enums title=""/> | ||||
|       <functions title=""/> | ||||
|       <variables title=""/> | ||||
|       <membergroups visible="yes"/> | ||||
|     </memberdecl> | ||||
|     <detaileddescription title=""/> | ||||
|     <memberdef> | ||||
|       <inlineclasses title=""/> | ||||
|       <typedefs title=""/> | ||||
|       <sequences title=""/> | ||||
|       <dictionaries title=""/> | ||||
|       <enums title=""/> | ||||
|       <functions title=""/> | ||||
|       <variables title=""/> | ||||
|     </memberdef> | ||||
|     <authorsection visible="yes"/> | ||||
|   </namespace> | ||||
|  | ||||
|   <!-- Layout definition for a file page --> | ||||
|   <file> | ||||
|     <briefdescription visible="yes"/> | ||||
|     <includes visible="$SHOW_INCLUDE_FILES"/> | ||||
|     <includegraph visible="$INCLUDE_GRAPH"/> | ||||
|     <includedbygraph visible="$INCLUDED_BY_GRAPH"/> | ||||
|     <sourcelink visible="yes"/> | ||||
|     <memberdecl> | ||||
|       <interfaces visible="yes" title=""/> | ||||
|       <classes visible="yes" title=""/> | ||||
|       <structs visible="yes" title=""/> | ||||
|       <exceptions visible="yes" title=""/> | ||||
|       <namespaces visible="yes" title=""/> | ||||
|       <constantgroups visible="yes" title=""/> | ||||
|       <defines title=""/> | ||||
|       <typedefs title=""/> | ||||
|       <sequences title=""/> | ||||
|       <dictionaries title=""/> | ||||
|       <enums title=""/> | ||||
|       <functions title=""/> | ||||
|       <variables title=""/> | ||||
|       <membergroups visible="yes"/> | ||||
|     </memberdecl> | ||||
|     <detaileddescription title=""/> | ||||
|     <memberdef> | ||||
|       <inlineclasses title=""/> | ||||
|       <defines title=""/> | ||||
|       <typedefs title=""/> | ||||
|       <sequences title=""/> | ||||
|       <dictionaries title=""/> | ||||
|       <enums title=""/> | ||||
|       <functions title=""/> | ||||
|       <variables title=""/> | ||||
|     </memberdef> | ||||
|     <authorsection/> | ||||
|   </file> | ||||
|  | ||||
|   <!-- Layout definition for a group page --> | ||||
|   <group> | ||||
|     <briefdescription visible="yes"/> | ||||
|     <groupgraph visible="$GROUP_GRAPHS"/> | ||||
|     <memberdecl> | ||||
|       <nestedgroups visible="yes" title=""/> | ||||
|       <dirs visible="yes" title=""/> | ||||
|       <files visible="yes" title=""/> | ||||
|       <namespaces visible="yes" title=""/> | ||||
|       <classes visible="yes" title=""/> | ||||
|       <defines title=""/> | ||||
|       <typedefs title=""/> | ||||
|       <sequences title=""/> | ||||
|       <dictionaries title=""/> | ||||
|       <enums title=""/> | ||||
|       <enumvalues title=""/> | ||||
|       <functions title=""/> | ||||
|       <variables title=""/> | ||||
|       <signals title=""/> | ||||
|       <publicslots title=""/> | ||||
|       <protectedslots title=""/> | ||||
|       <privateslots title=""/> | ||||
|       <events title=""/> | ||||
|       <properties title=""/> | ||||
|       <friends title=""/> | ||||
|       <membergroups visible="yes"/> | ||||
|     </memberdecl> | ||||
|     <detaileddescription title=""/> | ||||
|     <memberdef> | ||||
|       <pagedocs/> | ||||
|       <inlineclasses title=""/> | ||||
|       <defines title=""/> | ||||
|       <typedefs title=""/> | ||||
|       <sequences title=""/> | ||||
|       <dictionaries title=""/> | ||||
|       <enums title=""/> | ||||
|       <enumvalues title=""/> | ||||
|       <functions title=""/> | ||||
|       <variables title=""/> | ||||
|       <signals title=""/> | ||||
|       <publicslots title=""/> | ||||
|       <protectedslots title=""/> | ||||
|       <privateslots title=""/> | ||||
|       <events title=""/> | ||||
|       <properties title=""/> | ||||
|       <friends title=""/> | ||||
|     </memberdef> | ||||
|     <authorsection visible="yes"/> | ||||
|   </group> | ||||
|  | ||||
|   <!-- Layout definition for a directory page --> | ||||
|   <directory> | ||||
|     <briefdescription visible="yes"/> | ||||
|     <directorygraph visible="yes"/> | ||||
|     <memberdecl> | ||||
|       <dirs visible="yes"/> | ||||
|       <files visible="yes"/> | ||||
|     </memberdecl> | ||||
|     <detaileddescription title=""/> | ||||
|   </directory> | ||||
| </doxygenlayout> | ||||
							
								
								
									
										1
									
								
								api_docx/NEWS.md
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								api_docx/NEWS.md
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | ||||
| ../NEWS | ||||
							
								
								
									
										23
									
								
								api_docx/build_docs.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										23
									
								
								api_docx/build_docs.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| set -e | ||||
|  | ||||
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||||
| echo "DIR = $DIR" | ||||
|  | ||||
| ROOT="$(dirname "$DIR")" | ||||
| echo "ROOT = $ROOT" | ||||
|  | ||||
| echo "### cleanup $ROOT/temp-man-pages" | ||||
| rm -f -r $ROOT/temp-man-pages | ||||
|  | ||||
| mkdir $ROOT/temp-man-pages | ||||
|  | ||||
| echo "### create man pages" | ||||
| which python3 | ||||
| python3 $ROOT/api_docx/pre_build.py | ||||
|  | ||||
| echo "### doxygen version" | ||||
| doxygen -v | ||||
|  | ||||
| doxygen $ROOT/api_docx/doxygen.conf | ||||
							
								
								
									
										1408
									
								
								api_docx/custom.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1408
									
								
								api_docx/custom.css
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										7
									
								
								api_docx/custom.css.map
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								api_docx/custom.css.map
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1773
									
								
								api_docx/custom.scss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1773
									
								
								api_docx/custom.scss
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										2580
									
								
								api_docx/doxygen.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2580
									
								
								api_docx/doxygen.conf
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								api_docx/mdb-tools-logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								api_docx/mdb-tools-logo.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 3.1 KiB | 
							
								
								
									
										38
									
								
								api_docx/pre_build.py
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										38
									
								
								api_docx/pre_build.py
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| #!/usr/bin/env python3 | ||||
| # -*- coding: utf-8 -*- | ||||
|  | ||||
| import os | ||||
|  | ||||
| ROOT_PATH = os.path.abspath( os.path.join(os.path.dirname( __file__ ), "..")) | ||||
|  | ||||
|  | ||||
| files = os.listdir(os.path.join(ROOT_PATH, "doc")) | ||||
|  | ||||
| index = [] | ||||
| for fname in sorted(files): | ||||
|     if not fname.endswith(".txt"): | ||||
|         continue | ||||
|     cmd_name = fname[:-4] | ||||
|     with open(os.path.join(ROOT_PATH, "doc", fname), "r") as f: | ||||
|         contents = f.read() | ||||
|         f.close() | ||||
|  | ||||
|     out_file = os.path.join(ROOT_PATH, "temp-man-pages", "%s.md" % cmd_name) | ||||
|     with open(out_file, "w") as f: | ||||
|         s = "# %s {#%s}\n\n```\n%s\n```\n" % (cmd_name, cmd_name, contents) | ||||
|         f.write(s) | ||||
|         f.close() | ||||
|         index.append(cmd_name) | ||||
|     print(" wrote %s" % out_file) | ||||
|  | ||||
| out_file = os.path.join(ROOT_PATH, "temp-man-pages", "index.md") | ||||
|  | ||||
| s =  "Man Pages {#man-pages}\n" | ||||
| s += "=========================\n\n" | ||||
| for page in index: | ||||
|     s += "- @subpage %s\n" % page | ||||
| s += "\n" | ||||
|  | ||||
| with open(out_file, "w") as f: | ||||
|     f.write(s) | ||||
|     f.close() | ||||
| @@ -48,6 +48,10 @@ | ||||
| #include <io.h> | ||||
| #endif | ||||
|  | ||||
| /** \addtogroup mdbtools | ||||
|  *  @{ | ||||
|  */ | ||||
|  | ||||
| #define MDB_DEBUG 0 | ||||
|  | ||||
| #define MDB_PGSIZE 4096 | ||||
| @@ -636,6 +640,8 @@ void mdb_iconv_init(MdbHandle *mdb); | ||||
| void mdb_iconv_close(MdbHandle *mdb); | ||||
| const char* mdb_target_charset(MdbHandle *mdb); | ||||
|  | ||||
| /** @}*/ | ||||
|  | ||||
| #ifdef __cplusplus | ||||
|   } | ||||
| #endif | ||||
|   | ||||
| @@ -13,6 +13,10 @@ | ||||
| #include <ctype.h> | ||||
| #include <string.h> | ||||
|  | ||||
| /** \addtogroup mdb-dump | ||||
|  *  @{ | ||||
|  */ | ||||
|  | ||||
| int main(int argc, char **argv) | ||||
| { | ||||
|    unsigned long        i=0; | ||||
| @@ -85,3 +89,4 @@ int main(int argc, char **argv) | ||||
|    exit(0); | ||||
| }  | ||||
|  | ||||
| /** @}*/ | ||||
| @@ -21,15 +21,15 @@ | ||||
| #include "mdbtools.h" | ||||
|  | ||||
| /** | ||||
|  * mdb_like_cmp | ||||
|  * @s: String to search within. | ||||
|  * @r: Search pattern. | ||||
|  * | ||||
|  * @param s: String to search within. | ||||
|  * @param r: Search pattern. | ||||
|  * | ||||
|  * Tests the string @s to see if it matches the search pattern @r.  In the | ||||
|  * search pattern, a percent sign indicates matching on any number of | ||||
|  * characters, and an underscore indicates matching any single character. | ||||
|  * | ||||
|  * Returns: 1 if the string matches, 0 if the string does not match. | ||||
|  * @Returns: 1 if the string matches, 0 if the string does not match. | ||||
|  */ | ||||
| int mdb_like_cmp(char *s, char *r) | ||||
| { | ||||
|   | ||||
| @@ -19,10 +19,9 @@ | ||||
| #include "mdbtools.h" | ||||
|  | ||||
| /** | ||||
|  * mdb_stats_on: | ||||
|  * @mdb: Handle to the (open) MDB file to collect stats on. | ||||
|  * @brief Begins collection of statistics on an MDBHandle. | ||||
|  * @param mdb: Handle to the (open) MDB file to collect stats on. | ||||
|  * | ||||
|  * Begins collection of statistics on an MDBHandle. | ||||
|  * | ||||
|  * Statistics in LibMDB will track the number of reads from the MDB file.  The | ||||
|  * collection of statistics is started and stopped with the mdb_stats_on and | ||||
| @@ -39,13 +38,12 @@ mdb_stats_on(MdbHandle *mdb) | ||||
| 	mdb->stats->collect = TRUE; | ||||
| } | ||||
| /** | ||||
|  * mdb_stats_off: | ||||
|  * @mdb: pointer to handle of MDB file with active stats collection. | ||||
|  * @brief Turns off statistics collection. | ||||
|  * @param mdb: pointer to handle of MDB file with active stats collection. | ||||
|  * | ||||
|  * Turns off statistics collection. | ||||
|  * | ||||
|  * If mdb_stats_off is not called, statistics will be turned off when handle | ||||
|  * is freed using mdb_close. | ||||
|  * If mdb_stats_off() is not called, statistics will be turned off when handle | ||||
|  * is freed using mdb_close(). | ||||
|  **/ | ||||
| void | ||||
| mdb_stats_off(MdbHandle *mdb) | ||||
| @@ -55,10 +53,10 @@ mdb_stats_off(MdbHandle *mdb) | ||||
| 	mdb->stats->collect = FALSE; | ||||
| } | ||||
| /** | ||||
|  * mdb_dump_stats: | ||||
|  * @mdb: pointer to handle of MDB file with active stats collection. | ||||
|  * @brief Dumps current statistics to stdout. | ||||
|  * @param mdb: pointer to handle of MDB file with active stats collection. | ||||
|  * | ||||
|  * | ||||
|  * Dumps current statistics to stdout. | ||||
|  **/ | ||||
| void | ||||
| mdb_dump_stats(MdbHandle *mdb) | ||||
|   | ||||
| @@ -154,14 +154,13 @@ mdb_crack_row3(MdbHandle *mdb, unsigned int row_start, unsigned int row_end, | ||||
|     return 1; | ||||
| } | ||||
| /** | ||||
|  * mdb_crack_row: | ||||
|  * @table: Table that the row belongs to | ||||
|  * @row_start: offset to start of row on current page | ||||
|  * @row_end: offset to end of row on current page | ||||
|  * @fields: pointer to MdbField array to be populated by mdb_crack_row | ||||
|  * @brief Cracks a row buffer apart into its component fields. | ||||
|  * @param table: Table that the row belongs to | ||||
|  * @param row_start: offset to start of row on current page | ||||
|  * @param row_size: offset to end of row on current page | ||||
|  * @param fields: pointer to MdbField array to be populated by mdb_crack_row | ||||
|  * | ||||
|  * | ||||
|  * Cracks a row buffer apart into its component fields.   | ||||
|  *  | ||||
|  * A row buffer is that portion of a data page which contains the values for | ||||
|  * that row.  Its beginning and end can be found in the row offset table. | ||||
|  * | ||||
| @@ -172,7 +171,7 @@ mdb_crack_row3(MdbHandle *mdb, unsigned int row_start, unsigned int row_end, | ||||
|  * This routine is mostly used internally by mdb_fetch_row() but may have some | ||||
|  * applicability for advanced application programs. | ||||
|  * | ||||
|  * Return value: number of fields present, or -1 if the buffer is invalid. | ||||
|  * @return: number of fields present, or -1 if the buffer is invalid. | ||||
|  */ | ||||
| int | ||||
| mdb_crack_row(MdbTableDef *table, int row_start, size_t row_size, MdbField *fields) | ||||
| @@ -743,10 +742,12 @@ mdb_update_row(MdbTableDef *table) | ||||
| 	return 0; /* FIXME */ | ||||
| } | ||||
|  | ||||
| /* WARNING the return code is opposite to convention used elsewhere: | ||||
|  * returns 0 on success | ||||
|  * returns 1 on failure | ||||
|  * This might change on next ABI break. | ||||
| /** | ||||
|  * \warning the return code is opposite to convention used elsewhere: | ||||
|  * @return: | ||||
|  *       - 0 on success | ||||
|  *       - 1 on failure | ||||
|  * \note This might change on next ABI break. | ||||
|  */ | ||||
| int  | ||||
| mdb_replace_row(MdbTableDef *table, int row, void *new_row, int new_row_size) | ||||
|   | ||||
| @@ -30,6 +30,11 @@ | ||||
| #endif | ||||
| #include "connectparams.h" | ||||
|  | ||||
|  | ||||
| /** \addtogroup odbc | ||||
|  *  @{ | ||||
|  */ | ||||
|  | ||||
| /* | ||||
|  *  * Last resort place to check for INI file. This is usually set at compile time | ||||
|  *   * by build scripts. | ||||
| @@ -312,3 +317,4 @@ ODBCINSTGetProperties(HODBCINSTPROPERTY hLastProperty) | ||||
| } | ||||
|  | ||||
| #endif | ||||
| /** @}*/ | ||||
| @@ -25,6 +25,10 @@ | ||||
| #include <mdbfakeglib.h> | ||||
| #endif | ||||
|  | ||||
| /** \addtogroup odbc | ||||
|  *  @{ | ||||
|  */ | ||||
|  | ||||
| typedef struct | ||||
| { | ||||
|    GString* dsnName; | ||||
| @@ -44,3 +48,4 @@ gchar*   ExtractDSN (ConnectParams* params, const gchar* connectString); | ||||
| gchar*   ExtractDBQ (ConnectParams* params, const gchar* connectString); | ||||
|  | ||||
| #endif | ||||
| /** @}*/ | ||||
| @@ -35,6 +35,10 @@ | ||||
| extern "C" { | ||||
| #endif | ||||
|  | ||||
| /** \addtogroup odbc | ||||
|  *  @{ | ||||
|  */ | ||||
|  | ||||
| struct _henv { | ||||
| 	GPtrArray *connections; | ||||
|     char sqlState[6]; | ||||
| @@ -81,3 +85,4 @@ struct _sql_bind_info { | ||||
| } | ||||
| #endif | ||||
| #endif | ||||
| /** @}*/ | ||||
| @@ -28,6 +28,10 @@ | ||||
| #include <limits.h> | ||||
| #include "mdbodbc.h" | ||||
|  | ||||
| /** \addtogroup odbc | ||||
|  *  @{ | ||||
|  */ | ||||
|  | ||||
| //#define TRACE(x) fprintf(stderr,"Function %s\n", x); | ||||
| #define TRACE(x) | ||||
|  | ||||
| @@ -2375,3 +2379,4 @@ static const char * _odbc_get_client_type_name(MdbColumn *col) | ||||
| 	return NULL; | ||||
| } | ||||
|  | ||||
| /** @}*/ | ||||
| @@ -32,6 +32,10 @@ | ||||
|  | ||||
| #include <locale.h> | ||||
|  | ||||
| /** \addtogroup mdbsql | ||||
|  *  @{ | ||||
|  */ | ||||
|  | ||||
| /* Prevent warnings from -Wmissing-prototypes.  */ | ||||
| #ifdef YYPARSE_PARAM | ||||
| #if defined __STDC__ || defined __cplusplus | ||||
| @@ -81,13 +85,13 @@ MdbSQL *sql = g_malloc0(sizeof(MdbSQL)); | ||||
| #endif | ||||
|  | ||||
| /** | ||||
|  * mdb_sql_run_query: | ||||
|  * @sql: MDB SQL object to execute the query on. | ||||
|  * @querystr: SQL query string to execute. | ||||
|  * | ||||
|  * Parses @querystr and executes it within the given @sql object. | ||||
|  * @param sql: MdbSQL object to execute the query on. | ||||
|  * @param querystr: SQL query string to execute. | ||||
|  * | ||||
|  * Returns: the updated MDB SQL object, or NULL on error | ||||
|  * Parses \p querystr and executes it within the given \p sql object. | ||||
|  * | ||||
|  * @return  the updated MDB SQL object, or NULL on error | ||||
|  **/ | ||||
| MdbSQL* | ||||
| mdb_sql_run_query (MdbSQL* sql, const gchar* querystr) { | ||||
| @@ -980,3 +984,4 @@ mdb_sql_dump_results(MdbSQL *sql) | ||||
| 	/* the column and table names are no good now */ | ||||
| 	mdb_sql_reset(sql); | ||||
| } | ||||
| /** @}*/ | ||||
		Reference in New Issue
	
	Block a user
	 pedromorgan
					pedromorgan