home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / gnulib / gnucdiff / difpatch.dos < prev    next >
Encoding:
Text File  |  1988-12-16  |  19.9 KB  |  824 lines

  1.  
  2. *** analyze.c    Mon Sep 26 23:57:10 1988
  3. --- diff/analyze.c    Tue Dec 06 10:38:50 1988
  4. ***************
  5. *** 116,119 ****
  6. --- 116,120 ----
  7.         bmin > dmin ? bd[--bmin - 1] = INT_MAX : ++bmin;
  8.         bmax < dmax ? bd[++bmax + 1] = INT_MAX : --bmax;
  9.         for (d = bmax; d >= bmin; d -= 2)
  10.       {
  11. ***************
  12. *** 387,392 ****
  13. --- 388,401 ----
  14.   
  15.           /* Cancel provisional discards at the end, and shrink the run.  */
  16. + #if    defined(MSC_BUG)
  17.           while (j > i && discards[j - 1] == 2)
  18.             discards[j - 1] = 0, --provisional;
  19. + #else
  20. +         {
  21. +             int index = j - 1;
  22. +           while (j > i && discards[index] == 2)
  23. +             discards[index] = 0, --provisional;
  24. +         }
  25. + #endif
  26.   
  27.           /* Now we have the length of a run of discardable lines
  28. ***************
  29. *** 652,658 ****
  30. --- 661,673 ----
  31.        If so, we know they are identical without actually reading them.  */
  32.   
  33. + #if !defined(MSDOS)
  34. +     /*
  35. +     ** since MSC always sets the inode and dev fields to zero under DOS
  36. +     ** this test will always think two files are the same.
  37. +     */
  38.     if (filevec[0].stat.st_ino == filevec[1].stat.st_ino
  39.         && filevec[0].stat.st_dev == filevec[1].stat.st_dev)
  40.       return 0;
  41. + #endif /* MSDOS */
  42.   
  43.     binary = read_files (filevec);
  44. ***************
  45. *** 664,670 ****
  46. --- 679,711 ----
  47.     if (binary)
  48.       {
  49. + #if !defined(MSDOS)
  50.         int differs = (filevec[0].buffered_chars != filevec[1].buffered_chars
  51.                || bcmp (filevec[0].buffer, filevec[1].buffer,
  52.                     filevec[1].buffered_chars));
  53. + #else
  54. +     int differs;
  55. +     if(filevec[0].buffered_chars != filevec[1].buffered_chars)
  56. +         differs = 1;
  57. +     else {
  58. +         /*
  59. +         ** we've got to do it in chunks because of our
  60. +         ** poor 16 bit processor
  61. +         */
  62. +         char huge *b0 = filevec[0].buffer,
  63. +               *b1 = filevec[1].buffer;
  64. +         long int count;
  65. +         unsigned int delta;
  66. +         count = filevec[0].buffered_chars;
  67. +         while(count > 0) {
  68. +             delta = (unsigned)(count > 65000 ? 65000 : count);
  69. +             if(bcmp(b0,b1,delta) != 0)
  70. +                 break;
  71. +             count -= delta;
  72. +             b0 += delta;
  73. +             b1 += delta;
  74. +         }
  75. +         differs = count != 0;
  76. +     }
  77. + #endif           
  78.         if (differs) 
  79.       message ("Binary files %s and %s differ\n",
  80. ***************
  81. *** 775,780 ****
  82. --- 816,826 ----
  83.     for (i = 0; i < 2; ++i)
  84.       {
  85. + #if !defined(MSDOS)
  86.         if (filevec[i].buffer != 0)
  87.       free (filevec[i].buffer);
  88. + #else    /* MSDOS */
  89. +       if (filevec[i].buffer != 0)
  90. +     hfree (filevec[i].buffer);
  91. + #endif
  92.         free (filevec[i].linbuf);
  93.       }
  94. *** context.c    Wed Sep 28 21:19:18 1988
  95. --- diff/context.c    Mon Dec 05 10:36:40 1988
  96. ***************
  97. *** 253,257 ****
  98.   
  99.         /* If the change is ignorable, mark it.  */
  100. !       script->ignore = (!deletes && !inserts);
  101.   
  102.         /* Advance to the following change.  */
  103. --- 253,257 ----
  104.   
  105.         /* If the change is ignorable, mark it.  */
  106. !       script->ignore = (char)(!deletes && !inserts);
  107.   
  108.         /* Advance to the following change.  */
  109. *** diff.c    Fri Oct 07 00:18:42 1988
  110. --- diff/diff.c    Tue Dec 06 10:25:02 1988
  111. ***************
  112. *** 68,72 ****
  113.   }
  114.   
  115. ! main (argc, argv)
  116.        int argc;
  117.        char *argv[];
  118. --- 68,72 ----
  119.   }
  120.   
  121. ! void main (argc, argv)
  122.        int argc;
  123.        char *argv[];
  124. ***************
  125. *** 301,304 ****
  126. --- 301,305 ----
  127.   }
  128.   
  129. + void
  130.   specify_style (style)
  131.        enum output_style style;
  132. ***************
  133. *** 383,387 ****
  134.       }
  135.       }
  136.     /* See if the two named files are actually the same physical file.
  137.        If so, we know they are identical without actually reading them.  */
  138. --- 384,394 ----
  139.       }
  140.       }
  141. ! #if !defined(MSDOS)
  142. !     /*
  143. !     ** this stuff is real bad idea under MSDOS, at least for MSC 5.1
  144. !     ** because the st_ino and st_dev fields are not supported by
  145. !     ** MSDOS, and so stat sets them to zero; therefore
  146. !     ** this test always succeeds.
  147. !     */
  148.     /* See if the two named files are actually the same physical file.
  149.        If so, we know they are identical without actually reading them.  */
  150. ***************
  151. *** 395,398 ****
  152. --- 402,406 ----
  153.         goto done;
  154.       }
  155. + #endif    /* MSDOS */
  156.   
  157.     /* Open the files and record their descriptors.  */
  158. ***************
  159. *** 411,415 ****
  160.       {
  161.         char *filename = inf[i].name;
  162.         inf[i].desc = open (filename, O_RDONLY, 0);
  163.         if (0 > inf[i].desc)
  164. --- 419,431 ----
  165.       {
  166.         char *filename = inf[i].name;
  167. ! #if !defined(MSDOS)
  168. !       inf[i].desc = open (filename, O_RDONLY, 0);
  169. !       if (0 > inf[i].desc)
  170. !         {
  171. !           perror_with_name (filename);
  172. !           errorcount = 1;
  173. !         }
  174. ! #else
  175. !     if(inf[i].dir_p == 0) {
  176.             inf[i].desc = open (filename, O_RDONLY, 0);
  177.             if (0 > inf[i].desc)
  178. ***************
  179. *** 418,421 ****
  180. --- 434,440 ----
  181.                 errorcount = 1;
  182.               }
  183. +         } else
  184. +             inf[i].desc = 0;
  185. + #endif    /* MSDOS */
  186.       }
  187.       }
  188. *** diff.h    Wed Oct 12 00:51:24 1988
  189. --- diff/diff.h    Mon Dec 05 10:40:14 1988
  190. ***************
  191. *** 23,27 ****
  192. --- 23,31 ----
  193.   #include <stdio.h>
  194.   #include <sys/types.h>
  195. + #if !defined(MSDOS)
  196.   #include <sys/file.h>
  197. + #endif    /* MSDOS */
  198.   #include <sys/stat.h>
  199.   
  200. ***************
  201. *** 28,32 ****
  202. --- 32,40 ----
  203.   #ifdef USG
  204.   #include <time.h>
  205. + #if !defined(MSDOS)
  206.   #include <dirent.h>
  207. + #endif /* MSDOS */
  208.   #include <fcntl.h>
  209.   #define direct dirent
  210. ***************
  211. *** 43,47 ****
  212. --- 51,57 ----
  213.   #define bzero(s,n)    memset((s),0,(n))
  214.   
  215. + #if !defined(MSDOS)
  216.   #define dup2(f,t)    (close(t),fcntl((f),F_DUPFD,(t)))
  217. + #endif
  218.   
  219.   #define vfork    fork
  220. ***************
  221. *** 50,57 ****
  222. --- 60,75 ----
  223.   #endif
  224.   
  225. + #ifdef MSDOS
  226. + #include <process.h>
  227. + #include <stdlib.h>
  228. + #endif /* MSDOS */
  229.   #include <errno.h>
  230. + #if !defined(MSDOS)
  231.   extern int      errno;
  232.   extern int      sys_nerr;
  233.   extern char    *sys_errlist[];
  234. + #endif
  235.   
  236.   #define    EOS        (0)
  237. ***************
  238. *** 59,64 ****
  239. --- 77,84 ----
  240.   #define TRUE        1
  241.   
  242. + #if !defined(min)
  243.   #define min(a,b) ((a) <= (b) ? (a) : (b))
  244.   #define max(a,b) ((a) >= (b) ? (a) : (b))
  245. + #endif /* MSDOS */
  246.   
  247.   #ifndef PR_FILE_NAME
  248. ***************
  249. *** 68,73 ****
  250. --- 88,97 ----
  251.   /* Support old-fashioned C compilers.  */
  252.   #if defined (__STDC__) || defined (__GNUC__)
  253. + #if !defined(MSDOS)
  254.   #include "limits.h"
  255.   #else
  256. + #include <limits.h>
  257. + #endif    /* MSDOS */
  258. + #else
  259.   #define INT_MAX 2147483647
  260.   #define CHAR_BIT 8
  261. ***************
  262. *** 74,79 ****
  263.   #endif
  264.   
  265.   /* Support old-fashioned C compilers.  */
  266. ! #if !defined (__STDC__) && !defined (__GNUC__)
  267.   #define const
  268.   #endif
  269. --- 98,117 ----
  270.   #endif
  271.   
  272. + #if defined(MSDOS)
  273. + #ifdef INT_MAX
  274. + #undef INT_MAX
  275. + #include <limits.h>
  276. + #endif
  277. + #if !defined(MAKING_PROTO_H)
  278. + #include "proto.h"
  279. + #endif
  280. + #include <malloc.h>
  281. + #include <io.h>
  282. + #include <memory.h>
  283. + extern int getopt(int nargc,char **nargv,char *ostr);
  284. + #endif
  285.   /* Support old-fashioned C compilers.  */
  286. ! #if !defined (__STDC__) && !defined (__GNUC__) || defined(MSDOS)
  287.   #define const
  288.   #endif
  289. ***************
  290. *** 215,223 ****
  291.   
  292.       /* Buffer in which text of file is read.  */
  293.       char *        buffer;
  294.       /* Allocated size of buffer.  */
  295.       int            bufsize;
  296.       /* Number of valid characters now in the buffer. */
  297. !     int            buffered_chars;
  298.   
  299.       /* Array of data on analyzed lines of this chunk of this file.  */
  300. --- 253,273 ----
  301.   
  302.       /* Buffer in which text of file is read.  */
  303. + #if !defined(MSDOS)
  304.       char *        buffer;
  305.       /* Allocated size of buffer.  */
  306.       int            bufsize;
  307. +     /* Number of valid characters now in the buffer. */
  308. +     long int            buffered_chars;
  309. + #else    /* MSDOS */
  310. +     char huge *buffer;
  311. +     /* Allocated size of buffer.  */
  312. +     long int        bufsize;
  313.       /* Number of valid characters now in the buffer. */
  314. !     long int            buffered_chars;
  315. ! #endif    /* MSDOS */
  316.   
  317.       /* Array of data on analyzed lines of this chunk of this file.  */
  318. ***************
  319. *** 315,316 ****
  320. --- 365,367 ----
  321.   void message ();
  322.   void print_message_queue ();
  323. *** dir.c    Tue Sep 20 13:32:58 1988
  324. --- diff/dir.c    Tue Dec 06 11:34:58 1988
  325. ***************
  326. *** 32,35 ****
  327. --- 32,94 ----
  328.   };
  329.   
  330. + #if defined(MSDOS)
  331. + /*
  332. + ** due to difference of opinion btw gnu and microsoft about what
  333. + ** const means, const is defined away in diff.h, which causes warnings
  334. + ** when compiling the headers.  This ugliness is avoided here.
  335. + */
  336. + #ifdef const
  337. + #undef const
  338. + #endif
  339. + #include <string.h>
  340. + #include <dos.h>
  341. + struct direct {
  342. +     char d_name[14];
  343. + };
  344. + typedef struct _dir {
  345. +     int first;
  346. +     struct find_t dta;
  347. +     struct direct current;
  348. + } DIR;
  349. + DIR *
  350. + opendir(char *name) {
  351. +     char localname[65];
  352. +     DIR *rval = malloc(sizeof(DIR));
  353. +     strcpy(localname,name);
  354. +     strcat(localname,"/*.*");
  355. +     if(rval == NULL ||
  356. +         _dos_findfirst(localname,_A_NORMAL|_A_SUBDIR,&rval->dta) != 0)
  357. +         return NULL;
  358. +     rval->first = 1;
  359. +     return rval;
  360. + }
  361. + void
  362. + closedir(DIR *x) {
  363. +     free(x);
  364. + }
  365. + struct direct *
  366. + readdir(DIR *thisdir) {
  367. +     /*
  368. +     ** first time through, we don't need to look for a file
  369. +     */
  370. +     if(!thisdir->first) {
  371. +         if(_dos_findnext(&thisdir->dta) != 0)
  372. +             return NULL;
  373. +     } else
  374. +         thisdir->first = 0;
  375. +     strncpy(thisdir->current.d_name,thisdir->dta.name,13);
  376. +     thisdir->current.d_name[13] = '\0';
  377. +     strlwr(thisdir->current.d_name);
  378. +     return &thisdir->current;
  379. + }
  380. +         
  381. + #endif /* MSDOS */
  382.   static struct dirdata
  383.   dir_sort (dirname)
  384. ***************
  385. *** 55,59 ****
  386.       {
  387.         pfatal_with_name (dirname);
  388. !       return;
  389.       }
  390.   
  391. --- 114,118 ----
  392.       {
  393.         pfatal_with_name (dirname);
  394. !       return dirdata;
  395.       }
  396.   
  397. ***************
  398. *** 124,128 ****
  399. --- 183,195 ----
  400.   diff_dirs (name1, name2, handle_file, depth)
  401.        char *name1, *name2;
  402. + #if !defined(MSDOS)
  403.        int (*handle_file) ();
  404. + #else
  405. +     /* sorry, rms, I can't live with the assumption that
  406. +     ** sizeof(char *) == sizeof(int)
  407. +     */
  408. +     int (*handle_file)(char *dir0,char *name0,
  409. +         char *dir1,char *name1,int depth);
  410. + #endif
  411.   {
  412.     struct dirdata data1, data2;
  413. ***************
  414. *** 176,180 ****
  415.       {
  416.         /* Next filename in dir 1 is less; that is a file in dir 1 only.  */
  417. !       v1 = handle_file (name1, data1.files[i1], name2, 0, depth + 1);
  418.         i1++;
  419.       }
  420. --- 243,248 ----
  421.       {
  422.         /* Next filename in dir 1 is less; that is a file in dir 1 only.  */
  423. !       v1 = handle_file (name1, data1.files[i1], name2, (char *)0,
  424. !           depth + 1);
  425.         i1++;
  426.       }
  427. ***************
  428. *** 182,186 ****
  429.       {
  430.         /* Next filename in dir 2 is less; that is a file in dir 2 only.  */
  431. !       v1 = handle_file (name1, 0, name2, data2.files[i2], depth + 1);
  432.         i2++;
  433.       }
  434. --- 250,255 ----
  435.       {
  436.         /* Next filename in dir 2 is less; that is a file in dir 2 only.  */
  437. !       v1 = handle_file (name1, (char *)0, name2, data2.files[i2],
  438. !           depth + 1);
  439.         i2++;
  440.       }
  441. *** io.c    Mon Sep 26 22:27:28 1988
  442. --- diff/io.c    Tue Dec 06 11:19:24 1988
  443. ***************
  444. *** 22,27 ****
  445. --- 22,31 ----
  446.   
  447.   /* Rotate a value n bits to the left. */
  448. + #if !defined(MSDOS)
  449.   #define UINT_BIT (sizeof (unsigned) * CHAR_BIT)
  450.   #define ROL(v, n) ((v) << (n) | (v) >> UINT_BIT - (n))
  451. + #else
  452. + #define ROL(v,n)  ((v) << (n) | (v) >> (sizeof(v) * CHAR_BIT) - (n))
  453. + #endif
  454.   
  455.   /* Given a hash value and a new character, return a new hash value. */
  456. ***************
  457. *** 62,65 ****
  458. --- 66,70 ----
  459.         current->buffer = 0;
  460.       }
  461. + #if !defined(MSDOS)     
  462.     /* If it's a regular file, we can just get the size out of the stat
  463.        block and slurp it in all at once. */
  464. ***************
  465. *** 70,76 ****
  466. --- 75,97 ----
  467.         current->buffered_chars
  468.       = read (current->desc, current->buffer, current->bufsize);
  469. + #else    /* MSDOS */
  470. +   else {
  471. +       current->bufsize = current->stat.st_size + 1;
  472. +     if((current->buffer = 
  473. +         (char huge *)halloc(current->bufsize,sizeof(char))) == NULL)
  474. +         fatal("virtual memory exhausted");
  475. +     {
  476. +         int count;
  477. +         current->buffered_chars = 0;
  478. +         while((count = read(current->desc,
  479. +             current->buffer+current->buffered_chars,
  480. +                 32000)) > 0)
  481. +             current->buffered_chars += count;
  482. +     }
  483. + #endif    /* MSDOS */
  484.         if (current->buffered_chars < 0)
  485.       pfatal_with_name (current->name);
  486.       }
  487. + #if !defined(MSDOS)
  488.     else
  489.       {
  490. ***************
  491. *** 97,100 ****
  492. --- 118,122 ----
  493.       pfatal_with_name (current->name);
  494.       }
  495. + #endif /* MSDOS */
  496.     
  497.     /* Check first part of file to see if it's a binary file.  */
  498. ***************
  499. *** 129,135 ****
  500. --- 151,167 ----
  501.   
  502.     /* Attempt to get a good initial guess as to the number of lines. */
  503. + #if !defined(MSDOS)
  504.     current->linbufsize = current->buffered_chars / 50 + 5;
  505.     current->linbuf
  506.       = (struct line_def *) xmalloc (current->linbufsize * sizeof (struct line_def));
  507. + #else
  508. +     long int buffersize;
  509. +     current->linbufsize = (int)
  510. +         (buffersize = (long int)(current->buffered_chars / 50 + 5));
  511. +     buffersize *= sizeof(struct line_def);
  512. +     if(buffersize > 65535L)
  513. +         fatal("Too many lines to compare");
  514. +     current->linbuf = (struct line_def *) xmalloc((size_t)buffersize);
  515. + #endif
  516.   
  517.     if (function_regexp)
  518. ***************
  519. *** 291,296 ****
  520.     int lines;
  521.     /* Number of bytes left to scan.  */
  522.     int bytes = min (filevec[0].buffered_chars, filevec[1].buffered_chars);
  523.     /* Find identical prefix.  */
  524.   
  525. --- 323,331 ----
  526.     int lines;
  527.     /* Number of bytes left to scan.  */
  528. + #if !defined(MSDOS)
  529.     int bytes = min (filevec[0].buffered_chars, filevec[1].buffered_chars);
  530. ! #else
  531. !   long int bytes = min (filevec[0].buffered_chars, filevec[1].buffered_chars);
  532. ! #endif
  533.     /* Find identical prefix.  */
  534.   
  535. ***************
  536. *** 388,391 ****
  537. --- 423,427 ----
  538.     32749,
  539.     65521,
  540. + #if !defined MSDOS
  541.     131071,
  542.     262139,
  543. ***************
  544. *** 399,402 ****
  545. --- 435,439 ----
  546.     67108859,            /* Preposterously large . . . */
  547.     -1
  548. + #endif
  549.   };
  550.   
  551. ***************
  552. *** 410,414 ****
  553.        int n;
  554.   {
  555. !   int bucket = current->linbuf[n].hash % nbuckets;
  556.     struct equivclass *b = buckets[bucket], *p = NULL;
  557.   
  558. --- 447,451 ----
  559.        int n;
  560.   {
  561. !   int bucket = (int)(current->linbuf[n].hash % nbuckets);
  562.     struct equivclass *b = buckets[bucket], *p = NULL;
  563.   
  564. *** regex.c    Sat Oct 08 01:16:56 1988
  565. --- diff/regex.c    Thu Dec 08 08:20:48 1988
  566. ***************
  567. *** 136,139 ****
  568. --- 136,145 ----
  569.   #endif
  570.   
  571. + #ifdef MSDOS
  572. + #include <memory.h>
  573. + #include <malloc.h>
  574. + #include "diff.h"
  575. + #endif
  576.   /*
  577.    * Define the syntax stuff, so we can do the \<...\> things.
  578. ***************
  579. *** 188,192 ****
  580.   #ifndef NFAILURES
  581.   #define NFAILURES 80
  582. ! #endif NFAILURES
  583.   
  584.   /* width of a byte in bits */
  585. --- 194,198 ----
  586.   #ifndef NFAILURES
  587.   #define NFAILURES 80
  588. ! #endif /* NFAILURES */
  589.   
  590.   /* width of a byte in bits */
  591. ***************
  592. *** 246,249 ****
  593. --- 252,256 ----
  594.   #define PATUNFETCH p--
  595.   
  596. + #if !defined(MSDOS)
  597.   #define EXTEND_BUFFER \
  598.     { char *old_buffer = bufp->buffer; \
  599. ***************
  600. *** 263,268 ****
  601.         pending_exact += c; \
  602.     }
  603. ! static int store_jump (), insert_jump ();
  604.   
  605.   char *
  606. --- 270,293 ----
  607.         pending_exact += c; \
  608.     }
  609. ! #else
  610. ! #define EXTEND_BUFFER \
  611. !   { char *old_buffer = bufp->buffer; \
  612. !     if (bufp->allocated == (1<<15)) goto too_big; \
  613. !     bufp->allocated *= 2; \
  614. !     if (bufp->allocated > (1<<15)) bufp->allocated = (1<<15); \
  615. !     if (!(bufp->buffer = (char *) realloc (bufp->buffer, bufp->allocated))) \
  616. !       goto memory_exhausted; \
  617. !     c = bufp->buffer - old_buffer; \
  618. !     b += c; \
  619. !     if (fixup_jump) \
  620. !       fixup_jump += c; \
  621. !     if (laststart) \
  622. !       laststart += c; \
  623. !     begalt += c; \
  624. !     if (pending_exact) \
  625. !       pending_exact += c; \
  626. !   }
  627. ! #endif
  628. ! static void store_jump (), insert_jump ();
  629.   
  630.   char *
  631. ***************
  632. *** 345,350 ****
  633. --- 370,379 ----
  634.         else
  635.       /* Caller did not allocate a buffer.  Do it for him */
  636. + #if !defined(MSDOS)
  637.       bufp->buffer = (char *) malloc (28);
  638.         if (!bufp->buffer) goto memory_exhausted;
  639. + #else
  640. +     bufp->buffer = (char *) xmalloc(28);
  641. + #endif
  642.         begalt = b = bufp->buffer;
  643.       }
  644. ***************
  645. *** 746,750 ****
  646.     `opcode' is the opcode to store. */
  647.   
  648. ! static int
  649.   store_jump (from, opcode, to)
  650.        char *from, *to;
  651. --- 775,779 ----
  652.     `opcode' is the opcode to store. */
  653.   
  654. ! static void
  655.   store_jump (from, opcode, to)
  656.        char *from, *to;
  657. ***************
  658. *** 752,757 ****
  659.   {
  660.     from[0] = opcode;
  661. !   from[1] = (to - (from + 3)) & 0377;
  662. !   from[2] = (to - (from + 3)) >> 8;
  663.   }
  664.   
  665. --- 781,786 ----
  666.   {
  667.     from[0] = opcode;
  668. !   from[1] = (char)((to - (from + 3)) & 0377);
  669. !   from[2] = (char)((to - (from + 3)) >> 8);
  670.   }
  671.   
  672. ***************
  673. *** 763,767 ****
  674.      If you call this function, you must zero out pending_exact.  */
  675.   
  676. ! static int
  677.   insert_jump (op, from, to, current_end)
  678.        char op;
  679. --- 792,796 ----
  680.      If you call this function, you must zero out pending_exact.  */
  681.   
  682. ! static void
  683.   insert_jump (op, from, to, current_end)
  684.        char op;
  685. ***************
  686. *** 1274,1278 ****
  687.       case start_memory:
  688.         regstart[*p] = d;
  689. !        regstart_seg1[*p++] = (dend == end_match_1);
  690.         break;
  691.   
  692. --- 1303,1307 ----
  693.       case start_memory:
  694.         regstart[*p] = d;
  695. !        regstart_seg1[*p++] = (unsigned char)(dend == end_match_1);
  696.         break;
  697.   
  698. ***************
  699. *** 1279,1283 ****
  700.       case stop_memory:
  701.         regend[*p] = d;
  702. !        regend_seg1[*p++] = (dend == end_match_1);
  703.         break;
  704.   
  705. --- 1308,1312 ----
  706.       case stop_memory:
  707.         regend[*p] = d;
  708. !        regend_seg1[*p++] = (unsigned char)(dend == end_match_1);
  709.         break;
  710.   
  711. ***************
  712. *** 1424,1428 ****
  713.           /* p1[0] ... p1[2] are an on_failure_jump.
  714.              Examine what follows that */
  715. !         if (p1[3] == (unsigned char) exactn && p1[5] != c)
  716.             p[-3] = (unsigned char) finalize_jump;
  717.           else if (p1[3] == (unsigned char) charset
  718. --- 1453,1457 ----
  719.           /* p1[0] ... p1[2] are an on_failure_jump.
  720.              Examine what follows that */
  721. !         if (p1[3] == (char) exactn && p1[5] != (char)c)
  722.             p[-3] = (unsigned char) finalize_jump;
  723.           else if (p1[3] == (unsigned char) charset
  724. ***************
  725. *** 1661,1669 ****
  726.     if (!re_comp_buf.buffer)
  727.       {
  728.         if (!(re_comp_buf.buffer = (char *) malloc (200)))
  729.       return "Memory exhausted";
  730. -       re_comp_buf.allocated = 200;
  731.         if (!(re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH)))
  732.       return "Memory exhausted";
  733.       }
  734.     return re_compile_pattern (s, strlen (s), &re_comp_buf);
  735. --- 1690,1703 ----
  736.     if (!re_comp_buf.buffer)
  737.       {
  738. + #if !defined(MSDOS)
  739.         if (!(re_comp_buf.buffer = (char *) malloc (200)))
  740.       return "Memory exhausted";
  741.         if (!(re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH)))
  742.       return "Memory exhausted";
  743. + #else
  744. +     re_comp_buf.buffer = (char *) xmalloc(200);
  745. +     re_comp_buf.fastmap = (char *) xmalloc(1 << BYTEWIDTH);
  746. + #endif
  747. +       re_comp_buf.allocated = 200;
  748.       }
  749.     return re_compile_pattern (s, strlen (s), &re_comp_buf);
  750. *** util.c    Fri Sep 30 11:04:10 1988
  751. --- diff/util.c    Mon Dec 05 10:36:40 1988
  752. ***************
  753. *** 131,134 ****
  754. --- 131,135 ----
  755.     strcat (name, name1);
  756.   
  757. + #if !defined(MSDOS)
  758.     if (paginate_flag)
  759.       {
  760. ***************
  761. *** 163,166 ****
  762. --- 164,168 ----
  763.       }
  764.     else
  765. + #endif
  766.       {
  767.   
  768. ***************
  769. *** 187,191 ****
  770. --- 189,195 ----
  771.       {
  772.         fclose (outfile);
  773. + #if !defined(MSDOS)
  774.         wait (0);
  775. + #endif
  776.       }
  777.   }
  778. ***************
  779. *** 222,226 ****
  780.   
  781.     /* Undo the alteration.  */
  782. !   s1->text[s1->length] = savechar;
  783.   
  784.     /* If the comparison stopped at the alteration,
  785. --- 226,230 ----
  786.   
  787.     /* Undo the alteration.  */
  788. !   s1->text[s1->length] = (char) savechar;
  789.   
  790.     /* If the comparison stopped at the alteration,
  791. ***************
  792. *** 617,620 ****
  793. --- 621,625 ----
  794.   }
  795.   
  796. + void
  797.   debug_script (sp)
  798.        struct change *sp;
  799.