diff options
author | Martin Burnicki <martin.burnicki@meinberg.de> | 2009-01-22 12:02:00 +0100 |
---|---|---|
committer | Martin Burnicki <martin.burnicki@meinberg.de> | 2009-01-22 12:02:00 +0100 |
commit | 96060b726426eaa89df8069ed9eb490fde64f0ab (patch) | |
tree | ac5e5774a626e1ed31631903b3d03d71314f9b82 | |
parent | 37e0448962beb54db31389e03d6e3ab3f744af1e (diff) | |
download | mbgsdk-win-96060b726426eaa89df8069ed9eb490fde64f0ab.tar.gz mbgsdk-win-96060b726426eaa89df8069ed9eb490fde64f0ab.zip |
Convert mbgdmpst example from .cpp to .c
Also update VC6 project files and remove obsolete files.
-rw-r--r-- | c/demo/mbgsvcio/mbgdmpst.c | 11 | ||||
-rw-r--r-- | c/demo/mbgsvcio/vc6/mbgdmpst.dsp | 57 | ||||
-rw-r--r-- | c/demo/mbgsvcio/vc6/mbgdmpst.dsw | 12 | ||||
-rw-r--r-- | c/demo/mbgsvcio/vc6/stdafx.cpp | 8 | ||||
-rw-r--r-- | c/demo/mbgsvcio/vc6/stdafx.h | 23 |
5 files changed, 40 insertions, 71 deletions
diff --git a/c/demo/mbgsvcio/mbgdmpst.c b/c/demo/mbgsvcio/mbgdmpst.c index fe81bcc..9056dd5 100644 --- a/c/demo/mbgsvcio/mbgdmpst.c +++ b/c/demo/mbgsvcio/mbgdmpst.c @@ -1,8 +1,6 @@ // mbgdmpst.cpp : Defines the entry point for the application. // -#include "stdafx.h" - #include <mbgsvcio.h> #include <pcpsdefs.h> @@ -124,15 +122,12 @@ void mbg_dump_time_adjustment_status( FILE *fp ) -int APIENTRY WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpCmdLine, - int nCmdShow) +int main(int argc, char* argv[]) { #if 1 - if ( nCmdShow ) + if ( argc > 1 ) { - FILE *fp = fopen( lpCmdLine, "wt" ); + FILE *fp = fopen( argv[1], "wt" ); if ( fp ) { diff --git a/c/demo/mbgsvcio/vc6/mbgdmpst.dsp b/c/demo/mbgsvcio/vc6/mbgdmpst.dsp index d8ca388..773477c 100644 --- a/c/demo/mbgsvcio/vc6/mbgdmpst.dsp +++ b/c/demo/mbgsvcio/vc6/mbgdmpst.dsp @@ -40,9 +40,11 @@ RSC=rc.exe # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "." /I "common" /I "win32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "." /I "../../../mbglib/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c +# SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG" @@ -52,7 +54,8 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "mbgdmpst - Win32 Debug" @@ -65,9 +68,11 @@ LINK32=link.exe # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "common" /I "win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "../../../mbglib/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c +# SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "_DEBUG" @@ -77,7 +82,8 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# SUBTRACT LINK32 /pdb:none !ENDIF @@ -85,50 +91,46 @@ LINK32=link.exe # Name "mbgdmpst - Win32 Release" # Name "mbgdmpst - Win32 Debug" -# Begin Group "common" +# Begin Group "Source Files" # PROP Default_Filter "" # Begin Source File -SOURCE=.\common\mbg_tgt.h +SOURCE=..\mbgdmpst.c # End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "" # Begin Source File -SOURCE=.\common\pcpsdefs.h +SOURCE=..\..\..\mbglib\include\mbg_tgt.h # End Source File # Begin Source File -SOURCE=.\common\use_pack.h +SOURCE=..\..\..\mbglib\include\mbgsvcio.h # End Source File # Begin Source File -SOURCE=.\common\words.h +SOURCE=..\..\..\mbglib\include\pcpsdefs.h # End Source File -# End Group -# Begin Group "win32" +# Begin Source File -# PROP Default_Filter "" +SOURCE=..\..\..\mbglib\include\use_pack.h +# End Source File # Begin Source File -SOURCE=.\win32\mbgsvcio.h +SOURCE=..\..\..\mbglib\include\words.h # End Source File # End Group -# Begin Group "lib" - -# PROP Default_Filter "" -# Begin Group "msc" +# Begin Group "Mbglib Import Libraries" # PROP Default_Filter "" # Begin Source File -SOURCE=.\lib\msc\mbgsvcio.lib +SOURCE=..\..\..\mbglib\lib\msc\mbgsvcio.lib # End Source File # End Group -# End Group -# Begin Source File - -SOURCE=.\mbgdmpst.cpp -# End Source File # Begin Source File SOURCE=.\mbgdmpst.rc @@ -137,14 +139,5 @@ SOURCE=.\mbgdmpst.rc SOURCE=.\ReadMe.txt # End Source File -# Begin Source File - -SOURCE=.\StdAfx.cpp -# ADD CPP /Yc"stdafx.h" -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.h -# End Source File # End Target # End Project diff --git a/c/demo/mbgsvcio/vc6/mbgdmpst.dsw b/c/demo/mbgsvcio/vc6/mbgdmpst.dsw index 5c76f67..71839c5 100644 --- a/c/demo/mbgsvcio/vc6/mbgdmpst.dsw +++ b/c/demo/mbgsvcio/vc6/mbgdmpst.dsw @@ -15,6 +15,18 @@ Package=<4> ############################################################################### +Project: "mbgsvctm"=.\mbgsvctm\mbgsvctm.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Global: Package=<5> diff --git a/c/demo/mbgsvcio/vc6/stdafx.cpp b/c/demo/mbgsvcio/vc6/stdafx.cpp deleted file mode 100644 index da3801b..0000000 --- a/c/demo/mbgsvcio/vc6/stdafx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// mbgdmpst.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/c/demo/mbgsvcio/vc6/stdafx.h b/c/demo/mbgsvcio/vc6/stdafx.h deleted file mode 100644 index 8baa7c7..0000000 --- a/c/demo/mbgsvcio/vc6/stdafx.h +++ /dev/null @@ -1,23 +0,0 @@ -// 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__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) -#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__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> - - -// 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__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_) |