From f58b713bd4584ec17b17737b03ae8ebf54fab914 Mon Sep 17 00:00:00 2001 From: nishi Date: Sun, 23 Jun 2024 11:42:19 +0000 Subject: [PATCH] push serbian files git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@420 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- Document/Doxyfile-SR | 37 ++++++++++++++++++++ Document/FORMATv1SR.md | 78 ++++++++++++++++++++++++++++++++++++++++++ Document/Makefile | 5 ++- Document/indexsr.md | 12 +++++++ 4 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 Document/Doxyfile-SR create mode 100644 Document/FORMATv1SR.md create mode 100644 Document/indexsr.md diff --git a/Document/Doxyfile-SR b/Document/Doxyfile-SR new file mode 100644 index 0000000..b7865af --- /dev/null +++ b/Document/Doxyfile-SR @@ -0,0 +1,37 @@ +# $Id$ + +PROJECT_NAME = DataWorks +OUTPUT_DIRECTORY = doc +TAB_SIZE = 8 +OPTIMIZE_OUTPUT_FOR_C = YES +MARKDOWN_SUPPORT = YES +EXTRACT_ALL = NO +FILE_PATTERNS = *.h *.c +INPUT = ../Library +SOURCE_BROWSER = YES +HTML_DYNAMIC_MENUS = YES +GENERATE_TREEVIEW = YES +EXCLUDE_SYMBOLS = __* +FULL_SIDEBAR = NO +DISABLE_INDEX = NO +HAVE_DOT = YES +PROJECT_LOGO = ../Binary/dataworks-white.png +PROJECT_BRIEF = Database Library/Tools +GENERATE_MAN = YES +MAN_OUTPUT = mansr +HTML_OUTPUT = htmlsr +INPUT += indexsr.md +INPUT += FORMATv1SR.md +USE_MDFILE_AS_MAINPAGE = indexsr.md +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = ../Library/ ../ +IMAGE_PATH = .. +ENABLED_SECTIONS = YES +OUTPUT_LANGUAGE = Serbian +GENERATE_LATEX = NO +HTML_EXTRA_STYLESHEET = doxygen-theme/doxygen-awesome.css +HTML_COLORSTYLE = LIGHT + +EXAMPLE_PATH = ../Server ../Client +EXAMPLE_RECURSIVE = YES +EXAMPLE_PATTERNS = *.c diff --git a/Document/FORMATv1SR.md b/Document/FORMATv1SR.md new file mode 100644 index 0000000..a8b0124 --- /dev/null +++ b/Document/FORMATv1SR.md @@ -0,0 +1,78 @@ +# DWF - DataWorks Database Format 1.0 {#FORMATv1} + +DWF is a simple database format designed for DataWorks. + +## Specification + +You SHOULD use `.dwf` for the extension. + +All numbers MUST use big-endian. + +### File structure + +First 3 bytes MUST be 7F 44 57 (\x7F DW) (`signature`) + +Database entry (`dbentry`) MUST be in this format: + +| Name | Size | Type | Info | +| ---- | ---- | ---- | ---- | +| flag | 1 byte | uint8\_t | | +| length | 8 bytes | uint64\_t | Size of the actual data inside | +| size | 8 bytes | uint64\_t | | +| field\_index | 1 byte | uint8\_t | | +| db\_index | 1 byte | uint8\_t | | +| count | 8 bytes | uint64\_t | | +| fragnum | 8 bytes | uint64\_t | | +| data | \[size\] bytes | Binary | | + +and 2 flags for `dbentry`: +| Type | Mask | Info | +| ---- | ---- | ---- | +| Used | 0b10000000 | Flag this if you are using the entry. | +| Fragment | 0b01000000 | Flag this if the entry is fragment. | +| Unset | 0b00100000 | Flag this if the entry is unset. | + +Index entry (`indexentry`) MUST be in this format: +| Name | Size | Type | Info | +| ---- | ---- | ---- | ---- | +| flag | 1 byte | uint8\_t | | +| count | 8 bytes | uint64\_t | | +| dbname\_len | 1 byte | uint8\_t | | +| dbname | 256 bytes | ASCII | | +| fields | 4096 bytes | ASCII | Separate field names using NUL. Put NUL twice on the last field name. Like: `type` `name` `` `type` `name` `` ... `type` `name` `` `` | + +There are 5 types for `indexentry`: +| Type | Character | Type | Info | +| ---- | --------- | ---- | ---- | +| String | `S` | ASCII | | +| Integer | `I` | int64\_t | | +| Floating | `F` | double | | +| Logical | `L` | uint8\_t | 0 for false, other value for true | +| Help | `?` | ASCII | Should be just ignored | + +There is 1 flag for `indexentry`: +| Type | Mask | Info | +| ---- | ---- | ---- | +| Used | 0b10000000 | Flag this if you are using the entry. | + +Info entry (`infoentry`) MUST be in this format: +| Name | Size | Type | Info | +| ---- | ---- | ---- | ---- | +| version | 2 bytes | uint16\_t | MUST be 1 for 1.0 | +| mtime | 8 bytes | int64\_t | Last modified time of the database | + +`infoentry` IS the only thing which SHOULD be compatible in later format. + +File MUST look like this: +| Data | Info | +| ---- | ---- | +| `signature` | | +| `infoentry` | | +| `indexentry` | 1st one | +| `indexentry` | 2nd one | +| ... | | +| `indexentry` | 256th one | +| `dbentry` | 1st one | +| `dbentry` | 2nd one | +| ... | | +| `dbentry` | nth one | diff --git a/Document/Makefile b/Document/Makefile index 7f01818..6efddaa 100644 --- a/Document/Makefile +++ b/Document/Makefile @@ -1,6 +1,6 @@ # $Id$ -.PHONY: all clean document document-jp +.PHONY: all clean document document-jp document-sr all: document README.DOC document: @@ -9,6 +9,9 @@ document: document-jp: doxygen Doxyfile-JP +document-sr: + doxygen Doxyfile-SR + README.DOC: ../Tool/docfmt README.FMT ../Tool/docfmt README.FMT > README.DOC diff --git a/Document/indexsr.md b/Document/indexsr.md new file mode 100644 index 0000000..e312d84 --- /dev/null +++ b/Document/indexsr.md @@ -0,0 +1,12 @@ +# Abstract {#mainpage} + +**DataWorks** is a general-purpose and platform independent database library/client. + +## License + +**DataWorks** is free software, and sources are published under 3-clause BSD License by Crabware. + +Crabware is a software-development division of Hinode Gakuen PC-Club. Contact: Nishi <nishi@nishi.boats> + +@example client.c +@example server.c -- 2.43.0