mirror of git://vps1.g8bpq.net/linbpq
parent
35db10eca1
commit
bdb1f1236c
@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioUserFile
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="8.00"
|
|
||||||
ShowAllFiles="false"
|
|
||||||
>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="$(TargetPath)"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor=""
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="$(TargetPath)"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor=""
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
</VisualStudioUserFile>
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioUserFile
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="8.00"
|
|
||||||
ShowAllFiles="false"
|
|
||||||
>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="$(TargetPath)"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor=""
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="$(TargetPath)"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor=""
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
</VisualStudioUserFile>
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioUserFile
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="8.00"
|
|
||||||
ShowAllFiles="false"
|
|
||||||
>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="c:\devprogs\bpq32\bpq32.exe"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-MHE5LO8"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor="0"
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command=""
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-MHE5LO8"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor=""
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
</VisualStudioUserFile>
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioUserFile
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="8.00"
|
|
||||||
ShowAllFiles="false"
|
|
||||||
>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="C:\Devprogs\BPQ32\bpq32.exe"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor=""
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="C:\Devprogs\BPQ32\bpq32.exe"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor=""
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
</VisualStudioUserFile>
|
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
// FormatHTML.cpp : Defines the entry point for the console application.
|
||||||
|
//
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main () {
|
||||||
|
FILE *fp, *fp2;
|
||||||
|
char str[256];
|
||||||
|
char newstr[256];
|
||||||
|
char * ptr, * inptr;
|
||||||
|
|
||||||
|
/* opening file for reading */
|
||||||
|
fp = fopen("D:/AtomProject/test.html" , "r");
|
||||||
|
fp2 = fopen("D:/AtomProject/test.html.c" , "w");
|
||||||
|
|
||||||
|
if(fp == NULL) {
|
||||||
|
perror("Error opening file");
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
while(fgets (str, 256, fp) != NULL)
|
||||||
|
{
|
||||||
|
// Replace any " with \" and add " on front and \r\n" on end
|
||||||
|
|
||||||
|
char c;
|
||||||
|
ptr = newstr;
|
||||||
|
inptr = str;
|
||||||
|
|
||||||
|
c = *(inptr++);
|
||||||
|
|
||||||
|
*(ptr++) = '"';
|
||||||
|
|
||||||
|
while (c && c != 10)
|
||||||
|
{
|
||||||
|
if (c == '"')
|
||||||
|
*(ptr++) = '\\';
|
||||||
|
|
||||||
|
*(ptr++) = c;
|
||||||
|
|
||||||
|
c = *(inptr++);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
*(ptr++) = '\\';
|
||||||
|
*(ptr++) = 'r';
|
||||||
|
*(ptr++) = '\\';
|
||||||
|
*(ptr++) = 'n';
|
||||||
|
*(ptr++) = '"';
|
||||||
|
*(ptr++) = 10;
|
||||||
|
*(ptr++) = 0;
|
||||||
|
|
||||||
|
puts(newstr);
|
||||||
|
fputs(newstr, fp2);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(fp);
|
||||||
|
fclose(fp2);
|
||||||
|
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
@ -0,0 +1,219 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8.00"
|
||||||
|
Name="FormatHTML"
|
||||||
|
ProjectGUID="{2B892B53-6549-4872-AF51-45280ADC8AB5}"
|
||||||
|
RootNamespace="FormatHTML"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
OutputDirectory="C:\Dev\Msdev2005\$(SolutionName)\$(ProjectName)\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="C:\Dev\Msdev2005\Intermed\$(SolutionName)\$(ProjectName)\$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="0"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||||
|
LinkIncremental="2"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
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>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
OutputDirectory="C:\Dev\Msdev2005\$(SolutionName)\$(ProjectName)\$(ConfigurationName)"
|
||||||
|
IntermediateDirectory="C:\Dev\Msdev2005\Intermed\$(SolutionName)\$(ProjectName)\$(ConfigurationName)"
|
||||||
|
ConfigurationType="1"
|
||||||
|
CharacterSet="1"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
Detect64BitPortabilityProblems="true"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="kernel32.lib $(NoInherit)"
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
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;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\FormatHTML.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
CompileAs="1"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\stdafx.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\stdafx.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<File
|
||||||
|
RelativePath=".\ReadMe.txt"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioUserFile
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="8.00"
|
|
||||||
ShowAllFiles="false"
|
|
||||||
>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="$(TargetPath)"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor=""
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="$(TargetPath)"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor=""
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
</VisualStudioUserFile>
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<LocalDebuggerCommand>C:\Dev\Msdev2005\projects\bpq32\BPQMail\x64\Debug\LinBPQ.exe</LocalDebuggerCommand>
|
<LocalDebuggerCommand>c:\linbpq\linbpq.exe</LocalDebuggerCommand>
|
||||||
<LocalDebuggerWorkingDirectory>c:\linbpq</LocalDebuggerWorkingDirectory>
|
<LocalDebuggerWorkingDirectory>c:\linbpq</LocalDebuggerWorkingDirectory>
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioUserFile
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="8.00"
|
|
||||||
ShowAllFiles="false"
|
|
||||||
>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="$(TargetPath)"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments="COM53 127.0.0.1:4532"
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor="0"
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="$(TargetPath)"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments="COM53 127.0.0.1:4532"
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor="0"
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
</VisualStudioUserFile>
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioUserFile
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="8.00"
|
|
||||||
ShowAllFiles="false"
|
|
||||||
>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="$(TargetPath)"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor=""
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
>
|
|
||||||
<DebugSettings
|
|
||||||
Command="$(TargetPath)"
|
|
||||||
WorkingDirectory=""
|
|
||||||
CommandArguments=""
|
|
||||||
Attach="false"
|
|
||||||
DebuggerType="3"
|
|
||||||
Remote="1"
|
|
||||||
RemoteMachine="DESKTOP-TGEL8RC"
|
|
||||||
RemoteCommand=""
|
|
||||||
HttpUrl=""
|
|
||||||
PDBPath=""
|
|
||||||
SQLDebugging=""
|
|
||||||
Environment=""
|
|
||||||
EnvironmentMerge="true"
|
|
||||||
DebuggerFlavor=""
|
|
||||||
MPIRunCommand=""
|
|
||||||
MPIRunArguments=""
|
|
||||||
MPIRunWorkingDirectory=""
|
|
||||||
ApplicationCommand=""
|
|
||||||
ApplicationArguments=""
|
|
||||||
ShimCommand=""
|
|
||||||
MPIAcceptMode=""
|
|
||||||
MPIAcceptFilter=""
|
|
||||||
/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
</VisualStudioUserFile>
|
|
||||||
@ -1,187 +0,0 @@
|
|||||||
// Includes code from MiniUPnPc, used subject to the following conditions:
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
MiniUPnPc
|
|
||||||
Copyright (c) 2005-2020, Thomas BERNARD
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
* The name of the author may not be used to endorse or promote products
|
|
||||||
derived from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define MINIUPNP_STATICLIB
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include "upnpcommands.h"
|
|
||||||
#include "miniupnpc.h"
|
|
||||||
#include "upnperrors.h"
|
|
||||||
#include <winsock2.h>
|
|
||||||
#else
|
|
||||||
#include </usr/local/Cellar/miniupnpc/2.2.5/include/miniupnpc/upnpcommands.h>
|
|
||||||
#include </usr/local/Cellar/miniupnpc/2.2.5/include/miniupnpc/miniupnpc.h>
|
|
||||||
#include </usr/local/Cellar/miniupnpc/2.2.5/include/miniupnpc/upnperrors.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int AddMap(char * controlURL, char * eport, char * iport, char * proto);
|
|
||||||
int DeleteMap(char * controlURL, char * eport, char * iport, char * proto);
|
|
||||||
|
|
||||||
void Consoleprintf(const char * format, ...);
|
|
||||||
|
|
||||||
struct UPNP
|
|
||||||
{
|
|
||||||
struct UPNP * Next;
|
|
||||||
char * Protocol;
|
|
||||||
char * LANport;
|
|
||||||
char * WANPort;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct UPNP * UPNPConfig;
|
|
||||||
|
|
||||||
char * controlURL = 0;
|
|
||||||
char * servicetype = 0;
|
|
||||||
char iaddr[] = "IP";
|
|
||||||
char * inClient = NULL;
|
|
||||||
#ifdef LINBPQ
|
|
||||||
char desc[] = "LinBPQ ";
|
|
||||||
#else
|
|
||||||
char desc[] = "BPQ32 ";
|
|
||||||
#endif
|
|
||||||
char * remoteHost = NULL;
|
|
||||||
char * leaseDuration = NULL;
|
|
||||||
|
|
||||||
struct UPNPDev * devlist = 0;
|
|
||||||
char lanaddr[64] = "unset"; /* my ip address on the LAN */
|
|
||||||
struct UPNPUrls urls;
|
|
||||||
struct IGDdatas data;
|
|
||||||
|
|
||||||
int i;
|
|
||||||
const char * rootdescurl = 0;
|
|
||||||
const char * multicastif = 0;
|
|
||||||
const char * minissdpdpath = 0;
|
|
||||||
int localport = UPNP_LOCAL_PORT_ANY;
|
|
||||||
int retcode = 0;
|
|
||||||
int error = 0;
|
|
||||||
int ipv6 = 0;
|
|
||||||
int ignore = 0;
|
|
||||||
unsigned char ttl = 2;
|
|
||||||
|
|
||||||
|
|
||||||
int upnpInit()
|
|
||||||
{
|
|
||||||
struct UPNP * Config = UPNPConfig;
|
|
||||||
int i;
|
|
||||||
#ifdef WIN32
|
|
||||||
WSADATA wsaData;
|
|
||||||
int nResult = WSAStartup(MAKEWORD(2,2), &wsaData);
|
|
||||||
if(nResult != NO_ERROR)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "WSAStartup() failed.\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
while (Config)
|
|
||||||
{
|
|
||||||
if (devlist == NULL)
|
|
||||||
{
|
|
||||||
devlist = upnpDiscover(2000, multicastif, minissdpdpath, localport, ipv6, ttl, &error);
|
|
||||||
|
|
||||||
if (devlist == NULL)
|
|
||||||
{
|
|
||||||
Consoleprintf("Failed to find a UPNP device");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
|
|
||||||
}
|
|
||||||
|
|
||||||
AddMap(devlist->descURL, Config->LANport, Config->WANPort, Config->Protocol);
|
|
||||||
Config = Config->Next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int upnpClose()
|
|
||||||
{
|
|
||||||
struct UPNP * Config = UPNPConfig;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
while (Config)
|
|
||||||
{
|
|
||||||
if (devlist == NULL)
|
|
||||||
{
|
|
||||||
devlist = upnpDiscover(2000, multicastif, minissdpdpath, localport, ipv6, ttl, &error);
|
|
||||||
|
|
||||||
if (devlist == NULL)
|
|
||||||
{
|
|
||||||
Consoleprintf("Failed to find a UPNP device");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
|
|
||||||
}
|
|
||||||
|
|
||||||
DeleteMap(devlist->descURL, Config->LANport, Config->WANPort, Config->Protocol);
|
|
||||||
Config = Config->Next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int AddMap(char * controlURL, char * eport, char * iport, char * proto)
|
|
||||||
{
|
|
||||||
int r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
|
|
||||||
eport, iport, lanaddr, desc,
|
|
||||||
proto, remoteHost, leaseDuration);
|
|
||||||
|
|
||||||
if (r != UPNPCOMMAND_SUCCESS)
|
|
||||||
{
|
|
||||||
Consoleprintf("UPNP AddPortMapping(%s, %s, %s) failed with code %d (%s)", eport, iport, lanaddr, r, strupnperror(r));
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
Consoleprintf("UPNP AddPortMapping(%s, %s, %s) Succeeded", eport, iport, lanaddr, r);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int DeleteMap(char * controlURL, char * eport, char * iport, char * proto)
|
|
||||||
{
|
|
||||||
int r = UPNP_DeletePortMapping(urls.controlURL, data.first.servicetype, eport, proto, remoteHost);
|
|
||||||
|
|
||||||
if(r != UPNPCOMMAND_SUCCESS)
|
|
||||||
{
|
|
||||||
Consoleprintf("UPNP DeletePortMapping(%s, %s, %s) failed with code %d (%s)", eport, iport, lanaddr, r, strupnperror(r));
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
Consoleprintf("UPNP DeletePortMapping(%s, %s, %s) Succeeded", eport, iport, lanaddr, r);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in new issue