26 June 2023, 01:14 | #1 |
Registered User
Join Date: May 2023
Location: Christchurch, New Zealand
Posts: 33
|
Configuration Filles
Without trying to re-re-re-invent a wheel that has likely more wheels than an 18 wheeler by now, what would people suggest I use?
As far as I know the Amiga never really had a common default (official) tool to read/write configuration files, I did some recon on google/aminet found Config101.lha / libconfig.lha not really sure either of them fit my use case, ideally I'd like PureBasic preferences library but I'm not coding in PureBasic but in C code, mainly due to my code being open source and PureBasic being paid software. |
26 June 2023, 09:10 | #2 |
Registered User
Join Date: Apr 2023
Location: Washington/USA
Posts: 35
|
Your question is quite relatable! I've faced similar predicaments while working with the Amiga and C code.
From what I can gather, you're essentially looking for a configuration library that's easy to use and open source, much like PureBasic, but compatible with C code. I recommend checking out 'libconfig'. It's a simple C library for processing structured configuration files, like INI and .conf. It's open-source and pretty flexible. However, if you've already checked it and it doesn't quite fit, have you looked into 'inih' (INI Not Invented Here)? It's a small and simple INI file parser written in C. It's extremely lightweight and open-source too! |
26 June 2023, 09:40 | #3 | |
Registered User
Join Date: May 2023
Location: Christchurch, New Zealand
Posts: 33
|
Quote:
https://aminet.net/package/dev/c/iniparser is even just plugin and use, oddly I trust gcc on linux 100% on AmigaOS yeah I'll take a pass and use SAS/C which I have used for years, even if it's documentation is somewhat spars, iniparser comes with a .lib I'm yet to try and put in my lib: folder to see if it just works, I know the example code doesn't compile at all. |
|
26 June 2023, 16:36 | #4 |
Registered User
Join Date: Apr 2023
Location: Washington/USA
Posts: 35
|
Ah, the joys of configuration files and C coding on AmigaOS! I've been there. If you're already comfortable with SAS/C, it makes sense to stick with it, even if the documentation can be a little sparse.
Iniparser is a decent choice, but it sounds like you're running into some issues. If the provided .lib isn't working out of the box, it might be worth trying to compile the library from source with your SAS/C setup. Also, have you tried reaching out to the maintainer of the iniparser package on aminet? They might have some insight on how to make it play nice with SAS/C. |
26 June 2023, 18:39 | #5 |
Amigan
Join Date: Feb 2012
Location: London
Posts: 1,311
|
Some applications use ReadArgs() to process configuration files.
Roadshow for example. |
04 July 2023, 18:03 | #6 |
Registered User
Join Date: May 2023
Location: Christchurch, New Zealand
Posts: 33
|
I ended up using;
Config 1.01 (29.5.96) by Adam Dawes Which got FSUAE-DropDisk humming along nice, "he says" -- as the "FS-UAE Amiga 500" crashes on a music disk demo adf he loaded on his 2nd screen.. {BUT THAT'S NOT MY FAULT!} |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
what configuration? | Leaomarcos | support.WinUAE | 2 | 22 May 2018 06:07 |
What do you think about this display configuration ? | 21stcentury | support.WinUAE | 4 | 23 May 2017 13:32 |
Eagleplayer Configuration | Npl | support.Apps | 5 | 19 October 2009 21:37 |
Configuration | Janne | support.WinUAE | 4 | 06 August 2005 11:16 |
Configuration for Unreal | Tim Janssen | support.Games | 12 | 14 February 2002 16:27 |
|
|