home *** CD-ROM | disk | FTP | other *** search
/ Dream 51 / Amiga_Dream_51.iso / Atari / Desktops / text113b.zoo / textutils-1.13 / src / diffs < prev    next >
Text File  |  1996-01-23  |  13KB  |  536 lines

  1. diff -u ./cat.c /d/textutils-1.13.new/src/cat.c
  2. --- ./cat.c    Tue Sep 19 14:59:08 1995
  3. +++ /d/textutils-1.13.new/src/cat.c    Sat Jan 20 18:18:48 1996
  4. @@ -30,6 +30,9 @@
  5.  #ifndef _POSIX_SOURCE
  6.  #include <sys/ioctl.h>
  7.  #endif
  8. +#ifdef atarist
  9. +#  undef FIONREAD
  10. +#endif
  11.  #include "system.h"
  12.  #include "version.h"
  13.  #include "error.h"
  14. diff -u ./cksum.c /d/textutils-1.13.new/src/cksum.c
  15. --- ./cksum.c    Sun Sep 24 15:28:10 1995
  16. +++ /d/textutils-1.13.new/src/cksum.c    Fri Jan 19 02:56:44 1996
  17. @@ -114,6 +114,10 @@
  18.  /* Number of bytes to read at once.  */
  19.  #define BUFLEN (1 << 16)
  20.  
  21. +#ifdef atarist
  22. +long _stksize = BUFLEN + 8192;
  23. +#endif
  24. +
  25.  /* The name this program was run with.  */
  26.  char *program_name;
  27.  
  28. @@ -217,6 +221,9 @@
  29.        return -1;
  30.      }
  31.      }
  32. +#ifdef atarist
  33. +  fp->_flag |= _IOBIN;
  34. +#endif
  35.  
  36.    while ((bytes_read = fread (buf, 1, BUFLEN, fp)) > 0)
  37.      {
  38. diff -u ./comm.c /d/textutils-1.13.new/src/comm.c
  39. --- ./comm.c    Mon Aug  7 06:52:38 1995
  40. +++ /d/textutils-1.13.new/src/comm.c    Fri Jan 19 03:00:26 1996
  41. @@ -155,6 +155,9 @@
  42.        error (0, errno, "%s", infiles[i]);
  43.        return 1;
  44.      }
  45. +#ifdef atarist
  46. +      streams[i]->_flag &= ~_IOBIN;
  47. +#endif
  48.  
  49.        thisline[i] = readline (thisline[i], streams[i]);
  50.      }
  51. diff -u ./csplit.c /d/textutils-1.13.new/src/csplit.c
  52. --- ./csplit.c    Mon Aug  7 06:52:38 1995
  53. +++ /d/textutils-1.13.new/src/csplit.c    Sat Jan 20 19:08:04 1996
  54. @@ -1000,7 +1000,11 @@
  55.  create_output_file ()
  56.  {
  57.    output_filename = make_filename (files_created);
  58. +#ifdef atarist
  59. +  output_stream = fopen (output_filename, "wb");
  60. +#else
  61.    output_stream = fopen (output_filename, "w");
  62. +#endif
  63.    if (output_stream == NULL)
  64.      {
  65.        error (0, errno, "%s", output_filename);
  66. diff -u ./cut.c /d/textutils-1.13.new/src/cut.c
  67. --- ./cut.c    Sun Sep 24 15:30:48 1995
  68. +++ /d/textutils-1.13.new/src/cut.c    Fri Jan 19 03:01:46 1996
  69. @@ -653,6 +653,9 @@
  70.        return 1;
  71.      }
  72.      }
  73. +#ifdef atarist
  74. +  stream->_flag &= ~_IOBIN;
  75. +#endif
  76.  
  77.    cut_stream (stream);
  78.  
  79. diff -u ./expand.c /d/textutils-1.13.new/src/expand.c
  80. --- ./expand.c    Mon Aug  7 06:52:38 1995
  81. +++ /d/textutils-1.13.new/src/expand.c    Fri Jan 19 02:50:06 1996
  82. @@ -370,9 +370,16 @@
  83.      {
  84.        have_read_stdin = 1;
  85.        prev_file = file;
  86. +#ifdef atarist
  87. +          stdin->_flag &= ~_IOBIN;
  88. +#endif
  89.        return stdin;
  90.      }
  91. +#ifdef atarist
  92. +      fp = fopen (file, "rt");
  93. +#else
  94.        fp = fopen (file, "r");
  95. +#endif
  96.        if (fp)
  97.      {
  98.        prev_file = file;
  99. diff -u ./fmt.c /d/textutils-1.13.new/src/fmt.c
  100. --- ./fmt.c    Mon Aug  7 06:52:38 1995
  101. +++ /d/textutils-1.13.new/src/fmt.c    Fri Jan 19 02:50:08 1996
  102. @@ -395,6 +395,9 @@
  103.  
  104.    best_width = max_width * (2 * (100 - LEEWAY) + 1) / 200;
  105.  
  106. +#ifdef atarist
  107. +  stdin->_flag &= ~_IOBIN;
  108. +#endif
  109.    if (optind == argc)
  110.      fmt (stdin);
  111.    else
  112. @@ -403,7 +406,11 @@
  113.      fmt (stdin);
  114.        else
  115.      {
  116. +#ifdef atarist
  117. +      infile = fopen (argv[optind], "rt");
  118. +#else
  119.        infile = fopen (argv[optind], "r");
  120. +#endif
  121.        if (infile != NULL)
  122.          {
  123.            fmt (infile);
  124. diff -u ./fold.c /d/textutils-1.13.new/src/fold.c
  125. --- ./fold.c    Mon Aug  7 06:52:38 1995
  126. +++ /d/textutils-1.13.new/src/fold.c    Fri Jan 19 03:04:24 1996
  127. @@ -195,6 +195,9 @@
  128.        error (0, errno, "%s", filename);
  129.        return 1;
  130.      }
  131. +#ifdef atarist
  132. +  istream->_flag &= ~_IOBIN;
  133. +#endif
  134.  
  135.    while ((c = getc (istream)) != EOF)
  136.      {
  137. diff -u ./head.c /d/textutils-1.13.new/src/head.c
  138. --- ./head.c    Mon Aug  7 06:52:38 1995
  139. +++ /d/textutils-1.13.new/src/head.c    Sat Jan 20 19:17:20 1996
  140. @@ -38,7 +38,9 @@
  141.  
  142.  /* Size of atomic reads. */
  143.  #define BUFSIZE (512 * 8)
  144. -
  145. +#ifdef atarist
  146. +long _stksize = BUFSIZE + 8 * 1024;
  147. +#endif
  148.  /* Number of bytes per item we are printing.
  149.     If 0, head in lines. */
  150.  static int unit_size;
  151. @@ -97,6 +99,9 @@
  152.    long number = -1;        /* Number of items to print (-1 if undef.). */
  153.    int c;            /* Option character. */
  154.  
  155. +#ifdef atarist
  156. +  stdout->_flag |= _IOBIN;
  157. +#endif
  158.    program_name = argv[0];
  159.    have_read_stdin = 0;
  160.    unit_size = 0;
  161. diff -u ./join.c /d/textutils-1.13.new/src/join.c
  162. --- ./join.c    Mon Aug  7 06:52:38 1995
  163. +++ /d/textutils-1.13.new/src/join.c    Fri Jan 19 03:08:44 1996
  164. @@ -723,6 +723,10 @@
  165.      error (1, errno, "%s", names[1]);
  166.    if (fp1 == fp2)
  167.      error (1, errno, _("both files cannot be standard input"));
  168. +#ifdef atarist
  169. +  fp1->_flag &= ~_IOBIN;
  170. +  fp2->_flag &= ~_IOBIN;
  171. +#endif
  172.    join (fp1, fp2);
  173.  
  174.    if ((fp1 == stdin || fp2 == stdin) && fclose (stdin) == EOF)
  175. diff -u ./md5sum.c /d/textutils-1.13.new/src/md5sum.c
  176. --- ./md5sum.c    Wed Sep 20 15:13:30 1995
  177. +++ /d/textutils-1.13.new/src/md5sum.c    Sat Jan 20 18:46:52 1996
  178. @@ -38,6 +38,10 @@
  179.  #if UNIX || __UNIX__ || unix || __unix__ || _POSIX_VERSION
  180.  # define OPENOPTS(BINARY) "r"
  181.  #else
  182. +# ifdef atarist
  183. +#  define TEXT1TO1 "rb"
  184. +#  define TEXTCNVT "rt"
  185. +# else
  186.  # ifdef MSDOS
  187.  #  define TEXT1TO1 "rb"
  188.  #  define TEXTCNVT "r"
  189. @@ -51,6 +55,7 @@
  190.      "Cannot determine system type."
  191.  #  endif
  192.  # endif
  193. +# endif
  194.  # define OPENOPTS(BINARY) ((BINARY) != 0 ? TEXT1TO1 : TEXTCNVT)
  195.  #endif
  196.  
  197. @@ -85,6 +90,10 @@
  198.    { NULL, 0, NULL, 0 }
  199.  };
  200.  
  201. +#ifdef atarist
  202. +long _stksize = 16 * 1024;
  203. +#endif
  204. +
  205.  char *xmalloc ();
  206.  
  207.  static void
  208. @@ -247,7 +256,12 @@
  209.      }
  210.    else
  211.      {
  212. +#ifdef atarist
  213. +      /* Don't remove any character from the file name */
  214. +      checkfile_stream = fopen (checkfile_name, "rb");
  215. +#else
  216.        checkfile_stream = fopen (checkfile_name, "r");
  217. +#endif
  218.        if (checkfile_stream == NULL)
  219.      {
  220.        error (0, errno, "%s", checkfile_name);
  221. @@ -409,6 +423,12 @@
  222.    /* Text is default of the Plumb/Lankester format.  */
  223.    int binary = 0;
  224.  
  225. +#ifdef atarist
  226. +  /* Don't generate CR after file name for DOS line ending, because it
  227. +   * would be taken as part of the file name when using -c.
  228. +   */
  229. +  stdout->_flag |= _IOBIN;
  230. +#endif
  231.    /* Setting values of global variables.  */
  232.    program_name = argv[0];
  233.  
  234. diff -u ./nl.c /d/textutils-1.13.new/src/nl.c
  235. --- ./nl.c    Mon Aug  7 06:52:38 1995
  236. +++ /d/textutils-1.13.new/src/nl.c    Fri Jan 19 03:11:28 1996
  237. @@ -344,6 +344,9 @@
  238.        return 1;
  239.      }
  240.      }
  241. +#ifdef atarist
  242. +  stream->_flag &= ~_IOBIN;
  243. +#endif
  244.  
  245.    process_file (stream);
  246.  
  247. diff -u ./od.c /d/textutils-1.13.new/src/od.c
  248. --- ./od.c    Wed Sep 27 17:57:08 1995
  249. +++ /d/textutils-1.13.new/src/od.c    Fri Jan 19 03:16:28 1996
  250. @@ -976,6 +976,9 @@
  251.            continue;
  252.          }
  253.      }
  254. +#ifdef atarist
  255. +      in_stream->_flag |= _IOBIN;
  256. +#endif
  257.  
  258.        if (n_skip == 0)
  259.      break;
  260. @@ -1224,6 +1227,9 @@
  261.            err = 1;
  262.          }
  263.          }
  264. +#ifdef atarist
  265. +      in_stream->_flag |= _IOBIN;
  266. +#endif
  267.      }
  268.        while (in_stream == NULL);
  269.      }
  270. @@ -1299,6 +1305,9 @@
  271.            err = 1;
  272.          }
  273.          }
  274. +#ifdef atarist
  275. +      in_stream->_flag |= _IOBIN;
  276. +#endif
  277.      }
  278.        while (in_stream == NULL);
  279.      }
  280. diff -u ./paste.c /d/textutils-1.13.new/src/paste.c
  281. --- ./paste.c    Mon Aug  7 06:52:38 1995
  282. +++ /d/textutils-1.13.new/src/paste.c    Fri Jan 19 03:19:02 1996
  283. @@ -283,6 +283,9 @@
  284.        else if (fileno (fileptr[files_open]) == 0)
  285.          opened_stdin = 1;
  286.      }
  287. +#ifdef atarist
  288. +      fileptr[files_open]->_flag &= ~_IOBIN;
  289. +#endif
  290.      }
  291.  
  292.    fileptr[files_open] = ENDLIST;
  293. @@ -425,6 +428,9 @@
  294.            continue;
  295.          }
  296.      }
  297. +#ifdef atarist
  298. +      fileptr->_flag &= ~_IOBIN;
  299. +#endif
  300.  
  301.        delimptr = delims;    /* Set up for delimiter string. */
  302.  
  303. diff -u ./pr.c /d/textutils-1.13.new/src/pr.c
  304. --- ./pr.c    Fri Aug 11 08:24:16 1995
  305. +++ /d/textutils-1.13.new/src/pr.c    Fri Jan 19 03:20:34 1996
  306. @@ -945,6 +945,9 @@
  307.      error (0, errno, "%s", name);
  308.        return 0;
  309.      }
  310. +#ifdef atarist
  311. +  p->fp->_flag &= ~_IOBIN;
  312. +#endif
  313.    p->status = OPEN;
  314.    ++total_files;
  315.    return 1;
  316. diff -u ./sort.c /d/textutils-1.13.new/src/sort.c
  317. --- ./sort.c    Thu Sep 14 15:58:44 1995
  318. +++ /d/textutils-1.13.new/src/sort.c    Fri Jan 19 02:50:30 1996
  319. @@ -58,6 +58,10 @@
  320.  #define DEFAULT_TMPDIR "/tmp"
  321.  #endif
  322.  
  323. +#ifdef atarist
  324. +long _stksize = 16 * 1024;
  325. +#endif
  326. +
  327.  /* The kind of blanks for '-b' to skip in various options. */
  328.  enum blanktype { bl_start, bl_end, bl_both };
  329.  
  330. @@ -1258,7 +1262,11 @@
  331.  
  332.    for (i = 0; i < nfiles; ++i)
  333.      {
  334. +#ifdef atarist
  335. +      fp = xfopen (files[i], "rt");
  336. +#else
  337.        fp = xfopen (files[i], "r");
  338. +#endif
  339.        if (!checkfp (fp))
  340.      {
  341.        fprintf (stderr, _("%s: disorder on %s\n"), program_name, files[i]);
  342. @@ -1286,7 +1294,11 @@
  343.        for (i = 0; i < nfiles / NMERGE; ++i)
  344.      {
  345.        for (j = 0; j < NMERGE; ++j)
  346. +#ifdef atarist
  347. +        fps[j] = xfopen (files[i * NMERGE + j], "rt");
  348. +#else
  349.          fps[j] = xfopen (files[i * NMERGE + j], "r");
  350. +#endif
  351.        tfp = xfopen (temp = tempname (), "w");
  352.        mergefps (fps, NMERGE, tfp);
  353.        xfclose (tfp);
  354. @@ -1295,7 +1307,11 @@
  355.        files[t++] = temp;
  356.      }
  357.        for (j = 0; j < nfiles % NMERGE; ++j)
  358. +#ifdef atarist
  359. +    fps[j] = xfopen (files[i * NMERGE + j], "rt");
  360. +#else
  361.      fps[j] = xfopen (files[i * NMERGE + j], "r");
  362. +#endif
  363.        tfp = xfopen (temp = tempname (), "w");
  364.        mergefps (fps, nfiles % NMERGE, tfp);
  365.        xfclose (tfp);
  366. @@ -1306,7 +1322,11 @@
  367.      }
  368.  
  369.    for (i = 0; i < nfiles; ++i)
  370. +#ifdef atarist
  371. +    fps[i] = xfopen (files[i], "rt");
  372. +#else
  373.      fps[i] = xfopen (files[i], "r");
  374. +#endif
  375.    mergefps (fps, i, ofp);
  376.    for (i = 0; i < nfiles; ++i)
  377.      zaptemp (files[i]);
  378. @@ -1337,7 +1357,11 @@
  379.  
  380.    while (nfiles--)
  381.      {
  382. +#ifdef atarist
  383. +      fp = xfopen (*files++, "rt");
  384. +#else
  385.        fp = xfopen (*files++, "r");
  386. +#endif
  387.        while (fillbuf (&buf, fp))
  388.      {
  389.        findlines (&buf, &lines);
  390. @@ -1501,6 +1525,9 @@
  391.    parse_long_options (argc, argv, "sort", version_string, usage);
  392.  
  393.    have_read_stdin = 0;
  394. +#ifdef atarist
  395. +  stdin->_flag &= ~_IOBIN;
  396. +#endif
  397.    inittables ();
  398.  
  399.    temp_file_prefix = getenv ("TMPDIR");
  400. @@ -1816,7 +1843,11 @@
  401.              }
  402.          }
  403.  
  404. +#ifdef atarist
  405. +          fp = xfopen (files[i], "rt");
  406. +#else
  407.            fp = xfopen (files[i], "r");
  408. +#endif
  409.            tmp = tempname ();
  410.            ofp = xfopen (tmp, "w");
  411.            while ((cc = fread (buf, 1, sizeof buf, fp)) > 0)
  412. diff -u ./sum.c /d/textutils-1.13.new/src/sum.c
  413. --- ./sum.c    Mon Aug  7 06:52:40 1995
  414. +++ /d/textutils-1.13.new/src/sum.c    Fri Jan 19 03:23:18 1996
  415. @@ -31,6 +31,10 @@
  416.  static int bsd_sum_file ();
  417.  static int sysv_sum_file ();
  418.  
  419. +#ifdef atarist
  420. +long _stksize = 16 * 1024;
  421. +#endif
  422. +
  423.  int safe_read ();
  424.  
  425.  /* The name this program was run with. */
  426. @@ -171,6 +175,9 @@
  427.        return -1;
  428.      }
  429.      }
  430. +#ifdef atarist
  431. +  fp->_flag |= _IOBIN;
  432. +#endif
  433.  
  434.    /* This algorithm seems to depend on sign extension in `ch' in order to
  435.       give the right results.  Ick.  */
  436. diff -u ./tac.c /d/textutils-1.13.new/src/tac.c
  437. --- ./tac.c    Mon Aug  7 06:52:40 1995
  438. +++ /d/textutils-1.13.new/src/tac.c    Fri Jan 19 02:50:34 1996
  439. @@ -60,7 +60,9 @@
  440.  
  441.  /* The number of bytes per atomic write. */
  442.  #define WRITESIZE 8192
  443. -
  444. +#ifdef atarist
  445. +long _stksize = WRITESIZE + 8 * 1024;
  446. +#endif
  447.  char *mktemp ();
  448.  
  449.  static RETSIGTYPE cleanup ();
  450. diff -u ./tail.c /d/textutils-1.13.new/src/tail.c
  451. --- ./tail.c    Mon Aug  7 06:52:40 1995
  452. +++ /d/textutils-1.13.new/src/tail.c    Sat Jan 20 19:20:42 1996
  453. @@ -76,6 +76,10 @@
  454.  #define BUFSIZ (512 * 8)
  455.  #endif
  456.  
  457. +#ifdef atarist
  458. +long _stksize = BUFSIZ + 8 * 1024;
  459. +#endif
  460. +
  461.  /* If nonzero, interpret the numeric argument as the number of lines.
  462.     Otherwise, interpret it as the number of bytes.  */
  463.  static int count_lines;
  464. @@ -161,6 +165,9 @@
  465.    int c;            /* Option character.  */
  466.    int fileind;            /* Index in ARGV of first file name.  */
  467.  
  468. +#ifdef atarist
  469. +  stdout->_flag |= _IOBIN;
  470. +#endif
  471.    program_name = argv[0];
  472.    have_read_stdin = 0;
  473.    count_lines = 1;
  474. diff -u ./tr.c /d/textutils-1.13.new/src/tr.c
  475. --- ./tr.c    Mon Aug  7 06:52:40 1995
  476. +++ /d/textutils-1.13.new/src/tr.c    Sat Jan 20 19:00:20 1996
  477. @@ -1685,6 +1685,9 @@
  478.    struct Spec_list *s1 = &buf1;
  479.    struct Spec_list *s2 = &buf2;
  480.  
  481. +#ifdef atarist
  482. +  stdout->_flag |= _IOBIN;
  483. +#endif
  484.    program_name = argv[0];
  485.  
  486.    while ((c = getopt_long (argc, argv, "cdst", long_options,
  487. diff -u ./unexpand.c /d/textutils-1.13.new/src/unexpand.c
  488. --- ./unexpand.c    Mon Aug  7 06:52:40 1995
  489. +++ /d/textutils-1.13.new/src/unexpand.c    Fri Jan 19 02:50:38 1996
  490. @@ -425,9 +425,16 @@
  491.      {
  492.        have_read_stdin = 1;
  493.        prev_file = file;
  494. +#ifdef atarist
  495. +      stdin->_flag &= ~_IOBIN;
  496. +#endif
  497.        return stdin;
  498.      }
  499. +#ifdef atarist
  500. +      fp = fopen (file, "rt");
  501. +#else
  502.        fp = fopen (file, "r");
  503. +#endif
  504.        if (fp)
  505.      {
  506.        prev_file = file;
  507. diff -u ./uniq.c /d/textutils-1.13.new/src/uniq.c
  508. --- ./uniq.c    Mon Aug  7 06:52:40 1995
  509. +++ /d/textutils-1.13.new/src/uniq.c    Fri Jan 19 03:31:14 1996
  510. @@ -206,8 +206,12 @@
  511.      istream = stdin;
  512.    else
  513.      istream = fopen (infile, "r");
  514. +
  515.    if (istream == NULL)
  516.      error (1, errno, "%s", infile);
  517. +#ifdef atarist
  518. +  istream->_flag &= ~_IOBIN;
  519. +#endif
  520.  
  521.    if (!strcmp (outfile, "-"))
  522.      ostream = stdout;
  523. diff -u ./wc.c /d/textutils-1.13.new/src/wc.c
  524. --- ./wc.c    Mon Aug  7 06:52:40 1995
  525. +++ /d/textutils-1.13.new/src/wc.c    Fri Jan 19 02:50:40 1996
  526. @@ -29,6 +29,9 @@
  527.  
  528.  /* Size of atomic reads. */
  529.  #define BUFFER_SIZE (16 * 1024)
  530. +#ifdef atarist
  531. +long _stksize = BUFFER_SIZE + 8 * 1024;
  532. +#endif
  533.  
  534.  int safe_read ();
  535.  
  536.