mirror of
https://github.com/ENSL/NS.git
synced 2025-03-25 19:51:13 +00:00
libcurl-no-sll build
This commit is contained in:
parent
572fc6beb8
commit
48abae3be3
130 changed files with 6393 additions and 3895 deletions
README.md
main/source
Natural_Selection.opensdfNatural_Selection.sdfNatural_Selection.slnNatural_Selection.suo
cl_dll
dlls
includes
libcurl-7.18-nossl
libcurl-7.19.3
vgui/include
VGUI.hVGUI_ActionSignal.hVGUI_App.hVGUI_Bitmap.hVGUI_BitmapTGA.hVGUI_Border.hVGUI_BorderLayout.hVGUI_BorderPair.hVGUI_BuildGroup.hVGUI_Button.hVGUI_ButtonController.hVGUI_ButtonGroup.hVGUI_ChangeSignal.hVGUI_CheckButton.hVGUI_Color.hVGUI_ComboKey.hVGUI_ConfigWizard.hVGUI_Cursor.hVGUI_Dar.hVGUI_DataInputStream.hVGUI_Desktop.hVGUI_DesktopIcon.hVGUI_EditPanel.hVGUI_EtchedBorder.hVGUI_FileInputStream.hVGUI_FlowLayout.hVGUI_FocusChangeSignal.hVGUI_FocusNavGroup.hVGUI_Font.hVGUI_Frame.hVGUI_FrameSignal.hVGUI_GridLayout.hVGUI_HeaderPanel.hVGUI_Image.hVGUI_ImagePanel.hVGUI_InputSignal.hVGUI_InputStream.hVGUI_IntChangeSignal.hVGUI_IntLabel.hVGUI_KeyCode.hVGUI_Label.hVGUI_Layout.hVGUI_LayoutInfo.hVGUI_LineBorder.hVGUI_ListPanel.hVGUI_LoweredBorder.hVGUI_Menu.hVGUI_MenuItem.hVGUI_MenuSeparator.hVGUI_MessageBox.hVGUI_MiniApp.hVGUI_MouseCode.hVGUI_Panel.h
16
README.md
16
README.md
|
@ -2,18 +2,20 @@ Natural Selection Visual Studio 2010 Rebuild
|
|||
============================================
|
||||
|
||||
What does work:
|
||||
1.) Both DLLs can be compiled
|
||||
2.) client.dll is working but needs libpng12.dll in hl folder
|
||||
- 1.) Both DLLs can be compiled
|
||||
- 2.) client.dll is working but needs libpng12.dll in hl folder
|
||||
- 3.) ns.dll is working too thanks to lib-no-sll
|
||||
|
||||
What does not work:
|
||||
1.) Sadly the server --> "Host_Error: Couldn't get DLL API from ...ns.dll"
|
||||
|
||||
Additional Includes:
|
||||
1.) libpng
|
||||
2.) zlib
|
||||
3.) libcurl
|
||||
- 1.) libpng
|
||||
- 2.) zlib
|
||||
- 3.) libcurl
|
||||
|
||||
To do:
|
||||
|
||||
- fix ns bugs hud,fps...
|
||||
- build a linux client
|
||||
|
||||
|
||||
Half Life 1 SDK LICENSE
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,8 +1,8 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual C++ Express 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cl_dll.dll", "cl_dll\cl_dll.vcxproj", "{AC16D18F-1308-80D7-EF83-F84B72CA0A1D}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cl_dll.dll", "cl_dll\cl_dll.vcxproj", "{A3AC8049-E5F7-6D5F-47F9-76B45DB1D54A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ns.dll", "dlls\hl.vcxproj", "{BFD7A4D2-76E7-E0E5-5A77-32A65153CF0D}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ns.dll", "dlls\hl.vcxproj", "{B793156F-E439-A5B7-AF1E-E95BAB312F44}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -12,18 +12,18 @@ Global
|
|||
Playtest|Win32 = Playtest|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AC16D18F-1308-80D7-EF83-F84B72CA0A1D}.Developer - debug|Win32.ActiveCfg = Developer - debug|Win32
|
||||
{AC16D18F-1308-80D7-EF83-F84B72CA0A1D}.Developer - release|Win32.ActiveCfg = Developer - release|Win32
|
||||
{AC16D18F-1308-80D7-EF83-F84B72CA0A1D}.Playtest - balance disabled|Win32.ActiveCfg = Playtest - balance disabled|Win32
|
||||
{AC16D18F-1308-80D7-EF83-F84B72CA0A1D}.Playtest - balance disabled|Win32.Build.0 = Playtest - balance disabled|Win32
|
||||
{AC16D18F-1308-80D7-EF83-F84B72CA0A1D}.Playtest|Win32.ActiveCfg = Playtest|Win32
|
||||
{AC16D18F-1308-80D7-EF83-F84B72CA0A1D}.Playtest|Win32.Build.0 = Playtest|Win32
|
||||
{BFD7A4D2-76E7-E0E5-5A77-32A65153CF0D}.Developer - debug|Win32.ActiveCfg = Developer - debug|Win32
|
||||
{BFD7A4D2-76E7-E0E5-5A77-32A65153CF0D}.Developer - release|Win32.ActiveCfg = Developer - release|Win32
|
||||
{BFD7A4D2-76E7-E0E5-5A77-32A65153CF0D}.Playtest - balance disabled|Win32.ActiveCfg = Playtest - balance disabled|Win32
|
||||
{BFD7A4D2-76E7-E0E5-5A77-32A65153CF0D}.Playtest - balance disabled|Win32.Build.0 = Playtest - balance disabled|Win32
|
||||
{BFD7A4D2-76E7-E0E5-5A77-32A65153CF0D}.Playtest|Win32.ActiveCfg = Playtest|Win32
|
||||
{BFD7A4D2-76E7-E0E5-5A77-32A65153CF0D}.Playtest|Win32.Build.0 = Playtest|Win32
|
||||
{A3AC8049-E5F7-6D5F-47F9-76B45DB1D54A}.Developer - debug|Win32.ActiveCfg = Developer - debug|Win32
|
||||
{A3AC8049-E5F7-6D5F-47F9-76B45DB1D54A}.Developer - release|Win32.ActiveCfg = Developer - release|Win32
|
||||
{A3AC8049-E5F7-6D5F-47F9-76B45DB1D54A}.Playtest - balance disabled|Win32.ActiveCfg = Playtest - balance disabled|Win32
|
||||
{A3AC8049-E5F7-6D5F-47F9-76B45DB1D54A}.Playtest - balance disabled|Win32.Build.0 = Playtest - balance disabled|Win32
|
||||
{A3AC8049-E5F7-6D5F-47F9-76B45DB1D54A}.Playtest|Win32.ActiveCfg = Playtest|Win32
|
||||
{A3AC8049-E5F7-6D5F-47F9-76B45DB1D54A}.Playtest|Win32.Build.0 = Playtest|Win32
|
||||
{B793156F-E439-A5B7-AF1E-E95BAB312F44}.Developer - debug|Win32.ActiveCfg = Developer - debug|Win32
|
||||
{B793156F-E439-A5B7-AF1E-E95BAB312F44}.Developer - release|Win32.ActiveCfg = Developer - release|Win32
|
||||
{B793156F-E439-A5B7-AF1E-E95BAB312F44}.Playtest - balance disabled|Win32.ActiveCfg = Playtest - balance disabled|Win32
|
||||
{B793156F-E439-A5B7-AF1E-E95BAB312F44}.Playtest - balance disabled|Win32.Build.0 = Playtest - balance disabled|Win32
|
||||
{B793156F-E439-A5B7-AF1E-E95BAB312F44}.Playtest|Win32.ActiveCfg = Playtest|Win32
|
||||
{B793156F-E439-A5B7-AF1E-E95BAB312F44}.Playtest|Win32.Build.0 = Playtest|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
Binary file not shown.
2
main/source/cl_dll/Playtest/cl_dll.dll.lastbuildstate
Normal file
2
main/source/cl_dll/Playtest/cl_dll.dll.lastbuildstate
Normal file
|
@ -0,0 +1,2 @@
|
|||
#v4.0:v100
|
||||
Playtest|Win32|C:\Users\fabian\Documents\projects\NS\main\source\|
|
BIN
main/source/cl_dll/Playtest/cl_dll.exp
Normal file
BIN
main/source/cl_dll/Playtest/cl_dll.exp
Normal file
Binary file not shown.
BIN
main/source/cl_dll/Playtest/cl_dll.lib
Normal file
BIN
main/source/cl_dll/Playtest/cl_dll.lib
Normal file
Binary file not shown.
10
main/source/cl_dll/Playtest/client.dll.intermediate.manifest
Normal file
10
main/source/cl_dll/Playtest/client.dll.intermediate.manifest
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
|
@ -71,7 +71,7 @@
|
|||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Developer - release|Win32'">V:\temp\$(ProjectName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Developer - release|Win32'">V:\temp\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Developer - release|Win32'">$(TargetPath)%3b*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat</ExtensionsToDeleteOnClean>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">..\..\..\..\..\..\..\Program Files %28x86%29\Steam\SteamApps\common\Half-Life\ns\cl_dlls</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">..\..\..\..\..\..\..\..\Program Files %28x86%29\Steam\SteamApps\common\Half-Life\ns\cl_dlls</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">$(Configuration)\</IntDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">$(TargetPath)%3b*.obj%3b*.ilk%3b*.pdb%3b*.tlb%3b*.tli%3b*.tlh%3b*.tmp%3b*.rsp%3b*.bat</ExtensionsToDeleteOnClean>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Playtest - balance disabled|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
|
@ -195,7 +195,7 @@
|
|||
<Optimization>Full</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)\particles;$(SolutionDir)\includes\lpng1251;$(SolutionDir)\includes\zlib-1.2.8;$(SolutionDir)\includes\fmod\inc;$(SolutionDir)\..\..\..\halflife\utils\vgui\include</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)\particles;$(SolutionDir)\includes\lpng1251;$(SolutionDir)\includes\zlib-1.2.8;$(SolutionDir)\includes\fmod\inc;C:\Users\fabian\Documents\projects\NS\main\source\includes\vgui\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;AVH_CLIENT;USE_OLDAUTH</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
|
@ -220,7 +220,7 @@
|
|||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;ws2_32.lib;particles.lib;vgui.lib;zlib.lib;libpng.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)\..\..\..\halflife\utils\vgui\lib\win32_vc6;$(SolutionDir)\particles\Release;$(SolutionDir)\includes\lpng1251;$(SolutionDir)\includes\zlib-1.2.8;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)\particles\Release;$(SolutionDir)\includes\lpng1251;$(SolutionDir)\includes\zlib-1.2.8;$(SolutionDir)\includes\vgui\lib\win32_vc6;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ProgramDatabaseFile>
|
||||
</ProgramDatabaseFile>
|
||||
|
|
10
main/source/dlls/Playtest/ns.dll.intermediate.manifest
Normal file
10
main/source/dlls/Playtest/ns.dll.intermediate.manifest
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
2
main/source/dlls/Playtest/ns.dll.lastbuildstate
Normal file
2
main/source/dlls/Playtest/ns.dll.lastbuildstate
Normal file
|
@ -0,0 +1,2 @@
|
|||
#v4.0:v100
|
||||
Playtest|Win32|C:\Users\fabian\Documents\projects\NS\main\source\|
|
BIN
main/source/dlls/Playtest/vc100.idb
Normal file
BIN
main/source/dlls/Playtest/vc100.idb
Normal file
Binary file not shown.
|
@ -34,6 +34,7 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Developer - debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
|
@ -67,7 +68,7 @@
|
|||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Developer - debug|Win32'">V:\temp\$(ProjectName)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Developer - debug|Win32'">V:\temp\$(ProjectName)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Developer - debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">..\..\..\..\..\..\..\Program Files %28x86%29\Steam\SteamApps\common\Half-Life\ns\dlls</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">..\..\..\..\..\..\..\..\Program Files %28x86%29\Steam\SteamApps\common\Half-Life\ns\dlls</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Playtest|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Playtest - balance disabled|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
|
@ -183,7 +184,7 @@
|
|||
<Optimization>Full</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)\includes\libcurl-7.19.3\include\curl;$(SolutionDir)\includes\lua\include;$(SolutionDir)\particles\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)\includes\lua\include;$(SolutionDir)\particles\;$(SolutionDir)\includes\vgui\include;$(SolutionDir)\includes\libcurl-7.18-nossl\include\curl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;QUIVER;VOXEL;QUAKE2;VALVE_DLL;AVH_SERVER;AVH_NO_NEXUS;USE_OLDAUTH</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
|
@ -202,7 +203,7 @@
|
|||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;ws2_32.lib;particles.lib;lua5.1.lib;curllib_static.lib;ssleay32.lib;libeay32.lib;openldap.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;ws2_32.lib;particles.lib;lua5.1.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreSpecificDefaultLibraries>gdi32.lib user32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>.\hl.def</ModuleDefinitionFile>
|
||||
|
@ -214,7 +215,7 @@
|
|||
<SetChecksum>false</SetChecksum>
|
||||
<TreatLinkerWarningAsErrors>false</TreatLinkerWarningAsErrors>
|
||||
<AdditionalOptions>/NODEFAULTLIB:LIBCMT %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)\includes\libcurl-7.19.3\lib\Release;$(SolutionDir)\includes\libcurl-7.19.3\;$(SolutionDir)\includes\lua\lib;$(SolutionDir)\particles\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)\includes\lua\lib;$(SolutionDir)\particles\Release;$(SolutionDir)\includes\libcurl-7.18-nossl\;$(SolutionDir)\includes\vgui\lib\win32_vc6;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
|
|
1792
main/source/includes/libcurl-7.18-nossl/CHANGES
Normal file
1792
main/source/includes/libcurl-7.18-nossl/CHANGES
Normal file
File diff suppressed because it is too large
Load diff
21
main/source/includes/libcurl-7.18-nossl/COPYING
Normal file
21
main/source/includes/libcurl-7.18-nossl/COPYING
Normal file
|
@ -0,0 +1,21 @@
|
|||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright (c) 1996 - 2008, Daniel Stenberg, <daniel@haxx.se>.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any purpose
|
||||
with or without fee is hereby granted, provided that the above copyright
|
||||
notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||
OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization of the copyright holder.
|
|
@ -20,6 +20,9 @@ README
|
|||
Study the COPYING file for distribution terms and similar. If you distribute
|
||||
curl binaries or other binaries that involve libcurl, you might enjoy the
|
||||
LICENSE-MIXING document.
|
||||
|
||||
! This version of libcurl requires zlib1.dll (zLib 1.2.3), available at
|
||||
http://gnuwin32.sourceforge.net/packages/zlib.htm to work !
|
||||
|
||||
CONTACT
|
||||
|
||||
|
@ -30,9 +33,10 @@ CONTACT
|
|||
|
||||
WEB SITE
|
||||
|
||||
Visit the curl web site for the latest news and downloads:
|
||||
Visit the curl web site or mirrors for the latest news and downloads:
|
||||
|
||||
http://curl.haxx.se/
|
||||
Sweden http://curl.haxx.se/
|
||||
Mirrors http://curlm.haxx.se/
|
||||
|
||||
CVS
|
||||
|
94
main/source/includes/libcurl-7.18-nossl/RELEASE-NOTES
Normal file
94
main/source/includes/libcurl-7.18-nossl/RELEASE-NOTES
Normal file
|
@ -0,0 +1,94 @@
|
|||
Curl and libcurl 7.18.0
|
||||
|
||||
Public curl releases: 103
|
||||
Command line options: 126
|
||||
curl_easy_setopt() options: 150
|
||||
Public functions in libcurl: 56
|
||||
Public web site mirrors: 43
|
||||
Known libcurl bindings: 36
|
||||
Contributors: 597
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o --data-urlencode
|
||||
o CURLOPT_PROXY_TRANSFER_MODE
|
||||
o --no-keepalive - now curl does connections with keep-alive enabled by
|
||||
default
|
||||
o --socks4a added (proxy type CURLPROXY_SOCKS4A for libcurl)
|
||||
o --socks5-hostname added (CURLPROXY_SOCKS5_HOSTNAME for libcurl)
|
||||
o curl_easy_pause()
|
||||
o CURLOPT_SEEKFUNCTION and CURLOPT_SEEKDATA
|
||||
o --keepalive-time
|
||||
o curl --help output was re-ordered
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o curl-config --features and --protocols show the correct output when built
|
||||
with NSS, and also when SCP, SFTP and libz are not available
|
||||
o free problem in the curl tool for users with empty home dir
|
||||
o curl.h version 7.17.1 problem when building C++ apps with MSVC
|
||||
o SFTP and SCP use persistent connections
|
||||
o segfault on bad URL
|
||||
o variable wrapping when using absolutely huge send buffer sizes
|
||||
o variable wrapping when using debug callback and the HTTP request wasn't sent
|
||||
in one go
|
||||
o SSL connections with NSS done with the multi-interface
|
||||
o setting a share no longer activates cookies
|
||||
o Negotiate now works on auth and proxy simultanouesly
|
||||
o support HTTP Digest nonces up to 1023 letters
|
||||
o resumed ftp upload no longer requires the read callback to return full
|
||||
buffers
|
||||
o no longer default-appends ;type= on FTP URLs thru proxies
|
||||
o SSL session id caching
|
||||
o POST with callback over proxy requiring NTLM or Digest
|
||||
o Expect: 100-continue flaw on re-used connection with POSTs
|
||||
o build fix for MSVC 9.0 (VS2008)
|
||||
o Windows curl builds failed file truncation when retry downloading
|
||||
o SSL session ID cache memory leak
|
||||
o bad connection re-use check with environment variable-activated proxy use
|
||||
o --libcurl now generates a return statement as well
|
||||
o socklen_t is no longer used in the public includes
|
||||
o time zone offsets from -1400 to +1400 are now accepted by the date parser
|
||||
o allows more spaces in WWW/Proxy-Authenticate: headers
|
||||
o curl-config --libs skips /usr/lib64
|
||||
o range support for file:// transfers
|
||||
o libcurl hang with huge POST request and request-body read from callback
|
||||
o removed extra newlines from many error messages
|
||||
o improved pipelining
|
||||
o improved OOM handling for data url encoded HTTP POSTs when read from a file
|
||||
o test suite could pick wrong tool(s) if more than one existed in the PATH
|
||||
o curl_multi_fdset() failed to return socket while doing CONNECT over proxy
|
||||
o curl_multi_remove_handle() on a handle that is in used for a pipeline now
|
||||
break that pipeline
|
||||
o CURLOPT_COOKIELIST memory leaks
|
||||
o progress meter/callback during http proxy CONNECT requests
|
||||
o auth for http proxy when the proxy closes connection after first response
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
o see docs/KNOWN_BUGS (http://curl.haxx.se/docs/knownbugs.html)
|
||||
|
||||
Other curl-related news:
|
||||
|
||||
o TclCurl 7.17.1 => http://personal1.iddeo.es/andresgarci/tclcurl/english/
|
||||
o Ruby Curl::Multi 0.1 => http://curl-multi.rubyforge.org/
|
||||
o curl-java 0.2.1 => http://curl.haxx.se/libcurl/java/
|
||||
|
||||
New curl mirrors:
|
||||
|
||||
o http://curl.gominet.net/ is new mirror in Vizcaya, Portugal
|
||||
o http://curl.very-clever.com/ is a new mirror in Nuremberg, Germany
|
||||
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Dan Fandrich, Gisle Vanem, Toby Peterson, Yang Tse, Daniel Black,
|
||||
Robin Johnson, Michal Marek, Ates Goral, Andres Garcia, Rob Crittenden,
|
||||
Emil Romanus, Alessandro Vesely, Ray Pekowski, Spacen Jasset, Andrew Moise,
|
||||
Gilles Blanc, David Wright, Vikram Saxena, Mateusz Loskot, Gary Maxwell,
|
||||
Dmitry Kurochkin, Mohun Biswas, Richard Atterer, Maxim Perenesenko,
|
||||
Daniel Egger, Jeff Johnson, Nikitinskit Dmitriy, Georg Lippitsch, Eric Landes,
|
||||
Joe Malicki, Nathan Coulter, Lau Hang Kin, Judson Bishop, Igor Franchuk,
|
||||
Kevin Reed
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
|
@ -38,21 +38,13 @@ host_triplet = @host@
|
|||
subdir = include
|
||||
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
|
||||
$(top_srcdir)/m4/curl-confopts.m4 \
|
||||
$(top_srcdir)/m4/curl-functions.m4 \
|
||||
$(top_srcdir)/m4/curl-override.m4 \
|
||||
$(top_srcdir)/m4/curl-reentrant.m4 \
|
||||
$(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/lib/config.h \
|
||||
$(top_builddir)/src/config.h \
|
||||
$(top_builddir)/include/curl/curlbuild.h
|
||||
$(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
depcomp =
|
||||
am__depfiles_maybe =
|
||||
|
@ -78,6 +70,8 @@ AUTOCONF = @AUTOCONF@
|
|||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CABUNDLE_FALSE = @CABUNDLE_FALSE@
|
||||
CABUNDLE_TRUE = @CABUNDLE_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
|
@ -92,7 +86,6 @@ CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
|
|||
CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
|
||||
CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
|
||||
CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
|
||||
CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
|
||||
CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
|
||||
CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
|
||||
CURL_LIBS = @CURL_LIBS@
|
||||
|
@ -100,14 +93,12 @@ CYGPATH_W = @CYGPATH_W@
|
|||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAVE_ARES = @HAVE_ARES@
|
||||
HAVE_LIBZ = @HAVE_LIBZ@
|
||||
|
@ -121,13 +112,11 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
IPV6_ENABLED = @IPV6_ENABLED@
|
||||
KRB4_ENABLED = @KRB4_ENABLED@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
|
@ -137,22 +126,17 @@ MAKEINFO = @MAKEINFO@
|
|||
MANOPT = @MANOPT@
|
||||
MIMPURE_FALSE = @MIMPURE_FALSE@
|
||||
MIMPURE_TRUE = @MIMPURE_TRUE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
|
||||
NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
|
||||
NROFF = @NROFF@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH = @PATH@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKGADD_NAME = @PKGADD_NAME@
|
||||
|
@ -165,14 +149,10 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
|
|||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
|
||||
SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
|
||||
SSL_ENABLED = @SSL_ENABLED@
|
||||
STATICLIB_FALSE = @STATICLIB_FALSE@
|
||||
STATICLIB_TRUE = @STATICLIB_TRUE@
|
||||
STRIP = @STRIP@
|
||||
SUPPORT_FEATURES = @SUPPORT_FEATURES@
|
||||
SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
|
||||
TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
|
||||
USE_GNUTLS = @USE_GNUTLS@
|
||||
USE_LIBSSH2 = @USE_LIBSSH2@
|
||||
|
@ -184,7 +164,6 @@ USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
|
|||
VERSION = @VERSION@
|
||||
VERSIONNUM = @VERSIONNUM@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
|
@ -217,7 +196,6 @@ libexecdir = @libexecdir@
|
|||
libext = @libext@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
38
main/source/includes/libcurl-7.18-nossl/include/README
Normal file
38
main/source/includes/libcurl-7.18-nossl/include/README
Normal file
|
@ -0,0 +1,38 @@
|
|||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
Include files for libcurl, external users.
|
||||
|
||||
They're all placed in the curl subdirectory here for better fit in any kind
|
||||
of environment. You should include files from here using...
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
... style and point the compiler's include path to the directory holding the
|
||||
curl subdirectory. It makes it more likely to survive future modifications.
|
||||
|
||||
NOTE FOR LIBCURL HACKERS
|
||||
|
||||
All the include files in this tree are written and intended to be installed on
|
||||
a system that may serve multiple platforms and multiple applications, all
|
||||
using libcurl (possibly even different libcurl installations using different
|
||||
versions). Therefore, all header files in here must obey these rules:
|
||||
|
||||
* They cannot depend on or use configure-generated results from libcurl's or
|
||||
curl's directories. Other applications may not run configure as (lib)curl
|
||||
does, and using platform dependent info here may break other platforms.
|
||||
|
||||
* We cannot assume anything else but very basic compiler features being
|
||||
present. While libcurl requires an ANSI C compiler to build, some of the
|
||||
earlier ANSI compilers clearly can't deal with some preprocessor operators.
|
||||
|
||||
* Newlines must remain unix-style for older compilers' sake.
|
||||
|
||||
* Comments must be written in the old-style /* unnested C-fashion */
|
||||
|
||||
To figure out how to do good and portable checks for features, operating
|
||||
systems or specific hardwarare, a very good resource is Bjorn Reese's
|
||||
collection at http://predef.sf.net/
|
|
@ -0,0 +1,5 @@
|
|||
pkginclude_HEADERS = \
|
||||
curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h
|
||||
pkgincludedir= $(includedir)/curl
|
||||
|
||||
CLEANFILES = *dist
|
|
@ -37,22 +37,15 @@ build_triplet = @build@
|
|||
host_triplet = @host@
|
||||
subdir = include/curl
|
||||
DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/curlbuild.h.in
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
|
||||
$(top_srcdir)/m4/curl-confopts.m4 \
|
||||
$(top_srcdir)/m4/curl-functions.m4 \
|
||||
$(top_srcdir)/m4/curl-override.m4 \
|
||||
$(top_srcdir)/m4/curl-reentrant.m4 \
|
||||
$(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/lib/config.h \
|
||||
$(top_builddir)/src/config.h curlbuild.h
|
||||
$(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
|
@ -79,6 +72,8 @@ AUTOCONF = @AUTOCONF@
|
|||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CABUNDLE_FALSE = @CABUNDLE_FALSE@
|
||||
CABUNDLE_TRUE = @CABUNDLE_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
|
@ -93,7 +88,6 @@ CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
|
|||
CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
|
||||
CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
|
||||
CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
|
||||
CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
|
||||
CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
|
||||
CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
|
||||
CURL_LIBS = @CURL_LIBS@
|
||||
|
@ -101,14 +95,12 @@ CYGPATH_W = @CYGPATH_W@
|
|||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAVE_ARES = @HAVE_ARES@
|
||||
HAVE_LIBZ = @HAVE_LIBZ@
|
||||
|
@ -122,13 +114,11 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
IPV6_ENABLED = @IPV6_ENABLED@
|
||||
KRB4_ENABLED = @KRB4_ENABLED@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
|
@ -138,22 +128,17 @@ MAKEINFO = @MAKEINFO@
|
|||
MANOPT = @MANOPT@
|
||||
MIMPURE_FALSE = @MIMPURE_FALSE@
|
||||
MIMPURE_TRUE = @MIMPURE_TRUE@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
|
||||
NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
|
||||
NROFF = @NROFF@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH = @PATH@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKGADD_NAME = @PKGADD_NAME@
|
||||
|
@ -166,14 +151,10 @@ REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
|
|||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
|
||||
SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
|
||||
SSL_ENABLED = @SSL_ENABLED@
|
||||
STATICLIB_FALSE = @STATICLIB_FALSE@
|
||||
STATICLIB_TRUE = @STATICLIB_TRUE@
|
||||
STRIP = @STRIP@
|
||||
SUPPORT_FEATURES = @SUPPORT_FEATURES@
|
||||
SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
|
||||
TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
|
||||
USE_GNUTLS = @USE_GNUTLS@
|
||||
USE_LIBSSH2 = @USE_LIBSSH2@
|
||||
|
@ -185,7 +166,6 @@ USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
|
|||
VERSION = @VERSION@
|
||||
VERSIONNUM = @VERSIONNUM@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
|
@ -218,7 +198,6 @@ libexecdir = @libexecdir@
|
|||
libext = @libext@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
|
@ -232,28 +211,10 @@ subdirs = @subdirs@
|
|||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
pkginclude_HEADERS = \
|
||||
curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h \
|
||||
typecheck-gcc.h curlbuild.h curlrules.h
|
||||
curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h
|
||||
|
||||
|
||||
# curlbuild.h does not exist in the CVS tree. When the original libcurl
|
||||
# source code distribution archive file is created, curlbuild.h.dist is
|
||||
# renamed to curlbuild.h and included in the tarball so that it can be
|
||||
# used directly on non-configure systems.
|
||||
#
|
||||
# The distributed curlbuild.h will be overwritten on configure systems
|
||||
# when the configure script runs, with one that is suitable and specific
|
||||
# to the library being configured and built.
|
||||
#
|
||||
# curlbuild.h.in is the distributed template file from which the configure
|
||||
# script creates curlbuild.h at library configuration time, overwiting the
|
||||
# one included in the distribution archive.
|
||||
#
|
||||
# curlbuild.h.dist is not included in the source code distribution archive.
|
||||
EXTRA_DIST = curlbuild.h.in
|
||||
DISTCLEANFILES = curlbuild.h
|
||||
all: curlbuild.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
CLEANFILES = *dist
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
|
@ -286,23 +247,6 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
|||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
curlbuild.h: stamp-h3
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h3; \
|
||||
$(MAKE) stamp-h3; \
|
||||
else :; fi
|
||||
|
||||
stamp-h3: $(srcdir)/curlbuild.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h3
|
||||
cd $(top_builddir) && $(SHELL) ./config.status include/curl/curlbuild.h
|
||||
$(srcdir)/curlbuild.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h3
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f curlbuild.h stamp-h3
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
|
@ -340,11 +284,11 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
|||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) curlbuild.h.in $(TAGS_DEPENDENCIES) \
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) curlbuild.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
|
@ -356,11 +300,11 @@ TAGS: $(HEADERS) $(SOURCES) curlbuild.h.in $(TAGS_DEPENDENCIES) \
|
|||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) curlbuild.h.in $(TAGS_DEPENDENCIES) \
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) curlbuild.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
|
@ -407,7 +351,7 @@ distdir: $(DISTFILES)
|
|||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(HEADERS) curlbuild.h
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(pkgincludedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
|
@ -429,10 +373,10 @@ install-strip:
|
|||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
|
@ -443,8 +387,8 @@ clean-am: clean-generic clean-libtool mostlyclean-am
|
|||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
|
@ -485,7 +429,7 @@ ps-am:
|
|||
uninstall-am: uninstall-info-am uninstall-pkgincludeHEADERS
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool ctags distclean distclean-generic distclean-hdr \
|
||||
clean-libtool ctags distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
|
@ -20,27 +20,20 @@
|
|||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: curl.h,v 1.371 2008-12-10 23:13:31 bagder Exp $
|
||||
* $Id: curl.h,v 1.341 2008-01-10 10:30:20 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
* If you have libcurl problems, all docs and details are found here:
|
||||
* http://curl.haxx.se/libcurl/
|
||||
*
|
||||
* curl-library mailing list subscription and unsubscription web interface:
|
||||
* http://cool.haxx.se/mailman/listinfo/curl-library/
|
||||
*/
|
||||
/* If you have problems, all libcurl docs and details are found here:
|
||||
http://curl.haxx.se/libcurl/
|
||||
*/
|
||||
|
||||
#include "curlver.h" /* libcurl version defines */
|
||||
#include "curlbuild.h" /* libcurl build definitions */
|
||||
#include "curlrules.h" /* libcurl rules enforcement */
|
||||
#include "curlver.h" /* the libcurl version defines */
|
||||
|
||||
/*
|
||||
* Define WIN32 when build target is Win32 API
|
||||
*/
|
||||
|
||||
#if (defined(_WIN32) || defined(__WIN32__)) && \
|
||||
!defined(WIN32) && !defined(__SYMBIAN32__)
|
||||
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
|
||||
#define WIN32
|
||||
#endif
|
||||
|
||||
|
@ -69,15 +62,14 @@
|
|||
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
|
||||
libc5-based Linux systems. Only include it on system that are known to
|
||||
require it! */
|
||||
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
|
||||
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY)
|
||||
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || defined(__minix)
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#if !defined(WIN32) && !defined(__WATCOMC__)
|
||||
#ifndef __WATCOMC__
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
@ -94,11 +86,10 @@ extern "C" {
|
|||
typedef void CURL;
|
||||
|
||||
/*
|
||||
* Decorate exportable functions for Win32 and Symbian OS DLL linking.
|
||||
* Decorate exportable functions for Win32 DLL linking.
|
||||
* This avoids using a .def file for building libcurl.dll.
|
||||
*/
|
||||
#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \
|
||||
!defined(CURL_STATICLIB)
|
||||
#if (defined(WIN32) || defined(_WIN32)) && !defined(CURL_STATICLIB)
|
||||
#if defined(BUILDING_LIBCURL)
|
||||
#define CURL_EXTERN __declspec(dllexport)
|
||||
#else
|
||||
|
@ -108,7 +99,7 @@ typedef void CURL;
|
|||
|
||||
#ifdef CURL_HIDDEN_SYMBOLS
|
||||
/*
|
||||
* This definition is used to make external definitions visible in the
|
||||
* This definition is used to make external definitions visibile in the
|
||||
* shared library when symbols are hidden by default. It makes no
|
||||
* difference when compiling applications whether this is set or not,
|
||||
* only when compiling the library.
|
||||
|
@ -119,6 +110,73 @@ typedef void CURL;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We want the typedef curl_off_t setup for large file support on all
|
||||
* platforms. We also provide a CURL_FORMAT_OFF_T define to use in *printf
|
||||
* format strings when outputting a variable of type curl_off_t.
|
||||
*
|
||||
* Note: "pocc -Ze" is MSVC compatibily mode and this sets _MSC_VER!
|
||||
*/
|
||||
|
||||
#if (defined(_MSC_VER) && !defined(__POCC__)) || (defined(__LCC__) && defined(WIN32))
|
||||
/* MSVC */
|
||||
#ifdef _WIN32_WCE
|
||||
typedef long curl_off_t;
|
||||
#define CURL_FORMAT_OFF_T "%ld"
|
||||
#else
|
||||
typedef signed __int64 curl_off_t;
|
||||
#define CURL_FORMAT_OFF_T "%I64d"
|
||||
#endif
|
||||
#else /* (_MSC_VER && !__POCC__) || (__LCC__ && WIN32) */
|
||||
#if (defined(__GNUC__) && defined(WIN32)) || defined(__WATCOMC__)
|
||||
/* gcc on windows or Watcom */
|
||||
typedef long long curl_off_t;
|
||||
#define CURL_FORMAT_OFF_T "%I64d"
|
||||
#else /* GCC or Watcom on Windows */
|
||||
#if defined(__ILEC400__)
|
||||
/* OS400 C compiler. */
|
||||
typedef long long curl_off_t;
|
||||
#define CURL_FORMAT_OFF_T "%lld"
|
||||
#else /* OS400 C compiler. */
|
||||
|
||||
/* "normal" POSIX approach, do note that this does not necessarily mean that
|
||||
the type is >32 bits, see the SIZEOF_CURL_OFF_T define for that! */
|
||||
typedef off_t curl_off_t;
|
||||
|
||||
/* Check a range of defines to detect large file support. On Linux it seems
|
||||
none of these are set by default, so if you don't explicitly switches on
|
||||
large file support, this define will be made for "small file" support. */
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 0 /* to prevent warnings in the check below */
|
||||
#define UNDEF_FILE_OFFSET_BITS
|
||||
#endif
|
||||
#ifndef FILESIZEBITS
|
||||
#define FILESIZEBITS 0 /* to prevent warnings in the check below */
|
||||
#define UNDEF_FILESIZEBITS
|
||||
#endif
|
||||
|
||||
#if defined(_LARGE_FILES) || (_FILE_OFFSET_BITS > 32) || (FILESIZEBITS > 32) \
|
||||
|| defined(_LARGEFILE_SOURCE) || defined(_LARGEFILE64_SOURCE)
|
||||
/* For now, we assume at least one of these to be set for large files to
|
||||
work! */
|
||||
#define CURL_FORMAT_OFF_T "%lld"
|
||||
#else /* LARGE_FILE support */
|
||||
#define CURL_FORMAT_OFF_T "%ld"
|
||||
#endif
|
||||
#endif /* OS400 C compiler. */
|
||||
#endif /* GCC or Watcom on Windows */
|
||||
#endif /* (_MSC_VER && !__POCC__) || (__LCC__ && WIN32) */
|
||||
|
||||
#ifdef UNDEF_FILE_OFFSET_BITS
|
||||
/* this was defined above for our checks, undefine it again */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
#endif
|
||||
|
||||
#ifdef UNDEF_FILESIZEBITS
|
||||
/* this was defined above for our checks, undefine it again */
|
||||
#undef FILESIZEBITS
|
||||
#endif
|
||||
|
||||
#ifndef curl_socket_typedef
|
||||
/* socket typedef */
|
||||
#ifdef WIN32
|
||||
|
@ -153,16 +211,10 @@ struct curl_httppost {
|
|||
do not free in formfree */
|
||||
#define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */
|
||||
#define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */
|
||||
#define HTTPPOST_CALLBACK (1<<6) /* upload file contents by using the
|
||||
regular read callback to get the data
|
||||
and pass the given pointer as custom
|
||||
pointer */
|
||||
|
||||
char *showfilename; /* The file name to show. If not set, the
|
||||
actual file name will be used (if this
|
||||
is a file part) */
|
||||
void *userp; /* custom pointer used for
|
||||
HTTPPOST_CALLBACK posts */
|
||||
};
|
||||
|
||||
typedef int (*curl_progress_callback)(void *clientp,
|
||||
|
@ -179,7 +231,7 @@ typedef int (*curl_progress_callback)(void *clientp,
|
|||
#define CURL_MAX_WRITE_SIZE 16384
|
||||
#endif
|
||||
/* This is a magic return code for the write callback that, when returned,
|
||||
will signal libcurl to pause receiving on the current transfer. */
|
||||
will signal libcurl to pause receving on the current transfer. */
|
||||
#define CURL_WRITEFUNC_PAUSE 0x10000001
|
||||
typedef size_t (*curl_write_callback)(char *buffer,
|
||||
size_t size,
|
||||
|
@ -194,7 +246,7 @@ typedef size_t (*curl_write_callback)(char *buffer,
|
|||
#define CURL_READFUNC_PAUSE 0x10000001
|
||||
typedef int (*curl_seek_callback)(void *instream,
|
||||
curl_off_t offset,
|
||||
int origin); /* 'whence' */
|
||||
int origin); /* 'whence' */
|
||||
|
||||
typedef size_t (*curl_read_callback)(char *buffer,
|
||||
size_t size,
|
||||
|
@ -317,7 +369,7 @@ typedef enum {
|
|||
CURLE_WRITE_ERROR, /* 23 */
|
||||
CURLE_OBSOLETE24, /* 24 - NOT USED */
|
||||
CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */
|
||||
CURLE_READ_ERROR, /* 26 - couldn't open/read from file */
|
||||
CURLE_READ_ERROR, /* 26 - could open/read from file */
|
||||
CURLE_OUT_OF_MEMORY, /* 27 */
|
||||
/* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error
|
||||
instead of a memory allocation error if CURL_DOES_CONVERSIONS
|
||||
|
@ -389,13 +441,6 @@ typedef enum {
|
|||
|
||||
CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL
|
||||
connection */
|
||||
CURLE_AGAIN, /* 81 - socket is not ready for send/recv,
|
||||
wait till it's ready and try again (Added
|
||||
in 7.18.2) */
|
||||
CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or
|
||||
wrong format (Added in 7.19.0) */
|
||||
CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in
|
||||
7.19.0) */
|
||||
CURL_LAST /* never use! */
|
||||
} CURLcode;
|
||||
|
||||
|
@ -474,9 +519,8 @@ typedef enum {
|
|||
#define CURLAUTH_DIGEST (1<<1) /* Digest */
|
||||
#define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */
|
||||
#define CURLAUTH_NTLM (1<<3) /* NTLM */
|
||||
#define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */
|
||||
#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */
|
||||
#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
|
||||
#define CURLAUTH_ANY ~0 /* all types set */
|
||||
#define CURLAUTH_ANYSAFE (~CURLAUTH_BASIC)
|
||||
|
||||
#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */
|
||||
#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */
|
||||
|
@ -549,6 +593,23 @@ typedef enum {
|
|||
#ifdef CINIT
|
||||
#undef CINIT
|
||||
#endif
|
||||
/*
|
||||
* Figure out if we can use the ## operator, which is supported by ISO/ANSI C
|
||||
* and C++. Some compilers support it without setting __STDC__ or __cplusplus
|
||||
* so we need to carefully check for them too. We don't use configure-checks
|
||||
* for these since we want these headers to remain generic and working for all
|
||||
* platforms.
|
||||
*/
|
||||
#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \
|
||||
defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \
|
||||
defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \
|
||||
defined(__ILEC400__)
|
||||
/* This compiler is believed to have an ISO compatible preprocessor */
|
||||
#define CURL_ISOCPP
|
||||
#else
|
||||
/* This compiler is believed NOT to have an ISO compatible preprocessor */
|
||||
#undef CURL_ISOCPP
|
||||
#endif
|
||||
|
||||
#ifdef CURL_ISOCPP
|
||||
#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number
|
||||
|
@ -611,7 +672,7 @@ typedef enum {
|
|||
|
||||
/* If the CURLOPT_INFILE is used, this can be used to inform libcurl about
|
||||
* how large the file being sent really is. That allows better error
|
||||
* checking and better verifies that the upload was successful. -1 means
|
||||
* checking and better verifies that the upload was succcessful. -1 means
|
||||
* unknown size.
|
||||
*
|
||||
* For large file support, there is also a _LARGE version of the key
|
||||
|
@ -623,7 +684,7 @@ typedef enum {
|
|||
/* POST static input fields. */
|
||||
CINIT(POSTFIELDS, OBJECTPOINT, 15),
|
||||
|
||||
/* Set the referrer page (needed by some CGIs) */
|
||||
/* Set the referer page (needed by some CGIs) */
|
||||
CINIT(REFERER, OBJECTPOINT, 16),
|
||||
|
||||
/* Set the FTP PORT string (interface name, named or numerical IP address)
|
||||
|
@ -659,7 +720,7 @@ typedef enum {
|
|||
/* This points to a linked list of headers, struct curl_slist kind */
|
||||
CINIT(HTTPHEADER, OBJECTPOINT, 23),
|
||||
|
||||
/* This points to a linked list of post entries, struct curl_httppost */
|
||||
/* This points to a linked list of post entries, struct HttpPost */
|
||||
CINIT(HTTPPOST, OBJECTPOINT, 24),
|
||||
|
||||
/* name of the file keeping your private SSL-certificate */
|
||||
|
@ -682,7 +743,7 @@ typedef enum {
|
|||
"cookie awareness" */
|
||||
CINIT(COOKIEFILE, OBJECTPOINT, 31),
|
||||
|
||||
/* What version to specifically try to use.
|
||||
/* What version to specifly try to use.
|
||||
See CURL_SSLVERSION defines below. */
|
||||
CINIT(SSLVERSION, LONG, 32),
|
||||
|
||||
|
@ -743,7 +804,7 @@ typedef enum {
|
|||
/* Data passed to the progress callback */
|
||||
CINIT(PROGRESSDATA, OBJECTPOINT, 57),
|
||||
|
||||
/* We want the referrer field set automatically when following locations */
|
||||
/* We want the referer field set automatically when following locations */
|
||||
CINIT(AUTOREFERER, LONG, 58),
|
||||
|
||||
/* Port of the proxy, can be set in the proxy string as well with:
|
||||
|
@ -840,7 +901,7 @@ typedef enum {
|
|||
CURL_HTTP_VERSION* enums set below. */
|
||||
CINIT(HTTP_VERSION, LONG, 84),
|
||||
|
||||
/* Specifically switch on or off the FTP engine's use of the EPSV command. By
|
||||
/* Specificly switch on or off the FTP engine's use of the EPSV command. By
|
||||
default, that one will always be attempted before the more traditional
|
||||
PASV command. */
|
||||
CINIT(FTP_USE_EPSV, LONG, 85),
|
||||
|
@ -910,11 +971,11 @@ typedef enum {
|
|||
CINIT(HTTP200ALIASES, OBJECTPOINT, 104),
|
||||
|
||||
/* Continue to send authentication (user+password) when following locations,
|
||||
even when hostname changed. This can potentially send off the name
|
||||
even when hostname changed. This can potentionally send off the name
|
||||
and password to whatever host the server decides. */
|
||||
CINIT(UNRESTRICTED_AUTH, LONG, 105),
|
||||
|
||||
/* Specifically switch on or off the FTP engine's use of the EPRT command ( it
|
||||
/* Specificly switch on or off the FTP engine's use of the EPRT command ( it
|
||||
also disables the LPRT attempt). By default, those ones will always be
|
||||
attempted before the good old traditional PORT command. */
|
||||
CINIT(FTP_USE_EPRT, LONG, 106),
|
||||
|
@ -1095,7 +1156,7 @@ typedef enum {
|
|||
CINIT(CONNECTTIMEOUT_MS, LONG, 156),
|
||||
|
||||
/* set to zero to disable the libcurl's decoding and thus pass the raw body
|
||||
data to the application even when it is encoded/compressed */
|
||||
data to the appliction even when it is encoded/compressed */
|
||||
CINIT(HTTP_TRANSFER_DECODING, LONG, 157),
|
||||
CINIT(HTTP_CONTENT_DECODING, LONG, 158),
|
||||
|
||||
|
@ -1104,9 +1165,8 @@ typedef enum {
|
|||
CINIT(NEW_FILE_PERMS, LONG, 159),
|
||||
CINIT(NEW_DIRECTORY_PERMS, LONG, 160),
|
||||
|
||||
/* Set the behaviour of POST when redirecting. Values must be set to one
|
||||
of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
|
||||
CINIT(POSTREDIR, LONG, 161),
|
||||
/* Obey RFC 2616/10.3.2 and keep POSTs as POSTs after a 301 */
|
||||
CINIT(POST301, LONG, 161),
|
||||
|
||||
/* used by scp/sftp to verify the host's public key */
|
||||
CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162),
|
||||
|
@ -1128,28 +1188,6 @@ typedef enum {
|
|||
CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167),
|
||||
CINIT(SEEKDATA, OBJECTPOINT, 168),
|
||||
|
||||
/* CRL file */
|
||||
CINIT(CRLFILE, OBJECTPOINT, 169),
|
||||
|
||||
/* Issuer certificate */
|
||||
CINIT(ISSUERCERT, OBJECTPOINT, 170),
|
||||
|
||||
/* (IPv6) Address scope */
|
||||
CINIT(ADDRESS_SCOPE, LONG, 171),
|
||||
|
||||
/* Collect certificate chain info and allow it to get retrievable with
|
||||
CURLINFO_CERTINFO after the transfer is complete. (Unfortunately) only
|
||||
working with OpenSSL-powered builds. */
|
||||
CINIT(CERTINFO, LONG, 172),
|
||||
|
||||
/* "name" and "pwd" to use when fetching. */
|
||||
CINIT(USERNAME, OBJECTPOINT, 173),
|
||||
CINIT(PASSWORD, OBJECTPOINT, 174),
|
||||
|
||||
/* "name" and "pwd" to use with Proxy when fetching. */
|
||||
CINIT(PROXYUSERNAME, OBJECTPOINT, 175),
|
||||
CINIT(PROXYPASSWORD, OBJECTPOINT, 176),
|
||||
|
||||
CURLOPT_LASTENTRY /* the last unused */
|
||||
} CURLoption;
|
||||
|
||||
|
@ -1157,11 +1195,6 @@ typedef enum {
|
|||
the obsolete stuff removed! */
|
||||
|
||||
/* Backwards compatibility with older names */
|
||||
/* These are scheduled to disappear by 2011 */
|
||||
|
||||
/* This was added in version 7.19.1 */
|
||||
#define CURLOPT_POST301 CURLOPT_POSTREDIR
|
||||
|
||||
/* These are scheduled to disappear by 2009 */
|
||||
|
||||
/* The following were added in 7.17.0 */
|
||||
|
@ -1226,14 +1259,6 @@ enum {
|
|||
CURL_SSLVERSION_LAST /* never use, keep last */
|
||||
};
|
||||
|
||||
/* symbols to use with CURLOPT_POSTREDIR.
|
||||
CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that
|
||||
CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */
|
||||
|
||||
#define CURL_REDIR_GET_ALL 0
|
||||
#define CURL_REDIR_POST_301 1
|
||||
#define CURL_REDIR_POST_302 2
|
||||
#define CURL_REDIR_POST_ALL (CURL_REDIR_POST_301|CURL_REDIR_POST_302)
|
||||
|
||||
typedef enum {
|
||||
CURL_TIMECOND_NONE,
|
||||
|
@ -1288,9 +1313,7 @@ typedef enum {
|
|||
CFINIT(END),
|
||||
CFINIT(OBSOLETE2),
|
||||
|
||||
CFINIT(STREAM),
|
||||
|
||||
CURLFORM_LASTENTRY /* the last unused */
|
||||
CURLFORM_LASTENTRY /* the last unusued */
|
||||
} CURLformoption;
|
||||
|
||||
#undef CFINIT /* done */
|
||||
|
@ -1312,7 +1335,7 @@ struct curl_forms {
|
|||
* CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed
|
||||
* CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used
|
||||
* CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error)
|
||||
* CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated
|
||||
* CURL_FORMADD_MEMORY if a HttpPost struct cannot be allocated
|
||||
* CURL_FORMADD_MEMORY if some allocation for string copying failed.
|
||||
* CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array
|
||||
*
|
||||
|
@ -1336,7 +1359,7 @@ typedef enum {
|
|||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Pretty advanced function for building multi-part formposts. Each invoke
|
||||
* Pretty advanved function for building multi-part formposts. Each invoke
|
||||
* adds one part that together construct a full post. Then use
|
||||
* CURLOPT_HTTPPOST to send it off to libcurl.
|
||||
*/
|
||||
|
@ -1346,11 +1369,9 @@ CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,
|
|||
|
||||
/*
|
||||
* callback function for curl_formget()
|
||||
* The void *arg pointer will be the one passed as second argument to
|
||||
* curl_formget().
|
||||
* The void *arg pointer will be the one passed as second argument to curl_formget().
|
||||
* The character buffer passed to it must not be freed.
|
||||
* Should return the buffer length passed to it as the argument "len" on
|
||||
* success.
|
||||
* Should return the buffer length passed to it as the argument "len" on success.
|
||||
*/
|
||||
typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len);
|
||||
|
||||
|
@ -1519,15 +1540,6 @@ CURL_EXTERN void curl_slist_free_all(struct curl_slist *);
|
|||
*/
|
||||
CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);
|
||||
|
||||
/* info about the certificate chain, only for OpenSSL builds. Asked
|
||||
for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */
|
||||
struct curl_certinfo {
|
||||
int num_of_certs; /* number of certificates with information */
|
||||
struct curl_slist **certinfo; /* for each index in this array, there's a
|
||||
linked list with textual information in the
|
||||
format "name: value" */
|
||||
};
|
||||
|
||||
#define CURLINFO_STRING 0x100000
|
||||
#define CURLINFO_LONG 0x200000
|
||||
#define CURLINFO_DOUBLE 0x300000
|
||||
|
@ -1567,13 +1579,9 @@ typedef enum {
|
|||
CURLINFO_COOKIELIST = CURLINFO_SLIST + 28,
|
||||
CURLINFO_LASTSOCKET = CURLINFO_LONG + 29,
|
||||
CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,
|
||||
CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,
|
||||
CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
|
||||
CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33,
|
||||
CURLINFO_CERTINFO = CURLINFO_SLIST + 34,
|
||||
/* Fill in new entries below here! */
|
||||
|
||||
CURLINFO_LASTONE = 34
|
||||
CURLINFO_LASTONE = 30
|
||||
} CURLINFO;
|
||||
|
||||
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
|
||||
|
@ -1606,7 +1614,7 @@ typedef enum {
|
|||
/* Different data locks for a single share */
|
||||
typedef enum {
|
||||
CURL_LOCK_DATA_NONE = 0,
|
||||
/* CURL_LOCK_DATA_SHARE is used internally to say that
|
||||
/* CURL_LOCK_DATA_SHARE is used internaly to say that
|
||||
* the locking is just made to change the internal state of the share
|
||||
* itself.
|
||||
*/
|
||||
|
@ -1648,7 +1656,7 @@ typedef enum {
|
|||
typedef enum {
|
||||
CURLSHOPT_NONE, /* don't use */
|
||||
CURLSHOPT_SHARE, /* specify a data type to share */
|
||||
CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */
|
||||
CURLSHOPT_UNSHARE, /* specify shich data type to stop sharing */
|
||||
CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */
|
||||
CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */
|
||||
CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock
|
||||
|
@ -1673,7 +1681,7 @@ typedef enum {
|
|||
} CURLversion;
|
||||
|
||||
/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by
|
||||
basically all programs ever that want to get version information. It is
|
||||
basicly all programs ever, that want to get version information. It is
|
||||
meant to be a built-in version number for what kind of struct the caller
|
||||
expects. If the struct ever changes, we redefine the NOW to another enum
|
||||
from above. */
|
||||
|
@ -1783,21 +1791,4 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
|
|||
#include "easy.h" /* nothing in curl is fun without the easy stuff */
|
||||
#include "multi.h"
|
||||
|
||||
/* the typechecker doesn't work in C++ (yet) */
|
||||
#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
|
||||
((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \
|
||||
!defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK)
|
||||
#include "typecheck-gcc.h"
|
||||
#else
|
||||
#if defined(__STDC__) && (__STDC__ >= 1)
|
||||
/* This preprocessor magic that replaces a call with the exact same call is
|
||||
only done to make sure application authors pass exactly three arguments
|
||||
to these functions. */
|
||||
#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
|
||||
#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
|
||||
#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
|
||||
#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
|
||||
#endif /* __STDC__ >= 1 */
|
||||
#endif /* gcc >= 4.3 && !__cplusplus */
|
||||
|
||||
#endif /* __CURL_CURL_H */
|
|
@ -7,7 +7,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
@ -20,24 +20,24 @@
|
|||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: curlver.h,v 1.44 2009-01-17 14:56:33 gknauf Exp $
|
||||
* $Id: curlver.h,v 1.35 2008-01-24 14:05:56 gknauf Exp $
|
||||
***************************************************************************/
|
||||
|
||||
/* This header file contains nothing but libcurl version info, generated by
|
||||
a script at release-time. This was made its own header file in 7.11.2 */
|
||||
|
||||
/* This is the global package copyright */
|
||||
#define LIBCURL_COPYRIGHT "1996 - 2009 Daniel Stenberg, <daniel@haxx.se>."
|
||||
#define LIBCURL_COPYRIGHT "1996 - 2008 Daniel Stenberg, <daniel@haxx.se>."
|
||||
|
||||
/* This is the version number of the libcurl package from which this header
|
||||
file origins: */
|
||||
#define LIBCURL_VERSION "7.19.3"
|
||||
#define LIBCURL_VERSION "7.18.0"
|
||||
|
||||
/* The numeric version number is also available "in parts" by using these
|
||||
defines: */
|
||||
#define LIBCURL_VERSION_MAJOR 7
|
||||
#define LIBCURL_VERSION_MINOR 19
|
||||
#define LIBCURL_VERSION_PATCH 3
|
||||
#define LIBCURL_VERSION_MINOR 18
|
||||
#define LIBCURL_VERSION_PATCH 0
|
||||
|
||||
/* This is the numeric version of the libcurl version number, meant for easier
|
||||
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
|
||||
|
@ -54,7 +54,7 @@
|
|||
and it is always a greater number in a more recent release. It makes
|
||||
comparisons with greater than and less than work.
|
||||
*/
|
||||
#define LIBCURL_VERSION_NUM 0x071303
|
||||
#define LIBCURL_VERSION_NUM 0x071200
|
||||
|
||||
/*
|
||||
* This is the date and time when the full source package was created. The
|
||||
|
@ -65,6 +65,6 @@
|
|||
*
|
||||
* "Mon Feb 12 11:35:33 UTC 2007"
|
||||
*/
|
||||
#define LIBCURL_TIMESTAMP "Mon Jan 19 09:59:36 UTC 2009"
|
||||
#define LIBCURL_TIMESTAMP "Mon Jan 28 17:28:54 UTC 2008"
|
||||
|
||||
#endif /* __CURL_CURLVER_H */
|
|
@ -7,7 +7,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
@ -20,7 +20,7 @@
|
|||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: easy.h,v 1.14 2008-05-12 21:43:28 bagder Exp $
|
||||
* $Id: easy.h,v 1.13 2004/11/09 14:02:58 giva Exp $
|
||||
***************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -74,28 +74,6 @@ CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl);
|
|||
*/
|
||||
CURL_EXTERN void curl_easy_reset(CURL *curl);
|
||||
|
||||
/*
|
||||
* NAME curl_easy_recv()
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Receives data from the connected socket. Use after successful
|
||||
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
||||
*/
|
||||
CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
|
||||
size_t *n);
|
||||
|
||||
/*
|
||||
* NAME curl_easy_send()
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Sends data over the connected socket. Use after successful
|
||||
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
||||
*/
|
||||
CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
|
||||
size_t buflen, size_t *n);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -20,7 +20,7 @@
|
|||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: mprintf.h,v 1.16 2008-05-20 10:21:50 patrickm Exp $
|
||||
* $Id: mprintf.h,v 1.15 2007-08-07 12:44:38 patrickm Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
@ -35,13 +35,11 @@ extern "C" {
|
|||
CURL_EXTERN int curl_mprintf(const char *format, ...);
|
||||
CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...);
|
||||
CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...);
|
||||
CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,
|
||||
const char *format, ...);
|
||||
CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...);
|
||||
CURL_EXTERN int curl_mvprintf(const char *format, va_list args);
|
||||
CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args);
|
||||
CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args);
|
||||
CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,
|
||||
const char *format, va_list args);
|
||||
CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args);
|
||||
CURL_EXTERN char *curl_maprintf(const char *format, ...);
|
||||
CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: multi.h,v 1.45 2008-05-20 10:21:50 patrickm Exp $
|
||||
* $Id: multi.h,v 1.44 2007-05-30 20:04:44 bagder Exp $
|
||||
***************************************************************************/
|
||||
/*
|
||||
This is an "external" header file. Don't give away any internals here!
|
||||
|
@ -283,7 +283,7 @@ CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle,
|
|||
#undef CINIT /* re-using the same name as in curl.h */
|
||||
|
||||
#ifdef CURL_ISOCPP
|
||||
#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num
|
||||
#define CINIT(name,type,number) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + number
|
||||
#else
|
||||
/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
|
||||
#define LONG CURLOPTTYPE_LONG
|
BIN
main/source/includes/libcurl-7.18-nossl/libcurl.exp
Normal file
BIN
main/source/includes/libcurl-7.18-nossl/libcurl.exp
Normal file
Binary file not shown.
BIN
main/source/includes/libcurl-7.18-nossl/libcurl.lib
Normal file
BIN
main/source/includes/libcurl-7.18-nossl/libcurl.lib
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -1,55 +0,0 @@
|
|||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
Include files for libcurl, external users.
|
||||
|
||||
They're all placed in the curl subdirectory here for better fit in any kind
|
||||
of environment. You must include files from here using...
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
... style and point the compiler's include path to the directory holding the
|
||||
curl subdirectory. It makes it more likely to survive future modifications.
|
||||
|
||||
NOTE FOR LIBCURL HACKERS
|
||||
|
||||
The following notes apply to libcurl version 7.19.0 and later.
|
||||
|
||||
* The distributed curl/curlbuild.h file is only intended to be used on systems
|
||||
which can not run the also distributed configure script.
|
||||
|
||||
* The distributed curlbuild.h file is generated as a copy of curlbuild.h.dist
|
||||
when the libcurl source code distribution archive file is originally created.
|
||||
|
||||
* If you check out from CVS on a non-configure platform, you must run the
|
||||
appropriate buildconf* script to set up curlbuild.h and other local files
|
||||
before being able of compiling the library.
|
||||
|
||||
* On systems capable of running the configure script, the configure process
|
||||
will overwrite the distributed include/curl/curlbuild.h file with one that
|
||||
is suitable and specific to the library being configured and built, which
|
||||
is generated from the include/curl/curlbuild.h.in template file.
|
||||
|
||||
* If you intend to distribute an already compiled libcurl library you _MUST_
|
||||
also distribute along with it the generated curl/curlbuild.h which has been
|
||||
used to compile it. Otherwise the library will be of no use for the users of
|
||||
the library that you have built. It is _your_ responsability to provide this
|
||||
file. No one at the cURL project can know how you have built the library.
|
||||
|
||||
* File curl/curlbuild.h includes platform and configuration dependant info,
|
||||
and must not be modified by anyone. Configure script generates it for you.
|
||||
|
||||
* We cannot assume anything else but very basic compiler features being
|
||||
present. While libcurl requires an ANSI C compiler to build, some of the
|
||||
earlier ANSI compilers clearly can't deal with some preprocessor operators.
|
||||
|
||||
* Newlines must remain unix-style for older compilers' sake.
|
||||
|
||||
* Comments must be written in the old-style /* unnested C-fashion */
|
||||
|
||||
To figure out how to do good and portable checks for features, operating
|
||||
systems or specific hardwarare, a very good resource is Bjorn Reese's
|
||||
collection at http://predef.sf.net/
|
|
@ -1,25 +0,0 @@
|
|||
pkginclude_HEADERS = \
|
||||
curl.h curlver.h easy.h mprintf.h stdcheaders.h types.h multi.h \
|
||||
typecheck-gcc.h curlbuild.h curlrules.h
|
||||
|
||||
pkgincludedir= $(includedir)/curl
|
||||
|
||||
# curlbuild.h does not exist in the CVS tree. When the original libcurl
|
||||
# source code distribution archive file is created, curlbuild.h.dist is
|
||||
# renamed to curlbuild.h and included in the tarball so that it can be
|
||||
# used directly on non-configure systems.
|
||||
#
|
||||
# The distributed curlbuild.h will be overwritten on configure systems
|
||||
# when the configure script runs, with one that is suitable and specific
|
||||
# to the library being configured and built.
|
||||
#
|
||||
# curlbuild.h.in is the distributed template file from which the configure
|
||||
# script creates curlbuild.h at library configuration time, overwiting the
|
||||
# one included in the distribution archive.
|
||||
#
|
||||
# curlbuild.h.dist is not included in the source code distribution archive.
|
||||
|
||||
EXTRA_DIST = curlbuild.h.in
|
||||
|
||||
DISTCLEANFILES = curlbuild.h
|
||||
|
|
@ -1,528 +0,0 @@
|
|||
#ifndef __CURL_CURLBUILD_H
|
||||
#define __CURL_CURLBUILD_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: curlbuild.h.dist,v 1.16 2009-01-16 08:36:41 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
/* ================================================================ */
|
||||
/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* NOTE 1:
|
||||
* -------
|
||||
*
|
||||
* See file include/curl/curlbuild.h.in, run configure, and forget
|
||||
* that this file exists it is only used for non-configure systems.
|
||||
* But you can keep reading if you want ;-)
|
||||
*
|
||||
*/
|
||||
|
||||
/* ================================================================ */
|
||||
/* NOTES FOR NON-CONFIGURE SYSTEMS */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* NOTE 1:
|
||||
* -------
|
||||
*
|
||||
* Nothing in this file is intended to be modified or adjusted by the
|
||||
* curl library user nor by the curl library builder.
|
||||
*
|
||||
* If you think that something actually needs to be changed, adjusted
|
||||
* or fixed in this file, then, report it on the libcurl development
|
||||
* mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/
|
||||
*
|
||||
* Try to keep one section per platform, compiler and architecture,
|
||||
* otherwise, if an existing section is reused for a different one and
|
||||
* later on the original is adjusted, probably the piggybacking one can
|
||||
* be adversely changed.
|
||||
*
|
||||
* In order to differentiate between platforms/compilers/architectures
|
||||
* use only compiler built in predefined preprocessor symbols.
|
||||
*
|
||||
* This header file shall only export symbols which are 'curl' or 'CURL'
|
||||
* prefixed, otherwise public name space would be polluted.
|
||||
*
|
||||
* NOTE 2:
|
||||
* -------
|
||||
*
|
||||
* For any given platform/compiler curl_off_t must be typedef'ed to a
|
||||
* 64-bit wide signed integral data type. The width of this data type
|
||||
* must remain constant and independant of any possible large file
|
||||
* support settings.
|
||||
*
|
||||
* As an exception to the above, curl_off_t shall be typedef'ed to a
|
||||
* 32-bit wide signed integral data type if there is no 64-bit type.
|
||||
*
|
||||
* As a general rule, curl_off_t shall not be mapped to off_t. This
|
||||
* rule shall only be violated if off_t is the only 64-bit data type
|
||||
* available and the size of off_t is independant of large file support
|
||||
* settings. Keep your build on the safe side avoiding an off_t gating.
|
||||
* If you have a 64-bit off_t then take for sure that another 64-bit
|
||||
* data type exists, dig deeper and you will find it.
|
||||
*
|
||||
* NOTE 3:
|
||||
* -------
|
||||
*
|
||||
* Right now you might be staring at file include/curl/curlbuild.h.dist or
|
||||
* at file include/curl/curlbuild.h, this is due to the following reason:
|
||||
* file include/curl/curlbuild.h.dist is renamed to include/curl/curlbuild.h
|
||||
* when the libcurl source code distribution archive file is created.
|
||||
*
|
||||
* File include/curl/curlbuild.h.dist is not included in the distribution
|
||||
* archive. File include/curl/curlbuild.h is not present in the CVS tree.
|
||||
*
|
||||
* The distributed include/curl/curlbuild.h file is only intended to be used
|
||||
* on systems which can not run the also distributed configure script.
|
||||
*
|
||||
* On systems capable of running the configure script, the configure process
|
||||
* will overwrite the distributed include/curl/curlbuild.h file with one that
|
||||
* is suitable and specific to the library being configured and built, which
|
||||
* is generated from the include/curl/curlbuild.h.in template file.
|
||||
*
|
||||
* If you check out from CVS on a non-configure platform, you must run the
|
||||
* appropriate buildconf* script to set up curlbuild.h and other local files.
|
||||
*
|
||||
*/
|
||||
|
||||
/* ================================================================ */
|
||||
/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
|
||||
/* ================================================================ */
|
||||
|
||||
#ifdef CURL_SIZEOF_LONG
|
||||
# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_TYPEOF_CURL_OFF_T
|
||||
# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_FORMAT_CURL_OFF_T
|
||||
# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_FORMAT_CURL_OFF_TU
|
||||
# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_FORMAT_OFF_T
|
||||
# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_SIZEOF_CURL_OFF_T
|
||||
# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_SUFFIX_CURL_OFF_T
|
||||
# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_SUFFIX_CURL_OFF_TU
|
||||
# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
|
||||
#endif
|
||||
|
||||
/* ================================================================ */
|
||||
/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */
|
||||
/* ================================================================ */
|
||||
|
||||
#if defined(__DJGPP__) || defined(__GO32__)
|
||||
# if defined(__DJGPP__) && (__DJGPP__ > 1)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# else
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
|
||||
#elif defined(__SALFORDC__)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# if (__BORLANDC__ < 0x520)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# else
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_FORMAT_OFF_T "%I64d"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
||||
# endif
|
||||
|
||||
#elif defined(__TURBOC__)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(__386__)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_FORMAT_OFF_T "%I64d"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
||||
# else
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
|
||||
#elif defined(__POCC__)
|
||||
# if (__POCC__ < 280)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# elif defined(_MSC_VER)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_FORMAT_OFF_T "%I64d"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
||||
# else
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# endif
|
||||
|
||||
#elif defined(__LCC__)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
|
||||
#elif defined(__SYMBIAN32__)
|
||||
# if defined(__EABI__) /* Treat all ARM compilers equally */
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# elif defined(__CW32__)
|
||||
# pragma longlong on
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# elif defined(__VC32__)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# endif
|
||||
|
||||
#elif defined(__MWERKS__)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
|
||||
#elif defined(_WIN32_WCE)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_FORMAT_OFF_T "%I64d"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
||||
|
||||
#elif defined(__MINGW32__)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_FORMAT_OFF_T "%I64d"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
|
||||
#elif defined(__VMS)
|
||||
# if defined(__alpha) || defined(__ia64)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# else
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
|
||||
#elif defined(__OS400__)
|
||||
# if defined(__ILEC400__)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# endif
|
||||
|
||||
#elif defined(__MVS__)
|
||||
# if defined(__IBMC__) || defined(__IBMCPP__)
|
||||
# if defined(_ILP32)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# elif defined(_LP64)
|
||||
# define CURL_SIZEOF_LONG 8
|
||||
# endif
|
||||
# if defined(_LONG_LONG)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# elif defined(_LP64)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# else
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#elif defined(__370__)
|
||||
# if defined(__IBMC__) || defined(__IBMCPP__)
|
||||
# if defined(_ILP32)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# elif defined(_LP64)
|
||||
# define CURL_SIZEOF_LONG 8
|
||||
# endif
|
||||
# if defined(_LONG_LONG)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# elif defined(_LP64)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# else
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* ===================================== */
|
||||
/* SunPro Compilers */
|
||||
/* ===================================== */
|
||||
|
||||
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
# define CURL_TYPEOF_CURL_OFF_T off_t
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# if defined(__amd64) || defined(__sparcv9)
|
||||
# define CURL_SIZEOF_LONG 8
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# else
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# endif
|
||||
|
||||
/* ===================================== */
|
||||
/* KEEP MSVC THE PENULTIMATE ENTRY */
|
||||
/* ===================================== */
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_FORMAT_OFF_T "%I64d"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
||||
# else
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
|
||||
/* ===================================== */
|
||||
/* KEEP GENERIC GCC THE LAST ENTRY */
|
||||
/* ===================================== */
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
# if defined(__i386__) || defined(__ppc__)
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# elif defined(__x86_64__) || defined(__ppc64__)
|
||||
# define CURL_SIZEOF_LONG 8
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_FORMAT_OFF_T "%ld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
|
||||
#else
|
||||
# error "Unknown non-configure build target!"
|
||||
Error Compilation_aborted_Unknown_non_configure_build_target
|
||||
#endif
|
||||
|
||||
/* Data type definition of curl_off_t. */
|
||||
|
||||
#ifdef CURL_TYPEOF_CURL_OFF_T
|
||||
typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
|
||||
#endif
|
||||
|
||||
#endif /* __CURL_CURLBUILD_H */
|
|
@ -1,153 +0,0 @@
|
|||
#ifndef __CURL_CURLBUILD_H
|
||||
#define __CURL_CURLBUILD_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: curlbuild.h.in,v 1.6 2008-08-25 13:42:53 yangtse Exp $
|
||||
***************************************************************************/
|
||||
|
||||
/* ================================================================ */
|
||||
/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* NOTE 1:
|
||||
* -------
|
||||
*
|
||||
* Nothing in this file is intended to be modified or adjusted by the
|
||||
* curl library user nor by the curl library builder.
|
||||
*
|
||||
* If you think that something actually needs to be changed, adjusted
|
||||
* or fixed in this file, then, report it on the libcurl development
|
||||
* mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/
|
||||
*
|
||||
* This header file shall only export symbols which are 'curl' or 'CURL'
|
||||
* prefixed, otherwise public name space would be polluted.
|
||||
*
|
||||
* NOTE 2:
|
||||
* -------
|
||||
*
|
||||
* Right now you might be staring at file include/curl/curlbuild.h.in or
|
||||
* at file include/curl/curlbuild.h, this is due to the following reason:
|
||||
*
|
||||
* On systems capable of running the configure script, the configure process
|
||||
* will overwrite the distributed include/curl/curlbuild.h file with one that
|
||||
* is suitable and specific to the library being configured and built, which
|
||||
* is generated from the include/curl/curlbuild.h.in template file.
|
||||
*
|
||||
*/
|
||||
|
||||
/* ================================================================ */
|
||||
/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
|
||||
/* ================================================================ */
|
||||
|
||||
#ifdef CURL_SIZEOF_LONG
|
||||
# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_TYPEOF_CURL_OFF_T
|
||||
# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_FORMAT_CURL_OFF_T
|
||||
# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_FORMAT_CURL_OFF_TU
|
||||
# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_FORMAT_OFF_T
|
||||
# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_SIZEOF_CURL_OFF_T
|
||||
# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_SUFFIX_CURL_OFF_T
|
||||
# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CURL_SUFFIX_CURL_OFF_TU
|
||||
# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
|
||||
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
|
||||
#endif
|
||||
|
||||
/* ================================================================ */
|
||||
/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
|
||||
/* ================================================================ */
|
||||
|
||||
/* Configure process defines this to 1 when it finds out that system */
|
||||
/* header file sys/types.h must be included by the external interface. */
|
||||
#undef CURL_PULL_SYS_TYPES_H
|
||||
#ifdef CURL_PULL_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* Configure process defines this to 1 when it finds out that system */
|
||||
/* header file stdint.h must be included by the external interface. */
|
||||
#undef CURL_PULL_STDINT_H
|
||||
#ifdef CURL_PULL_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
/* Configure process defines this to 1 when it finds out that system */
|
||||
/* header file inttypes.h must be included by the external interface. */
|
||||
#undef CURL_PULL_INTTYPES_H
|
||||
#ifdef CURL_PULL_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#undef CURL_SIZEOF_LONG
|
||||
|
||||
/* Signed integral data type used for curl_off_t. */
|
||||
#undef CURL_TYPEOF_CURL_OFF_T
|
||||
|
||||
/* Data type definition of curl_off_t. */
|
||||
typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
|
||||
|
||||
/* curl_off_t formatting string directive without "%" conversion specifier. */
|
||||
#undef CURL_FORMAT_CURL_OFF_T
|
||||
|
||||
/* unsigned curl_off_t formatting string without "%" conversion specifier. */
|
||||
#undef CURL_FORMAT_CURL_OFF_TU
|
||||
|
||||
/* curl_off_t formatting string directive with "%" conversion specifier. */
|
||||
#undef CURL_FORMAT_OFF_T
|
||||
|
||||
/* The size of `curl_off_t', as computed by sizeof. */
|
||||
#undef CURL_SIZEOF_CURL_OFF_T
|
||||
|
||||
/* curl_off_t constant suffix. */
|
||||
#undef CURL_SUFFIX_CURL_OFF_T
|
||||
|
||||
/* unsigned curl_off_t constant suffix. */
|
||||
#undef CURL_SUFFIX_CURL_OFF_TU
|
||||
|
||||
#endif /* __CURL_CURLBUILD_H */
|
|
@ -1,216 +0,0 @@
|
|||
#ifndef __CURL_CURLRULES_H
|
||||
#define __CURL_CURLRULES_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: curlrules.h,v 1.5 2008-08-25 01:18:49 yangtse Exp $
|
||||
***************************************************************************/
|
||||
|
||||
/* ================================================================ */
|
||||
/* COMPILE TIME SANITY CHECKS */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* NOTE 1:
|
||||
* -------
|
||||
*
|
||||
* All checks done in this file are intentionally placed in a public
|
||||
* header file which is pulled by curl/curl.h when an application is
|
||||
* being built using an already built libcurl library. Additionally
|
||||
* this file is also included and used when building the library.
|
||||
*
|
||||
* If compilation fails on this file it is certainly sure that the
|
||||
* problem is elsewhere. It could be a problem in the curlbuild.h
|
||||
* header file, or simply that you are using different compilation
|
||||
* settings than those used to build the library.
|
||||
*
|
||||
* Nothing in this file is intended to be modified or adjusted by the
|
||||
* curl library user nor by the curl library builder.
|
||||
*
|
||||
* Do not deactivate any check, these are done to make sure that the
|
||||
* library is properly built and used.
|
||||
*
|
||||
* You can find further help on the libcurl development mailing list:
|
||||
* http://cool.haxx.se/mailman/listinfo/curl-library/
|
||||
*
|
||||
* NOTE 2
|
||||
* ------
|
||||
*
|
||||
* Some of the following compile time checks are based on the fact
|
||||
* that the dimension of a constant array can not be a negative one.
|
||||
* In this way if the compile time verification fails, the compilation
|
||||
* will fail issuing an error. The error description wording is compiler
|
||||
* dependant but it will be quite similar to one of the following:
|
||||
*
|
||||
* "negative subscript or subscript is too large"
|
||||
* "array must have at least one element"
|
||||
* "-1 is an illegal array size"
|
||||
* "size of array is negative"
|
||||
*
|
||||
* If you are building an application which tries to use an already
|
||||
* built libcurl library and you are getting this kind of errors on
|
||||
* this file, it is a clear indication that there is a mismatch between
|
||||
* how the library was built and how you are trying to use it for your
|
||||
* application. Your already compiled or binary library provider is the
|
||||
* only one who can give you the details you need to properly use it.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Verify that some macros are actually defined.
|
||||
*/
|
||||
|
||||
#ifndef CURL_SIZEOF_LONG
|
||||
# error "CURL_SIZEOF_LONG definition is missing!"
|
||||
Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing
|
||||
#endif
|
||||
|
||||
#ifndef CURL_TYPEOF_CURL_OFF_T
|
||||
# error "CURL_TYPEOF_CURL_OFF_T definition is missing!"
|
||||
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing
|
||||
#endif
|
||||
|
||||
#ifndef CURL_FORMAT_CURL_OFF_T
|
||||
# error "CURL_FORMAT_CURL_OFF_T definition is missing!"
|
||||
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing
|
||||
#endif
|
||||
|
||||
#ifndef CURL_FORMAT_CURL_OFF_TU
|
||||
# error "CURL_FORMAT_CURL_OFF_TU definition is missing!"
|
||||
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing
|
||||
#endif
|
||||
|
||||
#ifndef CURL_FORMAT_OFF_T
|
||||
# error "CURL_FORMAT_OFF_T definition is missing!"
|
||||
Error Compilation_aborted_CURL_FORMAT_OFF_T_is_missing
|
||||
#endif
|
||||
|
||||
#ifndef CURL_SIZEOF_CURL_OFF_T
|
||||
# error "CURL_SIZEOF_CURL_OFF_T definition is missing!"
|
||||
Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing
|
||||
#endif
|
||||
|
||||
#ifndef CURL_SUFFIX_CURL_OFF_T
|
||||
# error "CURL_SUFFIX_CURL_OFF_T definition is missing!"
|
||||
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing
|
||||
#endif
|
||||
|
||||
#ifndef CURL_SUFFIX_CURL_OFF_TU
|
||||
# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!"
|
||||
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macros private to this header file.
|
||||
*/
|
||||
|
||||
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
|
||||
|
||||
#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1
|
||||
|
||||
/*
|
||||
* Verify that the size previously defined and expected for long
|
||||
* is the same as the one reported by sizeof() at compile time.
|
||||
*/
|
||||
|
||||
typedef char
|
||||
__curl_rule_01__
|
||||
[CurlchkszEQ(long, CURL_SIZEOF_LONG)];
|
||||
|
||||
/*
|
||||
* Verify that the size previously defined and expected for
|
||||
* curl_off_t is actually the the same as the one reported
|
||||
* by sizeof() at compile time.
|
||||
*/
|
||||
|
||||
typedef char
|
||||
__curl_rule_02__
|
||||
[CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];
|
||||
|
||||
/*
|
||||
* Verify at compile time that the size of curl_off_t as reported
|
||||
* by sizeof() is greater or equal than the one reported for long
|
||||
* for the current compilation.
|
||||
*/
|
||||
|
||||
typedef char
|
||||
__curl_rule_03__
|
||||
[CurlchkszGE(curl_off_t, long)];
|
||||
|
||||
/* ================================================================ */
|
||||
/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
|
||||
* these to be visible and exported by the external libcurl interface API,
|
||||
* while also making them visible to the library internals, simply including
|
||||
* setup.h, without actually needing to include curl.h internally.
|
||||
* If some day this section would grow big enough, all this should be moved
|
||||
* to its own header file.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Figure out if we can use the ## preprocessor operator, which is supported
|
||||
* by ISO/ANSI C and C++. Some compilers support it without setting __STDC__
|
||||
* or __cplusplus so we need to carefully check for them too.
|
||||
*/
|
||||
|
||||
#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \
|
||||
defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \
|
||||
defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \
|
||||
defined(__ILEC400__)
|
||||
/* This compiler is believed to have an ISO compatible preprocessor */
|
||||
#define CURL_ISOCPP
|
||||
#else
|
||||
/* This compiler is believed NOT to have an ISO compatible preprocessor */
|
||||
#undef CURL_ISOCPP
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macros for minimum-width signed and unsigned curl_off_t integer constants.
|
||||
*/
|
||||
|
||||
#ifdef CURL_ISOCPP
|
||||
# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val ## Suffix
|
||||
#else
|
||||
# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val/**/Suffix
|
||||
#endif
|
||||
#define __CURL_OFF_T_C_HELPER1(Val,Suffix) __CURL_OFF_T_C_HELPER2(Val,Suffix)
|
||||
#define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_T)
|
||||
#define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_TU)
|
||||
|
||||
/*
|
||||
* Get rid of macros private to this header file.
|
||||
*/
|
||||
|
||||
#undef CurlchkszEQ
|
||||
#undef CurlchkszGE
|
||||
|
||||
/*
|
||||
* Get rid of macros not intended to exist beyond this point.
|
||||
*/
|
||||
|
||||
#undef CURL_PULL_SYS_TYPES_H
|
||||
#undef CURL_PULL_STDINT_H
|
||||
#undef CURL_PULL_INTTYPES_H
|
||||
|
||||
#undef CURL_TYPEOF_CURL_OFF_T
|
||||
|
||||
#endif /* __CURL_CURLRULES_H */
|
|
@ -1,550 +0,0 @@
|
|||
#ifndef __CURL_TYPECHECK_GCC_H
|
||||
#define __CURL_TYPECHECK_GCC_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: typecheck-gcc.h,v 1.8 2008-10-17 03:59:02 yangtse Exp $
|
||||
***************************************************************************/
|
||||
|
||||
/* wraps curl_easy_setopt() with typechecking */
|
||||
|
||||
/* To add a new kind of warning, add an
|
||||
* if(_curl_is_sometype_option(_curl_opt) && ! _curl_is_sometype(value))
|
||||
* _curl_easy_setopt_err_sometype();
|
||||
* block and define _curl_is_sometype_option, _curl_is_sometype and
|
||||
* _curl_easy_setopt_err_sometype below
|
||||
*
|
||||
* To add an option that uses the same type as an existing option, you'll just
|
||||
* need to extend the appropriate _curl_*_option macro
|
||||
*/
|
||||
#define curl_easy_setopt(handle, option, value) \
|
||||
__extension__ ({ \
|
||||
__typeof__ (option) _curl_opt = option; \
|
||||
if (__builtin_constant_p(_curl_opt)) { \
|
||||
if (_curl_is_long_option(_curl_opt) && !_curl_is_long(value)) \
|
||||
_curl_easy_setopt_err_long(); \
|
||||
if (_curl_is_off_t_option(_curl_opt) && !_curl_is_off_t(value)) \
|
||||
_curl_easy_setopt_err_curl_off_t(); \
|
||||
if (_curl_is_string_option(_curl_opt) && !_curl_is_string(value)) \
|
||||
_curl_easy_setopt_err_string(); \
|
||||
if (_curl_is_write_cb_option(_curl_opt) && !_curl_is_write_cb(value)) \
|
||||
_curl_easy_setopt_err_write_callback(); \
|
||||
if ((_curl_opt) == CURLOPT_READFUNCTION && !_curl_is_read_cb(value)) \
|
||||
_curl_easy_setopt_err_read_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_IOCTLFUNCTION && !_curl_is_ioctl_cb(value)) \
|
||||
_curl_easy_setopt_err_ioctl_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION && !_curl_is_sockopt_cb(value))\
|
||||
_curl_easy_setopt_err_sockopt_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION && \
|
||||
!_curl_is_opensocket_cb(value)) \
|
||||
_curl_easy_setopt_err_opensocket_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION && \
|
||||
!_curl_is_progress_cb(value)) \
|
||||
_curl_easy_setopt_err_progress_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_DEBUGFUNCTION && !_curl_is_debug_cb(value)) \
|
||||
_curl_easy_setopt_err_debug_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION && \
|
||||
!_curl_is_ssl_ctx_cb(value)) \
|
||||
_curl_easy_setopt_err_ssl_ctx_cb(); \
|
||||
if (_curl_is_conv_cb_option(_curl_opt) && !_curl_is_conv_cb(value)) \
|
||||
_curl_easy_setopt_err_conv_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_SEEKFUNCTION && !_curl_is_seek_cb(value)) \
|
||||
_curl_easy_setopt_err_seek_cb(); \
|
||||
if (_curl_is_cb_data_option(_curl_opt) && !_curl_is_cb_data(value)) \
|
||||
_curl_easy_setopt_err_cb_data(); \
|
||||
if ((_curl_opt) == CURLOPT_ERRORBUFFER && !_curl_is_error_buffer(value)) \
|
||||
_curl_easy_setopt_err_error_buffer(); \
|
||||
if ((_curl_opt) == CURLOPT_STDERR && !_curl_is_FILE(value)) \
|
||||
_curl_easy_setopt_err_FILE(); \
|
||||
if (_curl_is_postfields_option(_curl_opt) && !_curl_is_postfields(value)) \
|
||||
_curl_easy_setopt_err_postfields(); \
|
||||
if ((_curl_opt) == CURLOPT_HTTPPOST && \
|
||||
!_curl_is_arr((value), struct curl_httppost)) \
|
||||
_curl_easy_setopt_err_curl_httpost(); \
|
||||
if (_curl_is_slist_option(_curl_opt) && \
|
||||
!_curl_is_arr((value), struct curl_slist)) \
|
||||
_curl_easy_setopt_err_curl_slist(); \
|
||||
if ((_curl_opt) == CURLOPT_SHARE && !_curl_is_ptr((value), CURLSH)) \
|
||||
_curl_easy_setopt_err_CURLSH(); \
|
||||
} \
|
||||
curl_easy_setopt(handle, _curl_opt, value); \
|
||||
})
|
||||
|
||||
/* wraps curl_easy_getinfo() with typechecking */
|
||||
/* FIXME: don't allow const pointers */
|
||||
#define curl_easy_getinfo(handle, info, arg) \
|
||||
__extension__ ({ \
|
||||
__typeof__ (info) _curl_info = info; \
|
||||
if (__builtin_constant_p(_curl_info)) { \
|
||||
if (_curl_is_string_info(_curl_info) && !_curl_is_arr((arg), char *)) \
|
||||
_curl_easy_getinfo_err_string(); \
|
||||
if (_curl_is_long_info(_curl_info) && !_curl_is_arr((arg), long)) \
|
||||
_curl_easy_getinfo_err_long(); \
|
||||
if (_curl_is_double_info(_curl_info) && !_curl_is_arr((arg), double)) \
|
||||
_curl_easy_getinfo_err_double(); \
|
||||
if (_curl_is_slist_info(_curl_info) && \
|
||||
!_curl_is_arr((arg), struct curl_slist *)) \
|
||||
_curl_easy_getinfo_err_curl_slist(); \
|
||||
} \
|
||||
curl_easy_getinfo(handle, _curl_info, arg); \
|
||||
})
|
||||
|
||||
/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(),
|
||||
* for now just make sure that the functions are called with three
|
||||
* arguments
|
||||
*/
|
||||
#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
|
||||
#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
|
||||
|
||||
|
||||
/* the actual warnings, triggered by calling the _curl_easy_setopt_err*
|
||||
* functions */
|
||||
|
||||
/* To define a new warning, use _CURL_WARNING(identifier, "message") */
|
||||
#define _CURL_WARNING(id, message) \
|
||||
static void __attribute__((warning(message))) __attribute__((unused)) \
|
||||
__attribute__((noinline)) id(void) { __asm__(""); }
|
||||
|
||||
_CURL_WARNING(_curl_easy_setopt_err_long,
|
||||
"curl_easy_setopt expects a long argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_curl_off_t,
|
||||
"curl_easy_setopt expects a curl_off_t argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_string,
|
||||
"curl_easy_setopt expects a string (char* or char[]) argument for this option"
|
||||
)
|
||||
_CURL_WARNING(_curl_easy_setopt_err_write_callback,
|
||||
"curl_easy_setopt expects a curl_write_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_read_cb,
|
||||
"curl_easy_setopt expects a curl_read_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_ioctl_cb,
|
||||
"curl_easy_setopt expects a curl_ioctl_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb,
|
||||
"curl_easy_setopt expects a curl_sockopt_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb,
|
||||
"curl_easy_setopt expects a curl_opensocket_callback argument for this option"
|
||||
)
|
||||
_CURL_WARNING(_curl_easy_setopt_err_progress_cb,
|
||||
"curl_easy_setopt expects a curl_progress_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_debug_cb,
|
||||
"curl_easy_setopt expects a curl_debug_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb,
|
||||
"curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_conv_cb,
|
||||
"curl_easy_setopt expects a curl_conv_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_seek_cb,
|
||||
"curl_easy_setopt expects a curl_seek_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_cb_data,
|
||||
"curl_easy_setopt expects a private data pointer as argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_error_buffer,
|
||||
"curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_FILE,
|
||||
"curl_easy_setopt expects a FILE* argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_postfields,
|
||||
"curl_easy_setopt expects a void* or char* argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_curl_httpost,
|
||||
"curl_easy_setopt expects a struct curl_httppost* argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_curl_slist,
|
||||
"curl_easy_setopt expects a struct curl_slist* argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_CURLSH,
|
||||
"curl_easy_setopt expects a CURLSH* argument for this option")
|
||||
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_string,
|
||||
"curl_easy_getinfo expects a pointer to char * for this info")
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_long,
|
||||
"curl_easy_getinfo expects a pointer to long for this info")
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_double,
|
||||
"curl_easy_getinfo expects a pointer to double for this info")
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
|
||||
"curl_easy_getinfo expects a pointer to struct curl_slist * for this info")
|
||||
|
||||
/* groups of curl_easy_setops options that take the same type of argument */
|
||||
|
||||
/* To add a new option to one of the groups, just add
|
||||
* (option) == CURLOPT_SOMETHING
|
||||
* to the or-expression. If the option takes a long or curl_off_t, you don't
|
||||
* have to do anything
|
||||
*/
|
||||
|
||||
/* evaluates to true if option takes a long argument */
|
||||
#define _curl_is_long_option(option) \
|
||||
(0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT)
|
||||
|
||||
#define _curl_is_off_t_option(option) \
|
||||
((option) > CURLOPTTYPE_OFF_T)
|
||||
|
||||
/* evaluates to true if option takes a char* argument */
|
||||
#define _curl_is_string_option(option) \
|
||||
((option) == CURLOPT_URL || \
|
||||
(option) == CURLOPT_PROXY || \
|
||||
(option) == CURLOPT_INTERFACE || \
|
||||
(option) == CURLOPT_NETRC_FILE || \
|
||||
(option) == CURLOPT_USERPWD || \
|
||||
(option) == CURLOPT_USERNAME || \
|
||||
(option) == CURLOPT_PASSWORD || \
|
||||
(option) == CURLOPT_PROXYUSERPWD || \
|
||||
(option) == CURLOPT_PROXYUSERNAME || \
|
||||
(option) == CURLOPT_PROXYPASSWORD || \
|
||||
(option) == CURLOPT_ENCODING || \
|
||||
(option) == CURLOPT_REFERER || \
|
||||
(option) == CURLOPT_USERAGENT || \
|
||||
(option) == CURLOPT_COOKIE || \
|
||||
(option) == CURLOPT_COOKIEFILE || \
|
||||
(option) == CURLOPT_COOKIEJAR || \
|
||||
(option) == CURLOPT_COOKIELIST || \
|
||||
(option) == CURLOPT_FTPPORT || \
|
||||
(option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \
|
||||
(option) == CURLOPT_FTP_ACCOUNT || \
|
||||
(option) == CURLOPT_RANGE || \
|
||||
(option) == CURLOPT_CUSTOMREQUEST || \
|
||||
(option) == CURLOPT_SSLCERT || \
|
||||
(option) == CURLOPT_SSLCERTTYPE || \
|
||||
(option) == CURLOPT_SSLKEY || \
|
||||
(option) == CURLOPT_SSLKEYTYPE || \
|
||||
(option) == CURLOPT_KEYPASSWD || \
|
||||
(option) == CURLOPT_SSLENGINE || \
|
||||
(option) == CURLOPT_CAINFO || \
|
||||
(option) == CURLOPT_CAPATH || \
|
||||
(option) == CURLOPT_RANDOM_FILE || \
|
||||
(option) == CURLOPT_EGDSOCKET || \
|
||||
(option) == CURLOPT_SSL_CIPHER_LIST || \
|
||||
(option) == CURLOPT_KRBLEVEL || \
|
||||
(option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \
|
||||
(option) == CURLOPT_SSH_PUBLIC_KEYFILE || \
|
||||
(option) == CURLOPT_SSH_PRIVATE_KEYFILE || \
|
||||
(option) == CURLOPT_CRLFILE || \
|
||||
(option) == CURLOPT_ISSUERCERT || \
|
||||
0)
|
||||
|
||||
/* evaluates to true if option takes a curl_write_callback argument */
|
||||
#define _curl_is_write_cb_option(option) \
|
||||
((option) == CURLOPT_HEADERFUNCTION || \
|
||||
(option) == CURLOPT_WRITEFUNCTION)
|
||||
|
||||
/* evaluates to true if option takes a curl_conv_callback argument */
|
||||
#define _curl_is_conv_cb_option(option) \
|
||||
((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \
|
||||
(option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \
|
||||
(option) == CURLOPT_CONV_FROM_UTF8_FUNCTION)
|
||||
|
||||
/* evaluates to true if option takes a data argument to pass to a callback */
|
||||
#define _curl_is_cb_data_option(option) \
|
||||
((option) == CURLOPT_WRITEDATA || \
|
||||
(option) == CURLOPT_READDATA || \
|
||||
(option) == CURLOPT_IOCTLDATA || \
|
||||
(option) == CURLOPT_SOCKOPTDATA || \
|
||||
(option) == CURLOPT_OPENSOCKETDATA || \
|
||||
(option) == CURLOPT_PROGRESSDATA || \
|
||||
(option) == CURLOPT_WRITEHEADER || \
|
||||
(option) == CURLOPT_DEBUGDATA || \
|
||||
(option) == CURLOPT_SSL_CTX_DATA || \
|
||||
(option) == CURLOPT_SEEKDATA || \
|
||||
(option) == CURLOPT_PRIVATE || \
|
||||
0)
|
||||
|
||||
/* evaluates to true if option takes a POST data argument (void* or char*) */
|
||||
#define _curl_is_postfields_option(option) \
|
||||
((option) == CURLOPT_POSTFIELDS || \
|
||||
(option) == CURLOPT_COPYPOSTFIELDS || \
|
||||
0)
|
||||
|
||||
/* evaluates to true if option takes a struct curl_slist * argument */
|
||||
#define _curl_is_slist_option(option) \
|
||||
((option) == CURLOPT_HTTPHEADER || \
|
||||
(option) == CURLOPT_HTTP200ALIASES || \
|
||||
(option) == CURLOPT_QUOTE || \
|
||||
(option) == CURLOPT_POSTQUOTE || \
|
||||
(option) == CURLOPT_PREQUOTE || \
|
||||
(option) == CURLOPT_TELNETOPTIONS || \
|
||||
0)
|
||||
|
||||
/* groups of curl_easy_getinfo infos that take the same type of argument */
|
||||
|
||||
/* evaluates to true if info expects a pointer to char * argument */
|
||||
#define _curl_is_string_info(info) \
|
||||
(CURLINFO_STRING < (info) && (info) < CURLINFO_LONG)
|
||||
|
||||
/* evaluates to true if info expects a pointer to long argument */
|
||||
#define _curl_is_long_info(info) \
|
||||
(CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE)
|
||||
|
||||
/* evaluates to true if info expects a pointer to double argument */
|
||||
#define _curl_is_double_info(info) \
|
||||
(CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST)
|
||||
|
||||
/* true if info expects a pointer to struct curl_slist * argument */
|
||||
#define _curl_is_slist_info(info) \
|
||||
(CURLINFO_SLIST < (info))
|
||||
|
||||
|
||||
/* typecheck helpers -- check whether given expression has requested type*/
|
||||
|
||||
/* For pointers, you can use the _curl_is_ptr/_curl_is_arr macros,
|
||||
* otherwise define a new macro. Search for __builtin_types_compatible_p
|
||||
* in the GCC manual.
|
||||
* NOTE: these macros MUST NOT EVALUATE their arguments! The argument is
|
||||
* the actual expression passed to the curl_easy_setopt macro. This
|
||||
* means that you can only apply the sizeof and __typeof__ operators, no
|
||||
* == or whatsoever.
|
||||
*/
|
||||
|
||||
/* XXX: should evaluate to true iff expr is a pointer */
|
||||
#define _curl_is_any_ptr(expr) \
|
||||
(sizeof(expr) == sizeof(void*))
|
||||
|
||||
/* evaluates to true if expr is NULL */
|
||||
/* XXX: must not evaluate expr, so this check is not accurate */
|
||||
#define _curl_is_NULL(expr) \
|
||||
(__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL)))
|
||||
|
||||
/* evaluates to true if expr is type*, const type* or NULL */
|
||||
#define _curl_is_ptr(expr, type) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), type *) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), const type *))
|
||||
|
||||
/* evaluates to true if expr is one of type[], type*, NULL or const type* */
|
||||
#define _curl_is_arr(expr, type) \
|
||||
(_curl_is_ptr((expr), type) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), type []))
|
||||
|
||||
/* evaluates to true if expr is a string */
|
||||
#define _curl_is_string(expr) \
|
||||
(_curl_is_arr((expr), char) || \
|
||||
_curl_is_arr((expr), signed char) || \
|
||||
_curl_is_arr((expr), unsigned char))
|
||||
|
||||
/* evaluates to true if expr is a long (no matter the signedness)
|
||||
* XXX: for now, int is also accepted (and therefore short and char, which
|
||||
* are promoted to int when passed to a variadic function) */
|
||||
#define _curl_is_long(expr) \
|
||||
(__builtin_types_compatible_p(__typeof__(expr), long) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), signed long) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), unsigned long) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), int) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), signed int) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), unsigned int) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), short) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), signed short) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), unsigned short) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), char) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), signed char) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), unsigned char))
|
||||
|
||||
/* evaluates to true if expr is of type curl_off_t */
|
||||
#define _curl_is_off_t(expr) \
|
||||
(__builtin_types_compatible_p(__typeof__(expr), curl_off_t))
|
||||
|
||||
/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */
|
||||
/* XXX: also check size of an char[] array? */
|
||||
#define _curl_is_error_buffer(expr) \
|
||||
(__builtin_types_compatible_p(__typeof__(expr), char *) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), char[]))
|
||||
|
||||
/* evaluates to true if expr is of type (const) void* or (const) FILE* */
|
||||
#if 0
|
||||
#define _curl_is_cb_data(expr) \
|
||||
(_curl_is_ptr((expr), void) || \
|
||||
_curl_is_ptr((expr), FILE))
|
||||
#else /* be less strict */
|
||||
#define _curl_is_cb_data(expr) \
|
||||
_curl_is_any_ptr(expr)
|
||||
#endif
|
||||
|
||||
/* evaluates to true if expr is of type FILE* */
|
||||
#define _curl_is_FILE(expr) \
|
||||
(__builtin_types_compatible_p(__typeof__(expr), FILE *))
|
||||
|
||||
/* evaluates to true if expr can be passed as POST data (void* or char*) */
|
||||
#define _curl_is_postfields(expr) \
|
||||
(_curl_is_ptr((expr), void) || \
|
||||
_curl_is_arr((expr), char))
|
||||
|
||||
/* FIXME: the whole callback checking is messy...
|
||||
* The idea is to tolerate char vs. void and const vs. not const
|
||||
* pointers in arguments at least
|
||||
*/
|
||||
/* helper: __builtin_types_compatible_p distinguishes between functions and
|
||||
* function pointers, hide it */
|
||||
#define _curl_callback_compatible(func, type) \
|
||||
(__builtin_types_compatible_p(__typeof__(func), type) || \
|
||||
__builtin_types_compatible_p(__typeof__(func), type*))
|
||||
|
||||
/* evaluates to true if expr is of type curl_read_callback or "similar" */
|
||||
#define _curl_is_read_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), __typeof__(fread)) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), curl_read_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback4) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback5) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback6))
|
||||
typedef size_t (_curl_read_callback1)(char *, size_t, size_t, void*);
|
||||
typedef size_t (_curl_read_callback2)(char *, size_t, size_t, const void*);
|
||||
typedef size_t (_curl_read_callback3)(char *, size_t, size_t, FILE*);
|
||||
typedef size_t (_curl_read_callback4)(void *, size_t, size_t, void*);
|
||||
typedef size_t (_curl_read_callback5)(void *, size_t, size_t, const void*);
|
||||
typedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE*);
|
||||
|
||||
/* evaluates to true if expr is of type curl_write_callback or "similar" */
|
||||
#define _curl_is_write_cb(expr) \
|
||||
(_curl_is_read_cb(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), __typeof__(fwrite)) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), curl_write_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback4) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback5) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback6))
|
||||
typedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void*);
|
||||
typedef size_t (_curl_write_callback2)(const char *, size_t, size_t,
|
||||
const void*);
|
||||
typedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE*);
|
||||
typedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void*);
|
||||
typedef size_t (_curl_write_callback5)(const void *, size_t, size_t,
|
||||
const void*);
|
||||
typedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE*);
|
||||
|
||||
/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */
|
||||
#define _curl_is_ioctl_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), curl_ioctl_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_ioctl_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_ioctl_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_ioctl_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_ioctl_callback4))
|
||||
typedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void*);
|
||||
typedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void*);
|
||||
typedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void*);
|
||||
typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void*);
|
||||
|
||||
/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */
|
||||
#define _curl_is_sockopt_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), curl_sockopt_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_sockopt_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_sockopt_callback2))
|
||||
typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype);
|
||||
typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t,
|
||||
curlsocktype);
|
||||
|
||||
/* evaluates to true if expr is of type curl_opensocket_callback or "similar" */
|
||||
#define _curl_is_opensocket_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\
|
||||
_curl_callback_compatible((expr), _curl_opensocket_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_opensocket_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_opensocket_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_opensocket_callback4))
|
||||
typedef curl_socket_t (_curl_opensocket_callback1)
|
||||
(void *, curlsocktype, struct curl_sockaddr *);
|
||||
typedef curl_socket_t (_curl_opensocket_callback2)
|
||||
(void *, curlsocktype, const struct curl_sockaddr *);
|
||||
typedef curl_socket_t (_curl_opensocket_callback3)
|
||||
(const void *, curlsocktype, struct curl_sockaddr *);
|
||||
typedef curl_socket_t (_curl_opensocket_callback4)
|
||||
(const void *, curlsocktype, const struct curl_sockaddr *);
|
||||
|
||||
/* evaluates to true if expr is of type curl_progress_callback or "similar" */
|
||||
#define _curl_is_progress_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), curl_progress_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_progress_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_progress_callback2))
|
||||
typedef int (_curl_progress_callback1)(void *,
|
||||
double, double, double, double);
|
||||
typedef int (_curl_progress_callback2)(const void *,
|
||||
double, double, double, double);
|
||||
|
||||
/* evaluates to true if expr is of type curl_debug_callback or "similar" */
|
||||
#define _curl_is_debug_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), curl_debug_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback4))
|
||||
typedef int (_curl_debug_callback1) (CURL *,
|
||||
curl_infotype, char *, size_t, void *);
|
||||
typedef int (_curl_debug_callback2) (CURL *,
|
||||
curl_infotype, char *, size_t, const void *);
|
||||
typedef int (_curl_debug_callback3) (CURL *,
|
||||
curl_infotype, const char *, size_t, void *);
|
||||
typedef int (_curl_debug_callback4) (CURL *,
|
||||
curl_infotype, const char *, size_t, const void *);
|
||||
|
||||
/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */
|
||||
/* this is getting even messier... */
|
||||
#define _curl_is_ssl_ctx_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), curl_ssl_ctx_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback4) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback5) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback8))
|
||||
typedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *);
|
||||
typedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *);
|
||||
typedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *);
|
||||
typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *);
|
||||
#ifdef HEADER_SSL_H
|
||||
/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX
|
||||
* this will of course break if we're included before OpenSSL headers...
|
||||
*/
|
||||
typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *);
|
||||
typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *);
|
||||
typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *);
|
||||
typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, const void *);
|
||||
#else
|
||||
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5;
|
||||
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6;
|
||||
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7;
|
||||
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8;
|
||||
#endif
|
||||
|
||||
/* evaluates to true if expr is of type curl_conv_callback or "similar" */
|
||||
#define _curl_is_conv_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), curl_conv_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_conv_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_conv_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_conv_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_conv_callback4))
|
||||
typedef CURLcode (*_curl_conv_callback1)(char *, size_t length);
|
||||
typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length);
|
||||
typedef CURLcode (*_curl_conv_callback3)(void *, size_t length);
|
||||
typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length);
|
||||
|
||||
/* evaluates to true if expr is of type curl_seek_callback or "similar" */
|
||||
#define _curl_is_seek_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), curl_seek_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_seek_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_seek_callback2))
|
||||
typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int);
|
||||
typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int);
|
||||
|
||||
|
||||
#endif /* __CURL_TYPECHECK_GCC_H */
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
108
main/source/includes/vgui/include/VGUI.h
Normal file
108
main/source/includes/vgui/include/VGUI.h
Normal file
|
@ -0,0 +1,108 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_H
|
||||
#define VGUI_H
|
||||
|
||||
//If you are going to add stuff to the vgui core...
|
||||
//
|
||||
//Keep it simple.
|
||||
//
|
||||
//Never put code in a header.
|
||||
//
|
||||
//The name of the class is the name of the the file
|
||||
//
|
||||
//Each class gets its own .cpp file for its definition and a .h for its header. Helper
|
||||
//classes can be used but only within the .cpp and not referenceable from anywhere else.
|
||||
//
|
||||
//Don't add unneeded files. Keep the API clean.
|
||||
//
|
||||
//No platform specific code in vgui\lib-src\vgui dir. Code in vgui\lib-src\vgui should
|
||||
//only include from vgui\include or standard C includes. ie, if I see windows.h included
|
||||
//anywhere but vgui\lib-src\win32 I will hunt you down and kill you. Don't give me any crap
|
||||
//that mfc is platform inspecific.
|
||||
//
|
||||
//Always use <> and not "" for includes
|
||||
//
|
||||
//Use minimum dependencies in headers. Don't include another header if you can get away
|
||||
//with forward declaring (which is usually the case)
|
||||
//
|
||||
//No macros in headers. They are tools of satan. This also means no use of DEFINEs, use enum
|
||||
//
|
||||
//Minimize global functions
|
||||
//
|
||||
//No global variables.
|
||||
//
|
||||
//Panel is getting pretty plump, try and avoid adding junk to it if you can
|
||||
|
||||
//TODO: Look and Feel support
|
||||
// add Panel::setPaintProxy, if _paintProxy exists, it calls _paintProxy->paint
|
||||
// instead of Panel::paint. Components should implement their painting in a seperate
|
||||
// plugin class. Perhaps to encourage this, Panel::paint should just go away completely
|
||||
// The other option is to have Panel have the interface Paintable
|
||||
// class Paintable
|
||||
// {
|
||||
// public:
|
||||
// virtual void paint()=0;
|
||||
// };
|
||||
// Then a component can implement its paint in the class itself and then call
|
||||
// setPaintProxy(this). If this is the case _paintProxy->paint should always be called
|
||||
// and never Panel::paint from within paintTraverse
|
||||
//TODO: Figure out the 'Valve' Look and Feel and implement that instead of a the Java one
|
||||
//TODO: Determine ownership policy for Borders, Layouts, etc..
|
||||
//TODO: tooltips support
|
||||
//TODO: ComboKey (hot key support)
|
||||
//TODO: add Background.cpp, remove paintBackground from all components
|
||||
// Panel implements setBackground, Panel::paintBackground calls _background->paintBackground
|
||||
// similiar to the way Border works.
|
||||
//TODO: Builtin components should never overide paintBackground, only paint
|
||||
//TODO: All protected members should be converted to private
|
||||
//TODO: All member variables should be moved to the top of the class prototype
|
||||
//TODO: All private methods should be prepended with private
|
||||
//TODO: Use of word internal in method names is not consistent and confusing
|
||||
//TODO: Cleanup so bullshit publics are properly named, maybe even figure out
|
||||
// a naming convention for them
|
||||
//TODO: Breakup InputSignal into logical pieces
|
||||
//TODO: Button is in a state of disarray, it should have ButtonModel support
|
||||
//TODO: get rid of all the stupid strdup laziness, convert to vgui_strdup
|
||||
//TODO: actually figure out policy on String and implement it consistently
|
||||
//TODO: implement createLayoutInfo for other Layouts than need it
|
||||
//TODO: BorderLayout should have option for a null LayoutInfo defaulting to center
|
||||
//TODO: SurfaceBase should go away, put it in Surface
|
||||
//TODO: ActionSignals and other Signals should just set a flag when they fire.
|
||||
// then App can come along later and fire all the signals
|
||||
//TODO: Change all method naming to starting with a capital letter.
|
||||
|
||||
#ifdef _WIN32
|
||||
# define VGUIAPI __declspec( dllexport )
|
||||
#else
|
||||
# define VGUIAPI __attribute__ ((visibility("default")))
|
||||
#include <sys/types.h> // size_t define
|
||||
#endif
|
||||
|
||||
#define null 0L
|
||||
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned long ulong;
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
VGUIAPI void vgui_setMalloc(void *(*malloc)(size_t size) );
|
||||
VGUIAPI void vgui_setFree(void (*free)(void* memblock));
|
||||
VGUIAPI void vgui_strcpy(char* dst,int dstLen,const char* src);
|
||||
VGUIAPI char* vgui_strdup(const char* src);
|
||||
VGUIAPI int vgui_printf(const char* format,...);
|
||||
VGUIAPI int vgui_dprintf(const char* format,...);
|
||||
VGUIAPI int vgui_dprintf2(const char* format,...);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
84
main/source/includes/vgui/include/VGUI_ActionSignal.h
Normal file
84
main/source/includes/vgui/include/VGUI_ActionSignal.h
Normal file
|
@ -0,0 +1,84 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_ACTIONSIGNAL_H
|
||||
#define VGUI_ACTIONSIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
/*
|
||||
|
||||
TODO: maybe try something like this..
|
||||
|
||||
class VGUIAPI ActionSignal
|
||||
{
|
||||
};
|
||||
|
||||
class VGUIAPI ActionSignalSimple : public ActionSignal
|
||||
{
|
||||
public:
|
||||
virtual void actionPerformed(Panel* panel)=0;
|
||||
};
|
||||
|
||||
class VGUIAPI ActionSignalInt : public ActionSignal
|
||||
{
|
||||
public:
|
||||
virtual void actionPerformed(int value,Panel* panel)=0;
|
||||
};
|
||||
|
||||
|
||||
DefaultButtonModel would implement:
|
||||
|
||||
virtual void addActionSignal(ActionSignal* s)
|
||||
{
|
||||
if(s!=null)
|
||||
{
|
||||
_actionSignalDar.putElement(s);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void fireActionSignal()
|
||||
{
|
||||
for(int i=0;i<_actionSignalDar.getCount();i++)
|
||||
{
|
||||
ActionSignal* signal=_actionSignalDar[i];
|
||||
|
||||
ActionSignalSimple* ss=dynamic_cast<ActionSignalSimple*>(signal);
|
||||
if(ss!=null)
|
||||
{
|
||||
ss->actionPerformed(this);
|
||||
}
|
||||
|
||||
ActionSignalCommand* si=dynamic_cast<ActionSignalInt*>(signal);
|
||||
if(si!=null)
|
||||
{
|
||||
si->actionPerformed(_intValue,this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI ActionSignal
|
||||
{
|
||||
public:
|
||||
virtual void actionPerformed(Panel* panel)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
130
main/source/includes/vgui/include/VGUI_App.h
Normal file
130
main/source/includes/vgui/include/VGUI_App.h
Normal file
|
@ -0,0 +1,130 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_APP_H
|
||||
#define VGUI_APP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_MouseCode.h>
|
||||
#include<VGUI_KeyCode.h>
|
||||
#include<VGUI_Dar.h>
|
||||
#include<VGUI_Cursor.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
class TickSignal;
|
||||
class Scheme;
|
||||
class TickSignal;
|
||||
class SurfaceBase;
|
||||
|
||||
class VGUIAPI App
|
||||
{
|
||||
public:
|
||||
App();
|
||||
App(bool externalMain);
|
||||
public:
|
||||
static App* getInstance();
|
||||
//TODO: the public and public bullshit are all messed up, need to organize
|
||||
//TODO: actually all of the access needs to be properly thought out while you are at it
|
||||
public:
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual void externalTick();
|
||||
virtual bool wasMousePressed(MouseCode code,Panel* panel);
|
||||
virtual bool wasMouseDoublePressed(MouseCode code,Panel* panel);
|
||||
virtual bool isMouseDown(MouseCode code,Panel* panel);
|
||||
virtual bool wasMouseReleased(MouseCode code,Panel* panel);
|
||||
virtual bool wasKeyPressed(KeyCode code,Panel* panel);
|
||||
virtual bool isKeyDown(KeyCode code,Panel* panel);
|
||||
virtual bool wasKeyTyped(KeyCode code,Panel* panel);
|
||||
virtual bool wasKeyReleased(KeyCode code,Panel* panel);
|
||||
virtual void addTickSignal(TickSignal* s);
|
||||
virtual void setCursorPos(int x,int y);
|
||||
virtual void getCursorPos(int& x,int& y);
|
||||
virtual void setMouseCapture(Panel* panel);
|
||||
virtual void setMouseArena(int x0,int y0,int x1,int y1,bool enabled);
|
||||
virtual void setMouseArena(Panel* panel);
|
||||
virtual void requestFocus(Panel* panel);
|
||||
virtual Panel* getFocus();
|
||||
virtual void repaintAll();
|
||||
virtual void setScheme(Scheme* scheme);
|
||||
virtual Scheme* getScheme();
|
||||
virtual void enableBuildMode();
|
||||
virtual long getTimeMillis();
|
||||
virtual char getKeyCodeChar(KeyCode code,bool shifted);
|
||||
virtual void getKeyCodeText(KeyCode code,char* buf,int buflen);
|
||||
virtual int getClipboardTextCount();
|
||||
virtual void setClipboardText(const char* text,int textLen);
|
||||
virtual int getClipboardText(int offset,char* buf,int bufLen);
|
||||
virtual void reset();
|
||||
virtual void internalSetMouseArena(int x0,int y0,int x1,int y1,bool enabled);
|
||||
virtual bool setRegistryString(const char* key,const char* value);
|
||||
virtual bool getRegistryString(const char* key,char* value,int valueLen);
|
||||
virtual bool setRegistryInteger(const char* key,int value);
|
||||
virtual bool getRegistryInteger(const char* key,int& value);
|
||||
virtual void setCursorOveride(Cursor* cursor);
|
||||
virtual Cursor* getCursorOveride();
|
||||
virtual void setMinimumTickMillisInterval(int interval);
|
||||
public: //bullshit public stuff
|
||||
virtual void main(int argc,char* argv[])=0;
|
||||
virtual void run();
|
||||
virtual void internalCursorMoved(int x,int y,SurfaceBase* surfaceBase); //expects input in surface space
|
||||
virtual void internalMousePressed(MouseCode code,SurfaceBase* surfaceBase);
|
||||
virtual void internalMouseDoublePressed(MouseCode code,SurfaceBase* surfaceBase);
|
||||
virtual void internalMouseReleased(MouseCode code,SurfaceBase* surfaceBase);
|
||||
virtual void internalMouseWheeled(int delta,SurfaceBase* surfaceBase);
|
||||
virtual void internalKeyPressed(KeyCode code,SurfaceBase* surfaceBase);
|
||||
virtual void internalKeyTyped(KeyCode code,SurfaceBase* surfaceBase);
|
||||
virtual void internalKeyReleased(KeyCode code,SurfaceBase* surfaceBase);
|
||||
private:
|
||||
virtual void init();
|
||||
virtual void updateMouseFocus(int x,int y,SurfaceBase* surfaceBase);
|
||||
virtual void setMouseFocus(Panel* newMouseFocus);
|
||||
protected:
|
||||
virtual void surfaceBaseCreated(SurfaceBase* surfaceBase);
|
||||
virtual void surfaceBaseDeleted(SurfaceBase* surfaceBase);
|
||||
virtual void platTick();
|
||||
virtual void internalTick();
|
||||
protected:
|
||||
static App* _instance;
|
||||
protected:
|
||||
bool _running;
|
||||
bool _externalMain;
|
||||
Dar<SurfaceBase*> _surfaceBaseDar;
|
||||
Panel* _keyFocus;
|
||||
Panel* _oldMouseFocus;
|
||||
Panel* _mouseFocus;
|
||||
Panel* _mouseCapture;
|
||||
Panel* _wantedKeyFocus;
|
||||
bool _mousePressed[MOUSE_LAST];
|
||||
bool _mouseDoublePressed[MOUSE_LAST];
|
||||
bool _mouseDown[MOUSE_LAST];
|
||||
bool _mouseReleased[MOUSE_LAST];
|
||||
bool _keyPressed[KEY_LAST];
|
||||
bool _keyTyped[KEY_LAST];
|
||||
bool _keyDown[KEY_LAST];
|
||||
bool _keyReleased[KEY_LAST];
|
||||
Dar<TickSignal*> _tickSignalDar;
|
||||
Scheme* _scheme;
|
||||
bool _buildMode;
|
||||
bool _wantedBuildMode;
|
||||
Panel* _mouseArenaPanel;
|
||||
Cursor* _cursor[Cursor::dc_last];
|
||||
Cursor* _cursorOveride;
|
||||
private:
|
||||
long _nextTickMillis;
|
||||
long _minimumTickMillisInterval;
|
||||
friend class SurfaceBase;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
37
main/source/includes/vgui/include/VGUI_Bitmap.h
Normal file
37
main/source/includes/vgui/include/VGUI_Bitmap.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BITMAP_H
|
||||
#define VGUI_BITMAP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Image.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI Bitmap : public Image
|
||||
{
|
||||
private:
|
||||
int _id;
|
||||
bool _uploaded;
|
||||
public:
|
||||
Bitmap();
|
||||
protected:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void setRGBA(int x,int y,uchar r,uchar g,uchar b,uchar a);
|
||||
public:
|
||||
virtual void paint(Panel* panel);
|
||||
protected:
|
||||
uchar* _rgba;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
29
main/source/includes/vgui/include/VGUI_BitmapTGA.h
Normal file
29
main/source/includes/vgui/include/VGUI_BitmapTGA.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BITMAPTGA_H
|
||||
#define VGUI_BITMAPTGA_H
|
||||
|
||||
#include<VGUI_Bitmap.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
class InputStream;
|
||||
|
||||
class VGUIAPI BitmapTGA : public Bitmap
|
||||
{
|
||||
public:
|
||||
BitmapTGA(InputStream* is,bool invertAlpha);
|
||||
private:
|
||||
virtual bool loadTGA(InputStream* is,bool invertAlpha);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
45
main/source/includes/vgui/include/VGUI_Border.h
Normal file
45
main/source/includes/vgui/include/VGUI_Border.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BORDER_H
|
||||
#define VGUI_BORDER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Image.h>
|
||||
|
||||
//TODO: all borders should be titled
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI Border : public Image
|
||||
{
|
||||
public:
|
||||
Border();
|
||||
Border(int left,int top,int right,int bottom);
|
||||
public:
|
||||
virtual void setInset(int left,int top,int right,int bottom);
|
||||
virtual void getInset(int& left,int& top,int& right,int& bottom);
|
||||
protected:
|
||||
virtual void drawFilledRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawOutlinedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawSetTextPos(int x,int y);
|
||||
virtual void drawPrintText(int x,int y,const char* str,int strlen);
|
||||
virtual void drawPrintChar(int x,int y,char ch);
|
||||
protected:
|
||||
int _inset[4];
|
||||
private:
|
||||
Panel* _panel;
|
||||
friend class Panel;
|
||||
friend class BorderPair;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
46
main/source/includes/vgui/include/VGUI_BorderLayout.h
Normal file
46
main/source/includes/vgui/include/VGUI_BorderLayout.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BORDERLAYOUT_H
|
||||
#define VGUI_BORDERLAYOUT_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Layout.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class LayoutInfo;
|
||||
|
||||
class VGUIAPI BorderLayout : public Layout
|
||||
{
|
||||
public:
|
||||
enum Alignment
|
||||
{
|
||||
a_center=0,
|
||||
a_north,
|
||||
a_south,
|
||||
a_east,
|
||||
a_west,
|
||||
};
|
||||
private:
|
||||
int _inset;
|
||||
public:
|
||||
BorderLayout(int inset);
|
||||
public:
|
||||
virtual void performLayout(Panel* panel);
|
||||
virtual LayoutInfo* createLayoutInfo(Alignment alignment);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
33
main/source/includes/vgui/include/VGUI_BorderPair.h
Normal file
33
main/source/includes/vgui/include/VGUI_BorderPair.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BORDERPAIR_H
|
||||
#define VGUI_BORDERPAIR_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Border.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI BorderPair : public Border
|
||||
{
|
||||
public:
|
||||
BorderPair(Border* border0,Border* border1);
|
||||
public:
|
||||
virtual void doPaint(Panel* panel);
|
||||
protected:
|
||||
virtual void paint(Panel* panel);
|
||||
protected:
|
||||
Border* _border[2];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
68
main/source/includes/vgui/include/VGUI_BuildGroup.h
Normal file
68
main/source/includes/vgui/include/VGUI_BuildGroup.h
Normal file
|
@ -0,0 +1,68 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BUILDGROUP_H
|
||||
#define VGUI_BUILDGROUP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Dar.h>
|
||||
#include <VGUI_MouseCode.h>
|
||||
#include <VGUI_KeyCode.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum KeyCode;
|
||||
enum MouseCode;
|
||||
class Panel;
|
||||
class Cursor;
|
||||
class ChangeSignal;
|
||||
|
||||
class VGUIAPI BuildGroup
|
||||
{
|
||||
private:
|
||||
bool _enabled;
|
||||
int _snapX;
|
||||
int _snapY;
|
||||
Cursor* _cursor_sizenwse;
|
||||
Cursor* _cursor_sizenesw;
|
||||
Cursor* _cursor_sizewe;
|
||||
Cursor* _cursor_sizens;
|
||||
Cursor* _cursor_sizeall;
|
||||
bool _dragging;
|
||||
MouseCode _dragMouseCode;
|
||||
int _dragStartPanelPos[2];
|
||||
int _dragStartCursorPos[2];
|
||||
Panel* _currentPanel;
|
||||
Dar<ChangeSignal*> _currentPanelChangeSignalDar;
|
||||
Dar<Panel*> _panelDar;
|
||||
Dar<char*> _panelNameDar;
|
||||
public:
|
||||
BuildGroup();
|
||||
public:
|
||||
virtual void setEnabled(bool state);
|
||||
virtual bool isEnabled();
|
||||
virtual void addCurrentPanelChangeSignal(ChangeSignal* s);
|
||||
virtual Panel* getCurrentPanel();
|
||||
virtual void copyPropertiesToClipboard();
|
||||
private:
|
||||
virtual void applySnap(Panel* panel);
|
||||
virtual void fireCurrentPanelChangeSignal();
|
||||
protected:
|
||||
friend class Panel;
|
||||
virtual void panelAdded(Panel* panel,const char* panelName);
|
||||
virtual void cursorMoved(int x,int y,Panel* panel);
|
||||
virtual void mousePressed(MouseCode code,Panel* panel);
|
||||
virtual void mouseReleased(MouseCode code,Panel* panel);
|
||||
virtual void mouseDoublePressed(MouseCode code,Panel* panel);
|
||||
virtual void keyTyped(KeyCode code,Panel* panel);
|
||||
virtual Cursor* getCursor(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
61
main/source/includes/vgui/include/VGUI_Button.h
Normal file
61
main/source/includes/vgui/include/VGUI_Button.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BUTTON_H
|
||||
#define VGUI_BUTTON_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Label.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum MouseCode;
|
||||
class ButtonController;
|
||||
class ButtonGroup;
|
||||
class ActionSignal;
|
||||
|
||||
//TODO: Button should be derived from an AbstractButton
|
||||
class VGUIAPI Button : public Label
|
||||
{
|
||||
public:
|
||||
Button(const char* text,int x,int y,int wide,int tall);
|
||||
Button(const char* text,int x,int y);
|
||||
private:
|
||||
void init();
|
||||
public:
|
||||
virtual void setSelected(bool state);
|
||||
virtual void setSelectedDirect(bool state);
|
||||
virtual void setArmed(bool state);
|
||||
virtual bool isSelected();
|
||||
virtual void doClick();
|
||||
virtual void addActionSignal(ActionSignal* s);
|
||||
virtual void setButtonGroup(ButtonGroup* buttonGroup);
|
||||
virtual bool isArmed();
|
||||
virtual void setButtonBorderEnabled(bool state);
|
||||
virtual void setMouseClickEnabled(MouseCode code,bool state);
|
||||
virtual bool isMouseClickEnabled(MouseCode code);
|
||||
virtual void fireActionSignal();
|
||||
virtual Panel* createPropertyPanel();
|
||||
protected:
|
||||
virtual void setButtonController(ButtonController* _buttonController);
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
char* _text;
|
||||
bool _armed;
|
||||
bool _selected;
|
||||
bool _buttonBorderEnabled;
|
||||
Dar<ActionSignal*> _actionSignalDar;
|
||||
int _mouseClickMask;
|
||||
ButtonGroup* _buttonGroup;
|
||||
ButtonController* _buttonController;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
27
main/source/includes/vgui/include/VGUI_ButtonController.h
Normal file
27
main/source/includes/vgui/include/VGUI_ButtonController.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BUTTONCONTROLLER_H
|
||||
#define VGUI_BUTTONCONTROLLER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Button;
|
||||
|
||||
class VGUIAPI ButtonController
|
||||
{
|
||||
public:
|
||||
virtual void addSignals(Button* button)=0;
|
||||
virtual void removeSignals(Button* button)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
30
main/source/includes/vgui/include/VGUI_ButtonGroup.h
Normal file
30
main/source/includes/vgui/include/VGUI_ButtonGroup.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_BUTTONGROUP_H
|
||||
#define VGUI_BUTTONGROUP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Button;
|
||||
|
||||
class VGUIAPI ButtonGroup
|
||||
{
|
||||
public:
|
||||
virtual void addButton(Button* button);
|
||||
virtual void setSelected(Button* button);
|
||||
protected:
|
||||
Dar<Button*> _buttonDar;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
26
main/source/includes/vgui/include/VGUI_ChangeSignal.h
Normal file
26
main/source/includes/vgui/include/VGUI_ChangeSignal.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_CHANGESIGNAL_H
|
||||
#define VGUI_CHANGESIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI ChangeSignal
|
||||
{
|
||||
public:
|
||||
virtual void valueChanged(Panel* panel)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
28
main/source/includes/vgui/include/VGUI_CheckButton.h
Normal file
28
main/source/includes/vgui/include/VGUI_CheckButton.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_CHECKBUTTON_H
|
||||
#define VGUI_CHECKBUTTON_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_ToggleButton.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI CheckButton : public ToggleButton
|
||||
{
|
||||
public:
|
||||
CheckButton(const char* text,int x,int y,int wide,int tall);
|
||||
CheckButton(const char* text,int x,int y);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
44
main/source/includes/vgui/include/VGUI_Color.h
Normal file
44
main/source/includes/vgui/include/VGUI_Color.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_COLOR_H
|
||||
#define VGUI_COLOR_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Scheme.h>
|
||||
|
||||
//TODO: rename getColor(r,g,b,a) to getRGBA(r,g,b,a)
|
||||
//TODO: rename setColor(r,g,b,a) to setRGBA(r,g,b,a)
|
||||
//TODO: rename getColor(sc) to getSchemeColor(sc)
|
||||
//TODO: rename setColor(sc) to setSchemeColor(sc)
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI Color
|
||||
{
|
||||
private:
|
||||
uchar _color[4];
|
||||
Scheme::SchemeColor _schemeColor;
|
||||
public:
|
||||
Color();
|
||||
Color(int r,int g,int b,int a);
|
||||
Color(Scheme::SchemeColor sc);
|
||||
private:
|
||||
virtual void init();
|
||||
public:
|
||||
virtual void setColor(int r,int g,int b,int a);
|
||||
virtual void setColor(Scheme::SchemeColor sc);
|
||||
virtual void getColor(int& r,int& g,int& b,int& a);
|
||||
virtual void getColor(Scheme::SchemeColor& sc);
|
||||
virtual int operator[](int index);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
34
main/source/includes/vgui/include/VGUI_ComboKey.h
Normal file
34
main/source/includes/vgui/include/VGUI_ComboKey.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_COMBOKEY_H
|
||||
#define VGUI_COMBOKEY_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum KeyCode;
|
||||
|
||||
class ComboKey
|
||||
{
|
||||
public:
|
||||
ComboKey(KeyCode code,KeyCode modifier);
|
||||
public:
|
||||
bool isTwoCombo(KeyCode code,KeyCode modifier);
|
||||
protected:
|
||||
bool check(KeyCode code);
|
||||
protected:
|
||||
KeyCode _keyCode[2];
|
||||
friend class Panel;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
40
main/source/includes/vgui/include/VGUI_ConfigWizard.h
Normal file
40
main/source/includes/vgui/include/VGUI_ConfigWizard.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_CONFIGWIZARD_H
|
||||
#define VGUI_CONFIGWIZARD_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class TreeFolder;
|
||||
class Panel;
|
||||
class Button;
|
||||
|
||||
class VGUIAPI ConfigWizard : public Panel
|
||||
{
|
||||
public:
|
||||
ConfigWizard(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual Panel* getClient();
|
||||
virtual TreeFolder* getFolder();
|
||||
protected:
|
||||
TreeFolder* _treeFolder;
|
||||
Panel* _client;
|
||||
Button* _okButton;
|
||||
Button* _cancelButton;
|
||||
Button* _applyButton;
|
||||
Button* _helpButton;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
57
main/source/includes/vgui/include/VGUI_Cursor.h
Normal file
57
main/source/includes/vgui/include/VGUI_Cursor.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_CURSOR_H
|
||||
#define VGUI_CURSOR_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Bitmap;
|
||||
|
||||
class VGUIAPI Cursor
|
||||
{
|
||||
public:
|
||||
enum DefaultCursor
|
||||
{
|
||||
dc_user,
|
||||
dc_none,
|
||||
dc_arrow,
|
||||
dc_ibeam,
|
||||
dc_hourglass,
|
||||
dc_crosshair,
|
||||
dc_up,
|
||||
dc_sizenwse,
|
||||
dc_sizenesw,
|
||||
dc_sizewe,
|
||||
dc_sizens,
|
||||
dc_sizeall,
|
||||
dc_no,
|
||||
dc_hand,
|
||||
dc_last,
|
||||
};
|
||||
private:
|
||||
int _hotspot[2];
|
||||
Bitmap* _bitmap;
|
||||
DefaultCursor _dc;
|
||||
public:
|
||||
Cursor(DefaultCursor dc);
|
||||
Cursor(Bitmap* bitmap,int hotspotX,int hotspotY);
|
||||
public:
|
||||
virtual void getHotspot(int& x,int& y);
|
||||
private:
|
||||
virtual void privateInit(Bitmap* bitmap,int hotspotX,int hotspotY);
|
||||
public:
|
||||
virtual Bitmap* getBitmap();
|
||||
virtual DefaultCursor getDefaultCursor();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
194
main/source/includes/vgui/include/VGUI_Dar.h
Normal file
194
main/source/includes/vgui/include/VGUI_Dar.h
Normal file
|
@ -0,0 +1,194 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_DAR_H
|
||||
#define VGUI_DAR_H
|
||||
|
||||
#include<stdlib.h>
|
||||
#include<string.h>
|
||||
#include<VGUI.h>
|
||||
|
||||
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
//Simple lightweight dynamic array implementation
|
||||
template<class ELEMTYPE> class VGUIAPI Dar
|
||||
{
|
||||
public:
|
||||
Dar()
|
||||
{
|
||||
_count=0;
|
||||
_capacity=0;
|
||||
_data=null;
|
||||
ensureCapacity(4);
|
||||
}
|
||||
Dar(int initialCapacity)
|
||||
{
|
||||
_count=0;
|
||||
_capacity=0;
|
||||
_data=null;
|
||||
ensureCapacity(initialCapacity);
|
||||
}
|
||||
public:
|
||||
void ensureCapacity(int wantedCapacity)
|
||||
{
|
||||
if(wantedCapacity<=_capacity){return;}
|
||||
|
||||
//double capacity until it is >= wantedCapacity
|
||||
//this could be done with math, but iterative is just so much more fun
|
||||
int newCapacity=_capacity;
|
||||
if(newCapacity==0){newCapacity=1;}
|
||||
while(newCapacity<wantedCapacity){newCapacity*=2;}
|
||||
|
||||
//allocate and zero newData
|
||||
ELEMTYPE* newData=new ELEMTYPE[newCapacity];
|
||||
if(newData==null){exit(0);return;}
|
||||
memset(newData,0,sizeof(ELEMTYPE)*newCapacity);
|
||||
_capacity=newCapacity;
|
||||
|
||||
//copy data into newData
|
||||
for(int i=0;i<_count;i++){newData[i]=_data[i];}
|
||||
|
||||
delete[] _data;
|
||||
_data=newData;
|
||||
}
|
||||
void setCount(int count)
|
||||
{
|
||||
if((count<0)||(count>_capacity))
|
||||
{
|
||||
return;
|
||||
}
|
||||
_count=count;
|
||||
}
|
||||
int getCount()
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
void addElement(ELEMTYPE elem)
|
||||
{
|
||||
ensureCapacity(_count+1);
|
||||
_data[_count]=elem;
|
||||
_count++;
|
||||
}
|
||||
bool hasElement(ELEMTYPE elem)
|
||||
{
|
||||
for(int i=0;i<_count;i++)
|
||||
{
|
||||
if(_data[i]==elem)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void putElement(ELEMTYPE elem)
|
||||
{
|
||||
if(hasElement(elem))
|
||||
{
|
||||
return;
|
||||
}
|
||||
addElement(elem);
|
||||
}
|
||||
void insertElementAt(ELEMTYPE elem,int index)
|
||||
{
|
||||
if((index<0)||(index>_count))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if((index==_count)||(_count==0))
|
||||
{
|
||||
addElement(elem);
|
||||
}
|
||||
else
|
||||
{
|
||||
addElement(elem); //just to make sure it is big enough
|
||||
for(int i=_count-1;i>index;i--)
|
||||
{
|
||||
_data[i]=_data[i-1];
|
||||
}
|
||||
_data[index]=elem;
|
||||
}
|
||||
}
|
||||
void setElementAt(ELEMTYPE elem,int index)
|
||||
{
|
||||
if((index<0)||(index>=_count))
|
||||
{
|
||||
return;
|
||||
}
|
||||
_data[index]=elem;
|
||||
}
|
||||
void removeElementAt(int index)
|
||||
{
|
||||
if((index<0)||(index>=_count))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//slide everything to the right of index, left one.
|
||||
for(int i=index;i<(_count-1);i++)
|
||||
{
|
||||
_data[i]=_data[i+1];
|
||||
}
|
||||
_count--;
|
||||
}
|
||||
void removeElement(ELEMTYPE elem)
|
||||
{
|
||||
for(int i=0;i<_count;i++)
|
||||
{
|
||||
if(_data[i]==elem)
|
||||
{
|
||||
removeElementAt(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
void removeAll()
|
||||
{
|
||||
_count=0;
|
||||
}
|
||||
ELEMTYPE operator[](int index)
|
||||
{
|
||||
if((index<0)||(index>=_count))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return _data[index];
|
||||
}
|
||||
protected:
|
||||
int _count;
|
||||
int _capacity;
|
||||
ELEMTYPE* _data;
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
//forward referencing all the template types used so they get exported
|
||||
template class VGUIAPI Dar<char>;
|
||||
template class VGUIAPI Dar<char*>;
|
||||
template class VGUIAPI Dar<int>;
|
||||
template class VGUIAPI Dar<class Button*>;
|
||||
template class VGUIAPI Dar<class SurfaceBase*>;
|
||||
template class VGUIAPI Dar<class InputSignal*>;
|
||||
template class VGUIAPI Dar<class FocusChangeSignal*>;
|
||||
template class VGUIAPI Dar<class FrameSignal*>;
|
||||
template class VGUIAPI Dar<class ActionSignal*>;
|
||||
template class VGUIAPI Dar<class IntChangeSignal*>;
|
||||
template class VGUIAPI Dar<class TickSignal*>;
|
||||
template class VGUIAPI Dar<class Dar<char>*>;
|
||||
template class VGUIAPI Dar<class Frame*>;
|
||||
template class VGUIAPI Dar<class DesktopIcon*>;
|
||||
template class VGUIAPI Dar<class ChangeSignal*>;
|
||||
template class VGUIAPI Dar<class Panel*>;
|
||||
template class VGUIAPI Dar<class Label*>;
|
||||
template class VGUIAPI Dar<class RepaintSignal*>;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
49
main/source/includes/vgui/include/VGUI_DataInputStream.h
Normal file
49
main/source/includes/vgui/include/VGUI_DataInputStream.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_DATAINPUTSTREAM_H
|
||||
#define VGUI_DATAINPUTSTREAM_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_InputStream.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI DataInputStream : virtual public InputStream
|
||||
{
|
||||
private:
|
||||
InputStream* _is;
|
||||
public:
|
||||
DataInputStream(InputStream* is);
|
||||
public:
|
||||
virtual void seekStart(bool& success);
|
||||
virtual void seekRelative(int count,bool& success);
|
||||
virtual void seekEnd(bool& success);
|
||||
virtual int getAvailable(bool& success);
|
||||
//virtual uchar readUChar(bool& success);
|
||||
virtual void readUChar(uchar* buf,int count,bool& success);
|
||||
virtual void close(bool& success);
|
||||
virtual void close();
|
||||
public:
|
||||
virtual bool readBool(bool& success);
|
||||
virtual char readChar(bool& success);
|
||||
virtual uchar readUChar(bool& success);
|
||||
virtual short readShort(bool& success);
|
||||
virtual ushort readUShort(bool& success);
|
||||
virtual int readInt(bool& success);
|
||||
virtual uint readUInt(bool& success);
|
||||
virtual long readLong(bool& success);
|
||||
virtual ulong readULong(bool& success);
|
||||
virtual float readFloat(bool& success);
|
||||
virtual double readDouble(bool& success);
|
||||
virtual void readLine(char* buf,int bufLen,bool& success);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
42
main/source/includes/vgui/include/VGUI_Desktop.h
Normal file
42
main/source/includes/vgui/include/VGUI_Desktop.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_DESKTOP_H
|
||||
#define VGUI_DESKTOP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Dar.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class DesktopIcon;
|
||||
class TaskBar;
|
||||
|
||||
class VGUIAPI Desktop : public Panel
|
||||
{
|
||||
public:
|
||||
Desktop(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void iconActivated(DesktopIcon* icon);
|
||||
virtual void addIcon(DesktopIcon* icon);
|
||||
virtual void arrangeIcons();
|
||||
virtual Panel* getBackground();
|
||||
virtual Panel* getForeground();
|
||||
protected:
|
||||
Panel* _background;
|
||||
Panel* _foreground;
|
||||
TaskBar* _taskBar;
|
||||
Dar<DesktopIcon*> _desktopIconDar;
|
||||
int _cascade[2];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
41
main/source/includes/vgui/include/VGUI_DesktopIcon.h
Normal file
41
main/source/includes/vgui/include/VGUI_DesktopIcon.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_DESKTOPICON_H
|
||||
#define VGUI_DESKTOPICON_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class MiniApp;
|
||||
class Image;
|
||||
class Desktop;
|
||||
|
||||
class VGUIAPI DesktopIcon : public Panel
|
||||
{
|
||||
public:
|
||||
DesktopIcon(MiniApp* miniApp,Image* image);
|
||||
public:
|
||||
virtual void doActivate();
|
||||
virtual void setImage(Image* image);
|
||||
public: //bullshit public
|
||||
virtual void setDesktop(Desktop* desktop);
|
||||
virtual MiniApp* getMiniApp();
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
Desktop* _desktop;
|
||||
MiniApp* _miniApp;
|
||||
Image* _image;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
65
main/source/includes/vgui/include/VGUI_EditPanel.h
Normal file
65
main/source/includes/vgui/include/VGUI_EditPanel.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_EDITPANEL_H
|
||||
#define VGUI_EDITPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Font;
|
||||
|
||||
class VGUIAPI EditPanel : public Panel
|
||||
{
|
||||
public:
|
||||
EditPanel(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void doCursorUp();
|
||||
virtual void doCursorDown();
|
||||
virtual void doCursorLeft();
|
||||
virtual void doCursorRight();
|
||||
virtual void doCursorToStartOfLine();
|
||||
virtual void doCursorToEndOfLine();
|
||||
virtual void doCursorInsertChar(char ch);
|
||||
virtual void doCursorBackspace();
|
||||
virtual void doCursorNewLine();
|
||||
virtual void doCursorDelete();
|
||||
virtual void doCursorPrintf(char* format,...);
|
||||
virtual int getLineCount();
|
||||
virtual int getVisibleLineCount();
|
||||
virtual void setCursorBlink(bool state);
|
||||
virtual void setFont(Font* font);
|
||||
virtual void getText(int lineIndex, int offset,char* buf,int bufLen);
|
||||
|
||||
public: //bullshit public
|
||||
void getCursorBlink(bool& blink,int& nextBlinkTime);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
virtual void paint();
|
||||
virtual void addLine();
|
||||
virtual Dar<char>* getLine(int lineIndex);
|
||||
virtual void setChar(Dar<char>* lineDar,int x,char ch,char fill);
|
||||
virtual void setChar(Dar<char>* lineDar,int x,char ch);
|
||||
virtual void shiftLineLeft(Dar<char>* lineDar,int x,int count);
|
||||
virtual void shiftLineRight(Dar<char>* lineDar,int x,int count);
|
||||
private:
|
||||
virtual int spatialCharOffsetBetweenTwoLines(Dar<char>* srcDar,Dar<char>* dstDar,int x);
|
||||
protected:
|
||||
Dar<Dar<char>*> _lineDarDar;
|
||||
int _cursor[2];
|
||||
bool _cursorBlink;
|
||||
int _cursorNextBlinkTime;
|
||||
Font* _font;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
29
main/source/includes/vgui/include/VGUI_EtchedBorder.h
Normal file
29
main/source/includes/vgui/include/VGUI_EtchedBorder.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_ETCHEDBORDER_H
|
||||
#define VGUI_ETCHEDBORDER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Border.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI EtchedBorder : public Border
|
||||
{
|
||||
public:
|
||||
EtchedBorder();
|
||||
protected:
|
||||
virtual void paint(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
38
main/source/includes/vgui/include/VGUI_FileInputStream.h
Normal file
38
main/source/includes/vgui/include/VGUI_FileInputStream.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FILEINPUTSTREAM_H
|
||||
#define VGUI_FILEINPUTSTREAM_H
|
||||
|
||||
//TODO : figure out how to get stdio out of here, I think std namespace is broken for FILE for forward declaring does not work in vc6
|
||||
|
||||
#include<stdio.h>
|
||||
#include<VGUI_InputStream.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI FileInputStream : public InputStream
|
||||
{
|
||||
private:
|
||||
FILE* _fp;
|
||||
public:
|
||||
FileInputStream(const char* fileName,bool textMode);
|
||||
public:
|
||||
virtual void seekStart(bool& success);
|
||||
virtual void seekRelative(int count,bool& success);
|
||||
virtual void seekEnd(bool& success);
|
||||
virtual int getAvailable(bool& success);
|
||||
virtual uchar readUChar(bool& success);
|
||||
virtual void readUChar(uchar* buf,int count,bool& success);
|
||||
virtual void close(bool& success);
|
||||
virtual void close();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
29
main/source/includes/vgui/include/VGUI_FlowLayout.h
Normal file
29
main/source/includes/vgui/include/VGUI_FlowLayout.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FLOWLAYOUT_H
|
||||
#define VGUI_FLOWLAYOUT_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Layout.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI FlowLayout : public Layout
|
||||
{
|
||||
private:
|
||||
int _hgap;
|
||||
public:
|
||||
FlowLayout(int hgap);
|
||||
public:
|
||||
virtual void performLayout(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
26
main/source/includes/vgui/include/VGUI_FocusChangeSignal.h
Normal file
26
main/source/includes/vgui/include/VGUI_FocusChangeSignal.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FOCUSCHANGESIGNAL_H
|
||||
#define VGUI_FOCUSCHANGESIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI FocusChangeSignal
|
||||
{
|
||||
public:
|
||||
virtual void focusChanged(bool lost,Panel* panel)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
35
main/source/includes/vgui/include/VGUI_FocusNavGroup.h
Normal file
35
main/source/includes/vgui/include/VGUI_FocusNavGroup.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FOCUSNAVGROUP_H
|
||||
#define VGUI_FOCUSNAVGROUP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI FocusNavGroup
|
||||
{
|
||||
public:
|
||||
FocusNavGroup();
|
||||
protected:
|
||||
virtual void addPanel(Panel* panel);
|
||||
virtual void requestFocusPrev();
|
||||
virtual void requestFocusNext();
|
||||
virtual void setCurrentPanel(Panel* panel);
|
||||
protected:
|
||||
Dar<Panel*> _panelDar;
|
||||
int _currentIndex;
|
||||
friend class Panel;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
51
main/source/includes/vgui/include/VGUI_Font.h
Normal file
51
main/source/includes/vgui/include/VGUI_Font.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FONT_H
|
||||
#define VGUI_FONT_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class BaseFontPlat;
|
||||
|
||||
//TODO: cursors and fonts should work like gl binds
|
||||
class VGUIAPI Font
|
||||
{
|
||||
public:
|
||||
Font(const char* name,int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
|
||||
// If pFileData is non-NULL, then it will try to load the 32-bit (RLE) TGA file. If that fails,
|
||||
// it will create the font using the specified parameters.
|
||||
// pUniqueName should be set if pFileData and fileDataLen are set so it can determine if a font is already loaded.
|
||||
Font(const char* name,void *pFileData,int fileDataLen, int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
|
||||
private:
|
||||
virtual void init(const char* name,void *pFileData,int fileDataLen, int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
|
||||
public:
|
||||
BaseFontPlat* getPlat();
|
||||
virtual void getCharRGBA(int ch,int rgbaX,int rgbaY,int rgbaWide,int rgbaTall,uchar* rgba);
|
||||
virtual void getCharABCwide(int ch,int& a,int& b,int& c);
|
||||
virtual void getTextSize(const char* text,int& wide,int& tall);
|
||||
virtual int getTall();
|
||||
#ifndef _WIN32
|
||||
virtual int getWide();
|
||||
#endif
|
||||
virtual int getId();
|
||||
protected:
|
||||
char* _name;
|
||||
BaseFontPlat* _plat;
|
||||
int _id;
|
||||
friend class Surface;
|
||||
};
|
||||
|
||||
|
||||
void Font_Reset();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
73
main/source/includes/vgui/include/VGUI_Frame.h
Normal file
73
main/source/includes/vgui/include/VGUI_Frame.h
Normal file
|
@ -0,0 +1,73 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FRAME_H
|
||||
#define VGUI_FRAME_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Button;
|
||||
class FrameSignal;
|
||||
|
||||
class VGUIAPI Frame : public Panel
|
||||
{
|
||||
public:
|
||||
Frame(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void setInternal(bool state);
|
||||
virtual void paintBackground();
|
||||
virtual bool isInternal();
|
||||
virtual Panel* getClient();
|
||||
virtual void setTitle(const char* title);
|
||||
virtual void getTitle(char* buf,int bufLen);
|
||||
virtual void setMoveable(bool state);
|
||||
virtual void setSizeable(bool state);
|
||||
virtual bool isMoveable();
|
||||
virtual bool isSizeable();
|
||||
virtual void addFrameSignal(FrameSignal* s);
|
||||
virtual void setVisible(bool state);
|
||||
virtual void setMenuButtonVisible(bool state);
|
||||
virtual void setTrayButtonVisible(bool state);
|
||||
virtual void setMinimizeButtonVisible(bool state);
|
||||
virtual void setMaximizeButtonVisible(bool state);
|
||||
virtual void setCloseButtonVisible(bool state);
|
||||
public: //bullshit public
|
||||
virtual void fireClosingSignal();
|
||||
virtual void fireMinimizingSignal();
|
||||
protected:
|
||||
char* _title;
|
||||
bool _internal;
|
||||
bool _sizeable;
|
||||
bool _moveable;
|
||||
Panel* _topGrip;
|
||||
Panel* _bottomGrip;
|
||||
Panel* _leftGrip;
|
||||
Panel* _rightGrip;
|
||||
Panel* _topLeftGrip;
|
||||
Panel* _topRightGrip;
|
||||
Panel* _bottomLeftGrip;
|
||||
Panel* _bottomRightGrip;
|
||||
Panel* _captionGrip;
|
||||
Panel* _client;
|
||||
Button* _trayButton;
|
||||
Button* _minimizeButton;
|
||||
Button* _maximizeButton;
|
||||
Button* _closeButton;
|
||||
Button* _menuButton;
|
||||
Dar<FrameSignal*> _frameSignalDar;
|
||||
Frame* _resizeable;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
27
main/source/includes/vgui/include/VGUI_FrameSignal.h
Normal file
27
main/source/includes/vgui/include/VGUI_FrameSignal.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FRAMESIGNAL_H
|
||||
#define VGUI_FRAMESIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Frame;
|
||||
|
||||
class VGUIAPI FrameSignal
|
||||
{
|
||||
public:
|
||||
virtual void closing(Frame* frame)=0;
|
||||
virtual void minimizing(Frame* frame,bool toTray)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
30
main/source/includes/vgui/include/VGUI_GridLayout.h
Normal file
30
main/source/includes/vgui/include/VGUI_GridLayout.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_GRIDLAYOUT_H
|
||||
#define VGUI_GRIDLAYOUT_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Layout.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
/*
|
||||
class VGUIAPI GridLayout : public Layout
|
||||
{
|
||||
public:
|
||||
GridLayout(int rows,int cols,int hgap,int vgap);
|
||||
protected:
|
||||
int _rows;
|
||||
int _cols;
|
||||
};
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
#endif
|
65
main/source/includes/vgui/include/VGUI_HeaderPanel.h
Normal file
65
main/source/includes/vgui/include/VGUI_HeaderPanel.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_HEADERPANEL_H
|
||||
#define VGUI_HEADERPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Dar.h>
|
||||
#include<VGUI_Cursor.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum MouseCode;
|
||||
class ChangeSignal;
|
||||
|
||||
class VGUIAPI HeaderPanel : public Panel
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
Dar<Panel*> _sliderPanelDar;
|
||||
Dar<Panel*> _sectionPanelDar;
|
||||
Dar<ChangeSignal*> _changeSignalDar;
|
||||
Panel* _sectionLayer;
|
||||
int _sliderWide;
|
||||
bool _dragging;
|
||||
int _dragSliderIndex;
|
||||
int _dragSliderStartPos;
|
||||
int _dragSliderStartX;
|
||||
|
||||
public:
|
||||
|
||||
HeaderPanel(int x,int y,int wide,int tall);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void performLayout();
|
||||
|
||||
public:
|
||||
|
||||
virtual void addSectionPanel(Panel* panel);
|
||||
virtual void setSliderPos(int sliderIndex,int pos);
|
||||
virtual int getSectionCount();
|
||||
virtual void getSectionExtents(int sectionIndex,int& x0,int& x1);
|
||||
virtual void addChangeSignal(ChangeSignal* s);
|
||||
|
||||
public: //bullshit public
|
||||
|
||||
virtual void fireChangeSignal();
|
||||
virtual void privateCursorMoved(int x,int y,Panel* panel);
|
||||
virtual void privateMousePressed(MouseCode code,Panel* panel);
|
||||
virtual void privateMouseReleased(MouseCode code,Panel* panel);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
62
main/source/includes/vgui/include/VGUI_Image.h
Normal file
62
main/source/includes/vgui/include/VGUI_Image.h
Normal file
|
@ -0,0 +1,62 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_IMAGE_H
|
||||
#define VGUI_IMAGE_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Scheme.h>
|
||||
#include<VGUI_Color.h>
|
||||
|
||||
//TODO:: needs concept of insets
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI Image
|
||||
{
|
||||
friend class Panel;
|
||||
private:
|
||||
int _pos[2];
|
||||
int _size[2];
|
||||
Panel* _panel;
|
||||
Color _color;
|
||||
public:
|
||||
Image();
|
||||
public:
|
||||
virtual void setPos(int x,int y);
|
||||
virtual void getPos(int& x,int& y);
|
||||
virtual void getSize(int& wide,int& tall);
|
||||
virtual void setColor(Color color);
|
||||
virtual void getColor(Color& color);
|
||||
protected:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void drawSetColor(Scheme::SchemeColor sc);
|
||||
virtual void drawSetColor(int r,int g,int b,int a);
|
||||
virtual void drawFilledRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawOutlinedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawSetTextFont(Scheme::SchemeFont sf);
|
||||
virtual void drawSetTextFont(Font* font);
|
||||
virtual void drawSetTextColor(Scheme::SchemeColor sc);
|
||||
virtual void drawSetTextColor(int r,int g,int b,int a);
|
||||
virtual void drawSetTextPos(int x,int y);
|
||||
virtual void drawPrintText(const char* str,int strlen);
|
||||
virtual void drawPrintText(int x,int y,const char* str,int strlen);
|
||||
virtual void drawPrintChar(char ch);
|
||||
virtual void drawPrintChar(int x,int y,char ch);
|
||||
virtual void drawSetTextureRGBA(int id,const char* rgba,int wide,int tall);
|
||||
virtual void drawSetTexture(int id);
|
||||
virtual void drawTexturedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void paint(Panel* panel);
|
||||
public:
|
||||
virtual void doPaint(Panel* panel);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
38
main/source/includes/vgui/include/VGUI_ImagePanel.h
Normal file
38
main/source/includes/vgui/include/VGUI_ImagePanel.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_IMAGEPANEL_H
|
||||
#define VGUI_IMAGEPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Image;
|
||||
|
||||
class VGUIAPI ImagePanel : public Panel
|
||||
{
|
||||
public:
|
||||
inline ImagePanel()
|
||||
{
|
||||
_image=null;
|
||||
}
|
||||
|
||||
ImagePanel(Image* image);
|
||||
public:
|
||||
virtual void setImage(Image* image);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
Image* _image;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
39
main/source/includes/vgui/include/VGUI_InputSignal.h
Normal file
39
main/source/includes/vgui/include/VGUI_InputSignal.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_INPUTSIGNAL_H
|
||||
#define VGUI_INPUTSIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum MouseCode;
|
||||
enum KeyCode;
|
||||
class Panel;
|
||||
|
||||
//these are lumped into one for simplicity sake right now
|
||||
class VGUIAPI InputSignal
|
||||
{
|
||||
public:
|
||||
virtual void cursorMoved(int x,int y,Panel* panel)=0;
|
||||
virtual void cursorEntered(Panel* panel)=0;
|
||||
virtual void cursorExited(Panel* panel)=0;
|
||||
virtual void mousePressed(MouseCode code,Panel* panel)=0;
|
||||
virtual void mouseDoublePressed(MouseCode code,Panel* panel)=0;
|
||||
virtual void mouseReleased(MouseCode code,Panel* panel)=0;
|
||||
virtual void mouseWheeled(int delta,Panel* panel)=0;
|
||||
virtual void keyPressed(KeyCode code,Panel* panel)=0;
|
||||
virtual void keyTyped(KeyCode code,Panel* panel)=0;
|
||||
virtual void keyReleased(KeyCode code,Panel* panel)=0;
|
||||
virtual void keyFocusTicked(Panel* panel)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
30
main/source/includes/vgui/include/VGUI_InputStream.h
Normal file
30
main/source/includes/vgui/include/VGUI_InputStream.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_FILE_H
|
||||
#define VGUI_FILE_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI InputStream
|
||||
{
|
||||
public:
|
||||
virtual void seekStart(bool& success)=0;
|
||||
virtual void seekRelative(int count,bool& success)=0;
|
||||
virtual void seekEnd(bool& success)=0;
|
||||
virtual int getAvailable(bool& success)=0;
|
||||
virtual uchar readUChar(bool& success)=0;
|
||||
virtual void readUChar(uchar* buf,int count,bool& success)=0;
|
||||
virtual void close(bool& success)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
26
main/source/includes/vgui/include/VGUI_IntChangeSignal.h
Normal file
26
main/source/includes/vgui/include/VGUI_IntChangeSignal.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_INTCHANGESIGNAL_H
|
||||
#define VGUI_INTCHANGESIGNAL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI IntChangeSignal
|
||||
{
|
||||
public:
|
||||
virtual void intChanged(int value,Panel* panel)=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
35
main/source/includes/vgui/include/VGUI_IntLabel.h
Normal file
35
main/source/includes/vgui/include/VGUI_IntLabel.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_INTLABEL_H
|
||||
#define VGUI_INTLABEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Label.h>
|
||||
#include<VGUI_IntChangeSignal.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI IntLabel : public Label , public IntChangeSignal
|
||||
{
|
||||
public:
|
||||
IntLabel(int value,int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setValue(int value);
|
||||
virtual void intChanged(int value,Panel* panel);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
int _value;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
126
main/source/includes/vgui/include/VGUI_KeyCode.h
Normal file
126
main/source/includes/vgui/include/VGUI_KeyCode.h
Normal file
|
@ -0,0 +1,126 @@
|
|||
//========= Copyright Š 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_KEYCODE_H
|
||||
#define VGUI_KEYCODE_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
enum VGUIAPI KeyCode
|
||||
{
|
||||
KEY_0=0,
|
||||
KEY_1,
|
||||
KEY_2,
|
||||
KEY_3,
|
||||
KEY_4,
|
||||
KEY_5,
|
||||
KEY_6,
|
||||
KEY_7,
|
||||
KEY_8,
|
||||
KEY_9,
|
||||
KEY_A,
|
||||
KEY_B,
|
||||
KEY_C,
|
||||
KEY_D,
|
||||
KEY_E,
|
||||
KEY_F,
|
||||
KEY_G,
|
||||
KEY_H,
|
||||
KEY_I,
|
||||
KEY_J,
|
||||
KEY_K,
|
||||
KEY_L,
|
||||
KEY_M,
|
||||
KEY_N,
|
||||
KEY_O,
|
||||
KEY_P,
|
||||
KEY_Q,
|
||||
KEY_R,
|
||||
KEY_S,
|
||||
KEY_T,
|
||||
KEY_U,
|
||||
KEY_V,
|
||||
KEY_W,
|
||||
KEY_X,
|
||||
KEY_Y,
|
||||
KEY_Z,
|
||||
KEY_PAD_0,
|
||||
KEY_PAD_1,
|
||||
KEY_PAD_2,
|
||||
KEY_PAD_3,
|
||||
KEY_PAD_4,
|
||||
KEY_PAD_5,
|
||||
KEY_PAD_6,
|
||||
KEY_PAD_7,
|
||||
KEY_PAD_8,
|
||||
KEY_PAD_9,
|
||||
KEY_PAD_DIVIDE,
|
||||
KEY_PAD_MULTIPLY,
|
||||
KEY_PAD_MINUS,
|
||||
KEY_PAD_PLUS,
|
||||
KEY_PAD_ENTER,
|
||||
KEY_PAD_DECIMAL,
|
||||
KEY_LBRACKET,
|
||||
KEY_RBRACKET,
|
||||
KEY_SEMICOLON,
|
||||
KEY_APOSTROPHE,
|
||||
KEY_BACKQUOTE,
|
||||
KEY_COMMA,
|
||||
KEY_PERIOD,
|
||||
KEY_SLASH,
|
||||
KEY_BACKSLASH,
|
||||
KEY_MINUS,
|
||||
KEY_EQUAL,
|
||||
KEY_ENTER,
|
||||
KEY_SPACE,
|
||||
KEY_BACKSPACE,
|
||||
KEY_TAB,
|
||||
KEY_CAPSLOCK,
|
||||
KEY_NUMLOCK,
|
||||
KEY_ESCAPE,
|
||||
KEY_SCROLLLOCK,
|
||||
KEY_INSERT,
|
||||
KEY_DELETE,
|
||||
KEY_HOME,
|
||||
KEY_END,
|
||||
KEY_PAGEUP,
|
||||
KEY_PAGEDOWN,
|
||||
KEY_BREAK,
|
||||
KEY_LSHIFT,
|
||||
KEY_RSHIFT,
|
||||
KEY_LALT,
|
||||
KEY_RALT,
|
||||
KEY_LCONTROL,
|
||||
KEY_RCONTROL,
|
||||
KEY_LWIN,
|
||||
KEY_RWIN,
|
||||
KEY_APP,
|
||||
KEY_UP,
|
||||
KEY_LEFT,
|
||||
KEY_DOWN,
|
||||
KEY_RIGHT,
|
||||
KEY_F1,
|
||||
KEY_F2,
|
||||
KEY_F3,
|
||||
KEY_F4,
|
||||
KEY_F5,
|
||||
KEY_F6,
|
||||
KEY_F7,
|
||||
KEY_F8,
|
||||
KEY_F9,
|
||||
KEY_F10,
|
||||
KEY_F11,
|
||||
KEY_F12,
|
||||
KEY_LAST,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
81
main/source/includes/vgui/include/VGUI_Label.h
Normal file
81
main/source/includes/vgui/include/VGUI_Label.h
Normal file
|
@ -0,0 +1,81 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LABEL_H
|
||||
#define VGUI_LABEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
#include<VGUI_Scheme.h>
|
||||
#include<VGUI_Image.h>
|
||||
|
||||
//TODO: this should use a TextImage for the text
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
class TextImage;
|
||||
|
||||
class VGUIAPI Label : public Panel
|
||||
{
|
||||
public:
|
||||
enum Alignment
|
||||
{
|
||||
a_northwest=0,
|
||||
a_north,
|
||||
a_northeast,
|
||||
a_west,
|
||||
a_center,
|
||||
a_east,
|
||||
a_southwest,
|
||||
a_south,
|
||||
a_southeast,
|
||||
};
|
||||
public:
|
||||
Label(int textBufferLen,const char* text,int x,int y,int wide,int tall);
|
||||
Label(const char* text,int x,int y,int wide,int tall);
|
||||
Label(const char* text,int x,int y);
|
||||
Label(const char* text);
|
||||
|
||||
inline Label() : Panel(0,0,10,10)
|
||||
{
|
||||
init(1,"",true);
|
||||
}
|
||||
private:
|
||||
void init(int textBufferLen,const char* text,bool textFitted);
|
||||
public:
|
||||
virtual void setImage(Image* image);
|
||||
virtual void setText(int textBufferLen,const char* text);
|
||||
virtual void setText(const char* format,...);
|
||||
virtual void setFont(Scheme::SchemeFont schemeFont);
|
||||
virtual void setFont(Font* font);
|
||||
virtual void getTextSize(int& wide,int& tall);
|
||||
virtual void getContentSize(int& wide,int& tall);
|
||||
virtual void setTextAlignment(Alignment alignment);
|
||||
virtual void setContentAlignment(Alignment alignment);
|
||||
virtual Panel* createPropertyPanel();
|
||||
virtual void setFgColor(int r,int g,int b,int a);
|
||||
virtual void setFgColor(vgui::Scheme::SchemeColor sc);
|
||||
virtual void setContentFitted(bool state);
|
||||
protected:
|
||||
virtual void computeAlignment(int& tx0,int& ty0,int& tx1,int& ty1,int& ix0,int& iy0,int& ix1,int& iy1,int& minX,int& minY,int& maxX,int& maxY);
|
||||
virtual void paint();
|
||||
virtual void recomputeMinimumSize();
|
||||
protected:
|
||||
bool _textEnabled;
|
||||
bool _imageEnabled;
|
||||
bool _contentFitted;
|
||||
Alignment _textAlignment;
|
||||
Alignment _contentAlignment;
|
||||
TextImage* _textImage;
|
||||
Image* _image;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
31
main/source/includes/vgui/include/VGUI_Layout.h
Normal file
31
main/source/includes/vgui/include/VGUI_Layout.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LAYOUT_H
|
||||
#define VGUI_LAYOUT_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI Layout
|
||||
{
|
||||
//private:
|
||||
// Panel* _panel;
|
||||
public:
|
||||
Layout();
|
||||
public:
|
||||
//virtual void setPanel(Panel* panel); //called by Panel::setLayout
|
||||
virtual void performLayout(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
21
main/source/includes/vgui/include/VGUI_LayoutInfo.h
Normal file
21
main/source/includes/vgui/include/VGUI_LayoutInfo.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LAYOUTINFO_H
|
||||
#define VGUI_LAYOUTINFO_H
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI LayoutInfo
|
||||
{
|
||||
virtual LayoutInfo* getThis()=0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
39
main/source/includes/vgui/include/VGUI_LineBorder.h
Normal file
39
main/source/includes/vgui/include/VGUI_LineBorder.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LINEBORDER_H
|
||||
#define VGUI_LINEBORDER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Border.h>
|
||||
#include<VGUI_Color.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI LineBorder : public Border
|
||||
{
|
||||
private:
|
||||
Color _color;
|
||||
public:
|
||||
LineBorder();
|
||||
LineBorder(int thickness);
|
||||
LineBorder(Color color);
|
||||
LineBorder(int thickness,Color color);
|
||||
|
||||
inline void setLineColor(int r, int g, int b, int a) {_color = Color(r,g,b,a);}
|
||||
private:
|
||||
virtual void init(int thickness,Color color);
|
||||
protected:
|
||||
virtual void paint(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
40
main/source/includes/vgui/include/VGUI_ListPanel.h
Normal file
40
main/source/includes/vgui/include/VGUI_ListPanel.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LISTPANEL_H
|
||||
#define VGUI_LISTPANEL_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class ScrollBar;
|
||||
|
||||
//TODO: make a ScrollPanel and use a constrained one for _vpanel in ListPanel
|
||||
class VGUIAPI ListPanel : public Panel
|
||||
{
|
||||
public:
|
||||
ListPanel(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void addString(const char* str);
|
||||
virtual void addItem(Panel* panel);
|
||||
virtual void setPixelScroll(int value);
|
||||
virtual void translatePixelScroll(int delta);
|
||||
protected:
|
||||
virtual void performLayout();
|
||||
virtual void paintBackground();
|
||||
protected:
|
||||
Panel* _vpanel;
|
||||
ScrollBar* _scroll;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
29
main/source/includes/vgui/include/VGUI_LoweredBorder.h
Normal file
29
main/source/includes/vgui/include/VGUI_LoweredBorder.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_LOWEREDBORDER_H
|
||||
#define VGUI_LOWEREDBORDER_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Border.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI LoweredBorder : public Border
|
||||
{
|
||||
public:
|
||||
LoweredBorder();
|
||||
protected:
|
||||
virtual void paint(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
30
main/source/includes/vgui/include/VGUI_Menu.h
Normal file
30
main/source/includes/vgui/include/VGUI_Menu.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MENU_H
|
||||
#define VGUI_MENU_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Panel.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Panel;
|
||||
|
||||
class VGUIAPI Menu : public Panel
|
||||
{
|
||||
public:
|
||||
Menu(int x,int y,int wide,int tall);
|
||||
Menu(int wide,int tall);
|
||||
public:
|
||||
virtual void addMenuItem(Panel* panel);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
30
main/source/includes/vgui/include/VGUI_MenuItem.h
Normal file
30
main/source/includes/vgui/include/VGUI_MenuItem.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MENUITEM_H
|
||||
#define VGUI_MENUITEM_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Button.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Menu;
|
||||
|
||||
class VGUIAPI MenuItem : public Button
|
||||
{
|
||||
public:
|
||||
MenuItem(const char* text);
|
||||
MenuItem(const char* text,Menu* subMenu);
|
||||
protected:
|
||||
Menu* _subMenu;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
27
main/source/includes/vgui/include/VGUI_MenuSeparator.h
Normal file
27
main/source/includes/vgui/include/VGUI_MenuSeparator.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MENUSEPARATOR_H
|
||||
#define VGUI_MENUSEPARATOR_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Label.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class VGUIAPI MenuSeparator : public Label
|
||||
{
|
||||
public:
|
||||
MenuSeparator(const char* text);
|
||||
protected:
|
||||
virtual void paintBackground();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
53
main/source/includes/vgui/include/VGUI_MessageBox.h
Normal file
53
main/source/includes/vgui/include/VGUI_MessageBox.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MESSAGEBOX_H
|
||||
#define VGUI_MESSAGEBOX_H
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Frame.h>
|
||||
#include<VGUI_Dar.h>
|
||||
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Label;
|
||||
class Button;
|
||||
class ActionSignal;
|
||||
|
||||
class VGUIAPI MessageBox : public Frame
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
Label* _messageLabel;
|
||||
Button* _okButton;
|
||||
Dar<ActionSignal*> _actionSignalDar;
|
||||
|
||||
public:
|
||||
|
||||
MessageBox(const char* title,const char* text,int x,int y);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void performLayout();
|
||||
|
||||
public:
|
||||
|
||||
virtual void addActionSignal(ActionSignal* s);
|
||||
virtual void fireActionSignal();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
33
main/source/includes/vgui/include/VGUI_MiniApp.h
Normal file
33
main/source/includes/vgui/include/VGUI_MiniApp.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MINIAPP_H
|
||||
#define VGUI_MINIAPP_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
class Frame;
|
||||
|
||||
class VGUIAPI MiniApp
|
||||
{
|
||||
public:
|
||||
MiniApp();
|
||||
public:
|
||||
virtual void getName(char* buf,int bufLen);
|
||||
virtual Frame* createInstance()=0;
|
||||
protected:
|
||||
virtual void setName(const char* name);
|
||||
protected:
|
||||
char* _name;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
24
main/source/includes/vgui/include/VGUI_MouseCode.h
Normal file
24
main/source/includes/vgui/include/VGUI_MouseCode.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_MOUSECODE_H
|
||||
#define VGUI_MOUSECODE_H
|
||||
|
||||
#include<VGUI.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
enum VGUIAPI MouseCode
|
||||
{
|
||||
MOUSE_LEFT=0,
|
||||
MOUSE_RIGHT,
|
||||
MOUSE_MIDDLE,
|
||||
MOUSE_LAST,
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
228
main/source/includes/vgui/include/VGUI_Panel.h
Normal file
228
main/source/includes/vgui/include/VGUI_Panel.h
Normal file
|
@ -0,0 +1,228 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef VGUI_PANEL_H
|
||||
#define VGUI_PANEL_H
|
||||
|
||||
|
||||
/*
|
||||
|
||||
TODO:
|
||||
|
||||
Maybe have the border know who they are added to.
|
||||
A border can only be added to 1 thing, and will be
|
||||
removed from the other. That way they can actually
|
||||
be memory managed. Also do Layout's this way too.
|
||||
|
||||
TODO:
|
||||
outlinedRect should have a thickness arg
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include<VGUI.h>
|
||||
#include<VGUI_Dar.h>
|
||||
#include<VGUI_Scheme.h>
|
||||
#include<VGUI_Color.h>
|
||||
#include<VGUI_Cursor.h>
|
||||
#include <VGUI_MouseCode.h>
|
||||
#include <VGUI_KeyCode.h>
|
||||
#include <VGUI_RepaintSignal.h>
|
||||
|
||||
namespace vgui
|
||||
{
|
||||
|
||||
enum KeyCode;
|
||||
enum MouseCode;
|
||||
class SurfaceBase;
|
||||
class FocusChangeSignal;
|
||||
class InputSignal;
|
||||
class Cursor;
|
||||
class Layout;
|
||||
class FocusNavGroup;
|
||||
class Border;
|
||||
class Font;
|
||||
class BuildGroup;
|
||||
class App;
|
||||
class LayoutInfo;
|
||||
|
||||
class VGUIAPI Panel
|
||||
{
|
||||
public:
|
||||
Panel();
|
||||
Panel(int x,int y,int wide,int tall);
|
||||
private:
|
||||
void init(int x,int y,int wide,int tall);
|
||||
public:
|
||||
virtual void setPos(int x,int y);
|
||||
virtual void getPos(int& x,int& y);
|
||||
virtual void setSize(int wide,int tall);
|
||||
virtual void getSize(int& wide,int& tall);
|
||||
virtual void setBounds(int x,int y,int wide,int tall);
|
||||
virtual void getBounds(int& x,int& y,int& wide,int& tall);
|
||||
virtual int getWide();
|
||||
virtual int getTall();
|
||||
virtual Panel* getParent();
|
||||
virtual void setVisible(bool state);
|
||||
virtual bool isVisible();
|
||||
virtual bool isVisibleUp();
|
||||
virtual void repaint();
|
||||
virtual void repaintAll();
|
||||
virtual void getAbsExtents(int& x0,int& y0,int& x1,int& y1);
|
||||
virtual void getClipRect(int& x0,int& y0,int& x1,int& y1);
|
||||
virtual void setParent(Panel* newParent);
|
||||
virtual void addChild(Panel* child);
|
||||
virtual void insertChildAt(Panel* child,int index);
|
||||
virtual void removeChild(Panel* child);
|
||||
virtual bool wasMousePressed(MouseCode code);
|
||||
virtual bool wasMouseDoublePressed(MouseCode code);
|
||||
virtual bool isMouseDown(MouseCode code);
|
||||
virtual bool wasMouseReleased(MouseCode code);
|
||||
virtual bool wasKeyPressed(KeyCode code);
|
||||
virtual bool isKeyDown(KeyCode code);
|
||||
virtual bool wasKeyTyped(KeyCode code);
|
||||
virtual bool wasKeyReleased(KeyCode code);
|
||||
virtual void addInputSignal(InputSignal* s);
|
||||
virtual void removeInputSignal(InputSignal* s);
|
||||
virtual void addRepaintSignal(RepaintSignal* s);
|
||||
virtual void removeRepaintSignal(RepaintSignal* s);
|
||||
virtual bool isWithin(int x,int y); //in screen space
|
||||
virtual Panel* isWithinTraverse(int x,int y);
|
||||
virtual void localToScreen(int& x,int& y);
|
||||
virtual void screenToLocal(int& x,int& y);
|
||||
virtual void setCursor(Cursor* cursor);
|
||||
virtual void setCursor(Scheme::SchemeCursor scu);
|
||||
virtual Cursor* getCursor();
|
||||
virtual void setMinimumSize(int wide,int tall);
|
||||
virtual void getMinimumSize(int& wide,int& tall);
|
||||
virtual void requestFocus();
|
||||
virtual bool hasFocus();
|
||||
virtual int getChildCount();
|
||||
virtual Panel* getChild(int index);
|
||||
virtual void setLayout(Layout* layout);
|
||||
virtual void invalidateLayout(bool layoutNow);
|
||||
virtual void setFocusNavGroup(FocusNavGroup* focusNavGroup);
|
||||
virtual void requestFocusPrev();
|
||||
virtual void requestFocusNext();
|
||||
virtual void addFocusChangeSignal(FocusChangeSignal* s);
|
||||
virtual bool isAutoFocusNavEnabled();
|
||||
virtual void setAutoFocusNavEnabled(bool state);
|
||||
virtual void setBorder(Border* border);
|
||||
virtual void setPaintBorderEnabled(bool state);
|
||||
virtual void setPaintBackgroundEnabled(bool state);
|
||||
virtual void setPaintEnabled(bool state);
|
||||
virtual void getInset(int& left,int& top,int& right,int& bottom);
|
||||
virtual void getPaintSize(int& wide,int& tall);
|
||||
virtual void setPreferredSize(int wide,int tall);
|
||||
virtual void getPreferredSize(int& wide,int& tall);
|
||||
virtual SurfaceBase* getSurfaceBase();
|
||||
virtual bool isEnabled();
|
||||
virtual void setEnabled(bool state);
|
||||
virtual void setBuildGroup(BuildGroup* buildGroup,const char* panelPersistanceName);
|
||||
virtual bool isBuildGroupEnabled();
|
||||
virtual void removeAllChildren();
|
||||
virtual void repaintParent();
|
||||
virtual Panel* createPropertyPanel();
|
||||
virtual void getPersistanceText(char* buf,int bufLen);
|
||||
virtual void applyPersistanceText(const char* buf);
|
||||
virtual void setFgColor(Scheme::SchemeColor sc);
|
||||
virtual void setBgColor(Scheme::SchemeColor sc);
|
||||
virtual void setFgColor(int r,int g,int b,int a);
|
||||
virtual void setBgColor(int r,int g,int b,int a);
|
||||
virtual void getFgColor(int& r,int& g,int& b,int& a);
|
||||
virtual void getBgColor(int& r,int& g,int& b,int& a);
|
||||
virtual void setBgColor(Color color);
|
||||
virtual void setFgColor(Color color);
|
||||
virtual void getBgColor(Color& color);
|
||||
virtual void getFgColor(Color& color);
|
||||
virtual void setAsMouseCapture(bool state);
|
||||
virtual void setAsMouseArena(bool state);
|
||||
virtual App* getApp();
|
||||
virtual void getVirtualSize(int& wide,int& tall);
|
||||
virtual void setLayoutInfo(LayoutInfo* layoutInfo);
|
||||
virtual LayoutInfo* getLayoutInfo();
|
||||
virtual bool isCursorNone();
|
||||
public: //bullshit public
|
||||
virtual void solveTraverse();
|
||||
virtual void paintTraverse();
|
||||
virtual void setSurfaceBaseTraverse(SurfaceBase* surfaceBase);
|
||||
protected:
|
||||
virtual void performLayout();
|
||||
virtual void internalPerformLayout();
|
||||
virtual void drawSetColor(Scheme::SchemeColor sc);
|
||||
virtual void drawSetColor(int r,int g,int b,int a);
|
||||
virtual void drawFilledRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawOutlinedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void drawSetTextFont(Scheme::SchemeFont sf);
|
||||
virtual void drawSetTextFont(Font* font);
|
||||
virtual void drawSetTextColor(Scheme::SchemeColor sc);
|
||||
virtual void drawSetTextColor(int r,int g,int b,int a);
|
||||
virtual void drawSetTextPos(int x,int y);
|
||||
virtual void drawPrintText(const char* str,int strlen);
|
||||
virtual void drawPrintText(int x,int y,const char* str,int strlen);
|
||||
virtual void drawPrintChar(char ch);
|
||||
virtual void drawPrintChar(int x,int y,char ch);
|
||||
virtual void drawSetTextureRGBA(int id,const char* rgba,int wide,int tall);
|
||||
virtual void drawSetTexture(int id);
|
||||
virtual void drawTexturedRect(int x0,int y0,int x1,int y1);
|
||||
virtual void solve();
|
||||
virtual void paintTraverse(bool repaint);
|
||||
virtual void paintBackground();
|
||||
virtual void paint();
|
||||
virtual void paintBuildOverlay();
|
||||
virtual void internalCursorMoved(int x,int y);
|
||||
virtual void internalCursorEntered();
|
||||
virtual void internalCursorExited();
|
||||
virtual void internalMousePressed(MouseCode code);
|
||||
virtual void internalMouseDoublePressed(MouseCode code);
|
||||
virtual void internalMouseReleased(MouseCode code);
|
||||
virtual void internalMouseWheeled(int delta);
|
||||
virtual void internalKeyPressed(KeyCode code);
|
||||
virtual void internalKeyTyped(KeyCode code);
|
||||
virtual void internalKeyReleased(KeyCode code);
|
||||
virtual void internalKeyFocusTicked();
|
||||
virtual void internalFocusChanged(bool lost);
|
||||
virtual void internalSetCursor();
|
||||
protected:
|
||||
int _pos[2];
|
||||
int _size[2];
|
||||
int _loc[2];
|
||||
int _minimumSize[2];
|
||||
int _preferredSize[2];
|
||||
Dar<Panel*> _childDar;
|
||||
Panel* _parent;
|
||||
SurfaceBase* _surfaceBase;
|
||||
Dar<InputSignal*> _inputSignalDar;
|
||||
Dar<RepaintSignal*> _repaintSignalDar;
|
||||
int _clipRect[4];
|
||||
Cursor* _cursor;
|
||||
Scheme::SchemeCursor _schemeCursor;
|
||||
bool _visible;
|
||||
Layout* _layout;
|
||||
bool _needsLayout;
|
||||
FocusNavGroup* _focusNavGroup;
|
||||
Dar<FocusChangeSignal*> _focusChangeSignalDar;
|
||||
bool _autoFocusNavEnabled;
|
||||
Border* _border;
|
||||
private:
|
||||
bool _needsRepaint;
|
||||
bool _enabled;
|
||||
BuildGroup* _buildGroup;
|
||||
Color _fgColor;
|
||||
Color _bgColor;
|
||||
LayoutInfo* _layoutInfo;
|
||||
bool _paintBorderEnabled;
|
||||
bool _paintBackgroundEnabled;
|
||||
bool _paintEnabled;
|
||||
friend class Panel;
|
||||
friend class App;
|
||||
friend class SurfaceBase;
|
||||
friend class Image;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue