You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Alan Francis 43da439261 add a readme 1 year ago
containers remove some noise 1 year ago
cregex Bit of a mess but it correctly parses and doesnt leak 1 year ago
testapp read via a BPTR 1 year ago
.gitignore Initial Commit 1 year ago
README add a readme 1 year ago
configfile.c save original vs save a copy 1 year ago
configfile.h save original vs save a copy 1 year ago
configmodel.c move the key splitting to somewhere more private 1 year ago
configmodel.h move the key splitting to somewhere more private 1 year ago
containerkit.library local copy of the library 1 year ago
main.c save original vs save a copy 1 year ago
sectionstore.c move the key splitting to somewhere more private 1 year ago
sectionstore.h get subsections 1 year ago
smakefile join all the .o files, not the sub libraries 1 year ago
testconfig.cfg replace all works 1 year ago
types.h make configfile.h a self container public header 1 year ago

README

A pretty straight translation from the ruby code in the jcoglan book.

This code allows you to read and write a single gitconfig file.

Its a bit nasty as theres lots of string manipulation and the whole
idea of a key (foo.bar.baz) being split into [foo "bar"] with a baz
variable and back again is all string heavy. Also I had to create
the various containers to allow for string arrays. Sections are
stored in an array and a map because a map wont free the sections
but a section will etc etc.

ANyhoo, the smakefile creates a configreader binary that you can ignore
its just a fake testharness. The real outputs are configfile.lib and
configfile.h which I copied into AmigaGit.

Over time we can improve or replace this code without cluttering up the
AmigaGit codebase too much. Maybe building various parts of git in libs
might make some encapsulation sense :-)

I still have to make a makefile so this lib can build for vbcc. For the moment the
VBCC build of AmigaGit is broken as VBCC doesnt like the SAS-built lib.