summaryrefslogtreecommitdiff
path: root/app/tools/listxtp.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-19 19:55:58 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-19 19:55:58 +0100
commitd1a8285f818eb7e5c3d6a05709ea21a808490b8c (patch)
tree326578f0505cbed07cfe60de530022822dc237ac /app/tools/listxtp.c
parent16e9630b79f0a7a90c6cedb6781175bb8b337dc1 (diff)
New upstream version 5.1.0upstream/5.1.0
Diffstat (limited to 'app/tools/listxtp.c')
-rw-r--r--app/tools/listxtp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/tools/listxtp.c b/app/tools/listxtp.c
index 384c0d5..35d0daa 100644
--- a/app/tools/listxtp.c
+++ b/app/tools/listxtp.c
@@ -31,6 +31,7 @@
#define TRUE 1
#define FALSE 0
+#define MAX_FILES 500
#ifdef _WIN32
#define WIKIFORMATOPTION "/w"
#pragma warning( disable : 4996 )
@@ -70,7 +71,7 @@ main( int argc, char **argv )
struct stat buf;
char filename[ 256 ];
char path[ 256 ];
- char *results[100];
+ char *results[MAX_FILES];
int cnt = 0;
int i;
int bWiki = FALSE;
@@ -115,7 +116,7 @@ main( int argc, char **argv )
/*
* get all files from the directory
*/
- while( ent = readdir( d ))
+ while((ent = readdir(d)))
{
/*
* create full file name and get the state for that file
@@ -152,7 +153,7 @@ main( int argc, char **argv )
results[ cnt ] = malloc( strlen( buffer ) + 1 );
strcpy( results[ cnt ], buffer );
cnt++;
- if( cnt == 100 ) {
+ if( cnt == MAX_FILES ) {
fprintf( stderr, "Error: too many files\n" );
exit( 1 );
}