From ed0d2743b1f40dd136c4a7d232cd26bc457de3eb Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 25 Apr 2025 00:41:43 +0300 Subject: 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. --- teco.h | 10 +++++----- 1 file 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 +#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 #endif -#if HAVE_STDIO_H -#include -#endif - #if HAVE_ERRNO_H #include #endif -- cgit v1.2.3