aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-06-28 08:29:15 +0000
committerMike Buland <eichlan@xagasoft.com>2006-06-28 08:29:15 +0000
commitc427a7a635ed7f367d3581f0f78b09ef0ac736b9 (patch)
treee98b77d634a7613bf2c4c50b0454911b79574d95 /src
parent789eaff64b6dcdf920eb3f5a5d64ab4f1f33aa05 (diff)
downloadlibbu++-c427a7a635ed7f367d3581f0f78b09ef0ac736b9.tar.gz
libbu++-c427a7a635ed7f367d3581f0f78b09ef0ac736b9.tar.bz2
libbu++-c427a7a635ed7f367d3581f0f78b09ef0ac736b9.tar.xz
libbu++-c427a7a635ed7f367d3581f0f78b09ef0ac736b9.zip
Fixed a conflict between the new low level reader and the file reader.
Diffstat (limited to 'src')
-rw-r--r--src/pproc.cpp12
-rw-r--r--src/xmlfilereader.cpp8
2 files changed, 12 insertions, 8 deletions
diff --git a/src/pproc.cpp b/src/pproc.cpp
index ea836eb..55de6fe 100644
--- a/src/pproc.cpp
+++ b/src/pproc.cpp
@@ -4,9 +4,19 @@
4 4
5void pprocHelp( PPROC *pproc ) 5void pprocHelp( PPROC *pproc )
6{ 6{
7 int maxlen = 0;
7 for( int j = 0; pproc[j].proc || pproc[j].stateVar; j++ ) 8 for( int j = 0; pproc[j].proc || pproc[j].stateVar; j++ )
8 { 9 {
9 printf("%c, %s - %s\n", 10 int len = strlen( pproc[j].lpWord );
11 if( len > maxlen ) maxlen = len;
12 }
13
14 char fmt[100];
15 sprintf( fmt, " -%%c, --%%-%ds %%s\n", maxlen );
16
17 for( int j = 0; pproc[j].proc || pproc[j].stateVar; j++ )
18 {
19 printf( fmt,
10 pproc[j].cChar, 20 pproc[j].cChar,
11 pproc[j].lpWord, 21 pproc[j].lpWord,
12 pproc[j].shortHelp ); 22 pproc[j].shortHelp );
diff --git a/src/xmlfilereader.cpp b/src/xmlfilereader.cpp
index 9c0b7c1..eb0ff9c 100644
--- a/src/xmlfilereader.cpp
+++ b/src/xmlfilereader.cpp
@@ -14,13 +14,7 @@ XmlFileReader::XmlFileReader( const char *sFile, bool bStrip )
14 } 14 }
15 else 15 else
16 { 16 {
17 char buf[50]; 17 buildDoc();
18 fgets( buf, 50, fh );
19
20 if( !strcmp( buf, "<?xml version=\"1.0\"?>\n" ) )
21 {
22 buildDoc();
23 }
24 } 18 }
25} 19}
26 20