diff --git a/uppsrc/Core/Diag.h b/uppsrc/Core/Diag.h index c8db6fc53..3d0afb735 100644 --- a/uppsrc/Core/Diag.h +++ b/uppsrc/Core/Diag.h @@ -170,15 +170,15 @@ struct DebugLogBlock const char *name; }; -#define RLOG(a) UPP::LockLog(), UPP::VppLog() << a << EOL, UPP::UnlockLog() +#define RLOG(a) UPP::LockLog(), UPP::VppLog() << a << UPP::EOL, UPP::UnlockLog() #define RLOGBEGIN() UPP::LockLog(), UPP::VppLog() << LOG_BEGIN #define RLOGEND() UPP::VppLog() << LOG_END, UPP::UnlockLog() #define RLOGBLOCK(n) UPP::DebugLogBlock MK__s(n) #define RLOGHEXDUMP(s, a) UPP::HexDump(UPP::VppLog(), s, a) #define RQUOTE(a) { LOG(#a); a; } -#define RLOGSRCPOS() UPP::LockLog(), UPP::VppLog() << __FILE__ << '#' << __LINE__ << EOL -#define RDUMP(a) UPP::LockLog(), UPP::VppLog() << #a << " = " << (a) << EOL, UPP::UnlockLog() -#define RDUMPC(c) UPP::LockLog(), UPP::DumpContainer(UPP::VppLog() << #c << ':' << EOL, (c)), UPP::UnlockLog() +#define RLOGSRCPOS() UPP::LockLog(), UPP::VppLog() << __FILE__ << '#' << __LINE__ << UPP::EOL +#define RDUMP(a) UPP::LockLog(), UPP::VppLog() << #a << " = " << (a) << UPP::EOL, UPP::UnlockLog() +#define RDUMPC(c) UPP::LockLog(), UPP::DumpContainer(UPP::VppLog() << #c << ':' << UPP::EOL, (c)), UPP::UnlockLog() // Crash support diff --git a/uppsrc/Core/Dli.cpp b/uppsrc/Core/Dli.cpp index ecac2159a..7f44d8993 100644 --- a/uppsrc/Core/Dli.cpp +++ b/uppsrc/Core/Dli.cpp @@ -6,7 +6,7 @@ typedef HMODULE DLLHANDLE; typedef void *DLLHANDLE; #endif -#define LLOG(x) +#define LLOG(x) // RLOG(x) #ifdef PLATFORM_WIN32 @@ -163,7 +163,8 @@ void *CheckDll__(const char *fn, const char *const *names, UPP::Vector& { void *hmod = dlopen(fn, RTLD_LAZY | RTLD_GLOBAL); if(!hmod) { - LLOG("Error loading library " << fn << ": " << dlerror()); + RLOG("prdel"); + RLOG("Error loading library " << fn << ": " << dlerror()); /* for(int i = 0; i < 100; i++) { hmod = dlopen(fn + ("." + UPP::AsString(i)), RTLD_LAZY | RTLD_GLOBAL); @@ -181,15 +182,16 @@ void *CheckDll__(const char *fn, const char *const *names, UPP::Vector& if(optional) exp++; void *proc = dlsym(hmod, exp); if(!proc && !optional) { - if(!missing) - LLOG(fn << " missing exports:"); - LLOG(exp); + if(!missing) { + RLOG(fn << " missing exports:"); + } + RLOG(exp); } plist.Add(proc); } if(missing) { - LLOG(missing << " missing symbols total"); + RLOG(missing << " missing symbols total"); dlclose(hmod); return 0; } diff --git a/uppsrc/Oracle/Oci8.cpp b/uppsrc/Oracle/Oci8.cpp index d4e27453f..44675bafe 100644 --- a/uppsrc/Oracle/Oci8.cpp +++ b/uppsrc/Oracle/Oci8.cpp @@ -4,7 +4,7 @@ NAMESPACE_UPP -#define LLOG(x) // LLOG(x) +#define LLOG(x) RLOG(x) //#define DLLFILENAME "ora803.dll" #define DLLFILENAME "oci.dll" @@ -35,13 +35,13 @@ static String OciError(T_OCI8& oci8, OCIError *errhp, int *code) } bool Oracle8::AllocOciHandle(void *hp, int type) { - LLOG("AllocOciHandle(" << type << "), envhp = " << envhp); + LLOG("AllocOciHandle(type " << type << "), envhp = " << FormatIntHex(envhp)); *(dvoid **)hp = NULL; return oci8 && !oci8.OCIHandleAlloc(envhp, (dvoid **)hp, type, 0, NULL); } void Oracle8::FreeOciHandle(void *hp, int type) { - LLOG("FreeOciHandle(" << type << ")"); + LLOG("FreeOciHandle(" << FormatIntHex(hp) << ", type " << type << ")"); if(oci8 && hp) oci8.OCIHandleFree(hp, type); } diff --git a/uppsrc/Sql/SqlCase.cpp b/uppsrc/Sql/SqlCase.cpp index 5577feb72..50ddd0942 100644 --- a/uppsrc/Sql/SqlCase.cpp +++ b/uppsrc/Sql/SqlCase.cpp @@ -139,7 +139,7 @@ void SqlCompile(const char *&s, StringBuffer *r, byte dialect) while(s < e) { byte c = *s++; if(c < 32 || c > 126 || c == 39 || c == 92) { - *r << '\\\\'; + *r << '\\' << '\\'; r->Cat(((c >> 6) & 3) + '0'); r->Cat(((c >> 3) & 7) + '0'); r->Cat((c & 7) + '0');