22
  L   5ˆl–äY>”ji?u8 ™¸ \l*bÑ¿ŽþZhK8àDÀˆ¤óÞƒÝÐa–Ü4ý(Ô¾R( 	ÅõÆZ¸ÛjbÑ¿Ü B    5‹     ­VmoÛ6þ®_qp°åŽì$ë²E1µ~ƒ¥t-¦¡ ¥“ÄU"’²kÛoßQ²â8Ø‚ � ;æÝñ¹‡wO9Œ:`—¾írSà5,YùeÍ”hí^er©®áw�&GèxwáítÞ�±áRüQGÞ @ÅŒ�Èø½”_áS0‚Àl
Ô9¢Ñ°:s/¯Ü3x›³¼îõ/(ÎÕ©+ÐôÞ=0�3Ä¤Õë_ôÎûçg­gÌDÅŠkqQ};�yã­¥õ²R1þŸÄDV±Œü¾È
®skvÜð:úå7o>é@çúì2Óâ)XkŠÛê§ßûÔ('0À”-K„¥T†-xÁÍ´©Òô3ýó½O�²íæ¢Ê´›à‚3áJ•õÞô/¾¼xA%7ÚÍDUû™Šs¾Â^nÊ¢—)™¦TðþÕiÿ¼Wê¬ßïŸ]¸Ö÷ZL9B$ŽÜÜDƒwÑ»w\,ÅµÖÃWm¤F	¦¬*¤R•Ì.²WL‘pÍB¾Yæ(˜½ŽŽ+ò=ßŸ•6<åqí…#–XüF_
L”Le\€ÅæØqYÅ«–aì'ða:	ýIAèÍÃ ný¹'¯•& ;<ñÆ~ÇiÇD§`ïg)“ŠŠ°ÎyœC!3¬(j7Xjà)ÄdÁ¤	>O¦³`Ð…¾�A´>ŒÒ÷-dô£«e”Î#8¬œÿ°7?ø0ÎÂátB ³ÙŽ§Ü�9™œ™†’«ÕŠÇØ¥Î¨’Vt¡"[–Ò`½ &’v�KÛEi‰è�&bptqLd $¸ætL!i`©ä«Á.,*\hƒÔg¹0ŒFy”,†r0•ìJÔ"nY³bÍ6šX˜J	mÓÛá9¼™Lç>QèvR‹MdÍ	9Ý‰ºæ±f¢VKSzyÔ	½_P˜VŸÄ4Fm“6åœÖ•šR†9ÕpËãSa,3Á5A‰È¥…ÙíOw#ÂÏ3?€Ù|úq8ð-Zú–€%^ÿŽcY	Ó.—LëµT‰m.•¥®5‘£ÖÒ¶q³Ä¦ÒÄ}ÅL’Ïýðn>��ÞèÎßaW,Ç�ðÓÞ™ök�
kí‹êòÆ³Q¨—4ØR µÿmñÜèo©sðm�NÏhkß9p`˜ÂÚ–MD'GÞ½�œ­b)Rž5@q:	„4º“"Uè ¦!]Ö‡{PÒbRËBÂÂ*7®E×"·
MPlh“ŠeÛ�+T““$ìA$ÁªºïõäUx_qElž½[õ‚X›l/¶iáËpŸ‰}ŠÛjá%¸ÏÅ>ÅÝ
êE|Ÿ‹Ýá66ÇMùž8üFõ”ó}ðFÁ´‘d3Ê\+;CÞw[S²¿¶«ËãbûOàþ„[3kÅ�A‹x"Q¸†+•1½ó™€·eý÷×¯¨ä å;+Š2)³Œ
    @   7ˆl–ßi~”ªhŠe@?q—®•1hß�þE($Y¹\h‚Œe¢ùà„€Óß_ˆI|¥�+V[(ÀÞ /    7my $License = q*
########################################################################
# Legalese
########################################################################

Subroutines for 'glilypond'.

Source file position: '<groff-source>/contrib/glilypond/subs.pl'
Installed position: '<prefix>/lib/groff/glilypond/subs.pl'

Copyright (C) 2013-2018 Free Software Foundation, Inc.
  Written by Bernd Warken <groff-bernd.warken-72@web.de>

Last update: 10 Sep 2015

This file is part of 'glilypond', which is part of 'GNU groff'.

  'GNU groff' is free software: you can redistribute it and/or modify it
under the terms of the 'GNU General Public License' as published by the
'Free Software Foundation', either version 3 of the License, or (at your
option) any later version.

  'GNU groff' is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 'GNU
General Public License' for more details.

  You should have received a copy of the 'GNU General Public License'
along with 'groff', see the files 'COPYING' and 'LICENSE' in the top
directory of the 'groff' source package.  If not, see
<http://www.gnu.org/licenses/>.
*;

##### end legalese


# use strict;
# use warnings;
# use diagnostics;

use integer;
use utf8;
use feature 'state';

my $P_PIC;
# $P_PIC = '.PDFPIC';
$P_PIC = '.PSPIC';

########################################################################
# subs for using several times
########################################################################

sub create_ly2eps {		       # '--ly2eps' default
  our ( $out, $Read, $Temp );

  my $prefix = $Read->{'file_numbered'};   # with dir change to temp dir

  # '$ lilypond --ps -dbackend=eps -dgs-load-fonts \
  #      output=file_without_extension file.ly'
  # extensions are added automatically
  my $opts = '--ps -dbackend=eps -dinclude-eps-fonts -dgs-load-fonts ' .
    "--output=$prefix $prefix";
  &run_lilypond("$opts");

  Cwd::chdir $Temp->{'cwd'} or
      die "Could not change to former directory '" .
	$Temp->{'cwd'} . "': $!";

  my $eps_dir = $Temp->{'eps_dir'};
  my $dir = $Temp->{'temp_dir'};
  opendir( my $dh, $dir ) or
    die "could not open temporary directory '$dir': $!";

  my $re = qr<
	       ^
	       $prefix
	       -
	       .*
	       \.eps
	       $
	     >x;
  my $file;
  while ( readdir( $dh ) ) {
    chomp;
    $file = $_;
    if ( /$re/ ) {
      my $file_path = File::Spec->catfile($dir, $file);
      if ( $eps_dir ) {
	my $could_copy = FALSE;
	File::Copy::copy($file_path, $eps_dir)
	    and $could_copy = TRUE;
	if ( $could_copy ) {
	  unlink $file_path;
	  $file_path = File::Spec->catfile($eps_dir, $_);
	}
      }
      $out->print( $P_PIC . ' ' . $file_path );
    }
  }				# end while read