TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Tom Torfs
from: George White
date: 1998-10-24 13:25:08
subject: exinfo.c notes

Hi Tom,

I tested it with Borland C 3.1. Corrections required (where appropriate
original code shown commented out above the change) are:

/*
static int freadstr(FILE *fp, unsigned char *s, int maxlen,
unsigned char term)
*/
static int freadstr(FILE *fp, char *s, int maxlen,
unsigned char term)
        /* GW - remove "unsigned" from second parameter */
        /* Removes several warnings ar function calls */
        /* Warning: "Mixing pointers to signed and unsigned char */

* * * * * * * * * *

/*
   unsigned char *cp;
*/
   char *cp;
        /* GW - Remove "unsigned" from declaration */
        /* Removes several warnings */
        /* Warning: "Mixing pointers to signed and unsigned char */

* * * * * * * * * *

/*
   int exe,newexe,segexe,linearexe;
*/
/* GW - exe & newexe are only assigned to, never used! */
   int segexe,linearexe;

* * * * * * * * * *

/* GW - exe & newexe are only assigned to, never used! */
/*
   exe = 0;
   newexe = 0;
*/

* * * * * * * * * *

/* GW - exe & newexe are only assigned to, never used! */
/*
      exe = 1;
*/

* * * * * * * * * *

/* GW - exe & newexe are only assigned to, never used! */
/*
          newexe = 1;
*/

* * * * * * * * * *

/*
      if (fsize<65280)
*/
      if (fsize<65280L)         /* GW - Warning: "Constant is long" */

* * * * * * * * * *

/*
      if (packer == PACK_UNKNOWN
          & fsize>0x20)
*/
      if ((packer == PACK_UNKNOWN)
          & (fsize>0x20))
        /* GW - Warning: Amgiguous operators need parentheses */
        /* Borland are wrong, the rules of precedence mean that the */
        /* expression isn't ambiguous */

* * * * * * * * * *

Note: These last two are not in the multi-part post but were in the
original single message post.

/*
      printf("memory     : %ld - %ld bytes\n",
(long)exeheader.memminpara*16,(long)exeheader.memmaxpara*16)
*/
      printf("memory     : %ld - %ld bytes\n",
(long)exeheader.memminpara*16,(long)exeheader.memmaxpara*16);
/* GW - Error: "Statement missing ;" */

* * * * * * * * * *

/*
      printf("DOS memory : %ld - %ld bytes\n",
(long)exeheader.memminpara*16,(long)exeheader.memmaxpara*16)
*/
      printf("DOS memory : %ld - %ld bytes\n",
(long)exeheader.memminpara*16,(long)exeheader.memmaxpara*16);
/* GW - Error: "Statement missing ;" */

* * * * * * * * * *

George

 * SLMR 2.1a * Computers eliminate spare time.

--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-717904) (2:440/4)
SEEN-BY: 396/1 632/0 371 633/260 267 270 371 634/397 635/506 728 810 639/252
SEEN-BY: 670/218
@PATH: 440/4 255/1 251/25 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.