Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open-RJ

Small C library for reading Record-JAR (openrj) databases.

C License GitHub release Last Commit CI

Table of Contents

Introduction

Open-RJ reads Record-JAR databases: text files (or in-memory buffers) of records separated by %% lines, each record holding name: value fields. Continuation lines, comments, field aliases, and ordered/case-insensitive lookup are supported by the C API.

This tree is the C base of the Open-RJ family (recovered from the historical Open-RJ 1.6.4 line). C++ / STL mappings and language bindings are separate follow-on work.

Dependencies

Component Implemented in Use in Dependencies
Core library C C — via openrj/openrj.h <none>
Examples C - <none>
Unit tests C - STLSoft, xTests

Installation

Detailed instructions — via CMake or bundling — are provided in INSTALL.md.

Components

The public C API is declared in openrj/openrj.h:

API Purpose
ORJ_ReadDatabaseA() Load a Record-JAR from a file path
ORJ_CreateDatabaseFromMemoryA() Load a Record-JAR from a memory buffer
ORJ_FreeDatabaseA() Release a database
ORJ_Database_GetNumRecordsA() / …FieldsA() / …LinesA() Database metrics
ORJ_Database_GetRecordA() Obtain a record by index
ORJ_Record_GetFieldA() / ORJ_Record_FindFieldByNameA() Field access
ORJ_GetErrorStringA() / ORJ_GetParseErrorStringA() Error messaging

Examples

Eight C examples under examples/c/ exercise memory databases, field enumeration, flags, and lookups. Build them with CMake (BUILD_EXAMPLES=ON, the default) and run via run_all_examples.sh.

Project Information

Where to get help

GitHub Issues

Contribution guidelines

Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/openrj.

Dependencies

The Open-RJ C core has no non-standard dependencies.

Unit-tests depend on STLSoft (≥ 1.11) and xTests (≥ 0.26), and optionally shwild.

Related projects

  • FastFormat — includes an Open-RJ bundle inserter historically;
  • Planned: Open-RJ C++ / STL mappings, and a Rust record-jar crate;

License

Open-RJ is released under the BSD 3-Clause license.

About

An open-source library that implements readers of the Record-Jar structured text file format, in C with a C++ API

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages