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
650 B

1 month ago
  1. /*
  2. * This file is maintained by a user: if you have any questions about it,
  3. * please contact Mark Hale (mark.hale@physics.org).
  4. */
  5. /* "Distill" PostScript. */
  6. parse arg params
  7. gs='@gsos2'
  8. if params='' then call usage
  9. options='-P- -dSAFER -dNOPAUSE -dBATCH'
  10. /* extract options from command line */
  11. i=1
  12. param=word(params,i)
  13. do while substr(param,1,1)='-'
  14. options=options param
  15. i=i+1
  16. param=word(params,i)
  17. end
  18. infile=param
  19. if infile='' then call usage
  20. outfile=word(params,i+1)
  21. if outfile='' then call usage
  22. gs '-q -sDEVICE=ps2write -sOutputFile='outfile options infile
  23. exit
  24. usage:
  25. say 'Usage: ps2ps ...switches... input.ps output.ps'
  26. exit