diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/utils/vvis_launcher | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/utils/vvis_launcher')
| -rw-r--r-- | mp/src/utils/vvis_launcher/StdAfx.cpp | 30 | ||||
| -rw-r--r-- | mp/src/utils/vvis_launcher/StdAfx.h | 62 | ||||
| -rw-r--r-- | mp/src/utils/vvis_launcher/vvis_launcher.cpp | 158 | ||||
| -rw-r--r-- | mp/src/utils/vvis_launcher/vvis_launcher.vpc | 92 |
4 files changed, 171 insertions, 171 deletions
diff --git a/mp/src/utils/vvis_launcher/StdAfx.cpp b/mp/src/utils/vvis_launcher/StdAfx.cpp index 4165f58f..37ff27f1 100644 --- a/mp/src/utils/vvis_launcher/StdAfx.cpp +++ b/mp/src/utils/vvis_launcher/StdAfx.cpp @@ -1,15 +1,15 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//
-//=============================================================================//
-// stdafx.cpp : source file that includes just the standard includes
-// vvis_launcher.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +// stdafx.cpp : source file that includes just the standard includes +// vvis_launcher.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/mp/src/utils/vvis_launcher/StdAfx.h b/mp/src/utils/vvis_launcher/StdAfx.h index 8446846d..e67fc75b 100644 --- a/mp/src/utils/vvis_launcher/StdAfx.h +++ b/mp/src/utils/vvis_launcher/StdAfx.h @@ -1,31 +1,31 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//
-//=============================================================================//
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#if !defined(AFX_STDAFX_H__29316173_1244_4B6A_B361_1ADB126E69F2__INCLUDED_)
-#define AFX_STDAFX_H__29316173_1244_4B6A_B361_1ADB126E69F2__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-
-#include <windows.h>
-#include <stdio.h>
-#include "interface.h"
-
-// TODO: reference additional headers your program requires here
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_STDAFX_H__29316173_1244_4B6A_B361_1ADB126E69F2__INCLUDED_)
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__29316173_1244_4B6A_B361_1ADB126E69F2__INCLUDED_) +#define AFX_STDAFX_H__29316173_1244_4B6A_B361_1ADB126E69F2__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +#include <windows.h> +#include <stdio.h> +#include "interface.h" + +// TODO: reference additional headers your program requires here + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__29316173_1244_4B6A_B361_1ADB126E69F2__INCLUDED_) diff --git a/mp/src/utils/vvis_launcher/vvis_launcher.cpp b/mp/src/utils/vvis_launcher/vvis_launcher.cpp index 6d628040..edf03d25 100644 --- a/mp/src/utils/vvis_launcher/vvis_launcher.cpp +++ b/mp/src/utils/vvis_launcher/vvis_launcher.cpp @@ -1,79 +1,79 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//
-//=============================================================================//
-// vvis_launcher.cpp : Defines the entry point for the console application.
-//
-
-#include "stdafx.h"
-#include <direct.h>
-#include "tier1/strtools.h"
-#include "tier0/icommandline.h"
-#include "ilaunchabledll.h"
-
-
-
-char* GetLastErrorString()
-{
- static char err[2048];
-
- LPVOID lpMsgBuf;
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
- (LPTSTR) &lpMsgBuf,
- 0,
- NULL
- );
-
- strncpy( err, (char*)lpMsgBuf, sizeof( err ) );
- LocalFree( lpMsgBuf );
-
- err[ sizeof( err ) - 1 ] = 0;
-
- return err;
-}
-
-
-int main(int argc, char* argv[])
-{
- CommandLine()->CreateCmdLine( argc, argv );
- const char *pDLLName = "vvis_dll.dll";
-
- CSysModule *pModule = Sys_LoadModule( pDLLName );
- if ( !pModule )
- {
- printf( "vvis launcher error: can't load %s\n%s", pDLLName, GetLastErrorString() );
- return 1;
- }
-
- CreateInterfaceFn fn = Sys_GetFactory( pModule );
- if( !fn )
- {
- printf( "vvis launcher error: can't get factory from %s\n", pDLLName );
- Sys_UnloadModule( pModule );
- return 2;
- }
-
- int retCode = 0;
- ILaunchableDLL *pDLL = (ILaunchableDLL*)fn( LAUNCHABLE_DLL_INTERFACE_VERSION, &retCode );
- if( !pDLL )
- {
- printf( "vvis launcher error: can't get IVVisDLL interface from %s\n", pDLLName );
- Sys_UnloadModule( pModule );
- return 3;
- }
-
- pDLL->main( argc, argv );
- Sys_UnloadModule( pModule );
-
- return 0;
-}
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +// vvis_launcher.cpp : Defines the entry point for the console application. +// + +#include "stdafx.h" +#include <direct.h> +#include "tier1/strtools.h" +#include "tier0/icommandline.h" +#include "ilaunchabledll.h" + + + +char* GetLastErrorString() +{ + static char err[2048]; + + LPVOID lpMsgBuf; + FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + GetLastError(), + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language + (LPTSTR) &lpMsgBuf, + 0, + NULL + ); + + strncpy( err, (char*)lpMsgBuf, sizeof( err ) ); + LocalFree( lpMsgBuf ); + + err[ sizeof( err ) - 1 ] = 0; + + return err; +} + + +int main(int argc, char* argv[]) +{ + CommandLine()->CreateCmdLine( argc, argv ); + const char *pDLLName = "vvis_dll.dll"; + + CSysModule *pModule = Sys_LoadModule( pDLLName ); + if ( !pModule ) + { + printf( "vvis launcher error: can't load %s\n%s", pDLLName, GetLastErrorString() ); + return 1; + } + + CreateInterfaceFn fn = Sys_GetFactory( pModule ); + if( !fn ) + { + printf( "vvis launcher error: can't get factory from %s\n", pDLLName ); + Sys_UnloadModule( pModule ); + return 2; + } + + int retCode = 0; + ILaunchableDLL *pDLL = (ILaunchableDLL*)fn( LAUNCHABLE_DLL_INTERFACE_VERSION, &retCode ); + if( !pDLL ) + { + printf( "vvis launcher error: can't get IVVisDLL interface from %s\n", pDLLName ); + Sys_UnloadModule( pModule ); + return 3; + } + + pDLL->main( argc, argv ); + Sys_UnloadModule( pModule ); + + return 0; +} + diff --git a/mp/src/utils/vvis_launcher/vvis_launcher.vpc b/mp/src/utils/vvis_launcher/vvis_launcher.vpc index 5cf8eb99..f3c5e958 100644 --- a/mp/src/utils/vvis_launcher/vvis_launcher.vpc +++ b/mp/src/utils/vvis_launcher/vvis_launcher.vpc @@ -1,46 +1,46 @@ -//-----------------------------------------------------------------------------
-// VVIS_LAUNCHER.VPC
-//
-// Project Script
-//-----------------------------------------------------------------------------
-
-$Macro SRCDIR "..\.."
-$Macro OUTBINDIR "$SRCDIR\..\game\bin"
-$Macro OUTBINNAME "vvis"
-
-$Include "$SRCDIR\vpc_scripts\source_exe_con_base.vpc"
-
-$Configuration
-{
- $Compiler
- {
- $AdditionalIncludeDirectories "$BASE,..\common"
- $Create/UsePrecompiledHeader "Use Precompiled Header (/Yu)"
- $PrecompiledHeaderFile "Debug/vvis_launcher.pch"
- }
-}
-
-$Project "Vvis_launcher"
-{
- $Folder "Source Files"
- {
- $File "vvis_launcher.cpp"
-
- $File "StdAfx.cpp"
- {
- $Configuration
- {
- $Compiler
- {
- $Create/UsePrecompiledHeader "Create Precompiled Header (/Yc)"
- }
- }
- }
- }
-
- $Folder "Header Files"
- {
- $File "$SRCDIR\public\tier1\interface.h"
- $File "StdAfx.h"
- }
-}
+//----------------------------------------------------------------------------- +// VVIS_LAUNCHER.VPC +// +// Project Script +//----------------------------------------------------------------------------- + +$Macro SRCDIR "..\.." +$Macro OUTBINDIR "$SRCDIR\..\game\bin" +$Macro OUTBINNAME "vvis" + +$Include "$SRCDIR\vpc_scripts\source_exe_con_base.vpc" + +$Configuration +{ + $Compiler + { + $AdditionalIncludeDirectories "$BASE,..\common" + $Create/UsePrecompiledHeader "Use Precompiled Header (/Yu)" + $PrecompiledHeaderFile "Debug/vvis_launcher.pch" + } +} + +$Project "Vvis_launcher" +{ + $Folder "Source Files" + { + $File "vvis_launcher.cpp" + + $File "StdAfx.cpp" + { + $Configuration + { + $Compiler + { + $Create/UsePrecompiledHeader "Create Precompiled Header (/Yc)" + } + } + } + } + + $Folder "Header Files" + { + $File "$SRCDIR\public\tier1\interface.h" + $File "StdAfx.h" + } +} |