summaryrefslogtreecommitdiffstats
path: root/src/latexgen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2000-04-17 18:47:53 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2000-04-17 18:47:53 (GMT)
commit37905e0a0fcc820a556d56e609335afd21f8a929 (patch)
tree25b1690e57effb00b6b482041be7b48ca0ae643e /src/latexgen.cpp
parent3120c6832bd3b2df0ecac2ccb08ddcdacd5575ed (diff)
downloadDoxygen-37905e0a0fcc820a556d56e609335afd21f8a929.zip
Doxygen-37905e0a0fcc820a556d56e609335afd21f8a929.tar.gz
Doxygen-37905e0a0fcc820a556d56e609335afd21f8a929.tar.bz2
Release-1.1.2-20000417
Diffstat (limited to 'src/latexgen.cpp')
-rw-r--r--src/latexgen.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index a22a804..f927059 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -1134,18 +1134,22 @@ void LatexGenerator::docify(const char *str)
void LatexGenerator::codify(const char *str)
{
- static char spaces[]=" ";
if (str)
{
const char *p=str;
char c;
+ int spacesToNextTabStop;
while (*p)
{
c=*p++;
switch(c)
{
case 0x0c: break; // remove ^L
- case '\t': t << &spaces[col&7]; col+=8-(col&7); break;
+ case '\t': spacesToNextTabStop =
+ Config::tabSize - (col%Config::tabSize);
+ t << spaces.left(spacesToNextTabStop);
+ col+=spacesToNextTabStop;
+ break;
case '\n': t << '\n'; col=0; break;
default: t << c; col++; break;
}