Avoiding extra blank before ti(...) macros

git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@534 f6dd340e-d3f9-0310-b409-bdd246841980
This commit is contained in:
Frank B. Brokken 2011-03-04 11:07:38 +00:00
parent 65ca06db1d
commit d826be686a
4 changed files with 34 additions and 4 deletions

View file

@ -3,6 +3,6 @@
cd ../html
for x in `ls cplusplus[0-9][0-9].html` ; do
grep -v '^<index' < $x > ${x}2
../tmp/bin/rmindexlines < $x > ${x}2
mv ${x}2 $x
done

View file

@ -100,7 +100,7 @@ void htmldoc()
for (idx = sizeof(htmlList); idx--; )
{
html = element(idx, htmlList);
system("grep -v '^<index' < " + html + " > _" + html);
system("../../bin/rmindexlines < " + html + " > _" + html);
system("mv _" + html + " " + html);
}
run("touch ../../htmlidx-stamp");

View file

@ -4,8 +4,8 @@
#define GPP "g++"
#define GCC "gcc"
//#define GPP "g++-4.5"
//#define GCC "gcc-4.5"
//#define GPP "g++-4.6"
//#define GCC "gcc-4.6"
void programs(int docs)
{
@ -28,6 +28,10 @@ void programs(int docs)
if (!exists("tmp/bin/trim"))
run(GPP " " CPPOPT " -o tmp/bin/trim src/trim/trim.cc -s");
if (!exists("tmp/bin/rmindexlines"))
run(GPP " " CPPOPT
" -o tmp/bin/rmindexlines src/rmindexlines/rmindexlines.cc -s");
if (!exists("tmp/bin/tab"))
{
chdir("src/tab");

View file

@ -0,0 +1,26 @@
#include <iostream>
#include <string>
using namespace std;
int main()
{
string line1;
string line2;
getline(cin, line1); // initialization: pick up line 1
// which is never a \n
while (getline(cin, line2))
{
cout << line1;
if (line2.find("<index") == 0) // found an <index line
getline(cin, line1); // then get the next line
else
{
cout << '\n';
line1 = line2;
}
}
cout << line1 << '\n';
}