[xiph-commits] r10179 - trunk/oggdsf/src/tools/CMMLRip
davidb at svn.xiph.org
davidb at svn.xiph.org
Mon Oct 17 17:26:58 PDT 2005
Author: davidb
Date: 2005-10-17 17:26:57 -0700 (Mon, 17 Oct 2005)
New Revision: 10179
Modified:
trunk/oggdsf/src/tools/CMMLRip/CMMLRip.cpp
trunk/oggdsf/src/tools/CMMLRip/stdafx.h
Log:
Fix the build by adding "using namespace std".
Modified: trunk/oggdsf/src/tools/CMMLRip/CMMLRip.cpp
===================================================================
--- trunk/oggdsf/src/tools/CMMLRip/CMMLRip.cpp 2005-10-17 22:46:27 UTC (rev 10178)
+++ trunk/oggdsf/src/tools/CMMLRip/CMMLRip.cpp 2005-10-18 00:26:57 UTC (rev 10179)
@@ -3,8 +3,15 @@
#include "stdafx.h"
+using namespace std;
+
+#ifdef WIN32
int __cdecl _tmain(int argc, _TCHAR* argv[])
+#else
+int main(int argc, char * argv[])
+#endif
{
+
if ((argc != 3) || (argc != 4)) {
cout << "Usage : CMMLRip <Annodex File> <CMML File> [<Ogg File>>]"<<endl;
return 1;
@@ -14,20 +21,21 @@
string locCMMLFileName = argv[2];
string locOggFileName = "";
bool locKeepOgg = false;
+
if (argc == 4) {
locOggFileName = argv[3];
locKeepOgg = true;
}
fstream locAnxFile;
- locAnxFile.open(locAnxFileName, ios_base::in|ios_base::binary);
+ locAnxFile.open(locAnxFileName.c_str(), ios_base::in | ios_base::binary);
if (!locAnxFile.is_open()) {
cout<<"Cannot open annodex file ("<<locAnxFileName<<")"<<endl;
return 2;
}
fstream locCMMLFile;
- locCMMLFile.open(locCMMLFileName, ios:base::out|ios_base::binary);
+ locCMMLFile.open(locCMMLFileName.c_str(), ios_base::out | ios_base::binary);
return 0;
Modified: trunk/oggdsf/src/tools/CMMLRip/stdafx.h
===================================================================
--- trunk/oggdsf/src/tools/CMMLRip/stdafx.h 2005-10-17 22:46:27 UTC (rev 10178)
+++ trunk/oggdsf/src/tools/CMMLRip/stdafx.h 2005-10-18 00:26:57 UTC (rev 10179)
@@ -5,8 +5,14 @@
#pragma once
+#ifdef WIN32
+ #include <tchar.h>
+#endif
#include <iostream>
-#include <tchar.h>
+#include <fstream>
+#include <ios>
+#include <string>
+#include <stdio.h>
// TODO: reference additional headers your program requires here
More information about the commits
mailing list