aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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