commit 4de8e2182c447e4635fb977a2b95976b8f82e5d4 from: Oliver Lowe date: Sat Nov 29 01:31:16 2025 UTC Remove unused DEV_STANDALONE macro Can't quite work out what this was for but never set or documented anywhere so meh commit - 30d1a28ae115c9aa91c308768e9e392fd71b481c commit + 4de8e2182c447e4635fb977a2b95976b8f82e5d4 blob - ad2cea13b4e15ca1b56cb44e4ed26af80929e902 blob + ec36c5d389ca2ed04cec9f51ae8c9ab7cc153822 --- src/addrbook.c +++ 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, g 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, g 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("\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, "\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, g 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; blob - 45696c111fc8bd8b0e7013a82bfd6a681838d355 blob + 43b567f55d2cb8df72ad72c4b135791691652c7f --- src/addrindex.c +++ 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 *addrIn 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( "\n", fp ); -#else pfile = prefs_write_open( fileSpec ); g_free( fileSpec ); if( pfile ) { fp = pfile->fp; if (fprintf( fp, "\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)