diff options
author | KUDr <kudr@openttd.org> | 2006-05-27 16:12:16 +0000 |
---|---|---|
committer | KUDr <kudr@openttd.org> | 2006-05-27 16:12:16 +0000 |
commit | 5e73dce0e71791b87e5b096a890578eefcc26639 (patch) | |
tree | e4580db6e03032a997fce1392929b7190dc3b03d /strgen | |
parent | 3d01010440440cfbffd1e5d3b0cf1f23f0503a76 (diff) | |
download | openttd-5e73dce0e71791b87e5b096a890578eefcc26639.tar.xz |
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
Diffstat (limited to 'strgen')
-rw-r--r-- | strgen/strgen.c | 11 | ||||
-rw-r--r-- | strgen/strgen_vs80.vcproj | 121 |
2 files changed, 129 insertions, 3 deletions
diff --git a/strgen/strgen.c b/strgen/strgen.c index f37121108..828f6e2e5 100644 --- a/strgen/strgen.c +++ b/strgen/strgen.c @@ -149,6 +149,11 @@ static LangString *HashFind(const char *s) return NULL; } +#ifdef _MSC_VER +# define LINE_NUM_FMT "(%d)" +#else +# define LINE_NUM_FMT ":%d" +#endif static void CDECL Warning(const char *s, ...) { @@ -157,7 +162,7 @@ static void CDECL Warning(const char *s, ...) va_start(va, s); vsprintf(buf, s, va); va_end(va); - fprintf(stderr, "%s:%d: Warning: %s\n", _file, _cur_line, buf); + fprintf(stderr, "%s" LINE_NUM_FMT ": Warning: %s\n", _file, _cur_line, buf); _warnings++; } @@ -169,7 +174,7 @@ static void CDECL Error(const char *s, ...) va_start(va, s); vsprintf(buf, s, va); va_end(va); - fprintf(stderr, "%s:%d: Error: %s\n", _file, _cur_line, buf); + fprintf(stderr, "%s" LINE_NUM_FMT ": Error: %s\n", _file, _cur_line, buf); _errors++; } @@ -181,7 +186,7 @@ static void NORETURN CDECL Fatal(const char *s, ...) va_start(va, s); vsprintf(buf, s, va); va_end(va); - fprintf(stderr, "%s:%d: FATAL: %s\n", _file, _cur_line, buf); + fprintf(stderr, "%s" LINE_NUM_FMT ": FATAL: %s\n", _file, _cur_line, buf); exit(1); } diff --git a/strgen/strgen_vs80.vcproj b/strgen/strgen_vs80.vcproj new file mode 100644 index 000000000..d256297c4 --- /dev/null +++ b/strgen/strgen_vs80.vcproj @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="strgen"
+ ProjectGUID="{DFCBA918-FCBD-43E1-B9E6-517EA39F9042}"
+ RootNamespace="strgen_vs80"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\Debug"
+ IntermediateDirectory="..\..\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TypeLibraryName=".\Debug/strgen.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ PrecompiledHeaderFile="..\..\Debug/strgen.pch"
+ AssemblerListingLocation="..\..\Debug/"
+ ObjectFile="..\..\Debug/"
+ ProgramDataBaseFileName="..\..\Debug/"
+ WarningLevel="3"
+ WarnAsError="true"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1053"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="Debug/strgen.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="..\..\Debug/strgen.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="strgen.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
|