From 5d2c2b27a6323e2666378b986129b2a7c2c39e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 6 Feb 2022 16:04:24 +0100 Subject: New upstream version 5.2.2GA --- app/bin/custom.c | 50 +++++++++++++++++--------------------------------- 1 file changed, 17 insertions(+), 33 deletions(-) (limited to 'app/bin/custom.c') diff --git a/app/bin/custom.c b/app/bin/custom.c index 68a996b..1ec38e0 100644 --- a/app/bin/custom.c +++ b/app/bin/custom.c @@ -1,6 +1,6 @@ #define RENAME_H /** \file custom.c - * + * */ /* XTrkCad - Model Railroad CAD @@ -21,30 +21,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -#include -#ifndef WINDOWS -#include -#include -#endif -#include -#include -#include -#include -#ifdef WINDOWS -#include -#include -#else -#include -#endif -#include -#include - #include "cjoin.h" #include "common.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "misc.h" #include "track.h" #include "version.h" @@ -81,6 +61,7 @@ char * sSaveFilePattern = NULL; char * sImageFilePattern = NULL; char * sImportFilePattern = NULL; char * sDXFFilePattern = NULL; +char * sSVGFilePattern = NULL; char * sRecordFilePattern = NULL; char * sNoteFilePattern = NULL; char * sLogFilePattern = NULL; @@ -91,7 +72,6 @@ int iParamVersion = PARAMVERSION; int iMinParamVersion = MINPARAMVERSION; long lParamKey = PARAMKEY; -extern char *userLocale; EXPORT char * MakeWindowTitle( char * name ) { @@ -106,7 +86,7 @@ void InitCmdEasement( void ) { easementP = EasementInit(); } -void DoEasementRedir( void ) +void DoEasementRedir( void * unused ) { if (easementP) easementP(NULL); @@ -139,7 +119,7 @@ BOOL_T Initialize( void ) InitTrkStruct(); InitTrkText(); InitTrkDraw(); - + InitTrkBlock(); InitTrkSwitchMotor(); InitTrkSignal(); @@ -149,12 +129,12 @@ BOOL_T Initialize( void ) InitCmdNote(); memset( message, 0, sizeof message ); - + return TRUE; } /** - * Initialize siome localized strings for filename patterns etc. + * Initialize siome localized strings for filename patterns etc. */ void InitCustom( void ) @@ -177,9 +157,9 @@ void InitCustom( void ) sprintf(buf, _("All %s Files (*.xtc,*.xtce)|*.xtc;*.xtce|" "%s Trackplan (*.xtc)|*.xtc|" "%s Extended Trackplan (*.xtce)|*.xtce|" - "All Files (*)|*"), + "All Files (*)|*"), + Product, Product, - Product, Product ); sSourceFilePattern = strdup(buf); } @@ -206,6 +186,11 @@ void InitCustom( void ) { sDXFFilePattern = strdup(_("Data Exchange Format Files (*.dxf)|*.dxf")); } + if (sSVGFilePattern == NULL) + { + sSVGFilePattern = strdup(_("Scalable Vector Graphics Format Files (*.svg)|*.svg" )); + } + if (sRecordFilePattern == NULL) { sprintf(buf, _("%s Record Files (*.xtr)|*.xtr"), Product); @@ -259,6 +244,10 @@ void CleanupCustom( void ) free(sDXFFilePattern); sDXFFilePattern = NULL; } + if (sSVGFilePattern) { + free(sSVGFilePattern); + sSVGFilePattern = NULL; + } if (sRecordFilePattern) { free(sRecordFilePattern); @@ -279,9 +268,4 @@ void CleanupCustom( void ) free(sPartsListFilePattern); sPartsListFilePattern = NULL; } - if (userLocale) - { - free(userLocale); - userLocale = NULL; - } } -- cgit v1.2.3