aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-04-25 00:41:43 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-04-25 00:41:43 +0300
commited0d2743b1f40dd136c4a7d232cd26bc457de3eb (patch)
treee2dd9374d6b02346528514de83b758d5cfef6c7a
parentdd8b9800cea3c0396baad5f280003d8481182592 (diff)
downloadvideoteco-fork-ed0d2743b1f40dd136c4a7d232cd26bc457de3eb.tar.gz
the maximum filename length is now determined by standard C's FILENAME_MAX
This will save a lot of stack space and sometimes heap space on DOS.
-rw-r--r--teco.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/teco.h b/teco.h
index c5cc417..e22dd10 100644
--- a/teco.h
+++ b/teco.h
@@ -45,7 +45,11 @@
#define VMINOR 0
#define AUTO_DATE "$Date: 2007/12/10 22:13:07 $"
-#define TECO_FILENAME_TOTAL_LENGTH 1024
+#if HAVE_STDIO_H
+#include <stdio.h>
+#endif
+
+#define TECO_FILENAME_TOTAL_LENGTH FILENAME_MAX
#define TECO_FILENAME_COMPONENT_LENGTH 256
#define TECO_READONLY_NAME "visit"
#define TECO_INTERNAL_BUFFER_NAME "TECO-"
@@ -535,10 +539,6 @@ typedef unsigned long teco_ptrint_t;
#include <ctype.h>
#endif
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
#if HAVE_ERRNO_H
#include <errno.h>
#endif