Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
a31c9fff
Commit
a31c9fff
authored
Oct 25, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compilation fixes for Windows for new string implementation.
parent
79ed0650
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
29 deletions
+29
-29
qcstring.cpp
qtools/qcstring.cpp
+14
-14
definition.cpp
src/definition.cpp
+3
-3
htmlgen.cpp
src/htmlgen.cpp
+2
-2
tclscanner.l
src/tclscanner.l
+7
-3
util.cpp
src/util.cpp
+2
-2
qtools.vcproj
winbuild/qtools.vcproj
+1
-5
No files found.
qtools/qcstring.cpp
View file @
a31c9fff
...
...
@@ -31,7 +31,7 @@ QCString &QCString::sprintf( const char *format, ... )
const
int
minlen
=
256
;
if
(
length
()
<
minlen
)
resize
(
minlen
);
vsnprintf
(
data
(),
minlen
,
format
,
ap
);
resize
(
strlen
(
data
())
+
1
);
resize
(
q
strlen
(
data
())
+
1
);
va_end
(
ap
);
return
*
this
;
}
...
...
@@ -68,10 +68,10 @@ int QCString::find( const char *str, int index, bool cs ) const
else
// case insensitive
{
pos
=
data
();
int
len
=
strlen
(
str
);
int
len
=
q
strlen
(
str
);
while
(
*
pos
)
{
if
(
strncase
cmp
(
pos
,
str
,
len
)
==
0
)
break
;
if
(
qstrni
cmp
(
pos
,
str
,
len
)
==
0
)
break
;
pos
++
;
}
if
(
!*
pos
)
pos
=
0
;
// not found
...
...
@@ -124,7 +124,7 @@ int QCString::findRev( char c, int index, bool cs) const
int
QCString
::
findRev
(
const
char
*
str
,
int
index
,
bool
cs
)
const
{
int
slen
=
strlen
(
str
);
int
slen
=
q
strlen
(
str
);
int
len
=
length
();
if
(
index
<
0
)
index
=
len
-
slen
;
// start from end
else
if
(
index
>
len
)
return
-
1
;
// bad index
...
...
@@ -133,11 +133,11 @@ int QCString::findRev( const char *str, int index, bool cs) const
register
char
*
pos
=
data
()
+
index
;
if
(
cs
)
// case sensitive
{
for
(
int
i
=
index
;
i
>=
0
;
i
--
)
if
(
strncmp
(
pos
--
,
str
,
slen
)
==
0
)
return
i
;
for
(
int
i
=
index
;
i
>=
0
;
i
--
)
if
(
q
strncmp
(
pos
--
,
str
,
slen
)
==
0
)
return
i
;
}
else
// case insensitive
{
for
(
int
i
=
index
;
i
>=
0
;
i
--
)
if
(
strncase
cmp
(
pos
,
str
,
slen
)
==
0
)
return
i
;
for
(
int
i
=
index
;
i
>=
0
;
i
--
)
if
(
qstrni
cmp
(
pos
,
str
,
slen
)
==
0
)
return
i
;
}
return
-
1
;
}
...
...
@@ -174,16 +174,16 @@ int QCString::contains( const char *str, bool cs ) const
if
(
str
==
0
||
length
()
==
0
)
return
0
;
int
count
=
0
;
const
char
*
pos
=
data
();
int
len
=
strlen
(
str
);
int
len
=
q
strlen
(
str
);
while
(
*
pos
)
{
if
(
cs
)
{
if
(
strncmp
(
pos
,
str
,
len
)
==
0
)
count
++
;
if
(
q
strncmp
(
pos
,
str
,
len
)
==
0
)
count
++
;
}
else
{
if
(
strncase
cmp
(
pos
,
str
,
len
)
==
0
)
count
++
;
if
(
qstrni
cmp
(
pos
,
str
,
len
)
==
0
)
count
++
;
}
pos
++
;
}
...
...
@@ -199,8 +199,8 @@ int QCString::contains( const QRegExp &rx ) const
bool
QCString
::
stripPrefix
(
const
char
*
prefix
)
{
if
(
prefix
==
0
||
length
()
==
0
)
return
FALSE
;
int
len
=
strlen
(
prefix
);
if
(
strncmp
(
prefix
,
data
(),
len
)
==
0
)
int
len
=
q
strlen
(
prefix
);
if
(
q
strncmp
(
prefix
,
data
(),
len
)
==
0
)
{
int
newlen
=
length
()
-
len
+
1
;
qmemmove
(
data
(),
data
()
+
len
,
newlen
);
...
...
@@ -247,7 +247,7 @@ QCString QCString::mid( uint index, uint len) const
{
int
slen
=
length
();
if
(
len
==
0xffffffff
)
len
=
slen
-
index
;
if
(
isEmpty
()
||
(
int
)
index
>=
slen
)
if
(
isEmpty
()
||
(
int
)
index
>=
slen
||
len
==
0
)
{
return
QCString
();
}
...
...
@@ -255,7 +255,7 @@ QCString QCString::mid( uint index, uint len) const
{
register
char
*
p
=
data
()
+
index
;
QCString
s
(
len
+
1
);
memcpy
(
s
.
data
(),
p
,
len
);
qstrncpy
(
s
.
data
(),
p
,
len
+
1
);
return
s
;
}
}
...
...
@@ -541,7 +541,7 @@ char *qstrdup( const char *str )
{
if
(
!
str
)
return
0
;
char
*
dst
=
new
char
[
strlen
(
str
)
+
1
];
char
*
dst
=
new
char
[
q
strlen
(
str
)
+
1
];
CHECK_PTR
(
dst
);
return
strcpy
(
dst
,
str
);
}
...
...
src/definition.cpp
View file @
a31c9fff
...
...
@@ -896,11 +896,11 @@ QCString Definition::getSourceAnchor() const
{
if
(
Htags
::
useHtags
)
{
snprintf
(
anchorStr
,
maxAnchorStrLen
,
"L%d"
,
m_impl
->
body
->
startLine
);
q
snprintf
(
anchorStr
,
maxAnchorStrLen
,
"L%d"
,
m_impl
->
body
->
startLine
);
}
else
{
snprintf
(
anchorStr
,
maxAnchorStrLen
,
"l%05d"
,
m_impl
->
body
->
startLine
);
q
snprintf
(
anchorStr
,
maxAnchorStrLen
,
"l%05d"
,
m_impl
->
body
->
startLine
);
}
}
return
anchorStr
;
...
...
@@ -1166,7 +1166,7 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
}
const
int
maxLineNrStr
=
10
;
char
anchorStr
[
maxLineNrStr
];
snprintf
(
anchorStr
,
maxLineNrStr
,
"l%05d"
,
md
->
getStartBodyLine
());
q
snprintf
(
anchorStr
,
maxLineNrStr
,
"l%05d"
,
md
->
getStartBodyLine
());
//printf("Write object link to %s\n",md->getBodyDef()->getSourceFileBase().data());
ol
.
writeObjectLink
(
0
,
md
->
getBodyDef
()
->
getSourceFileBase
(),
anchorStr
,
name
);
ol
.
popGeneratorState
();
...
...
src/htmlgen.cpp
View file @
a31c9fff
...
...
@@ -1311,8 +1311,8 @@ void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
const
int
maxLineNrStr
=
10
;
char
lineNumber
[
maxLineNrStr
];
char
lineAnchor
[
maxLineNrStr
];
snprintf
(
lineNumber
,
maxLineNrStr
,
"%5d"
,
l
);
snprintf
(
lineAnchor
,
maxLineNrStr
,
"l%05d"
,
l
);
q
snprintf
(
lineNumber
,
maxLineNrStr
,
"%5d"
,
l
);
q
snprintf
(
lineAnchor
,
maxLineNrStr
,
"l%05d"
,
l
);
m_t
<<
"<div class=
\"
line
\"
>"
;
m_t
<<
"<a name=
\"
"
<<
lineAnchor
<<
"
\"
></a><span class=
\"
lineno
\"
>"
;
...
...
src/tclscanner.l
View file @
a31c9fff
...
...
@@ -2833,7 +2833,10 @@ tcl_inf("TCL_SUBST: use '%s'\n",s);
}
}
if (tcl.input_string.at(tcl.input_string.length()-1) == '\n')
if (tcl.input_string.at(tcl.input_string.length()-1) == 0x1A)
{
}
else if (tcl.input_string.at(tcl.input_string.length()-1) == '\n')
{
tcl.input_string[tcl.input_string.length()-1] = 0x1A;
}
...
...
@@ -2841,6 +2844,7 @@ tcl_inf("TCL_SUBST: use '%s'\n",s);
{
tcl.input_string += 0x1A;
}
tcl.code = NULL;
tcl.code_font=NULL;
tcl.code_line=1;
...
...
src/util.cpp
View file @
a31c9fff
...
...
@@ -266,7 +266,7 @@ QCString generateMarker(int id)
{
const
int
maxMarkerStrLen
=
20
;
char
result
[
maxMarkerStrLen
];
snprintf
(
result
,
maxMarkerStrLen
,
"@%d"
,
id
);
q
snprintf
(
result
,
maxMarkerStrLen
,
"@%d"
,
id
);
return
result
;
}
...
...
@@ -4916,7 +4916,7 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig)
const
int
maxAddrSize
=
20
;
char
addr
[
maxAddrSize
];
snprintf
(
addr
,
maxAddrSize
,
"%p:"
,
fnDict
);
q
snprintf
(
addr
,
maxAddrSize
,
"%p:"
,
fnDict
);
QCString
key
=
addr
;
key
+=
n
;
...
...
winbuild/qtools.vcproj
View file @
a31c9fff
...
...
@@ -1328,7 +1328,7 @@
</FileConfiguration>
</File>
<File
RelativePath=
"..\qtools\
s
cstring.cpp"
RelativePath=
"..\qtools\
q
cstring.cpp"
>
<FileConfiguration
Name=
"Release|Win32"
...
...
@@ -1576,10 +1576,6 @@
RelativePath=
"..\qtools\qxml.h"
>
</File>
<File
RelativePath=
"..\qtools\scstring.h"
>
</File>
</Filter>
</Files>
<Globals>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment