aboutsummaryrefslogtreecommitdiff
path: root/tecbuf.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-03-29 06:19:21 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-04-23 06:51:22 +0300
commit92f964701d55ae3a7c2060da3a78fe6d3b665bcb (patch)
tree4deb210d56a018259411b2fd5f79743698b6b69b /tecbuf.c
parent93f61120ddba2093d85dbd09dff2deb42f0393e2 (diff)
downloadvideoteco-fork-92f964701d55ae3a7c2060da3a78fe6d3b665bcb.tar.gz
MS-DOS real-mode (8086) port
It can be cross-compiled or compiled natively on 32-bit DOS with OpenWatcom C v1.9. Compiling on an 8086 might be possible later on - but we would have to add support for some ancient ANSI C compiler.
Diffstat (limited to 'tecbuf.c')
-rw-r--r--tecbuf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tecbuf.c b/tecbuf.c
index 9af3957..46f0f53 100644
--- a/tecbuf.c
+++ b/tecbuf.c
@@ -92,10 +92,10 @@ unsigned int hash = stringHash( name );
// printf("hash match! %s %s\n",name,bp->name);
/*
* This loop implements the equivalent of strcmp, except that in the
- * case of VMS, it is case insensitive.
+ * case of VMS and MS-DOS, it is case insensitive.
*/
for(cp1 = name, cp2 = bp->name;;cp1++,cp2++){
-#ifdef VMS
+#if defined(VMS) || defined(MSDOS)
if(UPCASE(*cp1) != UPCASE(*cp2)) break;
#else
if(*cp1 != *cp2) break;
@@ -1488,9 +1488,11 @@ char outbuf[1024];
bytes_required_for_line + INCREMENTAL_LINE_BUFFER_SIZE - 1;
bytes_to_allocate -=
bytes_to_allocate % INCREMENTAL_LINE_BUFFER_SIZE;
+#if LARGEST_LOOKASIDE_BLOCK > 0
if(dlbp->buffer_size > LARGEST_LOOKASIDE_BLOCK){
bytes_to_allocate = dlbp->buffer_size * 2;
}/* End IF */
+#endif
if(bytes_to_allocate < bytes_required_for_line){
char tmp_message[1024];
@@ -1610,9 +1612,11 @@ char outbuf[1024];
bytes_required_for_line + INCREMENTAL_LINE_BUFFER_SIZE - 1;
bytes_to_allocate -=
bytes_to_allocate % INCREMENTAL_LINE_BUFFER_SIZE;
+#if LARGEST_LOOKASIDE_BLOCK > 0
if(dlbp->buffer_size > LARGEST_LOOKASIDE_BLOCK){
bytes_to_allocate = dlbp->buffer_size * 2;
}/* End IF */
+#endif
if(bytes_to_allocate < bytes_required_for_line){
char tmp_message[1024];