$Id: tangle,v 7.2 1998/07/23 14:50:13 stoklund Exp stoklund $
Changes to tangle for RISC OS compilation


Add two extra optional filename arguments for pascalfile and poolfile

@x tangle.ch, 226
    pool_name := basename_change_suffix (web_name, '.web', '.pool');
@y
    {|pool_name| is already set.}
@z

@x tangle.ch, 421
  if (optind + 1 <> argc) and (optind + 2 <> argc) then begin
    write_ln (stderr, 'tangle: Need one or two file arguments.');
@y
  if (optind >= argc) or (optind + 4 < argc) then begin
    write_ln (stderr, 'tangle: Need one to four file arguments.');
@z

@x tangle.ch, 428
  if optind + 2 = argc then begin
@y
  if optind + 1 < argc then begin
@z

@x tangle.ch, 432
  {Change |".web"| to |".p"| and use the current directory.}
  pascal_name := basename_change_suffix (web_name, '.web', '.p');
@y
  {Get |pascal_name| from |cmdline| or |web_name|.}
  if optind + 2 < argc then
    pascal_name := extend_filename (cmdline (optind + 2),
				    char_to_string('p'))
  else
    pascal_name := basename_change_suffix (web_name, '.web', '.p');

  {And the same for |pool_name|}
  if optind + 3 < argc then
    pool_name := extend_filename (cmdline (optind + 3), 'pool')
  else
    pool_name := basename_change_suffix (web_name, '.web', '.pool');
@z
