home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip511.zip / msdos / Borland.fix next >
Text File  |  1992-07-10  |  4KB  |  138 lines

  1. Notes on patching Borland (binary) executables so they'll understand Unix-
  2. style, LF-delimited ASCII files (from Onno van der Linden, c/o Frank van
  3. der Linden, vdlinden@fwi.uva.nl).
  4.  
  5.  
  6. 1. The CPP used by TC 2.0 can't handle unix-style (LF-terminated) lines.
  7.    The CPP used by BC++ 2.0 can.
  8.    The CPP used by BC++ 3.0 can't handle #if statements with unix-style lines.
  9.    Fixes for both these problems below (GRR:  offset, new byte, old byte).
  10.  
  11.      Comparing files \TC\CPP.EXE and \TC\CPP.OLD
  12.      00004F25: 0D 0A
  13.      00005E3D: 0D 0A
  14.      00007916: 0D 0A
  15.      000079D6: 0D 0A
  16.      00007AC1: 0A 0D
  17.      0000D8EE: EC F7
  18.      0000D8F1: F7 EC
  19.      0000D9EE: EC F7
  20.      0000D9F1: F7 EC
  21.      0000DC80: 0A 0D
  22.      0000DC90: 0A 0D
  23.  
  24.      Comparing files \BORLANDC\BIN\CPP.EXE and \BORLANDC\BIN\CPP.OLD
  25.      0001D150: 89 75
  26.      0001D151: 36 08
  27.      0001D152: 30 89
  28.      0001D153: 23 36
  29.      0001D154: 75 30
  30.      0001D155: 04 23
  31.      0001D288: 9A 89
  32.      0001D289: FF 36
  33.      0001D28A: FF 30
  34.      0001D28B: 00 23
  35.      0001D28C: 00 9A
  36.      0001D28E: 0E FF
  37.      0001D28F: 30 00
  38.      0001D290: 23 00
  39.      0001E5A7: 89 8D
  40.  
  41.  
  42. 2. The compilers (tcc 2.0 and bcc 3.0) are both one-pass compilers; i.e.,
  43.    cpp.exe isn't used when compiling with tcc or bcc.  The earlier statements
  44.    about both cpp's are the same for the builtin preprocesser in the compilers.
  45.    To fix the unix-style line stuff for the compilers, apply the fixes below.
  46.    I do have something called bpatch.c which reads in the output of fc /b and
  47.    changes the executable.  If anyone is too lazy to write it himself, just
  48.    send out a mail.
  49.  
  50.      Comparing files TCC.EXE and TCC.OLD
  51.      00005E06: BF 88
  52.      00005E07: 02 01
  53.      00005E0C: 88 BF
  54.      00005E0D: 01 02
  55.      00006E7C: 0A 0D
  56.      00011FF9: 0A 0D
  57.      00012059: 0A 0D
  58.      00017E6C: 0A 0D
  59.      00018181: 0A 0D
  60.      000181F6: 0A 0D
  61.      00018AC1: 0A 0D
  62.      00018B27: 0D 0A
  63.      00018BBE: 0A 0D
  64.      00018C12: 0A 0D
  65.      00018C6A: 0A 0D
  66.      0001948A: 0A 0D
  67.      000194B7: 0D 0A
  68.      00019507: 0A 0D
  69.      0001C093: 0A 0D
  70.      0001C495: 3C 89
  71.      0001C496: 0D 46
  72.      0001C497: 74 FC
  73.      0001C498: DF 3D
  74.      0001C499: FF 0D
  75.      0001C49A: 0E 00
  76.      0001C49B: 34 75
  77.      0001C49C: 50 03
  78.      0001C49D: 3C E9
  79.      0001C49E: 0A F6
  80.      0001C49F: 75 FB
  81.      0001C4A0: 03 FF
  82.      0001C4A1: E9 0E
  83.      0001C4A2: F2 34
  84.      0001C4A3: FB 50
  85.      0001C4D0: 0A 0D
  86.      0001CFA7: 0A 0D
  87.      0001CFBA: 0D 0A
  88.      0001D007: 0A 0D
  89.      0002A13C: 0A 0D
  90.      0002A14C: 0A 0D
  91.      0002A2B6: EC F7
  92.      0002A2B9: F7 EC
  93.      0002A3B6: EC F7
  94.      0002A3B9: F7 EC
  95.      0002A4B6: EC F7
  96.      0002A4B9: F7 EC
  97.      0002BDC3: 20 21
  98.      0002BDC6: 21 20
  99.      
  100.      Comparing files BCC.EXE and BCC.OLD
  101.      0002B877: 89 75
  102.      0002B878: 36 08
  103.      0002B879: 5C 89
  104.      0002B87A: 5F 36
  105.      0002B87B: 75 5C
  106.      0002B87C: 04 5F
  107.      0002B9AF: 0E 89
  108.      0002B9B0: E8 36
  109.      0002B9B1: 56 5C
  110.      0002B9B2: DC 5F
  111.      0002B9B3: FF 90
  112.      0002B9B5: 5C E8
  113.      0002B9B6: 5F 51
  114.      0002B9B7: 90 DC
  115.      
  116.    Just an addition: the first one was for the cpp.exe's, the recent one is for
  117.    the compilers (bcc.exe, tcc.exe).  The first one is a bit redundant because
  118.    cpp.exe is hardly ever used.  See it as an attempt to make things complete.
  119.  
  120.  
  121. 3. For those of you who are using NDMAKE45 under MSDOS:
  122.    version 4.5 predefines the macro's MAKE and MFLAGS as readonly's.
  123.    So there was no way you could use $(MAKE) with ndmake45.
  124.    Here are the fc /b's that make things work:
  125.  
  126.      Comparing files MAKE45.EXE and MAKE45.OLD
  127.      000019C0: 00 03   # MFLAG
  128.      000019DC: 00 03   # MAKE
  129.      00007BEA: 0A 7E   # output of make -p
  130.      00007BEB: 00 0A   #
  131.  
  132.      Comparing files MAKE45L.EXE and MAKE45L.OLD
  133.      0000277E: 00 03   # MFLAG
  134.      0000279D: 00 03   # MAKE
  135.      0000A6A8: 0A 7E   # output of make -p
  136.      0000A6A9: 00 0A
  137.  
  138.