OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.4 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../sed/no-in-place-wo-file.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. --- sed-4.1/sed/execute.c 2004-03-13 10:30:39.000000000 +0100
  17. +++ sed-4.1-jsaw/sed/execute.c 2004-06-24 13:35:57.497606648 +0200
  18. @@ -654,7 +654,7 @@
  19. input->read_fn = read_file_line;
  20. - if (in_place_extension)
  21. + if (in_place_extension && !(name[0] == '-' && name[1] == '\0'))
  22. {
  23. int output_fd;
  24. char *tmpdir = ck_strdup(name), *p;
  25. @@ -701,7 +701,7 @@
  26. if (input->fp != stdin) /* stdin can be reused on tty and tape devices */
  27. ck_fclose(input->fp);
  28. - if (in_place_extension && output_file.fp != NULL)
  29. + if (in_place_extension && output_file.fp != NULL && output_file.fp != stdout)
  30. {
  31. ck_fclose (output_file.fp);
  32. if (strcmp(in_place_extension, "*") != 0)