commit 4de8e2182c447e4635fb977a2b95976b8f82e5d4
parent 30d1a28ae115c9aa91c308768e9e392fd71b481c
Author: Oliver Lowe <o@olowe.co>
Date: Sat, 29 Nov 2025 12:31:16 +1100
Remove unused DEV_STANDALONE macro
Can't quite work out what this was for but never set or documented
anywhere so meh
Diffstat:
2 files changed, 0 insertions(+), 29 deletions(-)
diff --git a/src/addrbook.c b/src/addrbook.c
@@ -34,10 +34,8 @@
#include "adbookbase.h"
#include "file-utils.h"
-#ifndef DEV_STANDALONE
#include "prefs_gtk.h"
#include "codeconv.h"
-#endif
#define ADDRBOOK_MAX_SEARCH_COUNT 1000
#define ADDRBOOK_PREFIX "addrbook-"
@@ -1266,9 +1264,7 @@ static gint addrbook_write_to(AddressBookFile *book, gchar *newFile)
FILE *fp;
gchar *fileSpec;
HashLoopData data;
-#ifndef DEV_STANDALONE
PrefFile *pfile;
-#endif
cm_return_val_if_fail(book != NULL, -1);
cm_return_val_if_fail(newFile != NULL, -1);
@@ -1276,22 +1272,12 @@ static gint addrbook_write_to(AddressBookFile *book, gchar *newFile)
fileSpec = g_strconcat(book->path, G_DIR_SEPARATOR_S, newFile, NULL);
book->retVal = MGU_OPEN_FILE;
-#ifdef DEV_STANDALONE
- fp = g_fopen(fileSpec, "wb");
- g_free(fileSpec);
- if (fp) {
- if (fputs("<?xml version=\"1.0\" ?>\n", fp) == EOF) {
- book->retVal = MGU_ERROR_WRITE;
- return book->retVal;
- }
-#else
pfile = prefs_write_open(fileSpec);
g_free(fileSpec);
if (pfile) {
fp = pfile->fp;
if (fprintf( fp, "<?xml version=\"1.0\" encoding=\"%s\" ?>\n", CS_INTERNAL ) < 0)
goto fail;
-#endif
if (addrbook_write_elem_s(fp, 0, AB_ELTAG_ADDRESS_BOOK) < 0)
goto fail;
if (addrbook_write_attr(fp, AB_ATTAG_NAME,
@@ -1327,12 +1313,8 @@ static gint addrbook_write_to(AddressBookFile *book, gchar *newFile)
goto fail;
book->retVal = MGU_SUCCESS;
-#ifdef DEV_STANDALONE
- fclose(fp);
-#else
if (prefs_file_close( pfile ) < 0)
book->retVal = MGU_ERROR_WRITE;
-#endif
}
fileSpec = NULL;
diff --git a/src/addrindex.c b/src/addrindex.c
@@ -35,10 +35,8 @@
#include "passwordstore.h"
#include "file-utils.h"
-#ifndef DEV_STANDALONE
#include "prefs_gtk.h"
#include "codeconv.h"
-#endif
#define TAG_ADDRESS_INDEX "addressbook"
@@ -1019,27 +1017,18 @@ static int addrindex_write_index( AddressIndex *addrIndex, FILE *fp ) {
static gint addrindex_write_to( AddressIndex *addrIndex, const gchar *newFile ) {
FILE *fp;
gchar *fileSpec;
-#ifndef DEV_STANDALONE
PrefFile *pfile;
-#endif
cm_return_val_if_fail( addrIndex != NULL, -1 );
fileSpec = g_strconcat( addrIndex->filePath, G_DIR_SEPARATOR_S, newFile, NULL );
addrIndex->retVal = MGU_OPEN_FILE;
-#ifdef DEV_STANDALONE
- fp = g_fopen( fileSpec, "wb" );
- g_free( fileSpec );
- if( fp ) {
- fputs( "<?xml version=\"1.0\" ?>\n", fp );
-#else
pfile = prefs_write_open( fileSpec );
g_free( fileSpec );
if( pfile ) {
fp = pfile->fp;
if (fprintf( fp, "<?xml version=\"1.0\" encoding=\"%s\" ?>\n", CS_INTERNAL ) < 0)
goto fail;
-#endif
if (addrindex_write_elem_s( fp, 0, TAG_ADDRESS_INDEX ) < 0)
goto fail;
if (fputs( ">\n", fp ) == EOF)