summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 12:03:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 12:03:25 (GMT)
commit63d6ebbdc5448ceb5e98cb1ca0b7fadb1ebe9350 (patch)
tree380c8174739958989e5022ea5c613c74b7747df6 /win
parent6203c60601717753524d662bbc900adfa3e86ddf (diff)
parent96af7fcd51a853aac2eb09b6de444a9789e04638 (diff)
downloadtcl-63d6ebbdc5448ceb5e98cb1ca0b7fadb1ebe9350.zip
tcl-63d6ebbdc5448ceb5e98cb1ca0b7fadb1ebe9350.tar.gz
tcl-63d6ebbdc5448ceb5e98cb1ca0b7fadb1ebe9350.tar.bz2
[Bug 3388350] mingw64 compiler warnings
Diffstat (limited to 'win')
-rw-r--r--win/tclWinChan.c4
-rw-r--r--win/tclWinConsole.c2
-rw-r--r--win/tclWinDde.c6
-rw-r--r--win/tclWinReg.c2
-rw-r--r--win/tclWinSerial.c2
-rw-r--r--win/tclWinSock.c2
-rw-r--r--win/tclWinThrd.c2
7 files changed, 10 insertions, 10 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index b35c380..0f17834 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -1224,7 +1224,7 @@ TclpGetDefaultStdChannel(
HANDLE handle;
int mode = -1;
char *bufMode = NULL;
- DWORD handleId = (DWORD)INVALID_HANDLE_VALUE;
+ DWORD handleId = (DWORD)-1;
/* Standard handle to retrieve. */
switch (type) {
@@ -1337,7 +1337,7 @@ TclWinOpenFileChannel(
infoPtr->flags = appendMode;
infoPtr->handle = handle;
infoPtr->dirty = 0;
- wsprintfA(channelName, "file%lx", (int) infoPtr);
+ wsprintfA(channelName, "file%lx", PTR2INT(infoPtr));
infoPtr->channel = Tcl_CreateChannel(&fileChannelType, channelName,
(ClientData) infoPtr, permissions);
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index ebba41a..8be8e09 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -1362,7 +1362,7 @@ TclWinOpenConsoleChannel(
* for instance).
*/
- wsprintfA(channelName, "file%lx", (int) infoPtr);
+ wsprintfA(channelName, "file%lx", PTR2INT(infoPtr));
infoPtr->channel = Tcl_CreateChannel(&consoleChannelType, channelName,
(ClientData) infoPtr, permissions);
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index df6507b..9f39b37 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -211,7 +211,7 @@ Initialize(void)
if (ddeInstance == 0) {
Tcl_MutexLock(&ddeMutex);
if (ddeInstance == 0) {
- if (DdeInitialize(&ddeInstance, DdeServerProc,
+ if (DdeInitialize(&ddeInstance, (PFNCALLBACK) DdeServerProc,
CBF_SKIP_REGISTRATIONS | CBF_SKIP_UNREGISTRATIONS
| CBF_FAIL_POKES, 0) != DMLERR_NO_ERROR) {
ddeInstance = 0;
@@ -957,7 +957,7 @@ DdeClientWindowProc(
(struct DdeEnumServices *) lpcs->lpCreateParams;
#ifdef _WIN64
- SetWindowLongPtr(hwnd, GWLP_USERDATA, (long)es);
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) es);
#else
SetWindowLong(hwnd, GWL_USERDATA, (long)es);
#endif
@@ -1032,7 +1032,7 @@ DdeEnumWindowsCallback(
HWND hwndTarget,
LPARAM lParam)
{
- DWORD dwResult = 0;
+ DWORD_PTR dwResult = 0;
struct DdeEnumServices *es = (struct DdeEnumServices *) lParam;
SendMessageTimeout(hwndTarget, WM_DDE_INITIATE, (WPARAM)es->hwnd,
diff --git a/win/tclWinReg.c b/win/tclWinReg.c
index f4bdd00..8eaf2a7 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.c
@@ -1437,7 +1437,7 @@ BroadcastValue(
Tcl_Obj *CONST objv[]) /* Argument values. */
{
LRESULT result;
- DWORD sendResult;
+ DWORD_PTR sendResult;
UINT timeout = 3000;
int len;
CONST char *str;
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index bb26e23..fb092ff 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -1499,7 +1499,7 @@ TclWinOpenSerialChannel(
* are shared between multiple channels (stdin/stdout).
*/
- wsprintfA(channelName, "file%lx", (int) infoPtr);
+ wsprintfA(channelName, "file%lx", PTR2INT(infoPtr));
infoPtr->channel = Tcl_CreateChannel(&serialChannelType, channelName,
(ClientData) infoPtr, permissions);
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index a365b49..1bf4f97 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1326,7 +1326,7 @@ Tcl_MakeTcpClientChannel(
* Set kernel space buffering and non-blocking.
*/
- TclSockMinimumBuffers((int) sock, TCP_BUFFER_SIZE);
+ TclSockMinimumBuffers(PTR2INT(sock), TCP_BUFFER_SIZE);
infoPtr = NewSocketInfo((SOCKET) sock);
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 4a4e7f4..8544e71 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -260,7 +260,7 @@ TclpThreadExit(
Tcl_ThreadId
Tcl_GetCurrentThread(void)
{
- return (Tcl_ThreadId) GetCurrentThreadId();
+ return (Tcl_ThreadId) INT2PTR(GetCurrentThreadId());
}
/*
lass='add'>+ {
+ ClassDef *usedCd = Doxygen::hiddenClasses.find(type);
+ if (usedCd==0)
+ {
+ Debug::print(Debug::Classes,0," New undocumented used class `%s'\n", type.data());
+ usedCd = new ClassDef(
+ masterCd->getDefFileName(),masterCd->getDefLine(),
+ type,ClassDef::Class);
+ Doxygen::hiddenClasses.inSort(type,usedCd);
+ }
+ if (isArtificial) usedCd->setClassIsArtificial();
+ instanceCd->addUsedClass(usedCd,md->name());
+ }
}
}
}
@@ -2897,9 +2924,9 @@ static bool findClassRelation(
}
}
bool isATemplateArgument = templateNames!=0 && templateNames->find(bi->name)!=0;
- if (!isATemplateArgument && found)
+ if (/*!isATemplateArgument &&*/ found)
{
- Debug::print(Debug::Classes,0," Documented base class `%s' templSpec=%s\n",bi->name.data(),templSpec.data());
+ Debug::print(Debug::Classes,0," Documented class `%s' templSpec=%s\n",bi->name.data(),templSpec.data());
// add base class to this class
// if templSpec is not empty then we should "instantiate"
@@ -2956,19 +2983,6 @@ static bool findClassRelation(
baseClass->insertSubClass(cd,bi->prot,bi->virt,templSpec);
// the undocumented base was found in this file
baseClass->insertUsedFile(root->fileName);
- // is this an inherited template argument?
- //printf("%s->setIsTemplateBaseClass(%d)\n",baseClass->name().data(),isTemplBaseClass);
- //if (isATemplateArgument)
- //{
- // baseClass->setIsTemplateBaseClass(*templateNames->find(bi->name));
- //}
- // add class to the list
- //if (!isATemplateArgument)
- //{
- //}
- //else
- //{
- //}
return TRUE;
}
else
@@ -3370,8 +3384,6 @@ static void addTodoTestBugReferences()
addFileMemberTodoTestBugReferences(0);
}
-
-
//----------------------------------------------------------------------
// Copy the documentation in entry `root' to member definition `md' and
// set the function declaration of the member to `funcDecl'. If the boolean
@@ -3828,18 +3840,6 @@ static void findMember(Entry *root,
}
} while (!done);
- if (isFriend)
- {
- if (funcDecl.left(6)=="class ")
- {
- funcDecl=funcDecl.right(funcDecl.length()-6);
- }
- else if (funcDecl.left(7)=="struct ")
- {
- funcDecl=funcDecl.right(funcDecl.length()-7);
- }
- }
-
// delete any ; from the function declaration
int sep;
while ((sep=funcDecl.find(';'))!=-1)
@@ -3857,12 +3857,27 @@ static void findMember(Entry *root,
":: ","::"
),
" ::","::"
- );
+ ).stripWhiteSpace();
- // extract information from the declarations
- parseFuncDecl(funcDecl,scopeName,funcType,funcName,
+ //printf("funcDecl=`%s'\n",funcDecl.data());
+ if (isFriend && funcDecl.left(6)=="class ")
+ {
+ //printf("friend class\n");
+ funcDecl=funcDecl.right(funcDecl.length()-6);
+ funcName = funcDecl.copy();
+ }
+ else if (isFriend && funcDecl.left(7)=="struct ")
+ {
+ funcDecl=funcDecl.right(funcDecl.length()-7);
+ funcName = funcDecl.copy();
+ }
+ else
+ {
+ // extract information from the declarations
+ parseFuncDecl(funcDecl,scopeName,funcType,funcName,
funcArgs,funcTempList,exceptions
);
+ }
//printf("scopeName=`%s' funcType=`%s' funcName=`%s'\n",
// scopeName.data(),funcType.data(),funcName.data());
@@ -4473,8 +4488,17 @@ static void findMemberDocumentation(Entry *root)
// root->name.data(),root->args.data(),root->exception.data());
//if (root->relates.length()) printf(" Relates %s\n",root->relates.data());
//printf("Inside=%s\n Relates=%s\n",root->inside.data(),root->relates.data());
-
- if (!root->type.isEmpty())
+ if (root->type=="friend class" || root->type=="friend struct" ||
+ root->type=="friend union")
+ {
+ findMember(root,
+ root->type+" "+
+ root->name,
+ root->relates,
+ FALSE,FALSE);
+
+ }
+ else if (!root->type.isEmpty())
{
findMember(root,
root->type+" "+
@@ -6098,15 +6122,20 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest)
pclose(f);
}
// filter unwanted bytes from the resulting data
- uchar *p=(uchar *)dest.data()+oldPos;
uchar conv[256];
int i;
for (i=0;i<256;i++) conv[i]=i;
conv[0x06]=0x20; // replace the offending characters with spaces
conv[0x00]=0x20;
// remove any special markers from the input
+ uchar *p=(uchar *)dest.data()+oldPos;
for (i=0;i<size;i++,p++) *p=conv[*p];
- // adjust pointer
+ // and translate CR's
+ int newSize=filterCRLF(dest.data()+oldPos,size);
+ if (newSize!=size) // we removed chars
+ {
+ dest.resize(newSize); // resize the array
+ }
}
//----------------------------------------------------------------------------
@@ -7054,7 +7083,7 @@ void parseInput()
buildVarList(root);
msg("Building member list...\n"); // using class info only !
- buildMemberList(root);
+ buildFunctionList(root);
transferFunctionDocumentation();
msg("Searching for friends...\n");
diff --git a/src/doxytag.l b/src/doxytag.l
index 95e7cbe..b8f1279 100644
--- a/src/doxytag.l
+++ b/src/doxytag.l
@@ -220,6 +220,7 @@ QCString unhtmlify(const char *str)
<Start>^"<li>" {
BEGIN( SearchClassFile );
}
+<Start>^"<td"[^\n]*"<h1 align=center>" | // Qt-3.x.x+
<Start>^"<h1 align=center>" { // Qt variant
BEGIN( ReadClassName );
}
diff --git a/src/entry.h b/src/entry.h
index 146ce57..3646d40 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -216,7 +216,7 @@ class Entry
MEMBERGRP_SEC = 0x01300000,
USINGDECL_SEC = 0x01400000,
PACKAGE_SEC = 0x01500000,
- PACKAGEDOC_SEC = 0x01600000,
+ PACKAGEDOC_SEC = 0x01600000
};
enum MemberSpecifier
{
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 31c24fc..2320473 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -831,7 +831,7 @@ void HtmlGenerator::endAlphabeticalIndexList()
void HtmlGenerator::writeIndexHeading(const char *s)
{
t << "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><div class=\"ah\">&nbsp;&nbsp;" << s
- << "&nbsp;&nbsp;</td</tr></table>";
+ << "&nbsp;&nbsp;</td></tr></table>";
}
void HtmlGenerator::startImage(const char *name,const char *,bool hasCaption)
@@ -940,7 +940,7 @@ void HtmlGenerator::startParameterType(bool first)
if (first)
{
DBG_HTML(t << "<!-- startFirstParameterType -->" << endl;)
- t << " <td class=\"md\">";
+ t << " <td class=\"md\" nowrap>";
}
else
{
@@ -948,14 +948,14 @@ void HtmlGenerator::startParameterType(bool first)
t << " <tr>" << endl;
t << " <td></td>" << endl;
t << " <td></td>" << endl;
- t << " <td class=\"md\">";
+ t << " <td class=\"md\" nowrap>";
}
}
void HtmlGenerator::endParameterType()
{
DBG_HTML(t << "<!-- endParameterType -->" << endl;)
- t << "</td>" << endl;
+ t << "&nbsp;</td>" << endl;
}
void HtmlGenerator::startParameterName(bool oneArgOnly)
diff --git a/src/htmlgen.h b/src/htmlgen.h
index cbc40f1..caed87f 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -120,6 +120,8 @@ class HtmlGenerator : public OutputGenerator
void endCodeFragment() { t << "</pre></div>"; }
void startPreFragment() { t << "<pre>"; }
void endPreFragment() { t << "</pre>"; }
+ void startLineNumber() {}
+ void endLineNumber() { t << " "; }
void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); }
//void writeBoldString(const char *text)
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 7e072ac..7bdfbdf 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -1529,9 +1529,14 @@ void LatexGenerator::endMemberList()
void LatexGenerator::startImage(const char *name,const char *size,bool hasCaption)
{
if (hasCaption)
- t << "\\begin{figure}[H]" << endl;
+ {
+ t << "\\begin{figure}[h]" << endl;
+ t << "\\begin{center}" << endl;
+ }
else
+ {
t << "\\mbox{";
+ }
QCString gfxName = name;
if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4);
// "\\epsfig{file=" << name;
@@ -1539,9 +1544,13 @@ void LatexGenerator::startImage(const char *name,const char *size,bool hasCaptio
if (size) t << "[" << size << "]";
t << "{" << gfxName << "}";
if (hasCaption)
+ {
t << "\\caption{";
+ }
else
+ {
t << "}" << endl;
+ }
}
void LatexGenerator::endImage(bool hasCaption)
@@ -1549,6 +1558,7 @@ void LatexGenerator::endImage(bool hasCaption)
if (hasCaption)
{
t << "}" << endl;
+ t << "\\end{center}" << endl;
t << "\\end{figure}" << endl;
}
}
diff --git a/src/latexgen.h b/src/latexgen.h
index 3b09340..bf3e530 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -118,6 +118,8 @@ class LatexGenerator : public OutputGenerator
void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl;
insidePre=FALSE;
}
+ void startLineNumber() {}
+ void endLineNumber() { t << " "; }
void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); }
//void writeBoldString(const char *text)
diff --git a/src/mangen.h b/src/mangen.h
index 5ce5a7c..e87cbc7 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -110,6 +110,8 @@ class ManGenerator : public OutputGenerator
void endCodeFragment();
void startPreFragment() { startCodeFragment(); }
void endPreFragment() { endCodeFragment(); }
+ void startLineNumber() {}
+ void endLineNumber() { t << " "; }
void startCodeLine() {}
void endCodeLine() { codify("\n"); col=0; }
//void writeBoldString(const char *text)
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 8aaa7cc..afdcab6 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -558,7 +558,8 @@ bool MemberDef::isBriefSectionVisible() const
// only include members is the are documented or
// HIDE_UNDOC_MEMBERS is NO in the config file
bool visibleIfDocumented = (!Config_getBool("HIDE_UNDOC_MEMBERS") ||
- hasDocumentation()
+ hasDocumentation() ||
+ isDocumentedFriendClass()
);
// hide members with no detailed description and brief descriptions
@@ -767,7 +768,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (!name().isEmpty() && name().at(0)!='@')
{
//printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable());
- if (/*d->isLinkable() &&*/ isLinkable())
+ if (isLinkable())
{
if (annMemb)
{
@@ -786,7 +787,14 @@ void MemberDef::writeDeclaration(OutputList &ol,
writeLink(ol,cd,nd,fd,gd);
}
}
- else // there is a brief member description and brief member
+ else if (isDocumentedFriendClass())
+ // if the member is an undocumented friend declaration for some class,
+ // then maybe we can link to the class
+ {
+ writeLink(ol,getClass(name()),0,0,0);
+ }
+ else
+ // there is a brief member description and brief member
// descriptions are enabled or there is no detailed description.
{
if (annMemb) annMemb->annUsed=annUsed=TRUE;
@@ -1479,7 +1487,8 @@ void MemberDef::warnIfUndocumented()
else
t="file", d=fd;
- if (d && d->isLinkable() && !isLinkable() && name().find('@')==-1)
+ if (d && d->isLinkable() && !isLinkable() && !isDocumentedFriendClass()
+ && name().find('@')==-1)
warn_undoc(m_defFileName,m_defLine,"Warning: Member %s of %s %s is not documented.",
name().data(),t,d->name().data());
}
@@ -1520,11 +1529,20 @@ void MemberDef::setEnumDecl(OutputList &ed)
*enumDeclList+=ed;
}
+bool MemberDef::isDocumentedFriendClass() const
+{
+ ClassDef *fcd=0;
+ return (isFriend() &&
+ (type=="friend class" || type=="friend struct" ||
+ type=="friend union") &&
+ (fcd=getClass(name())) && fcd->isLinkable());
+}
+
bool MemberDef::hasDocumentation() const
{
return Definition::hasDocumentation() ||
(mtype==Enumeration && docEnumValues) || // has enum values
- (argList!=0 && argList->hasDocumentation());
+ (argList!=0 && argList->hasDocumentation()); // has doc arguments
}
void MemberDef::setMemberGroup(MemberGroup *grp)
diff --git a/src/memberdef.h b/src/memberdef.h