From 299be1bf845cfff02c52633a2bcf3385c2e672b3 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 22 Oct 2024 17:40:23 +0200 Subject: [PATCH] move configuration from ~/.x49gp/ to ~/.config/x49gp/ --- README.md | 2 +- dist/x49gp.man.in | 4 ++-- src/main.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b47d48e..e65917d 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ Start Over: * clean slate? ``` -rm -r ~/.x49gp +rm -r ~/.config/x49gp ``` * soft reset only? diff --git a/dist/x49gp.man.in b/dist/x49gp.man.in index 491118f..e9cefcb 100644 --- a/dist/x49gp.man.in +++ b/dist/x49gp.man.in @@ -178,7 +178,7 @@ as the configuration file instead of the default one. See below for details on t .El .Sh FILES .Bl -tag -width indent -.It Sy ~/. Ns Nm Ns Sy /config +.It Sy ~/.config/ Ns Nm Ns Sy /config The default location for the configuration file. The file format is the INI-like .Dq key-file format defined by GLib. The configuration file stores, for the most part, the state of the calculator's hardware, excluding the memory. The peripherals' official names according the the S3C2410 datasheet are used as section names with the prefix @@ -214,4 +214,4 @@ The default name of the file backing the SRAM memory; required size: 512 KiB. The default name of the file backing the S3C2410's internal SRAM memory; required size: 4 KiB. .El .Sh CAVEATS -The emulation of the calculators' hardware is not fully accurate. Most notably, emulation speed is not authentic (it depends on the host's capabilites), and communication ports (serial, infrared, USB) are not available. For most purposes this is good enough, though. \ No newline at end of file +The emulation of the calculators' hardware is not fully accurate. Most notably, emulation speed is not authentic (it depends on the host's capabilites), and communication ports (serial, infrared, USB) are not available. For most purposes this is good enough, though. diff --git a/src/main.c b/src/main.c index 1502e5c..894a139 100644 --- a/src/main.c +++ b/src/main.c @@ -653,10 +653,10 @@ main(int argc, char **argv) } if (opt.config == NULL) { - char config_dir[strlen(progname) + 2]; + char config_dir[strlen(progname) + 9]; home = g_get_home_dir(); - sprintf(config_dir, ".%s", progname); + sprintf(config_dir, ".config/%s", progname); opt.config = g_build_filename(home, config_dir, "config", NULL); }