From: Thorsten Engel Date: Thu, 18 May 2006 17:29:38 +0000 (+0000) Subject: - improved code style of last commit ;-) X-Git-Tag: Release-2.0.0~859 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9628ebd25c10468a7c7aed54db2d30e1c9b6fab0;p=bacula%2Fbacula - improved code style of last commit ;-) git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3025 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index 6088f157ad..73a57e5be9 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -714,7 +714,7 @@ int send_data(JCR *jcr, int stream, FF_PKT *ff_pkt, DIGEST *digest, DIGEST *sign goto err; } compress_len = zstream.total_out; - blibzInited = deflateReset (&zstream) == Z_OK; + blibzInited = deflateReset(&zstream) == Z_OK; Dmsg2(400, "compressed len=%d uncompressed len=%d\n", compress_len, sd->msglen); diff --git a/bacula/src/lib/winapi.c b/bacula/src/lib/winapi.c index fe6b7eb007..58a20fd715 100644 --- a/bacula/src/lib/winapi.c +++ b/bacula/src/lib/winapi.c @@ -248,7 +248,7 @@ InitWinAPIWrapper() break; } #endif /* WIN32_VSS */ - atexit (Win32ConvCleanupCache); + atexit(Win32ConvCleanupCache); } #else diff --git a/bacula/src/win32/baculafd/baculafd.vcproj b/bacula/src/win32/baculafd/baculafd.vcproj index c3d818b78c..6dc5dbf1d9 100644 --- a/bacula/src/win32/baculafd/baculafd.vcproj +++ b/bacula/src/win32/baculafd/baculafd.vcproj @@ -1,207 +1,170 @@ + ProjectGUID="{D1A9DA7E-7BBA-4E74-B21E-2440124D191E}" + Keyword="Win32Proj"> + Name="Win32"/> - - - - - - - + UseOfATL="1" + CharacterSet="2"> - - + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + UseOfATL="1" + CharacterSet="2"> + + + + + + + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + + + + + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> - - + Name="VCCustomBuildTool"/> + TargetMachine="1"/> + + + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool"/> + Name="VCWebServiceProxyGeneratorTool"/> + Name="VCXMLDataGeneratorTool"/> + Name="VCWebDeploymentTool"/> + Name="VCManagedWrapperGeneratorTool"/> + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> @@ -209,399 +172,367 @@ + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + RelativePath="..\lib\address_conf.cpp"> + RelativePath="..\lib\alist.cpp"> + RelativePath="..\lib\alloc.cpp"> + RelativePath="..\lib\attr.cpp"> + RelativePath="..\findlib\attribs.cpp"> + RelativePath="..\filed\authenticate.cpp"> + RelativePath="..\filed\backup.cpp"> + RelativePath="..\lib\base64.cpp"> + RelativePath="..\lib\berrno.cpp"> + RelativePath="..\findlib\bfile.cpp"> + RelativePath="..\lib\bget_msg.cpp"> + RelativePath="..\lib\bnet.cpp"> + RelativePath="..\lib\bnet_server.cpp"> + RelativePath="..\lib\bregex.cpp"> + RelativePath="..\lib\bshm.cpp"> + RelativePath="..\lib\bsys.cpp"> + RelativePath="..\lib\btime.cpp"> + RelativePath="..\lib\btimers.cpp"> + RelativePath="..\compat\compat.cpp"> + RelativePath="..\lib\cram-md5.cpp"> + RelativePath="..\lib\crc32.cpp"> + RelativePath="..\findlib\create_file.cpp"> + RelativePath="..\lib\crypto.cpp"> + RelativePath="..\lib\daemon.cpp"> + RelativePath="..\lib\dlist.cpp"> + RelativePath="..\lib\edit.cpp"> + RelativePath="..\findlib\enable_priv.cpp"> + RelativePath="..\filed\estimate.cpp"> + RelativePath="..\filed\filed.cpp"> + RelativePath="..\filed\filed_conf.cpp"> + RelativePath="..\findlib\find.cpp"> + RelativePath="..\findlib\find_one.cpp"> + RelativePath="..\lib\fnmatch.cpp"> + RelativePath="..\findlib\fstype.cpp"> + RelativePath="..\compat\getopt.c"> + RelativePath="..\filed\heartbeat.cpp"> + RelativePath="..\lib\hmac.cpp"> + RelativePath="..\lib\htable.cpp"> + RelativePath="..\lib\idcache.cpp"> + RelativePath="..\lib\jcr.cpp"> + RelativePath="..\filed\job.cpp"> + RelativePath="..\lib\lex.cpp"> + RelativePath="..\findlib\makepath.cpp"> + RelativePath="..\findlib\match.cpp"> + RelativePath="..\lib\md5.cpp"> + RelativePath="..\lib\mem_pool.cpp"> + RelativePath="..\lib\message.cpp"> + RelativePath="..\lib\parse_conf.cpp"> + RelativePath="..\compat\print.cpp"> + RelativePath="..\lib\pythonlib.cpp"> + RelativePath="..\lib\queue.cpp"> + RelativePath="..\lib\res.cpp"> + RelativePath="..\filed\restore.cpp"> + RelativePath="..\lib\rwlock.cpp"> + RelativePath="..\findlib\save-cwd.cpp"> + RelativePath="..\lib\scan.cpp"> + RelativePath="..\lib\semlock.cpp"> + RelativePath="..\lib\serial.cpp"> + RelativePath="..\lib\sha1.cpp"> + RelativePath="..\lib\signal.cpp"> + RelativePath="..\lib\smartall.cpp"> + RelativePath="..\filed\status.cpp"> + RelativePath=".\StdAfx.cpp"> + RelativePath="..\lib\tls.cpp"> + RelativePath="..\lib\tree.cpp"> + RelativePath="..\lib\util.cpp"> + + + + + + + + + + RelativePath="..\lib\var.cpp"> + RelativePath="..\filed\verify.cpp"> + RelativePath="..\filed\verify_vol.cpp"> + RelativePath="..\compat\vss.cpp"> + RelativePath="..\compat\vss_W2K3.cpp"> + RelativePath="..\compat\vss_XP.cpp"> + RelativePath="..\lib\watchdog.cpp"> + RelativePath="..\..\filed\win32\winabout.cpp"> + RelativePath="..\findlib\winapi.cpp"> + RelativePath="..\..\filed\win32\winevents.cpp"> + RelativePath="..\..\filed\win32\winmain.cpp"> + RelativePath="..\..\filed\win32\winres.rc"> + + + + + + + + + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + + + + + + + + + + + RelativePath="..\compat\host.h"> + RelativePath="..\compat\mswinver.h"> + RelativePath="..\compat\netdb.h"> + RelativePath="..\compat\pwd.h"> + RelativePath="..\compat\sched.h"> + RelativePath=".\StdAfx.h"> + RelativePath="..\compat\stdint.h"> + RelativePath="..\compat\strings.h"> + RelativePath="..\compat\syslog.h"> + + + + + + + + + + + + + + + + - - + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + RelativePath="..\..\src\filed\win32\bacula.bmp"> + RelativePath="..\..\src\filed\win32\bacula.ico"> + RelativePath="..\..\src\filed\win32\error.ico"> + RelativePath="..\..\src\filed\win32\idle.ico"> + RelativePath="..\..\src\filed\win32\running.ico"> + RelativePath="..\..\src\filed\win32\saving.ico"> - - diff --git a/bacula/src/win32/compat/compat.cpp b/bacula/src/win32/compat/compat.cpp index 6c871331db..f1a172713a 100644 --- a/bacula/src/win32/compat/compat.cpp +++ b/bacula/src/win32/compat/compat.cpp @@ -45,19 +45,19 @@ conversion is called 3 times (lstat, attribs, open), by using the cache this is reduced to 1 time */ -POOLMEM* g_pWin32ConvUTF8Cache = get_pool_memory (PM_FNAME); -POOLMEM* g_pWin32ConvUCS2Cache = get_pool_memory (PM_FNAME); +POOLMEM *g_pWin32ConvUTF8Cache = get_pool_memory (PM_FNAME); +POOLMEM *g_pWin32ConvUCS2Cache = get_pool_memory (PM_FNAME); static pthread_mutex_t Win32Convmutex = PTHREAD_MUTEX_INITIALIZER; void Win32ConvCleanupCache() { if (g_pWin32ConvUTF8Cache) { - free_pool_memory (g_pWin32ConvUTF8Cache); + free_pool_memory(g_pWin32ConvUTF8Cache); g_pWin32ConvUTF8Cache = NULL; } if (g_pWin32ConvUCS2Cache) { - free_pool_memory (g_pWin32ConvUCS2Cache); + free_pool_memory(g_pWin32ConvUCS2Cache); g_pWin32ConvUCS2Cache = NULL; } } @@ -128,7 +128,7 @@ void conv_unix_to_win32_path(const char *name, char *win32_name, DWORD dwSize) } POOLMEM* -make_wchar_win32_path(POOLMEM* pszUCSPath, BOOL* pBIsRawPath /*= NULL*/) +make_wchar_win32_path(POOLMEM *pszUCSPath, BOOL *pBIsRawPath /*= NULL*/) { /* created 02/27/2006 Thorsten Engel @@ -146,14 +146,14 @@ make_wchar_win32_path(POOLMEM* pszUCSPath, BOOL* pBIsRawPath /*= NULL*/) if (!p_GetCurrentDirectoryW) return pszUCSPath; - wchar_t * name = (wchar_t *) pszUCSPath; + wchar_t *name = (wchar_t *) pszUCSPath; /* if it has already the desired form, exit without changes */ - if (wcslen(name) > 3 && wcsncmp (name, L"\\\\?\\", 4) == 0) + if (wcslen(name) > 3 && wcsncmp(name, L"\\\\?\\", 4) == 0) return pszUCSPath; - POOLMEM* pwszBuf = get_pool_memory (PM_FNAME); - POOLMEM* pwszCurDirBuf = get_pool_memory (PM_FNAME); + POOLMEM *pwszBuf = get_pool_memory(PM_FNAME); + POOLMEM *pwszCurDirBuf = get_pool_memory(PM_FNAME); DWORD dwCurDirPathSize = 0; /* get buffer with enough size (name+max 6. wchars+1 null terminator */ @@ -180,12 +180,12 @@ make_wchar_win32_path(POOLMEM* pszUCSPath, BOOL* pBIsRawPath /*= NULL*/) bAddCurrentPath = FALSE; /* is path relative to itself?, if yes, skip ./ */ - if (wcslen(name) > 2 && ((wcsncmp (name, L"./", 2) == 0) || (wcsncmp (name, L".\\", 2) == 0))) { + if (wcslen(name) > 2 && ((wcsncmp(name, L"./", 2) == 0) || (wcsncmp(name, L".\\", 2) == 0))) { name+=2; } /* is path of form '//./'? */ - if (wcslen(name) > 3 && ((wcsncmp (name, L"//./", 4) == 0) || (wcsncmp (name, L"\\\\.\\", 4) == 0))) { + if (wcslen(name) > 3 && ((wcsncmp(name, L"//./", 4) == 0) || (wcsncmp(name, L"\\\\.\\", 4) == 0))) { bAddDrive = FALSE; bAddCurrentPath = FALSE; bAddPrefix = FALSE; @@ -242,7 +242,7 @@ make_wchar_win32_path(POOLMEM* pszUCSPath, BOOL* pBIsRawPath /*= NULL*/) pwszBuf = check_pool_memory_size(pwszBuf, dwBufCharsNeeded*sizeof(wchar_t)); /* get directory into own buffer as it may either return c:\... or \\?\C:\.... */ - if (dwCurDirPathSize > 3 && wcsncmp ((LPCWSTR)pwszCurDirBuf, L"\\\\?\\", 4) == 0) + if (dwCurDirPathSize > 3 && wcsncmp((LPCWSTR)pwszCurDirBuf, L"\\\\?\\", 4) == 0) /* copy complete string */ wcscpy((wchar_t *) pwszBuf, (LPCWSTR)pwszCurDirBuf); else @@ -259,7 +259,7 @@ make_wchar_win32_path(POOLMEM* pszUCSPath, BOOL* pBIsRawPath /*= NULL*/) } - wchar_t * win32_name = (wchar_t *)pwszBuf+nParseOffset; + wchar_t *win32_name = (wchar_t *)pwszBuf+nParseOffset; while (*name) { /* Check for Unix separator and convert to Win32 */ @@ -303,8 +303,8 @@ make_wchar_win32_path(POOLMEM* pszUCSPath, BOOL* pBIsRawPath /*= NULL*/) } #endif - free_pool_memory (pszUCSPath); - free_pool_memory (pwszCurDirBuf); + free_pool_memory(pszUCSPath); + free_pool_memory(pwszCurDirBuf); return pwszBuf; } @@ -374,10 +374,10 @@ make_win32_path_UTF8_2_wchar(POOLMEM **pszUCS, const char *pszUTF, BOOL* pBIsRaw { P(Win32Convmutex); /* if we find the utf8 string in cache, we use the cached ucs2 version */ - if (bstrcmp (pszUTF, g_pWin32ConvUTF8Cache)) { + if (bstrcmp(pszUTF, g_pWin32ConvUTF8Cache)) { int32_t nBufSize = sizeof_pool_memory(g_pWin32ConvUCS2Cache); *pszUCS = check_pool_memory_size(*pszUCS, nBufSize); - wcscpy ((LPWSTR) *pszUCS, (LPWSTR) g_pWin32ConvUCS2Cache); + wcscpy((LPWSTR) *pszUCS, (LPWSTR) g_pWin32ConvUCS2Cache); V(Win32Convmutex); return nBufSize / sizeof (WCHAR); } @@ -396,10 +396,10 @@ make_win32_path_UTF8_2_wchar(POOLMEM **pszUCS, const char *pszUTF, BOOL* pBIsRaw /* populate cache */ int32_t nBufSize = sizeof_pool_memory(*pszUCS); g_pWin32ConvUCS2Cache = check_pool_memory_size(g_pWin32ConvUCS2Cache, nBufSize); - wcscpy ((LPWSTR) g_pWin32ConvUCS2Cache, (LPWSTR) *pszUCS); - nBufSize = strlen (pszUTF)+1; + wcscpy((LPWSTR) g_pWin32ConvUCS2Cache, (LPWSTR) *pszUCS); + nBufSize = strlen(pszUTF)+1; g_pWin32ConvUTF8Cache = check_pool_memory_size(g_pWin32ConvUTF8Cache, nBufSize); - bstrncpy (g_pWin32ConvUTF8Cache, pszUTF, nBufSize); + bstrncpy(g_pWin32ConvUTF8Cache, pszUTF, nBufSize); V(Win32Convmutex); return nRet;