diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:24 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2022-02-06 16:04:24 +0100 |
commit | 5d2c2b27a6323e2666378b986129b2a7c2c39e5c (patch) | |
tree | ce8982b6c0111f79791068de2c2d4c6ce3138a49 /app/bin/custom.c | |
parent | b623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff) |
New upstream version 5.2.2GAupstream/5.2.2GA
Diffstat (limited to 'app/bin/custom.c')
-rw-r--r-- | app/bin/custom.c | 50 |
1 files changed, 17 insertions, 33 deletions
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 <stdlib.h> -#include <stdio.h> -#ifndef WINDOWS -#include <unistd.h> -#include <dirent.h> -#endif -#include <math.h> -#include <ctype.h> -#include <string.h> -#include <time.h> -#ifdef WINDOWS -#include <io.h> -#include <windows.h> -#else -#include <sys/stat.h> -#endif -#include <stdarg.h> -#include <errno.h> - #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; - } } |