星火微课系统客户端
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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. % Copyright (C) 1996-2003 Artifex Software, Inc. All rights reserved.
  2. %
  3. % This software is provided AS-IS with no warranty, either express or
  4. % implied.
  5. %
  6. % This software is distributed under license and may not be copied,
  7. % modified or distributed except as expressly authorized under the terms
  8. % of the license contained in the file LICENSE in this distribution.
  9. %
  10. % For more information about licensing, please refer to
  11. % http://www.ghostscript.com/licensing/. For information on
  12. % commercial licensing, go to http://www.artifex.com/licensing/ or
  13. % contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  14. % San Rafael, CA 94903, U.S.A., +1(415)492-9861.
  15. %
  16. % $Id: cat.ps 8331 2008-02-05 11:07:00Z kens $
  17. %
  18. % Appends one file to another. Primarily used to overcome the
  19. % 'copy' limitation of Windows command shell for ps2epsi
  20. %
  21. % the files to be appended are given by the environament
  22. % variables %infile% and %outfile%. %infile% is appended to
  23. % %outfile%
  24. %
  25. /datastring 1024 string def
  26. {
  27. (outfile) getenv
  28. {
  29. /outfilename exch def
  30. (infile) getenv
  31. {
  32. /infilename exch def
  33. infilename status
  34. {
  35. pop pop pop pop outfilename status
  36. {
  37. pop pop pop pop
  38. infilename (r) file /infile exch def
  39. outfilename (a+) file /outfile exch def
  40. {
  41. infile datastring readstring
  42. {
  43. outfile exch writestring
  44. }
  45. {
  46. dup length 0 gt
  47. {outfile exch writestring} {pop} ifelse
  48. exit
  49. } ifelse
  50. } loop
  51. infile closefile
  52. outfile closefile
  53. }
  54. {
  55. (Failed to find file ) print outfilename ==
  56. } ifelse
  57. }
  58. {
  59. (Failed to find file ) print infilename ==
  60. } ifelse
  61. }
  62. {
  63. (Couldn't find %infile% environment variable) ==
  64. } ifelse
  65. }
  66. {
  67. (Couldn't find %outfile% environment variable) ==
  68. }
  69. ifelse
  70. } bind
  71. exec