Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

v47i115: chord - A formatting utility for guitar players, Part01/06

21 views
Skip to first unread message

Martin Leclerc - Sun Montreal SE

unread,
Apr 12, 1995, 3:00:00 AM4/12/95
to
Submitted-by: Martin....@canada.sun.com (Martin Leclerc - Sun Montreal SE)
Posting-number: Volume 47, Issue 115
Archive-name: chord/part01
Environment: UNIX, DOS, VMS, Amiga
Supersedes: chord: Volume 40, Issue 84-88

This is a description of a utility called CHORD.

It's purpose is to provide guitar players with a tool to produce good
looking, self-descriptive music sheet from a text file.

CHORD read a text file containing the lyrics of a song, the chords to
be played, their description and some other optional data to produce a
PostScript document that includes:

Centered titles
Chord names above the words
Graphical representation of the chords at the end of the songs

CHORD also provides support for

Multiple columns on a page
Index of a songbook
Multiple logical pages per physical pages ( 1, 2 or 4)
Configurable fonts for the lyrics and the chord names
Multiple songs inside one file
The complete ISO 8859-1 character set
and
Chorus marking

The authors spent a great deal of time making it as feature-full and usable
as possible. If you like this program, please take the time to send a postcard
from your home town or locality to each of the two authors and let them know
what you think of CHORD. Please send the cards to the following addresses:

Martin Leclerc Mario Dorion
19 Browning 18 Georgia Crescent
Dollard des Ormeaux Pointe Claire
Quebec, H9G 2K5 Quebec, H9R 5V7
CANADA CANADA

NEW IN VERSION 3.6

o Song index is sorted
o .chordrc is read only once per execution
o Speed improvement by a factor of ~5
o support of multiple columns
o better (I hope...) support of A4 format
o inclusion of a2crd to convert ASCII files to chord format
o Chords defined multiples times ALL stay in the known chord structure, so
that 'chord -D' shows them all, even if the names are duplicates.
o bug fixes


===== PLATFORM =====

CHORD has been developped on SPARCStations running Solaris 2.2 and
OpenWindows 3.2. The PostScript previewer (PageView), SparcPrinters and
LaserWriter II have had no problem with the output. Please report any
changes your system requires.

Known port include VMS, DOS, U*IX, AMIGA-DOS.

===== CREDITS =====

CHORD has been developped and is still being maintained by Martin
Leclerc and Mario Dorion.

CHORD uses the GNU getopt() routine made available to the community by
the Free Software Foundation.

We would like to thanks the following individuals:

Steve Putz, who has kindly contributed a number of suggestions, bug
fixes and enhancements(?).

Jim Gerland (GER...@ubvms.cc.buffalo.edu), who has performed the initial
VMS port.

Leo Bicknell (ab...@freenet.acsu.buffalo.edu) has provided the chord sorting
routine.

Additional thanks to Fred handloser (and his pal Duncan) and many
others for providing many suggestions of features that were implemented
in CHORD 3.5.

===== COMPILING =====

CHORD is written in fairly portable C and should work on most UNIX
systems with little or no change. Let us know of your problems.

Simply edit the Makefile to meet your environment and 'make'.

Note: If your environment does not offer a getopt() routine edit the
Makefile to de-comment the lines (INCL, SRC and OBJ) that mention the
included getopt routine ... We reccomend using your system's getopt()
if it is available.

===== ARCHIVES =====

The offical chord archive is maintained generously by Jan-Erik Schuch (f91...@nada.kth.se)

Check out the web page http://www.nada.kth.se/~f91-jsc/

Another great source is ftp://ftp.nevada.edu or http://www.nevada.edu

===== COPYRIGHT =====

CHORD is licensed following the conditions of the
general GNU license. You are authorized to use this program free of
charge. You are authorized to distribute this program freely as long as
the full source is included. You are not allowed to remove the
`copyright' notices from the authors nor are you allowed to pretend you
wrote it. You are not allowed to charge any money for CHORD. You are
not allowed to distribute a modified version of CHORD without written
authorizations from the authors. You are not allowed to use parts of
CHORD in any other commercial or public-domain software. Sorry for all
the negatives rules ... but we've been bitten once!

Martin Leclerc (Martin....@canada.sun.com)
Mario Dorion (Mario....@canada.sun.com)

#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: chord chord/chord_guide.ps.01 chord/songs
# chord/songs/heaven
# Wrapped by kent@ftp on Wed Apr 12 21:39:34 1995
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 1 (of 6)."'
if test ! -d 'chord' ; then
echo shar: Creating directory \"'chord'\"
mkdir 'chord'
fi
if test -f 'chord/chord_guide.ps.01' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/chord_guide.ps.01'\"
else
echo shar: Extracting \"'chord/chord_guide.ps.01'\" \(55018 characters\)
sed "s/^X//" >'chord/chord_guide.ps.01' <<'END_OF_FILE'
X%!PS-Adobe-3.0
X%%BoundingBox: (atend)
X%%Pages: (atend)
X%%PageOrder: (atend)
X%%DocumentFonts: (atend)
X%%Creator: Frame 4.0
X%%DocumentData: Clean7Bit
X%%EndComments
X%%BeginProlog
X%
X% Frame ps_prolog 4.0, for use with Frame 4.0 products
X% This ps_prolog file is Copyright (c) 1986-1993 Frame Technology
X% Corporation. All rights reserved. This ps_prolog file may be
X% freely copied and distributed in conjunction with documents created
X% using FrameMaker, FrameBuilder and FrameViewer as long as this
X% copyright notice is preserved.
X%
X% Frame products normally print colors as their true color on a color printer
X% or as shades of gray, based on luminance, on a black-and white printer. The
X% following flag, if set to True, forces all non-white colors to print as pure
X% black. This has no effect on bitmap images.
X/FMPrintAllColorsAsBlack false def
X%
X% Frame products can either set their own line screens or use a printer's
X% default settings. Three flags below control this separately for no
X% separations, spot separations and process separations. If a flag
X% is true, then the default printer settings will not be changed. If it is
X% false, Frame products will use their own settings from a table based on
X% the printer's resolution.
X/FMUseDefaultNoSeparationScreen true def
X/FMUseDefaultSpotSeparationScreen true def
X/FMUseDefaultProcessSeparationScreen false def
X%
X% For any given PostScript printer resolution, Frame products have two sets of
X% screen angles and frequencies for printing process separations, which are
X% recomended by Adobe. The following variable chooses the higher frequencies
X% when set to true or the lower frequencies when set to false. This is only
X% effective if the appropriate FMUseDefault...SeparationScreen flag is false.
X/FMUseHighFrequencyScreens true def
X%
X% PostScript Level 2 printers contain an "Accurate Screens" feature which can
X% improve process separation rendering at the expense of compute time. This
X% flag is ignored by PostScript Level 1 printers.
X/FMUseAcccurateScreens true def
X%
X% The following PostScript procedure defines the spot function that Frame
X% products will use for process separations. You may un-comment-out one of
X% the alternative functions below, or use your own.
X%
X% Dot function
X/FMSpotFunction {abs exch abs 2 copy add 1 gt
X {1 sub dup mul exch 1 sub dup mul add 1 sub }
X {dup mul exch dup mul add 1 exch sub }ifelse } def
X%
X% Line function
X% /FMSpotFunction { pop } def
X%
X% Elipse function
X% /FMSpotFunction { dup 5 mul 8 div mul exch dup mul exch add
X% sqrt 1 exch sub } def
X%
X%
X/FMversion (4.0) def
X/FMLevel1 /languagelevel where {pop languagelevel} {1} ifelse 2 lt def
X/FMPColor
X FMLevel1 {
X false
X /colorimage where {pop pop true} if
X } {
X true
X } ifelse
Xdef
X/FrameDict 400 dict def
Xsystemdict /errordict known not {/errordict 10 dict def
X errordict /rangecheck {stop} put} if
X% The readline in PS 23.0 doesn't recognize cr's as nl's on AppleTalk
XFrameDict /tmprangecheck errordict /rangecheck get put
Xerrordict /rangecheck {FrameDict /bug true put} put
XFrameDict /bug false put
Xmark
X% Some PS machines read past the CR, so keep the following 3 lines together!
Xcurrentfile 5 string readline
X00
X0000000000
Xcleartomark
Xerrordict /rangecheck FrameDict /tmprangecheck get put
XFrameDict /bug get {
X /readline {
X /gstring exch def
X /gfile exch def
X /gindex 0 def
X {
X gfile read pop
X dup 10 eq {exit} if
X dup 13 eq {exit} if
X gstring exch gindex exch put
X /gindex gindex 1 add def
X } loop
X pop
X gstring 0 gindex getinterval true
X } bind def
X } if
X/FMshowpage /showpage load def
X/FMquit /quit load def
X/FMFAILURE {
X dup = flush
X FMshowpage
X /Helvetica findfont 12 scalefont setfont
X 72 200 moveto
X show FMshowpage
X FMquit
X } def
X/FMVERSION {
X FMversion ne {
X (Frame product version does not match ps_prolog!) FMFAILURE
X } if
X } def
X/FMBADEPSF {
X (PostScript Lang. Ref. Man., 2nd Ed., H.2.4 says EPS must not call X )
X dup dup (X) search pop exch pop exch pop length
X 4 -1 roll
X putinterval
X FMFAILURE
X } def
X/FMLOCAL {
X FrameDict begin
X 0 def
X end
X } def
X/concatprocs
X {
X /proc2 exch cvlit def/proc1 exch cvlit def/newproc proc1 length proc2 length add array def
X newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval newproc cvx
X}def
XFrameDict begin
X/FMnone 0 def
X/FMcyan 1 def
X/FMmagenta 2 def
X/FMyellow 3 def
X/FMblack 4 def
X/FMcustom 5 def
X/FrameNegative false def
X/FrameSepIs FMnone def
X/FrameSepBlack 0 def
X/FrameSepYellow 0 def
X/FrameSepMagenta 0 def
X/FrameSepCyan 0 def
X/FrameSepRed 1 def
X/FrameSepGreen 1 def
X/FrameSepBlue 1 def
X/FrameCurGray 1 def
X/FrameCurPat null def
X/FrameCurColors [ 0 0 0 1 0 0 0 ] def
X/FrameColorEpsilon .001 def
X/eqepsilon {
X sub dup 0 lt {neg} if
X FrameColorEpsilon le
X} bind def
X/FrameCmpColorsCMYK {
X 2 copy 0 get exch 0 get eqepsilon {
X 2 copy 1 get exch 1 get eqepsilon {
X 2 copy 2 get exch 2 get eqepsilon {
X 3 get exch 3 get eqepsilon
X } {pop pop false} ifelse
X }{pop pop false} ifelse
X } {pop pop false} ifelse
X} bind def
X/FrameCmpColorsRGB {
X 2 copy 4 get exch 0 get eqepsilon {
X 2 copy 5 get exch 1 get eqepsilon {
X 6 get exch 2 get eqepsilon
X }{pop pop false} ifelse
X } {pop pop false} ifelse
X} bind def
X/RGBtoCMYK {
X 1 exch sub
X 3 1 roll
X 1 exch sub
X 3 1 roll
X 1 exch sub
X 3 1 roll
X 3 copy
X 2 copy
X le { pop } { exch pop } ifelse
X 2 copy
X le { pop } { exch pop } ifelse
X dup dup dup
X 6 1 roll
X 4 1 roll
X 7 1 roll
X sub
X 6 1 roll
X sub
X 5 1 roll
X sub
X 4 1 roll
X} bind def
X/CMYKtoRGB {
X dup dup 4 -1 roll add
X 5 1 roll 3 -1 roll add
X 4 1 roll add
X 1 exch sub dup 0 lt {pop 0} if 3 1 roll
X 1 exch sub dup 0 lt {pop 0} if exch
X 1 exch sub dup 0 lt {pop 0} if exch
X} bind def
X/FrameSepInit {
X 1.0 RealSetgray
X} bind def
X/FrameSetSepColor {
X /FrameSepBlue exch def
X /FrameSepGreen exch def
X /FrameSepRed exch def
X /FrameSepBlack exch def
X /FrameSepYellow exch def
X /FrameSepMagenta exch def
X /FrameSepCyan exch def
X /FrameSepIs FMcustom def
X setCurrentScreen
X} bind def
X/FrameSetCyan {
X /FrameSepBlue 1.0 def
X /FrameSepGreen 1.0 def
X /FrameSepRed 0.0 def
X /FrameSepBlack 0.0 def
X /FrameSepYellow 0.0 def
X /FrameSepMagenta 0.0 def
X /FrameSepCyan 1.0 def
X /FrameSepIs FMcyan def
X setCurrentScreen
X} bind def
X
X/FrameSetMagenta {
X /FrameSepBlue 1.0 def
X /FrameSepGreen 0.0 def
X /FrameSepRed 1.0 def
X /FrameSepBlack 0.0 def
X /FrameSepYellow 0.0 def
X /FrameSepMagenta 1.0 def
X /FrameSepCyan 0.0 def
X /FrameSepIs FMmagenta def
X setCurrentScreen
X} bind def
X
X/FrameSetYellow {
X /FrameSepBlue 0.0 def
X /FrameSepGreen 1.0 def
X /FrameSepRed 1.0 def
X /FrameSepBlack 0.0 def
X /FrameSepYellow 1.0 def
X /FrameSepMagenta 0.0 def
X /FrameSepCyan 0.0 def
X /FrameSepIs FMyellow def
X setCurrentScreen
X} bind def
X
X/FrameSetBlack {
X /FrameSepBlue 0.0 def
X /FrameSepGreen 0.0 def
X /FrameSepRed 0.0 def
X /FrameSepBlack 1.0 def
X /FrameSepYellow 0.0 def
X /FrameSepMagenta 0.0 def
X /FrameSepCyan 0.0 def
X /FrameSepIs FMblack def
X setCurrentScreen
X} bind def
X
X/FrameNoSep {
X /FrameSepIs FMnone def
X setCurrentScreen
X} bind def
X/FrameSetSepColors {
X FrameDict begin
X [ exch 1 add 1 roll ]
X /FrameSepColors
X exch def end
X } bind def
X/FrameColorInSepListCMYK {
X FrameSepColors {
X exch dup 3 -1 roll
X FrameCmpColorsCMYK
X { pop true exit } if
X } forall
X dup true ne {pop false} if
X } bind def
X/FrameColorInSepListRGB {
X FrameSepColors {
X exch dup 3 -1 roll
X FrameCmpColorsRGB
X { pop true exit } if
X } forall
X dup true ne {pop false} if
X } bind def
X/RealSetgray /setgray load def
X/RealSetrgbcolor /setrgbcolor load def
X/RealSethsbcolor /sethsbcolor load def
Xend
X/setgray {
X FrameDict begin
X FrameSepIs FMnone eq
X { RealSetgray }
X {
X FrameSepIs FMblack eq
X { RealSetgray }
X { FrameSepIs FMcustom eq
X FrameSepRed 0 eq and
X FrameSepGreen 0 eq and
X FrameSepBlue 0 eq and {
X RealSetgray
X } {
X 1 RealSetgray pop
X } ifelse
X } ifelse
X } ifelse
X end
X} bind def
X/setrgbcolor {
X FrameDict begin
X FrameSepIs FMnone eq
X { RealSetrgbcolor }
X {
X 3 copy [ 4 1 roll ]
X FrameColorInSepListRGB
X {
X FrameSepBlue eq exch
X FrameSepGreen eq and exch
X FrameSepRed eq and
X { 0 } { 1 } ifelse
X }
X {
X FMPColor {
X RealSetrgbcolor
X currentcmykcolor
X } {
X RGBtoCMYK
X } ifelse
X FrameSepIs FMblack eq
X {1.0 exch sub 4 1 roll pop pop pop} {
X FrameSepIs FMyellow eq
X {pop 1.0 exch sub 3 1 roll pop pop} {
X FrameSepIs FMmagenta eq
X {pop pop 1.0 exch sub exch pop } {
X FrameSepIs FMcyan eq
X {pop pop pop 1.0 exch sub }
X {pop pop pop pop 1} ifelse } ifelse } ifelse } ifelse
X } ifelse
X RealSetgray
X }
X ifelse
X end
X} bind def
X/sethsbcolor {
X FrameDict begin
X FrameSepIs FMnone eq
X { RealSethsbcolor }
X {
X RealSethsbcolor
X currentrgbcolor
X setrgbcolor
X }
X ifelse
X end
X} bind def
XFrameDict begin
X/setcmykcolor where {
X pop /RealSetcmykcolor /setcmykcolor load def
X} {
X /RealSetcmykcolor {
X 4 1 roll
X 3 { 3 index add 0 max 1 min 1 exch sub 3 1 roll} repeat
X setrgbcolor pop
X } bind def
X} ifelse
Xuserdict /setcmykcolor {
X FrameDict begin
X FrameSepIs FMnone eq
X { RealSetcmykcolor }
X {
X 4 copy [ 5 1 roll ]
X FrameColorInSepListCMYK
X {
X FrameSepBlack eq exch
X FrameSepYellow eq and exch
X FrameSepMagenta eq and exch
X FrameSepCyan eq and
X { 0 } { 1 } ifelse
X }
X {
X FrameSepIs FMblack eq
X {1.0 exch sub 4 1 roll pop pop pop} {
X FrameSepIs FMyellow eq
X {pop 1.0 exch sub 3 1 roll pop pop} {
X FrameSepIs FMmagenta eq
X {pop pop 1.0 exch sub exch pop } {
X FrameSepIs FMcyan eq
X {pop pop pop 1.0 exch sub }
X {pop pop pop pop 1} ifelse } ifelse } ifelse } ifelse
X } ifelse
X RealSetgray
X }
X ifelse
X end
X } bind put
XFMLevel1 not {
X
X /patProcDict 5 dict dup begin
X <0f1e3c78f0e1c387> { 3 setlinewidth -1 -1 moveto 9 9 lineto stroke
X 4 -4 moveto 12 4 lineto stroke
X -4 4 moveto 4 12 lineto stroke} bind def
X <0f87c3e1f0783c1e> { 3 setlinewidth -1 9 moveto 9 -1 lineto stroke
X -4 4 moveto 4 -4 lineto stroke
X 4 12 moveto 12 4 lineto stroke} bind def
X <8142241818244281> { 1 setlinewidth -1 9 moveto 9 -1 lineto stroke
X -1 -1 moveto 9 9 lineto stroke } bind def
X <03060c183060c081> { 1 setlinewidth -1 -1 moveto 9 9 lineto stroke
X 4 -4 moveto 12 4 lineto stroke
X -4 4 moveto 4 12 lineto stroke} bind def
X <8040201008040201> { 1 setlinewidth -1 9 moveto 9 -1 lineto stroke
X -4 4 moveto 4 -4 lineto stroke
X 4 12 moveto 12 4 lineto stroke} bind def
X end def
X /patDict 15 dict dup begin
X /PatternType 1 def
X /PaintType 2 def
X /TilingType 3 def
X /BBox [ 0 0 8 8 ] def
X /XStep 8 def
X /YStep 8 def
X /PaintProc {
X begin
X patProcDict bstring known {
X patProcDict bstring get exec
X } {
X 8 8 true [1 0 0 -1 0 8] bstring imagemask
X } ifelse
X end
X } bind def
X end def
X} if
X/combineColor {
X FrameSepIs FMnone eq
X {
X graymode FMLevel1 or not {
X
X [/Pattern [/DeviceCMYK]] setcolorspace
X FrameCurColors 0 4 getinterval aload pop FrameCurPat setcolor
X } {
X FrameCurColors 3 get 1.0 ge {
X FrameCurGray RealSetgray
X } {
X FMPColor graymode and {
X 0 1 3 {
X FrameCurColors exch get
X 1 FrameCurGray sub mul
X } for
X RealSetcmykcolor
X } {
X 4 1 6 {
X FrameCurColors exch get
X graymode {
X 1 exch sub 1 FrameCurGray sub mul 1 exch sub
X } {
X 1.0 lt {FrameCurGray} {1} ifelse
X } ifelse
X } for
X RealSetrgbcolor
X } ifelse
X } ifelse
X } ifelse
X } {
X FrameCurColors 0 4 getinterval aload
X FrameColorInSepListCMYK {
X FrameSepBlack eq exch
X FrameSepYellow eq and exch
X FrameSepMagenta eq and exch
X FrameSepCyan eq and
X FrameSepIs FMcustom eq and
X { FrameCurGray } { 1 } ifelse
X } {
X FrameSepIs FMblack eq
X {FrameCurGray 1.0 exch sub mul 1.0 exch sub 4 1 roll pop pop pop} {
X FrameSepIs FMyellow eq
X {pop FrameCurGray 1.0 exch sub mul 1.0 exch sub 3 1 roll pop pop} {
X FrameSepIs FMmagenta eq
X {pop pop FrameCurGray 1.0 exch sub mul 1.0 exch sub exch pop } {
X FrameSepIs FMcyan eq
X {pop pop pop FrameCurGray 1.0 exch sub mul 1.0 exch sub }
X {pop pop pop pop 1} ifelse } ifelse } ifelse } ifelse
X } ifelse
X graymode FMLevel1 or not {
X
X [/Pattern [/DeviceGray]] setcolorspace
X FrameCurPat setcolor
X } {
X graymode not FMLevel1 and {
X
X dup 1 lt {pop FrameCurGray} if
X } if
X RealSetgray
X } ifelse
X } ifelse
X} bind def
X/savematrix {
X orgmatrix currentmatrix pop
X } bind def
X/restorematrix {
X orgmatrix setmatrix
X } bind def
X/dmatrix matrix def
X/dpi 72 0 dmatrix defaultmatrix dtransform
X dup mul exch dup mul add sqrt def
X
X/freq dpi dup 72 div round dup 0 eq {pop 1} if 8 mul div def
X/sangle 1 0 dmatrix defaultmatrix dtransform exch atan def
X/dpiranges [ 2540 2400 1693 1270 1200 635 600 0 ] def
X/CMLowFreqs [ 100.402 94.8683 89.2289 100.402 94.8683 66.9349 63.2456 47.4342 ] def
X/YLowFreqs [ 95.25 90.0 84.65 95.25 90.0 70.5556 66.6667 50.0 ] def
X/KLowFreqs [ 89.8026 84.8528 79.8088 89.8026 84.8528 74.8355 70.7107 53.033 ] def
X/CLowAngles [ 71.5651 71.5651 71.5651 71.5651 71.5651 71.5651 71.5651 71.5651 ] def
X/MLowAngles [ 18.4349 18.4349 18.4349 18.4349 18.4349 18.4349 18.4349 18.4349 ] def
X/YLowTDot [ true true false true true false false false ] def
X/CMHighFreqs [ 133.87 126.491 133.843 108.503 102.523 100.402 94.8683 63.2456 ] def
X/YHighFreqs [ 127.0 120.0 126.975 115.455 109.091 95.25 90.0 60.0 ] def
X/KHighFreqs [ 119.737 113.137 119.713 128.289 121.218 89.8026 84.8528 63.6395 ] def
X/CHighAngles [ 71.5651 71.5651 71.5651 70.0169 70.0169 71.5651 71.5651 71.5651 ] def
X/MHighAngles [ 18.4349 18.4349 18.4349 19.9831 19.9831 18.4349 18.4349 18.4349 ] def
X/YHighTDot [ false false true false false true true false ] def
X/PatFreq [ 10.5833 10.0 9.4055 10.5833 10.0 10.5833 10.0 9.375 ] def
X/screenIndex {
X 0 1 dpiranges length 1 sub { dup dpiranges exch get 1 sub dpi le {exit} {pop} ifelse } for
X} bind def
X/getCyanScreen {
X FMUseHighFrequencyScreens { CHighAngles CMHighFreqs} {CLowAngles CMLowFreqs} ifelse
X screenIndex dup 3 1 roll get 3 1 roll get /FMSpotFunction load
X} bind def
X/getMagentaScreen {
X FMUseHighFrequencyScreens { MHighAngles CMHighFreqs } {MLowAngles CMLowFreqs} ifelse
X screenIndex dup 3 1 roll get 3 1 roll get /FMSpotFunction load
X} bind def
X/getYellowScreen {
X FMUseHighFrequencyScreens { YHighTDot YHighFreqs} { YLowTDot YLowFreqs } ifelse
X screenIndex dup 3 1 roll get 3 1 roll get { 3 div
X {2 { 1 add 2 div 3 mul dup floor sub 2 mul 1 sub exch} repeat
X FMSpotFunction } } {/FMSpotFunction load } ifelse
X 0.0 exch
X} bind def
X/getBlackScreen {
X FMUseHighFrequencyScreens { KHighFreqs } { KLowFreqs } ifelse
X screenIndex get 45.0 /FMSpotFunction load
X} bind def
X/getSpotScreen {
X getBlackScreen
X} bind def
X/getCompositeScreen {
X getBlackScreen
X} bind def
X/FMSetScreen
X FMLevel1 { /setscreen load
X }{ {
X 8 dict begin
X /HalftoneType 1 def
X /SpotFunction exch def
X /Angle exch def
X /Frequency exch def
X /AccurateScreens FMUseAcccurateScreens def
X currentdict end sethalftone
X } bind } ifelse
Xdef
X/setDefaultScreen {
X FMPColor {
X orgrxfer cvx orggxfer cvx orgbxfer cvx orgxfer cvx setcolortransfer
X }
X {
X orgxfer cvx settransfer
X } ifelse
X orgfreq organgle orgproc cvx setscreen
X} bind def
X/setCurrentScreen {
X FrameSepIs FMnone eq {
X FMUseDefaultNoSeparationScreen {
X setDefaultScreen
X } {
X getCompositeScreen FMSetScreen
X } ifelse
X } {
X FrameSepIs FMcustom eq {
X FMUseDefaultSpotSeparationScreen {
X setDefaultScreen
X } {
X getSpotScreen FMSetScreen
X } ifelse
X } {
X FMUseDefaultProcessSeparationScreen {
X setDefaultScreen
X } {
X FrameSepIs FMcyan eq {
X getCyanScreen FMSetScreen
X } {
X FrameSepIs FMmagenta eq {
X getMagentaScreen FMSetScreen
X } {
X FrameSepIs FMyellow eq {
X getYellowScreen FMSetScreen
X } {
X getBlackScreen FMSetScreen
X } ifelse
X } ifelse
X } ifelse
X } ifelse
X } ifelse
X } ifelse
X} bind def
Xend
X /gstring FMLOCAL
X /gfile FMLOCAL
X /gindex FMLOCAL
X /orgrxfer FMLOCAL
X /orggxfer FMLOCAL
X /orgbxfer FMLOCAL
X /orgxfer FMLOCAL
X /orgproc FMLOCAL
X /orgrproc FMLOCAL
X /orggproc FMLOCAL
X /orgbproc FMLOCAL
X /organgle FMLOCAL
X /orgrangle FMLOCAL
X /orggangle FMLOCAL
X /orgbangle FMLOCAL
X /orgfreq FMLOCAL
X /orgrfreq FMLOCAL
X /orggfreq FMLOCAL
X /orgbfreq FMLOCAL
X /yscale FMLOCAL
X /xscale FMLOCAL
X /edown FMLOCAL
X /manualfeed FMLOCAL
X /paperheight FMLOCAL
X /paperwidth FMLOCAL
X/FMDOCUMENT {
X array /FMfonts exch def
X /#copies exch def
X FrameDict begin
X 0 ne /manualfeed exch def
X /paperheight exch def
X /paperwidth exch def
X 0 ne /FrameNegative exch def
X 0 ne /edown exch def
X /yscale exch def
X /xscale exch def
X FMLevel1 {
X manualfeed {setmanualfeed} if
X /FMdicttop countdictstack 1 add def
X /FMoptop count def
X setpapername
X manualfeed {true} {papersize} ifelse
X {manualpapersize} {false} ifelse
X {desperatepapersize} {false} ifelse
X { (Can't select requested paper size for Frame print job!) FMFAILURE } if
X count -1 FMoptop {pop pop} for
X countdictstack -1 FMdicttop {pop end} for
X }
X {{1 dict dup /PageSize [paperwidth paperheight]put setpagedevice}stopped
X { (Can't select requested paper size for Frame print job!) FMFAILURE } if
X {1 dict dup /ManualFeed manualfeed put setpagedevice } stopped pop }
X ifelse
X
X FMPColor {
X currentcolorscreen
X cvlit /orgproc exch def
X /organgle exch def
X /orgfreq exch def
X cvlit /orgbproc exch def
X /orgbangle exch def
X /orgbfreq exch def
X cvlit /orggproc exch def
X /orggangle exch def
X /orggfreq exch def
X cvlit /orgrproc exch def
X /orgrangle exch def
X /orgrfreq exch def
X currentcolortransfer
X FrameNegative {
X 1 1 4 {
X pop { 1 exch sub } concatprocs 4 1 roll
X } for
X 4 copy
X setcolortransfer
X } if
X cvlit /orgxfer exch def
X cvlit /orgbxfer exch def
X cvlit /orggxfer exch def
X cvlit /orgrxfer exch def
X } {
X currentscreen
X cvlit /orgproc exch def
X /organgle exch def
X /orgfreq exch def
X
X currenttransfer
X FrameNegative {
X { 1 exch sub } concatprocs
X dup settransfer
X } if
X cvlit /orgxfer exch def
X } ifelse
X end
X} def
X/pagesave FMLOCAL
X/orgmatrix FMLOCAL
X/landscape FMLOCAL
X/pwid FMLOCAL
X/FMBEGINPAGE {
X FrameDict begin
X /pagesave save def
X 3.86 setmiterlimit
X /landscape exch 0 ne def
X landscape {
X 90 rotate 0 exch dup /pwid exch def neg translate pop
X }{
X pop /pwid exch def
X } ifelse
X edown { [-1 0 0 1 pwid 0] concat } if
X 0 0 moveto paperwidth 0 lineto paperwidth paperheight lineto
X 0 paperheight lineto 0 0 lineto 1 setgray fill
X xscale yscale scale
X /orgmatrix matrix def
X gsave
X} def
X/FMENDPAGE {
X grestore
X pagesave restore
X end
X showpage
X } def
X/FMFONTDEFINE {
X FrameDict begin
X findfont
X ReEncode
X 1 index exch
X definefont
X FMfonts 3 1 roll
X put
X end
X } def
X/FMFILLS {
X FrameDict begin dup
X array /fillvals exch def
X dict /patCache exch def
X end
X } def
X/FMFILL {
X FrameDict begin
X fillvals 3 1 roll put
X end
X } def
X/FMNORMALIZEGRAPHICS {
X newpath
X 0.0 0.0 moveto
X 1 setlinewidth
X 0 setlinecap
X 0 0 0 sethsbcolor
X 0 setgray
X } bind def
X /fx FMLOCAL
X /fy FMLOCAL
X /fh FMLOCAL
X /fw FMLOCAL
X /llx FMLOCAL
X /lly FMLOCAL
X /urx FMLOCAL
X /ury FMLOCAL
X/FMBEGINEPSF {
X end
X /FMEPSF save def
X /showpage {} def
X% See Adobe's "PostScript Language Reference Manual, 2nd Edition", page 714.
X% "...the following operators MUST NOT be used in an EPS file:" (emphasis ours)
X /banddevice {(banddevice) FMBADEPSF} def
X /clear {(clear) FMBADEPSF} def
X /cleardictstack {(cleardictstack) FMBADEPSF} def
X /copypage {(copypage) FMBADEPSF} def
X /erasepage {(erasepage) FMBADEPSF} def
X /exitserver {(exitserver) FMBADEPSF} def
X /framedevice {(framedevice) FMBADEPSF} def
X /grestoreall {(grestoreall) FMBADEPSF} def
X /initclip {(initclip) FMBADEPSF} def
X /initgraphics {(initgraphics) FMBADEPSF} def
X /initmatrix {(initmatrix) FMBADEPSF} def
X /quit {(quit) FMBADEPSF} def
X /renderbands {(renderbands) FMBADEPSF} def
X /setglobal {(setglobal) FMBADEPSF} def
X /setpagedevice {(setpagedevice) FMBADEPSF} def
X /setshared {(setshared) FMBADEPSF} def
X /startjob {(startjob) FMBADEPSF} def
X /lettertray {(lettertray) FMBADEPSF} def
X /letter {(letter) FMBADEPSF} def
X /lettersmall {(lettersmall) FMBADEPSF} def
X /11x17tray {(11x17tray) FMBADEPSF} def
X /11x17 {(11x17) FMBADEPSF} def
X /ledgertray {(ledgertray) FMBADEPSF} def
X /ledger {(ledger) FMBADEPSF} def
X /legaltray {(legaltray) FMBADEPSF} def
X /legal {(legal) FMBADEPSF} def
X /statementtray {(statementtray) FMBADEPSF} def
X /statement {(statement) FMBADEPSF} def
X /executivetray {(executivetray) FMBADEPSF} def
X /executive {(executive) FMBADEPSF} def
X /a3tray {(a3tray) FMBADEPSF} def
X /a3 {(a3) FMBADEPSF} def
X /a4tray {(a4tray) FMBADEPSF} def
X /a4 {(a4) FMBADEPSF} def
X /a4small {(a4small) FMBADEPSF} def
X /b4tray {(b4tray) FMBADEPSF} def
X /b4 {(b4) FMBADEPSF} def
X /b5tray {(b5tray) FMBADEPSF} def
X /b5 {(b5) FMBADEPSF} def
X FMNORMALIZEGRAPHICS
X [/fy /fx /fh /fw /ury /urx /lly /llx] {exch def} forall
X fx fw 2 div add fy fh 2 div add translate
X rotate
X fw 2 div neg fh 2 div neg translate
X fw urx llx sub div fh ury lly sub div scale
X llx neg lly neg translate
X /FMdicttop countdictstack 1 add def
X /FMoptop count def
X } bind def
X/FMENDEPSF {
X count -1 FMoptop {pop pop} for
X countdictstack -1 FMdicttop {pop end} for
X FMEPSF restore
X FrameDict begin
X } bind def
XFrameDict begin
X/setmanualfeed {
X%%BeginFeature *ManualFeed True
X statusdict /manualfeed true put
X%%EndFeature
X } bind def
X/max {2 copy lt {exch} if pop} bind def
X/min {2 copy gt {exch} if pop} bind def
X/inch {72 mul} def
X/pagedimen {
X paperheight sub abs 16 lt exch
X paperwidth sub abs 16 lt and
X {/papername exch def} {pop} ifelse
X } bind def
X /papersizedict FMLOCAL
X/setpapername {
X /papersizedict 14 dict def
X papersizedict begin
X /papername /unknown def
X /Letter 8.5 inch 11.0 inch pagedimen
X /LetterSmall 7.68 inch 10.16 inch pagedimen
X /Tabloid 11.0 inch 17.0 inch pagedimen
X /Ledger 17.0 inch 11.0 inch pagedimen
X /Legal 8.5 inch 14.0 inch pagedimen
X /Statement 5.5 inch 8.5 inch pagedimen
X /Executive 7.5 inch 10.0 inch pagedimen
X /A3 11.69 inch 16.5 inch pagedimen
X /A4 8.26 inch 11.69 inch pagedimen
X /A4Small 7.47 inch 10.85 inch pagedimen
X /B4 10.125 inch 14.33 inch pagedimen
X /B5 7.16 inch 10.125 inch pagedimen
X end
X } bind def
X/papersize {
X papersizedict begin
X /Letter {lettertray letter} def
X /LetterSmall {lettertray lettersmall} def
X /Tabloid {11x17tray 11x17} def
X /Ledger {ledgertray ledger} def
X /Legal {legaltray legal} def
X /Statement {statementtray statement} def
X /Executive {executivetray executive} def
X /A3 {a3tray a3} def
X /A4 {a4tray a4} def
X /A4Small {a4tray a4small} def
X /B4 {b4tray b4} def
X /B5 {b5tray b5} def
X /unknown {unknown} def
X papersizedict dup papername known {papername} {/unknown} ifelse get
X end
X statusdict begin stopped end
X } bind def
X/manualpapersize {
X papersizedict begin
X /Letter {letter} def
X /LetterSmall {lettersmall} def
X /Tabloid {11x17} def
X /Ledger {ledger} def
X /Legal {legal} def
X /Statement {statement} def
X /Executive {executive} def
X /A3 {a3} def
X /A4 {a4} def
X /A4Small {a4small} def
X /B4 {b4} def
X /B5 {b5} def
X /unknown {unknown} def
X papersizedict dup papername known {papername} {/unknown} ifelse get
X end
X stopped
X } bind def
X/desperatepapersize {
X statusdict /setpageparams known
X {
X paperwidth paperheight 0 1
X statusdict begin
X {setpageparams} stopped
X end
X } {true} ifelse
X } bind def
X/DiacriticEncoding [
X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
X/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
X/.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl
X/numbersign /dollar /percent /ampersand /quotesingle /parenleft
X/parenright /asterisk /plus /comma /hyphen /period /slash /zero /one
X/two /three /four /five /six /seven /eight /nine /colon /semicolon
X/less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K
X/L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash
X/bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h
X/i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar
X/braceright /asciitilde /.notdef /Adieresis /Aring /Ccedilla /Eacute
X/Ntilde /Odieresis /Udieresis /aacute /agrave /acircumflex /adieresis
X/atilde /aring /ccedilla /eacute /egrave /ecircumflex /edieresis
X/iacute /igrave /icircumflex /idieresis /ntilde /oacute /ograve
X/ocircumflex /odieresis /otilde /uacute /ugrave /ucircumflex
X/udieresis /dagger /.notdef /cent /sterling /section /bullet
X/paragraph /germandbls /registered /copyright /trademark /acute
X/dieresis /.notdef /AE /Oslash /.notdef /.notdef /.notdef /.notdef
X/yen /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
X/ordfeminine /ordmasculine /.notdef /ae /oslash /questiondown
X/exclamdown /logicalnot /.notdef /florin /.notdef /.notdef
X/guillemotleft /guillemotright /ellipsis /.notdef /Agrave /Atilde
X/Otilde /OE /oe /endash /emdash /quotedblleft /quotedblright
X/quoteleft /quoteright /.notdef /.notdef /ydieresis /Ydieresis
X/fraction /currency /guilsinglleft /guilsinglright /fi /fl /daggerdbl
X/periodcentered /quotesinglbase /quotedblbase /perthousand
X/Acircumflex /Ecircumflex /Aacute /Edieresis /Egrave /Iacute
X/Icircumflex /Idieresis /Igrave /Oacute /Ocircumflex /.notdef /Ograve
X/Uacute /Ucircumflex /Ugrave /dotlessi /circumflex /tilde /macron
X/breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron
X] def
X/ReEncode {
X dup
X length
X dict begin
X {
X 1 index /FID ne
X {def}
X {pop pop} ifelse
X } forall
X 0 eq {/Encoding DiacriticEncoding def} if
X currentdict
X end
X } bind def
XFMPColor
X
X {
X /BEGINBITMAPCOLOR {
X BITMAPCOLOR} def
X /BEGINBITMAPCOLORc {
X BITMAPCOLORc} def
X /BEGINBITMAPTRUECOLOR {
X BITMAPTRUECOLOR } def
X /BEGINBITMAPTRUECOLORc {
X BITMAPTRUECOLORc } def
X }
X
X {
X /BEGINBITMAPCOLOR {
X BITMAPGRAY} def
X /BEGINBITMAPCOLORc {
X BITMAPGRAYc} def
X /BEGINBITMAPTRUECOLOR {
X BITMAPTRUEGRAY } def
X /BEGINBITMAPTRUECOLORc {
X BITMAPTRUEGRAYc } def
X }
Xifelse
X/K {
X FMPrintAllColorsAsBlack {
X dup 1 eq 2 index 1 eq and 3 index 1 eq and not
X {7 {pop} repeat 0 0 0 1 0 0 0} if
X } if
X FrameCurColors astore
X pop combineColor
X} bind def
X/graymode true def
X /bwidth FMLOCAL
X /bpside FMLOCAL
X /bstring FMLOCAL
X /onbits FMLOCAL
X /offbits FMLOCAL
X /xindex FMLOCAL
X /yindex FMLOCAL
X /x FMLOCAL
X /y FMLOCAL
X/setPatternMode {
X FMLevel1 {
X /bwidth exch def
X /bpside exch def
X /bstring exch def
X /onbits 0 def /offbits 0 def
X freq sangle landscape {90 add} if
X {/y exch def
X /x exch def
X /xindex x 1 add 2 div bpside mul cvi def
X /yindex y 1 add 2 div bpside mul cvi def
X bstring yindex bwidth mul xindex 8 idiv add get
X 1 7 xindex 8 mod sub bitshift and 0 ne FrameNegative {not} if
X {/onbits onbits 1 add def 1}
X {/offbits offbits 1 add def 0}
X ifelse
X }
X setscreen
X offbits offbits onbits add div FrameNegative {1.0 exch sub} if
X /FrameCurGray exch def
X } {
X pop pop
X dup patCache exch known {
X patCache exch get
X } {
X dup
X patDict /bstring 3 -1 roll put
X patDict
X 9 PatFreq screenIndex get div dup matrix scale
X makepattern
X dup
X patCache 4 -1 roll 3 -1 roll put
X } ifelse
X /FrameCurGray 0 def
X /FrameCurPat exch def
X } ifelse
X /graymode false def
X combineColor
X} bind def
X/setGrayScaleMode {
X graymode not {
X /graymode true def
X FMLevel1 {
X setCurrentScreen
X } if
X } if
X /FrameCurGray exch def
X combineColor
X} bind def
X/normalize {
X transform round exch round exch itransform
X } bind def
X/dnormalize {
X dtransform round exch round exch idtransform
X } bind def
X/lnormalize {
X 0 dtransform exch cvi 2 idiv 2 mul 1 add exch idtransform pop
X } bind def
X/H {
X lnormalize setlinewidth
X } bind def
X/Z {
X setlinecap
X } bind def
X
X/PFill {
X graymode FMLevel1 or not {
X gsave 1 setgray eofill grestore
X } if
X} bind def
X/PStroke {
X graymode FMLevel1 or not {
X gsave 1 setgray stroke grestore
X } if
X stroke
X} bind def
X /fillvals FMLOCAL
X/X {
X fillvals exch get
X dup type /stringtype eq
X {8 1 setPatternMode}
X {setGrayScaleMode}
X ifelse
X } bind def
X/V {
X PFill gsave eofill grestore
X } bind def
X/Vclip {
X clip
X } bind def
X/Vstrk {
X currentlinewidth exch setlinewidth PStroke setlinewidth
X } bind def
X/N {
X PStroke
X } bind def
X/Nclip {
X strokepath clip newpath
X } bind def
X/Nstrk {
X currentlinewidth exch setlinewidth PStroke setlinewidth
X } bind def
X/M {newpath moveto} bind def
X/E {lineto} bind def
X/D {curveto} bind def
X/O {closepath} bind def
X /n FMLOCAL
X/L {
X /n exch def
X newpath
X normalize
X moveto
X 2 1 n {pop normalize lineto} for
X } bind def
X/Y {
X L
X closepath
X } bind def
X /x1 FMLOCAL
X /x2 FMLOCAL
X /y1 FMLOCAL
X /y2 FMLOCAL
X/R {
X /y2 exch def
X /x2 exch def
X /y1 exch def
X /x1 exch def
X x1 y1
X x2 y1
X x2 y2
X x1 y2
X 4 Y
X } bind def
X /rad FMLOCAL
X/rarc
X {rad
X arcto
X } bind def
X/RR {
X /rad exch def
X normalize
X /y2 exch def
X /x2 exch def
X normalize
X /y1 exch def
X /x1 exch def
X mark
X newpath
X {
X x1 y1 rad add moveto
X x1 y2 x2 y2 rarc
X x2 y2 x2 y1 rarc
X x2 y1 x1 y1 rarc
X x1 y1 x1 y2 rarc
X closepath
X } stopped {x1 y1 x2 y2 R} if
X cleartomark
X } bind def
X/RRR {
X /rad exch def
X normalize /y4 exch def /x4 exch def
X normalize /y3 exch def /x3 exch def
X normalize /y2 exch def /x2 exch def
X normalize /y1 exch def /x1 exch def
X newpath
X normalize moveto
X mark
X {
X x2 y2 x3 y3 rarc
X x3 y3 x4 y4 rarc
X x4 y4 x1 y1 rarc
X x1 y1 x2 y2 rarc
X closepath
X } stopped
X {x1 y1 x2 y2 x3 y3 x4 y4 newpath moveto lineto lineto lineto closepath} if
X cleartomark
X } bind def
X/C {
X grestore
X gsave
X R
X clip
X setCurrentScreen
X} bind def
X/CP {
X grestore
X gsave
X Y
X clip
X setCurrentScreen
X} bind def
X /FMpointsize FMLOCAL
X/F {
X FMfonts exch get
X FMpointsize scalefont
X setfont
X } bind def
X/Q {
X /FMpointsize exch def
X F
X } bind def
X/T {
X moveto show
X } bind def
X/RF {
X rotate
X 0 ne {-1 1 scale} if
X } bind def
X/TF {
X gsave
X moveto
X RF
X show
X grestore
X } bind def
X/P {
X moveto
X 0 32 3 2 roll widthshow
X } bind def
X/PF {
X gsave
X moveto
X RF
X 0 32 3 2 roll widthshow
X grestore
X } bind def
X/S {
X moveto
X 0 exch ashow
X } bind def
X/SF {
X gsave
X moveto
X RF
X 0 exch ashow
X grestore
X } bind def
X/B {
X moveto
X 0 32 4 2 roll 0 exch awidthshow
X } bind def
X/BF {
X gsave
X moveto
X RF
X 0 32 4 2 roll 0 exch awidthshow
X grestore
X } bind def
X/G {
X gsave
X newpath
X normalize translate 0.0 0.0 moveto
X dnormalize scale
X 0.0 0.0 1.0 5 3 roll arc
X closepath
X PFill fill
X grestore
X } bind def
X/Gstrk {
X savematrix
X newpath
X 2 index 2 div add exch 3 index 2 div sub exch
X normalize 2 index 2 div sub exch 3 index 2 div add exch
X translate
X scale
X 0.0 0.0 1.0 5 3 roll arc
X restorematrix
X currentlinewidth exch setlinewidth PStroke setlinewidth
X } bind def
X/Gclip {
X newpath
X savematrix
X normalize translate 0.0 0.0 moveto
X dnormalize scale
X 0.0 0.0 1.0 5 3 roll arc
X closepath
X clip newpath
X restorematrix
X } bind def
X/GG {
X gsave
X newpath
X normalize translate 0.0 0.0 moveto
X rotate
X dnormalize scale
X 0.0 0.0 1.0 5 3 roll arc
X closepath
X PFill
X fill
X grestore
X } bind def
X/GGclip {
X savematrix
X newpath
X normalize translate 0.0 0.0 moveto
X rotate
X dnormalize scale
X 0.0 0.0 1.0 5 3 roll arc
X closepath
X clip newpath
X restorematrix
X } bind def
X/GGstrk {
X savematrix
X newpath
X normalize translate 0.0 0.0 moveto
X rotate
X dnormalize scale
X 0.0 0.0 1.0 5 3 roll arc
X closepath
X restorematrix
X currentlinewidth exch setlinewidth PStroke setlinewidth
X } bind def
X/A {
X gsave
X savematrix
X newpath
X 2 index 2 div add exch 3 index 2 div sub exch
X normalize 2 index 2 div sub exch 3 index 2 div add exch
X translate
X scale
X 0.0 0.0 1.0 5 3 roll arc
X restorematrix
X PStroke
X grestore
X } bind def
X/Aclip {
X newpath
X savematrix
X normalize translate 0.0 0.0 moveto
X dnormalize scale
X 0.0 0.0 1.0 5 3 roll arc
X closepath
X strokepath clip newpath
X restorematrix
X} bind def
X/Astrk {
X Gstrk
X} bind def
X/AA {
X gsave
X savematrix
X newpath
X
X 3 index 2 div add exch 4 index 2 div sub exch
X
X normalize 3 index 2 div sub exch 4 index 2 div add exch
X translate
X rotate
X scale
X 0.0 0.0 1.0 5 3 roll arc
X restorematrix
X PStroke
X grestore
X } bind def
X/AAclip {
X savematrix
X newpath
X normalize translate 0.0 0.0 moveto
X rotate
X dnormalize scale
X 0.0 0.0 1.0 5 3 roll arc
X closepath
X strokepath clip newpath
X restorematrix
X} bind def
X/AAstrk {
X GGstrk
X} bind def
X /x FMLOCAL
X /y FMLOCAL
X /w FMLOCAL
X /h FMLOCAL
X /xx FMLOCAL
X /yy FMLOCAL
X /ww FMLOCAL
X /hh FMLOCAL
X /FMsaveobject FMLOCAL
X /FMoptop FMLOCAL
X /FMdicttop FMLOCAL
X/BEGINPRINTCODE {
X /FMdicttop countdictstack 1 add def
X /FMoptop count 7 sub def
X /FMsaveobject save def
X userdict begin
X /showpage {} def
X FMNORMALIZEGRAPHICS
X 3 index neg 3 index neg translate
X } bind def
X/ENDPRINTCODE {
X count -1 FMoptop {pop pop} for
X countdictstack -1 FMdicttop {pop end} for
X FMsaveobject restore
X } bind def
X/gn {
X 0
X { 46 mul
X cf read pop
X 32 sub
X dup 46 lt {exit} if
X 46 sub add
X } loop
X add
X } bind def
X /str FMLOCAL
X/cfs {
X /str sl string def
X 0 1 sl 1 sub {str exch val put} for
X str def
X } bind def
X/ic [
X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223
X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223
X 0
X {0 hx} {1 hx} {2 hx} {3 hx} {4 hx} {5 hx} {6 hx} {7 hx} {8 hx} {9 hx}
X {10 hx} {11 hx} {12 hx} {13 hx} {14 hx} {15 hx} {16 hx} {17 hx} {18 hx}
X {19 hx} {gn hx} {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12}
X {13} {14} {15} {16} {17} {18} {19} {gn} {0 wh} {1 wh} {2 wh} {3 wh}
X {4 wh} {5 wh} {6 wh} {7 wh} {8 wh} {9 wh} {10 wh} {11 wh} {12 wh}
X {13 wh} {14 wh} {gn wh} {0 bl} {1 bl} {2 bl} {3 bl} {4 bl} {5 bl} {6 bl}
X {7 bl} {8 bl} {9 bl} {10 bl} {11 bl} {12 bl} {13 bl} {14 bl} {gn bl}
X {0 fl} {1 fl} {2 fl} {3 fl} {4 fl} {5 fl} {6 fl} {7 fl} {8 fl} {9 fl}
X {10 fl} {11 fl} {12 fl} {13 fl} {14 fl} {gn fl}
X ] def
X /sl FMLOCAL
X /val FMLOCAL
X /ws FMLOCAL
X /im FMLOCAL
X /bs FMLOCAL
X /cs FMLOCAL
X /len FMLOCAL
X /pos FMLOCAL
X/ms {
X /sl exch def
X /val 255 def
X /ws cfs
X /im cfs
X /val 0 def
X /bs cfs
X /cs cfs
X } bind def
X400 ms
X/ip {
X is
X 0
X cf cs readline pop
X { ic exch get exec
X add
X } forall
X pop
X
X } bind def
X/rip {
X
X
X bis ris copy pop
X is
X 0
X cf cs readline pop
X { ic exch get exec
X add
X } forall
X pop pop
X ris gis copy pop
X dup is exch
X
X cf cs readline pop
X { ic exch get exec
X add
X } forall
X pop pop
X gis bis copy pop
X dup add is exch
X
X cf cs readline pop
X { ic exch get exec
X add
X } forall
X pop
X
X } bind def
X/wh {
X /len exch def
X /pos exch def
X ws 0 len getinterval im pos len getinterval copy pop
X pos len
X } bind def
X/bl {
X /len exch def
X /pos exch def
X bs 0 len getinterval im pos len getinterval copy pop
X pos len
X } bind def
X/s1 1 string def
X/fl {
X /len exch def
X /pos exch def
X /val cf s1 readhexstring pop 0 get def
X pos 1 pos len add 1 sub {im exch val put} for
X pos len
X } bind def
X/hx {
X 3 copy getinterval
X cf exch readhexstring pop pop
X } bind def
X /h FMLOCAL
X /w FMLOCAL
X /d FMLOCAL
X /lb FMLOCAL
X /bitmapsave FMLOCAL
X /is FMLOCAL
X /cf FMLOCAL
X/wbytes {
X dup dup
X 24 eq { pop pop 3 mul }
X { 8 eq {pop} {1 eq {7 add 8 idiv} {3 add 4 idiv} ifelse} ifelse } ifelse
X } bind def
X/BEGINBITMAPBWc {
X 1 {} COMMONBITMAPc
X } bind def
X/BEGINBITMAPGRAYc {
X 8 {} COMMONBITMAPc
X } bind def
X/BEGINBITMAP2BITc {
X 2 {} COMMONBITMAPc
X } bind def
X/COMMONBITMAPc {
X
X /r exch def
X /d exch def
X gsave
X
X 3 index 2 div add exch
X 4 index 2 div add exch
X translate
X rotate
X 1 index 2 div neg
X 1 index 2 div neg
X translate
X scale
X /h exch def /w exch def
X /lb w d wbytes def
X sl lb lt {lb ms} if
X /bitmapsave save def
X r
X /is im 0 lb getinterval def
X ws 0 lb getinterval is copy pop
X /cf currentfile def
X w h d [w 0 0 h neg 0 h]
X {ip} image
X bitmapsave restore
X grestore
X } bind def
X/BEGINBITMAPBW {
X 1 {} COMMONBITMAP
X } bind def
X/BEGINBITMAPGRAY {
X 8 {} COMMONBITMAP
X } bind def
X/BEGINBITMAP2BIT {
X 2 {} COMMONBITMAP
X } bind def
X/COMMONBITMAP {
X /r exch def
X /d exch def
X gsave
X
X 3 index 2 div add exch
X 4 index 2 div add exch
X translate
X rotate
X 1 index 2 div neg
X 1 index 2 div neg
X translate
X scale
X /h exch def /w exch def
X /bitmapsave save def
X r
X /is w d wbytes string def
X /cf currentfile def
X w h d [w 0 0 h neg 0 h]
X {cf is readhexstring pop} image
X bitmapsave restore
X grestore
X } bind def
X/ngrayt 256 array def
X/nredt 256 array def
X/nbluet 256 array def
X/ngreent 256 array def
X /gryt FMLOCAL
X /blut FMLOCAL
X /grnt FMLOCAL
X /redt FMLOCAL
X /indx FMLOCAL
X /cynu FMLOCAL
X /magu FMLOCAL
X /yelu FMLOCAL
X /k FMLOCAL
X /u FMLOCAL
XFMLevel1 {
X/colorsetup {
X currentcolortransfer
X /gryt exch def
X /blut exch def
X /grnt exch def
X /redt exch def
X 0 1 255 {
X /indx exch def
X /cynu 1 red indx get 255 div sub def
X /magu 1 green indx get 255 div sub def
X /yelu 1 blue indx get 255 div sub def
X /k cynu magu min yelu min def
X /u k currentundercolorremoval exec def
X% /u 0 def
X nredt indx 1 0 cynu u sub max sub redt exec put
X ngreent indx 1 0 magu u sub max sub grnt exec put
X nbluet indx 1 0 yelu u sub max sub blut exec put
X ngrayt indx 1 k currentblackgeneration exec sub gryt exec put
X } for
X {255 mul cvi nredt exch get}
X {255 mul cvi ngreent exch get}
X {255 mul cvi nbluet exch get}
X {255 mul cvi ngrayt exch get}
X setcolortransfer
X {pop 0} setundercolorremoval
X {} setblackgeneration
X } bind def
X}
X{
X/colorSetup2 {
X [ /Indexed /DeviceRGB 255
X {dup red exch get 255 div
X exch dup green exch get 255 div
X exch blue exch get 255 div}
X ] setcolorspace
X} bind def
X} ifelse
X /tran FMLOCAL
X/fakecolorsetup {
X /tran 256 string def
X 0 1 255 {/indx exch def
X tran indx
X red indx get 77 mul
X green indx get 151 mul
X blue indx get 28 mul
X add add 256 idiv put} for
X currenttransfer
X {255 mul cvi tran exch get 255.0 div}
X exch concatprocs settransfer
X} bind def
X/BITMAPCOLOR {
X /d 8 def
X gsave
X
X 3 index 2 div add exch
X 4 index 2 div add exch
X translate
X rotate
X 1 index 2 div neg
X 1 index 2 div neg
X translate
X scale
X /h exch def /w exch def
X /bitmapsave save def
X FMLevel1 {
X colorsetup
X /is w d wbytes string def
X /cf currentfile def
X w h d [w 0 0 h neg 0 h]
X {cf is readhexstring pop} {is} {is} true 3 colorimage
X } {
X colorSetup2
X /is w d wbytes string def
X /cf currentfile def
X 7 dict dup begin
X /ImageType 1 def
X /Width w def
X /Height h def
X /ImageMatrix [w 0 0 h neg 0 h] def
X /DataSource {cf is readhexstring pop} bind def
X /BitsPerComponent d def
X /Decode [0 255] def
X end image
X } ifelse
X bitmapsave restore
X grestore
X } bind def
X/BITMAPCOLORc {
X /d 8 def
X gsave
X
X 3 index 2 div add exch
X 4 index 2 div add exch
X translate
X rotate
X 1 index 2 div neg
X 1 index 2 div neg
X translate
X scale
X /h exch def /w exch def
X /lb w d wbytes def
X sl lb lt {lb ms} if
X /bitmapsave save def
X FMLevel1 {
X colorsetup
X /is im 0 lb getinterval def
X ws 0 lb getinterval is copy pop
X /cf currentfile def
X w h d [w 0 0 h neg 0 h]
X {ip} {is} {is} true 3 colorimage
X } {
X colorSetup2
X /is im 0 lb getinterval def
X ws 0 lb getinterval is copy pop
X /cf currentfile def
X 7 dict dup begin
X /ImageType 1 def
X /Width w def
X /Height h def
X /ImageMatrix [w 0 0 h neg 0 h] def
X /DataSource {ip} bind def
X /BitsPerComponent d def
X /Decode [0 255] def
X end image
X } ifelse
X bitmapsave restore
X grestore
X } bind def
X/BITMAPTRUECOLORc {
X /d 24 def
X gsave
X
X 3 index 2 div add exch
X 4 index 2 div add exch
X translate
X rotate
X 1 index 2 div neg
X 1 index 2 div neg
X translate
X scale
X /h exch def /w exch def
X /lb w d wbytes def
X sl lb lt {lb ms} if
X /bitmapsave save def
X
X /is im 0 lb getinterval def
X /ris im 0 w getinterval def
X /gis im w w getinterval def
X /bis im w 2 mul w getinterval def
X
X ws 0 lb getinterval is copy pop
X /cf currentfile def
X w h 8 [w 0 0 h neg 0 h]
X {w rip pop ris} {gis} {bis} true 3 colorimage
X bitmapsave restore
X grestore
X } bind def
X/BITMAPTRUECOLOR {
X gsave
X
X 3 index 2 div add exch
X 4 index 2 div add exch
X translate
X rotate
X 1 index 2 div neg
X 1 index 2 div neg
X translate
X scale
X /h exch def /w exch def
X /bitmapsave save def
X /is w string def
X /gis w string def
X /bis w string def
X /cf currentfile def
X w h 8 [w 0 0 h neg 0 h]
X { cf is readhexstring pop }
X { cf gis readhexstring pop }
X { cf bis readhexstring pop }
X true 3 colorimage
X bitmapsave restore
X grestore
X } bind def
X/BITMAPTRUEGRAYc {
X /d 24 def
X gsave
X
X 3 index 2 div add exch
X 4 index 2 div add exch
X translate
X rotate
X 1 index 2 div neg
X 1 index 2 div neg
X translate
X scale
X /h exch def /w exch def
X /lb w d wbytes def
X sl lb lt {lb ms} if
X /bitmapsave save def
X
X /is im 0 lb getinterval def
X /ris im 0 w getinterval def
X /gis im w w getinterval def
X /bis im w 2 mul w getinterval def
X ws 0 lb getinterval is copy pop
X /cf currentfile def
X w h 8 [w 0 0 h neg 0 h]
X {w rip pop ris gis bis w gray} image
X bitmapsave restore
X grestore
X } bind def
X/ww FMLOCAL
X/r FMLOCAL
X/g FMLOCAL
X/b FMLOCAL
X/i FMLOCAL
X/gray {
X /ww exch def
X /b exch def
X /g exch def
X /r exch def
X 0 1 ww 1 sub { /i exch def r i get .299 mul g i get .587 mul
X b i get .114 mul add add r i 3 -1 roll floor cvi put } for
X r
X } bind def
X/BITMAPTRUEGRAY {
X gsave
X
X 3 index 2 div add exch
X 4 index 2 div add exch
X translate
X rotate
X 1 index 2 div neg
X 1 index 2 div neg
X translate
X scale
X /h exch def /w exch def
X /bitmapsave save def
X /is w string def
X /gis w string def
X /bis w string def
X /cf currentfile def
X w h 8 [w 0 0 h neg 0 h]
X { cf is readhexstring pop
X cf gis readhexstring pop
X cf bis readhexstring pop w gray} image
X bitmapsave restore
X grestore
X } bind def
X/BITMAPGRAY {
X 8 {fakecolorsetup} COMMONBITMAP
X } bind def
X/BITMAPGRAYc {
X 8 {fakecolorsetup} COMMONBITMAPc
X } bind def
X/ENDBITMAP {
X } bind def
Xend
X /ALDsave FMLOCAL
X /ALDmatrix matrix def ALDmatrix currentmatrix pop
X/StartALD {
X /ALDsave save def
X savematrix
X ALDmatrix setmatrix
X } bind def
X/InALD {
X restorematrix
X } bind def
X/DoneALD {
X ALDsave restore
X } bind def
X/I { setdash } bind def
X/J { [] 0 setdash } bind def
X%%EndProlog
X%%BeginSetup
X(4.0) FMVERSION
X1 1 0 0 612 792 0 1 12 FMDOCUMENT
X0 0 /Helvetica-Bold FMFONTDEFINE
X1 0 /Times-Roman FMFONTDEFINE
X2 0 /Helvetica FMFONTDEFINE
X3 0 /Times-Bold FMFONTDEFINE
X4 0 /Courier FMFONTDEFINE
X5 0 /Courier-Bold FMFONTDEFINE
X6 0 /Bookman-Demi FMFONTDEFINE
X7 0 /Bookman-Light FMFONTDEFINE
X32 FMFILLS
X0 0 FMFILL
X1 0.1 FMFILL
X2 0.3 FMFILL
X3 0.5 FMFILL
X4 0.7 FMFILL
X5 0.9 FMFILL
X6 0.97 FMFILL
X7 1 FMFILL
X8 <0f1e3c78f0e1c387> FMFILL
X9 <0f87c3e1f0783c1e> FMFILL
X10 <cccccccccccccccc> FMFILL
X11 <ffff0000ffff0000> FMFILL
X12 <8142241818244281> FMFILL
X13 <03060c183060c081> FMFILL
X14 <8040201008040201> FMFILL
X16 1 FMFILL
X17 0.9 FMFILL
X18 0.7 FMFILL
X19 0.5 FMFILL
X20 0.3 FMFILL
X21 0.1 FMFILL
X22 0.03 FMFILL
X23 0 FMFILL
X24 <f0e1c3870f1e3c78> FMFILL
X25 <f0783c1e0f87c3e1> FMFILL
X26 <3333333333333333> FMFILL
X27 <0000ffff0000ffff> FMFILL
X28 <7ebddbe7e7dbbd7e> FMFILL
X29 <fcf9f3e7cf9f3f7e> FMFILL
X30 <7fbfdfeff7fbfdfe> FMFILL
X%%EndSetup
X%%Page: "15" 1
X%%BeginPaperSize: Letter
X%%EndPaperSize
X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
XJ
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T
X(-15-) 295.33 748 T
X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X1 14 Q
X( -t text_font size) 72 710.67 T
X( Sets the size, in points, of the font used to display the lyrics to the) 108 694.67 T
X(speci\336ed integer value. The title line is displayed using that point size) 108 678.67 T
X(+ 5. The sub-title is displayed using that point size -2.) 108 662.67 T
X( -T T) 72 625.67 T
X(ext_font) 99.79 625.67 T
X( Sets the font used to print text to the speci\336ed name. That name must) 108 609.67 T
X(be known to your PostScript Interpreter) 108 593.67 T
X(.) 329.26 593.67 T
X( -V) 72 556.67 T
X(Prints version and patch level) 108 540.67 T
X( -x halftones) 72 503.67 T
X-0.21 ( Sets up transposition to that number of halftones. Can not be zero. All) 108 487.67 P
X2 12 Q
X(chord) 108 471.67 T
X1 14 Q
X(names must be build in the following way in order to be recog-) 141.35 471.67 T
X(nized:) 108 455.67 T
X( {note-name}[#|b][^/]* [ \324/\325 {note-name}[#|b][^/]* ]) 108 418.67 T
X( That is, a valid note name, possibly followed by \324#\325 or \324b\325, followed) 108 376.67 T
X-0.19 (by other modi\336er \050\3247\325, \324m\325, etc...\051. Many such construct can make up a) 108 360.67 P
X(chord name, as long as they are separated by \324/\325.) 108 344.67 T
X( {note-name} must appear in the list \324A) 108 302.67 T
X(\325,\325B\325,\325C\325,\325D\325,\325E\325,\325F\325,\325G\325.) 327.91 302.67 T
X(-2) 72 260.67 T
X(Prints two logical pages per physical page.) 108 244.67 T
X( -4) 72 207.67 T
X(Prints four logical pages per physical page.) 108 191.67 T
XFMENDPAGE
X%%EndPage: "15" 1
X%%Page: "14" 2
X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T
X(-14-) 295.33 748 T
X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X1 14 Q
X( - g) 72 710.67 T
X(Disable printing of grids for \322easy\323 chords.) 108 694.67 T
X(Whether a built-in chord is easy or not has been arbitrarily decided by) 108 662.67 T
X(the authors. The general rule was that any chord in its major) 108 646.67 T
X(, minor) 444.15 646.67 T
X(,) 484.04 646.67 T
X(7th or minor 7th was \322easy\323 while everything else \050maj7, aug, dim,) 108 630.67 T
X-0.51 (sus, etc...\051 was \322tough\323. All chords de\336ned in the $HOME/.chordrc \336le) 108 614.67 P
X(or in the input \336le are de\336ned as \322tough\323.) 108 598.67 T
X( -h) 72 561.67 T
X(Prints a short options summary) 108 545.67 T
X(.) 281.32 545.67 T
X( -i) 72 508.67 T
X(Generates a table of contents with the song titles and page numbers. It) 108 492.67 T
X(implies page numbering through the document. Index pages are not) 108 476.67 T
X(numbered.) 108 460.67 T
X( -L) 72 423.67 T
X(Places the odd page numbers on the left.) 108 407.67 T
X( -l) 72 370.67 T
X(Prints only the lyrics of the song.) 108 354.67 T
X( -o \336lename) 72 317.67 T
X( Sends output to <\336lename>.) 108 301.67 T
X( -p \336rst_page) 72 264.67 T
X( Numbers the pages consecutively starting with \336rst_page \050e.g. 1\051.) 108 248.67 T
X(W) 108 232.67 T
X(ithout this option, each song restarts the page numbering at 1, and) 120.66 232.67 T
X(page numbers are only put on subsequent pages of multiple page) 108 216.67 T
X(songs.) 108 200.67 T
X( -R) 72 163.67 T
X(Places the odd and even page numbers in the lower right and left cor-) 108 147.67 T
X(ners respectively \050for two-sided output\051. The default is all page num-) 108 131.67 T
X(bers on the right.) 108 115.67 T
XFMENDPAGE
X%%EndPage: "14" 2
X%%Page: "13" 3
X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T
X(-13-) 295.33 748 T
X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X3 14 Q
X(Options and Switches) 72 710.67 T
X1 F
X(Here are the options you can specify when invoking) 72 673.67 T
X2 12 Q
X(CHORD) 367.11 673.67 T
X1 14 Q
X(;) 411.1 673.67 T
X( -A) 72 657.67 T
X(W) 108 641.67 T
X(ill print the \322About) 120.66 641.67 T
X2 12 Q
X(CHORD) 231.1 641.67 T
X1 14 Q
X(...\323 message.) 275.09 641.67 T
X( -a) 72 604.67 T
X(Automatically single spaces lines that have no chords.) 108 588.67 T
X( -c chord_font size) 72 551.67 T
X( Sets the size, in points, of the font used to display chords to the speci-) 108 535.67 T
X(\336ed integer value.) 108 519.67 T
X( -C chord_font) 72 477.67 T
X( Sets the font used to print chords to the speci\336ed name. That name) 108 461.67 T
X(must be known to your PostScript Interpreter) 108 445.67 T
X(.) 359.99 445.67 T
X( -d) 72 408.67 T
X-0.32 ( Generates a text Chord Chart of all internally known chords as well as) 108 392.67 P
X(chords de\336ned in the $HOME/.chordrc \336le. Chords de\336ned in the) 108 376.67 T
X(.chordrc \336le are identi\336ed with the \322\050local\051\323 caption. The printout is) 108 360.67 T
X(suitable for input to the .chordrc \336le.) 108 344.67 T
X( -D) 72 307.67 T
X(Generates a PostScript Chord Chart of all internally known chords as) 108 291.67 T
X(well as chords de\336ned in the $HOME/.chordrc \336le. chords de\336ned in) 108 275.67 T
X-0.18 (the .chordrc \336le are identi\336ed with a small asterisk after the chord grid.) 108 259.67 P
X( -s grid_size) 72 222.67 T
X( Sets the size of the chord grids.) 108 206.67 T
X( -G) 72 169.67 T
X(Disable printing of the chord grids for the whole input \336le\050s\051. The) 108 153.67 T
X-0.2 (ef) 108 137.67 P
X-0.2 (fect can be disable for any particular song by the usage of the grid or) 118.63 137.67 P
X(g directive.) 108 121.67 T
XFMENDPAGE
X%%EndPage: "13" 3
X%%Page: "12" 4
X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T
X(-12-) 295.33 748 T
X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X3 14 Q
X(How do I install) 72 710.67 T
X2 12 Q
X(CHORD) 170.8 710.67 T
X3 14 Q
X( on my machine?) 214.79 710.67 T
X2 12 Q
X(CHORD) 72 689.67 T
X1 14 Q
X( is distributed in source format. That means you will need to compile it on) 115.99 689.67 T
X-0.29 (your machine. Doing so requires a C compiler) 72 673.67 P
X-0.29 (. This compiler can implement one of) 328.16 673.67 P
X(two norms about the C language: ANSI or K&R. Both types of compilers will do,) 72 657.67 T
X(but we prefer the \336rst type.) 72 641.67 T
X-0.13 (The \336rst step is to modify the \336le called \322Make\336le\323 to let the system know of some) 72 609.67 P
X(basic preferences:) 72 593.67 T
X(1. If you are running on a system that has a routine called \322getopt\323, make sure the) 72 561.67 T
X(line that says) 72 545.67 T
X4 12 Q
X(GETOPT = getopt.o) 90 531 T
X1 14 Q
X(is commented OUT) 72 515.67 T
X(. T) 181.4 515.67 T
X(o do so, add a \324#\325 at the very beginning of the line. If you do) 195.97 515.67 T
X(not know what we are talking about you should leave the line untouched.) 72 499.67 T
X(2. Select ONE format of paper: US \0508.5 by 1) 72 467.67 T
X(1 inches\051 or A4. The other line should) 321.49 467.67 T
X(be commented out, as outlined in the previous point.) 72 451.67 T
X-0.22 (3. Select the directory in which) 72 419.67 P
X2 12 Q
X-0.21 (CHORD) 249.13 419.67 P
X1 14 Q
X-0.22 ( will be installed, by modifying the value of) 293.13 419.67 P
X(the variable BINDIR. In case of doubt, leave the line unchanged.) 72 403.67 T
X(4.Select the directory in which the manual page for) 72 371.67 T
X2 12 Q
X(CHORD) 362.05 371.67 T
X1 14 Q
X( will be installed, by) 406.04 371.67 T
X(modifying the value of the variable MANDIR. In case of doubt, leave the line) 72 355.67 T
X(unchanged.) 72 339.67 T
X(Save the Make\336le \336le, and invoke the \322make\323 utility) 72 291.67 T
X4 12 Q
X(% make) 90 277 T
X1 14 Q
X(This should build the) 72 245.67 T
X2 12 Q
X(CHORD) 194.12 245.67 T
X1 14 Q
X( utility correctly) 238.11 245.67 T
X(. If you have problems at this point,) 327.42 245.67 T
X(\336rst try to contact someone who may be an experienced system administrator or) 72 229.67 T
X(programmer for assistance. If all else fails, send a detailed message to the authors,) 72 213.67 T
X(and they will do their best to help) 72 197.67 T
X(If the \322make\323 succeeded, invoke) 72 165.67 T
X4 12 Q
X(% make install) 90 151 T
X1 14 Q
X(to have the utility installed in the right spot. Y) 72 135.67 T
X(ou could also manually install the) 328.83 135.67 T
X2 12 Q
X(CHORD) 72 119.67 T
X1 14 Q
X( binary in the location of your choice.) 115.99 119.67 T
X(Included with the distribution are two sample \336les, under the \322song\323 subdirectory) 72 87.67 T
X(.) 527.59 87.67 T
XFMENDPAGE
X%%EndPage: "12" 4
X%%Page: "11" 5
X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T
X(-11-) 295.33 748 T
X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X3 14 Q
X(Wher) 72 710.67 T
X(e to \336nd) 105.96 710.67 T
X2 12 Q
X(CHORD) 157.69 710.67 T
X3 14 Q
X( \336les) 201.69 710.67 T
X2 12 Q
X(CHORD) 72 689.67 T
X1 14 Q
X( having been around since 1991 there is a number of) 115.99 689.67 T
X2 12 Q
X(CHORD) 412.65 689.67 T
X1 14 Q
X( input \336les) 456.64 689.67 T
X-0.66 (freely available if you have access to the Internet.) 72 673.67 P
X3 F
X-0.66 (http://www) 347.49 673.67 P
X-0.66 (.nada.kth.se/~f91-jsc) 414.38 673.67 P
X1 F
X(is the home page of a) 72 657.67 T
X2 12 Q
X(CHORD) 194.86 657.67 T
X1 14 Q
X(archive.) 242.19 657.67 T
X3 F
X( FTP) 286.89 657.67 T
X(.NEV) 315.55 657.67 T
X(ADA.EDU) 346.8 657.67 T
X1 F
X( \050131.216.1.1) 410.18 657.67 T
X(1\051 con-) 484.32 657.67 T
X(tains chord and tab \336les for a great many pop and traditional songs. Many of the) 72 641.67 T
X(songs are in) 72 625.67 T
X2 12 Q
X(CHORD) 142.38 625.67 T
X1 14 Q
X( format. Look for \336le with the extensions CRD, .CHO, .CRD-) 186.37 625.67 T
X(PRO, .CHOPRO or .CHORDPRO. The songs are in the directory /pub/guitar) 72 609.67 T
X(. This) 502.88 609.67 T
X(site is available for anonymous FTP) 72 593.67 T
X(.) 272.27 593.67 T
X(The following USENET newsgroup are often used to post or request chord and tab) 72 561.67 T
END_OF_FILE
if test 55018 -ne `wc -c <'chord/chord_guide.ps.01'`; then
echo shar: \"'chord/chord_guide.ps.01'\" unpacked with wrong size!
elif test -f 'chord/chord_guide.ps.02' && test -f 'chord/chord_guide.ps.03'; then
echo shar: Combining \"'chord/chord_guide.ps'\" \(121332 characters\)
cat 'chord/chord_guide.ps.01' 'chord/chord_guide.ps.02' 'chord/chord_guide.ps.03'> 'chord/chord_guide.ps'
if test 121332 -ne `wc -c <'chord/chord_guide.ps'`; then
echo shar: \"'chord/chord_guide.ps'\" combined with wrong size!
else
rm chord/chord_guide.ps.01 chord/chord_guide.ps.02 chord/chord_guide.ps.03
fi
fi
# end of 'chord/chord_guide.ps.01'
fi
if test ! -d 'chord/songs' ; then
echo shar: Creating directory \"'chord/songs'\"
mkdir 'chord/songs'
fi
if test -f 'chord/songs/heaven' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/songs/heaven'\"
else
echo shar: Extracting \"'chord/songs/heaven'\" \(1158 characters\)
sed "s/^X//" >'chord/songs/heaven' <<'END_OF_FILE'
X{title:Heaven}
X{st:Bryan Adams}
X[C]Oh, [Am]thinking about all our [G]younger years
XThere was [Dm]only you and [Am]me,
Xwe were [Dm]young and wild and [G]free
X
X[C]Now, [Am]nothing can take you a[G]way from me
XWe've been [Dm]down that road be[Am]fore
XBut that's [Dm]over now, you keep me [G]comin' back for more
X
X{start_of_chorus}
X[F]Baby you're [G]all that I [Am]want
XWhen you're [C]lying here in my [F]arms
X[F]I'm finding it [G]hard to be[Am]lieve we're in [G]heaven
X
X[F]And love is [G]all that I [Am]need
XAnd I [C]found it here in your [F]heart
X[F]It isn't too [G]hard to [Am]see we're in [G]heaven
X{end_of_chorus}
X
X[C]Oh, [Am]once in your life you [G]find someone
XWho will [Dm]turn your world a[Am]round
XBring you [Dm]up when you're feeling [G]down
X
X[C]Yeah, [Am]nothing could change what you [G]mean to me
XOh there's [Dm]lots that I could [Am]say
XBut just [Dm]hold me now, 'cause our [G]love will light the way
X
X{c: chorus}
X
X[Dm]I've been waiting for so [F]long
XFor [C]something to [Am]arrive
XFor [Dm]love to come a[G]long
X
X[Dm]Now our dreams are coming [F]true
XThrough the [C]good times and the [Am]bad
X[G]Yeah, I'll be standing there by you
X
X{c: chorus}
END_OF_FILE
if test 1158 -ne `wc -c <'chord/songs/heaven'`; then
echo shar: \"'chord/songs/heaven'\" unpacked with wrong size!
fi
# end of 'chord/songs/heaven'
fi
echo shar: End of archive 1 \(of 6\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 4 5 6 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 6 archives.
rm -f ark[1-9]isdone
else
echo You still must unpack the following archives:
echo " " ${MISSING}
fi
exit 0
exit 0 # Just in case...

Martin Leclerc - Sun Montreal SE

unread,
Apr 12, 1995, 3:00:00 AM4/12/95
to
Submitted-by: Martin....@canada.sun.com (Martin Leclerc - Sun Montreal SE)
Posting-number: Volume 47, Issue 116
Archive-name: chord/part02

Environment: UNIX, DOS, VMS, Amiga
Supersedes: chord: Volume 40, Issue 84-88

#! /bin/sh


# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".

# Contents: chord/chord_guide.ps.02 chord/common.c chord/patchlevel.h


# Wrapped by kent@ftp on Wed Apr 12 21:39:34 1995
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:

echo ' "shar: End of archive 2 (of 6)."'
if test -f 'chord/chord_guide.ps.02' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/chord_guide.ps.02'\"
else
echo shar: Extracting \"'chord/chord_guide.ps.02'\" \(55014 characters\)
sed "s/^X//" >'chord/chord_guide.ps.02' <<'END_OF_FILE'
X(\336les:) 72 545.67 T
X3 F
X( r) 99.23 545.67 T
X(ec.music.makers.guitar) 108.69 545.67 T
X(.tablatur) 246.22 545.67 T
X(e) 298.46 545.67 T
X1 F
X(,) 304.68 545.67 T
X3 F
X(alt.guitar) 311.68 545.67 T
X(.tab) 366 545.67 T
X(The authors) 72 515.67 T
X2 12 Q
X(CHORD) 72 494.67 T
X1 14 Q
X( has been developed by Martin Leclerc and Mario Dorion, both systems) 115.99 494.67 T
X(engineer with the Montr\216al \050Canada\051 subsidiary of Sun Microsystems. W) 72 478.67 T
X(e\325re still) 481.49 478.67 T
X(developing and supporting) 72 462.67 T
X2 12 Q
X(CHORD) 224.82 462.67 T
X1 14 Q
X(.) 268.82 462.67 T
X(Feel free to contact us via e-mail to suggest improvements and report bug \336xes.) 72 430.67 T
X(Our email addresses are) 72 414.67 T
X3 F
X(Martin.Lecler) 209.62 414.67 T
X(c...@Sun.Com) 293.73 414.67 T
X1 F
X( and) 368.59 414.67 T
X3 F
X(Mario....@Sun.Com) 72 398.67 T
X(Copyright) 72 368.67 T
X1 F
X-0.09 (Y) 72 347.67 P
X-0.09 (ou are authorized to use this program free of char) 80.71 347.67 P
X-0.09 (ge. Y) 356.02 347.67 P
X-0.09 (ou are authorized to distrib-) 384.85 347.67 P
X-0.25 (ute this program freely as long as the full source is included. Y) 72 331.67 P
X-0.25 (ou are not allowed to) 419.53 331.67 P
X-0.23 (remove the \324copyright\325 notices from the authors nor are you allowed to pretend you) 72 315.67 P
X-0.33 (wrote it. Y) 72 299.67 P
X-0.33 (ou are not allowed to char) 130.21 299.67 P
X-0.33 (ge any money for) 274.1 299.67 P
X2 12 Q
X-0.31 (CHORD) 374.64 299.67 P
X1 14 Q
X-0.33 (. Y) 418.63 299.67 P
X-0.33 (ou are not allowed) 434.01 299.67 P
X(to use parts of) 72 283.67 T
X2 12 Q
X(CHORD) 154.43 283.67 T
X1 14 Q
X( in any other commercial or public-domain software.) 198.42 283.67 T
X(The authors spent a great deal of time making it as feature-full and usable as possi-) 72 251.67 T
X-0.54 (ble. If you like this program, please take the time to send a postcard from your home) 72 235.67 P
X(town or locality to each of the two authors and let them know what you think of) 72 219.67 T
X2 12 Q
X(CHORD) 72 203.67 T
X1 14 Q
X(. Please send the cards to the following addresses:) 115.99 203.67 T
X(Martin Leclerc) 144 187.67 T
X(Mario Dorion) 324 187.67 T
X(19 Browning) 144 171.67 T
X(18 Geor) 324 171.67 T
X(gia Crescent) 369.23 171.67 T
X(Dollard des Ormeaux) 144 155.67 T
X(Pointe Claire) 324 155.67 T
X(Quebec, H9G 2K5) 144 139.67 T
X(Quebec, H9R 5V7) 324 139.67 T
X(CANADA) 144 123.67 T
X(CANADA) 324 123.67 T
XFMENDPAGE
X%%EndPage: "11" 5
X%%Page: "10" 6


X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T

X(-10-) 295.33 748 T


X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X3 14 Q

X(About the chords) 72 710.67 T
X2 12 Q
X(CHORD) 178.95 710.67 T
X3 14 Q
X( knows about:) 222.94 710.67 T
X2 12 Q
X-0.17 (CHORD) 72 689.67 P
X1 14 Q
X-0.18 ( knows of about 360 chords. Now) 115.99 689.67 P
X-0.18 (, we KNOW your favorite chord won\325) 303.37 689.67 P
X-0.18 (t be) 516.25 689.67 P
X(in there, and if it is, it will be all wrong. So we put in a facility for people to de\336ne) 72 673.67 T
X-0.23 (their own chords. This facility will also let you rede\336ne already de\336ned chords. For) 72 657.67 P
X(the details, look in the \322Directives\323 section of this guide, for the \322de\336ne\323 directive.) 72 641.67 T
X3 F
X(About your pr) 72 595.67 T
X(efer) 158.09 595.67 T
X(ences:) 181.14 595.67 T
X1 F
X(Y) 72 574.67 T
X(ou can store your preferences about fonts and chords in a \336le that is unique to) 80.71 574.67 T
X(every user) 72 558.67 T
X(. This \336le is called \322.chordrc\323 and should be in your home directory) 129.15 558.67 T
X(. For) 506.95 558.67 T
X(the list of the preferences you can have, see the \322Directives\323 section.) 72 542.67 T
X3 F
X(Putting comments in your \336les) 72 496.67 T
X1 F
X(A line starting with a \324#\325 is interpreted as a comment, and generates no output.) 72 475.67 T
X(\050although all your comments are automatically mailed to the authors, and we read) 72 459.67 T
X(them at parties...\051) 72 443.67 T
XFMENDPAGE
X%%EndPage: "10" 6
X%%Page: "9" 7


X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T

X(-9-) 298.67 748 T


X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN

X0 5 5 605 787 600 782 45 -44.01 FMBEGINEPSF
X%%BeginDocument: /home/martin/wrk/chord-martin/ex2.eps
X%!PS-Adobe-3.0 EPSF-3.0
X%%Title: A song
X%%Creator: Martin Leclerc & Mario Dorion
X%%BoundingBox: 5 5 605 787
X%%EndComments
X/inch {72 mul } def
X
X/CHORD_FONT { /Helvetica-Oblique findfont 9 scalefont } def
X/TEXT_FONT { /Times-Roman findfont 12 scalefont } def
X/MONO_FONT { /Courier findfont 10 scalefont } def
X% routines for the drawing of the chords
X/grid {
X currentpoint currentpoint
X 6 { 0 cagesizeX rlineto incr cagesize neg incr add rmoveto } repeat
X moveto
X 5 { cagesize 0 rlineto 0 cagesize sub incr rmoveto } repeat
X 1 setlinewidth stroke moveto
X currentpoint
X 0 cagesizeX rmoveto cagesize 0 rlineto
X cagesize 30 div setlinewidth stroke
X moveto
X} def
X
X/dot {
X /fret exch def /str exch def
X /x 5 fret abs sub incr mul half-incr sub def
X /y 6 str sub incr mul def
X currentpoint
X y x rmoveto
X 0 setgray
X fret -1 eq
X {
X 0 incr rmoveto
X check neg check neg rmoveto
X check check rlineto check check rlineto
X check neg check neg rmoveto check neg check rmoveto
X check check neg rlineto check check neg rlineto
X cagesize 50 div setlinewidth stroke
X }
X { fret 0 ne
X { currentpoint dot-size 0 360 arc fill}
X { currentpoint
X check 0 360 newpath arc
X cagesize 50 div setlinewidth
X }
X ifelse
X stroke
X }
X ifelse
X moveto
X} def
X
X/dots {
X grid
X /origin exch def
X /fret-displ exch def
X 1 1 6
X {
X /str exch def
X /fret exch def
X fret -2 ne {str fret dot} if
X } for
X
X fret-displ 1 ne
X {
X currentpoint displ-font setfont
X 0 cagesize fret-displ 10 ge {1.75} {3} ifelse div sub
X cagesizeX incr sub rmoveto
X /char 6 string def fret-displ char cvs show moveto
X } if
X
X /chord-name exch def
X currentpoint displ-font setfont
X 0 cagesizeX cagesizeX 15 div add dot-size 3 mul add rmoveto
X chord-name stringwidth pop 2 div cagesize 2 div exch sub 0 rmoveto
X chord-name show
X 0 cagesize 10 div rmoveto
X origin 1 eq { (*) show} if
X origin 2 eq { (**) show} if
X chord-font setfont moveto
X} def
X
X/cagesize 30 def
X/incr cagesize 5 div def
X/cagesizeX incr 4 mul def
X/half-incr incr 2 div def
X/dot-size cagesize 15 div def
X/check cagesize 20 div def
X
X/chord-font /Times-Roman findfont cagesize 5 div scalefont def
X/displ-font /Times-Roman findfont cagesize 3 div scalefont def
X% end of the routines for the drawing of the chords
X
X%%EndProlog
X/TEXT_FONT { /Times-Roman findfont 17 scalefont } def
X/MONO_FONT { /Courier findfont 15 scalefont } def
XTEXT_FONT setfont
X( Everybody Hurts) dup stringwidth pop 2 div
X612 2 div exch sub 756 moveto
Xshow
X/TEXT_FONT { /Times-Roman findfont 12 scalefont } def
X/MONO_FONT { /Courier findfont 10 scalefont } def
XTEXT_FONT setfont
X( REM) dup stringwidth pop 2 div
X612 2 div exch sub 739 moveto
Xshow
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X717 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(Intro ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X717 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(Intro ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X717 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(Intro ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X717 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 706 moveto
X(Intro ) show
X/minhpos 0 def
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X676 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(When your day is ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X676 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(When your day is long and the ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X676 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(When your day is long and the night, the night is ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X676 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(When your day is long and the night, the night is yours a) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X676 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X72 665 moveto
X(When your day is long and the night, the night is yours alone) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X655 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(When you're sure you've had e) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X655 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(When you're sure you've had enough of this ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X655 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(When you're sure you've had enough of this life, well ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X655 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 644 moveto
X(When you're sure you've had enough of this life, well hang on) show
XMONO_FONT setfont
X72 633 moveto
X( E\(low\)-3-2-0-) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E) stringwidth pop add def
X623 moveto
XCHORD_FONT setfont
X(E) show
XTEXT_FONT setfont
X(Don't let yourself ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X623 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X(Don't let yourself go, ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E) stringwidth pop add def
X623 moveto
XCHORD_FONT setfont
X(E) show
XTEXT_FONT setfont
X(Don't let yourself go, cause everybody ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X623 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X(Don't let yourself go, cause everybody cries ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E) stringwidth pop add def
X623 moveto
XCHORD_FONT setfont
X(E) show
XTEXT_FONT setfont
X(Don't let yourself go, cause everybody cries and everybody) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X623 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X(Don't let yourself go, cause everybody cries and everybody hurts some) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X623 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(Don't let yourself go, cause everybody cries and everybody hurts sometimes ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X623 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 612 moveto
X(Don't let yourself go, cause everybody cries and everybody hurts sometimes ) show
X/minhpos 0 def
XTEXT_FONT setfont
X(Sometimes everything is ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X602 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(Sometimes everything is wrong, ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X602 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(Sometimes everything is wrong, now it's time to sing a) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X602 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X72 591 moveto
X(Sometimes everything is wrong, now it's time to sing along) show
X/minhpos 0 def
XTEXT_FONT setfont
X(When your day is night alone ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X581 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(When your day is night alone \(hold ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X581 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X72 570 moveto
X(When your day is night alone \(hold on, hold on\)) show
X/minhpos 0 def
XTEXT_FONT setfont
X(If you feel like letting go ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X560 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(If you feel like letting go \(hold ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X560 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X72 549 moveto
X(If you feel like letting go \(hold on\)) show
X/minhpos 0 def
XTEXT_FONT setfont
X(If you think you've had too ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X539 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(If you think you've had too much of this ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X539 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(If you think you've had too much of this life, well hang ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X539 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 528 moveto
X(If you think you've had too much of this life, well hang on) show
X/minhpos 0 def
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E) stringwidth pop add def
X498 moveto
XCHORD_FONT setfont
X(E) show
XTEXT_FONT setfont
X(Cause everybody ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X498 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X(Cause everybody hurts, ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E) stringwidth pop add def
X498 moveto
XCHORD_FONT setfont
X(E) show
XTEXT_FONT setfont
X(Cause everybody hurts, take comfort in your ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X498 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X72 487 moveto
X(Cause everybody hurts, take comfort in your friends) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E) stringwidth pop add def
X477 moveto
XCHORD_FONT setfont
X(E) show
XTEXT_FONT setfont
X(Everybody ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X477 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X(Everybody hurts, ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E) stringwidth pop add def
X477 moveto
XCHORD_FONT setfont
X(E) show
XTEXT_FONT setfont
X(Everybody hurts, don't throw your ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X477 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X(Everybody hurts, don't throw your hands, oh ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E) stringwidth pop add def
X477 moveto
XCHORD_FONT setfont
X(E) show
XTEXT_FONT setfont
X(Everybody hurts, don't throw your hands, oh now, don't throw your ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X477 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X72 466 moveto
X(Everybody hurts, don't throw your hands, oh now, don't throw your hands) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (C) stringwidth pop add def
X456 moveto
XCHORD_FONT setfont
X(C) show
XTEXT_FONT setfont
X(If you feel like you're ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D4) stringwidth pop add def
X456 moveto
XCHORD_FONT setfont
X(D4) show
XTEXT_FONT setfont
X(If you feel like you're alone, no, no, no, you're not ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X456 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X72 445 moveto
X(If you feel like you're alone, no, no, no, you're not alone) show
XMONO_FONT setfont
X72 434 moveto
X( D4 -> E-0-----0-----0-----0--) show
XMONO_FONT setfont
X72 423 moveto
X( B---3-----3-----3------) show
XMONO_FONT setfont
X72 412 moveto
X( G-----0-----0-----0----) show
X/minhpos 0 def
XTEXT_FONT setfont
X( ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X402 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X( If you're on your ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X402 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X( If you're on your own in this ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X402 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X( If you're on your own in this life, the days and nights are ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X402 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 391 moveto
X( If you're on your own in this life, the days and nights are long) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X381 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(When you think you've had too ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X381 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(When you think you've had too much, with this ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X381 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(When you think you've had too much, with this life, to hang ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X381 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 370 moveto
X(When you think you've had too much, with this life, to hang on) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E) stringwidth pop add def
X360 moveto
XCHORD_FONT setfont
X(E) show
XTEXT_FONT setfont
X(Well everybody ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X360 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X(Well everybody hurts, some) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E) stringwidth pop add def
X360 moveto
XCHORD_FONT setfont
X(E) show
XTEXT_FONT setfont
X72 349 moveto
X(Well everybody hurts, sometimes ) show
X/minhpos 0 def
XTEXT_FONT setfont
X(Everybody ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X339 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X(Everybody cries, ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E) stringwidth pop add def
X339 moveto
XCHORD_FONT setfont
X(E) show
XTEXT_FONT setfont
X(Everybody cries, and everybody ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A) stringwidth pop add def
X339 moveto
XCHORD_FONT setfont
X(A) show
XTEXT_FONT setfont
X(Everybody cries, and everybody hurts,) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (N.C.) stringwidth pop add def
X339 moveto
XCHORD_FONT setfont
X(N.C.) show
XTEXT_FONT setfont
X(Everybody cries, and everybody hurts, ... some) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X339 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(Everybody cries, and everybody hurts, ... sometimes ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X339 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 328 moveto
X(Everybody cries, and everybody hurts, ... sometimes ) show
X1 setlinewidth
Xnewpath
X62 369 moveto
X0 -41 rlineto
Xclosepath
Xstroke
X/minhpos 0 def
XTEXT_FONT setfont
X(But everybody ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X318 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(But everybody hurts ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X318 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(But everybody hurts sometimes so hold ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X318 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(But everybody hurts sometimes so hold on, hold ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X318 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(But everybody hurts sometimes so hold on, hold on, hold ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X318 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X72 307 moveto
X(But everybody hurts sometimes so hold on, hold on, hold on) show
X/minhpos 0 def
XTEXT_FONT setfont
X(Hold on, ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X297 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(Hold on, hold on, ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X297 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(Hold on, hold on, hold on, ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X297 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(Hold on, hold on, hold on, hold on, ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X297 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X72 286 moveto
X(Hold on, hold on, hold on, hold on, hold on) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X276 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(Everybody ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X276 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(Everybody hurts ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X276 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(Everybody hurts ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X276 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(Everybody hurts ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X276 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 265 moveto
X(Everybody hurts ) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X255 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(You are not alone ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X255 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(You are not alone ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X255 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(You are not alone ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X255 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(You are not alone ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D) stringwidth pop add def
X255 moveto
XCHORD_FONT setfont
X(D) show
XTEXT_FONT setfont
X(You are not alone ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X255 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 244 moveto
X(You are not alone ) show
X/minhpos 0 def
X480 234 moveto
X72 174 moveto
X(A) -1 0 2 2 2 0 1 0 dots
X132 174 moveto
X(C) -1 3 2 0 1 0 1 0 dots
X192 174 moveto
X(D) -1 -1 0 2 3 2 1 0 dots
X252 174 moveto
X(D4) -1 -1 0 0 3 -1 1 2 dots
X312 174 moveto
X(E) -1 3 3 2 0 0 1 2 dots
X372 174 moveto
X(G) 3 2 0 0 3 3 1 2 dots
X1 setlinewidth
X0 setgray
Xnewpath
X72 36 10 sub moveto
X468 0 rlineto
Xstroke
X%%Trailer
X%%EOF
X
X%%EndDocument
XFMENDEPSF
XFMENDPAGE
X%%EndPage: "9" 7
X%%Page: "8" 8


X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T

X(-8-) 298.67 748 T


X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X3 14 Q

X(Another example:) 72 710.67 T
X1 F
X(This example uses some of the more advanced directives:) 72 689.67 T
X4 10 Q
X({) 72 676.33 T
X5 F
X(title) 78 676.33 T
X4 F
X(: Everybody Hurts}) 108 676.33 T
X({) 72 664.33 T
X5 F
X(subtitle) 78 664.33 T
X4 F
X(: REM}) 126 664.33 T
X({) 72 652.33 T
X5 F
X(def) 78 652.33 T
X(ine) 96 652.33 T
X4 F
X(: G) 114 652.33 T
X5 F
X(base-fret) 138 652.33 T
X4 F
X( 1) 192 652.33 T
X5 F
X(frets) 210 652.33 T
X4 F
X( 3 2 0 0 3 3}) 240 652.33 T
X({) 72 640.33 T
X5 F
X(def) 78 640.33 T
X(ine) 96 640.33 T
X4 F
X(: D4) 114 640.33 T
X5 F
X(base-fret) 144 640.33 T
X4 F
X( 1) 198 640.33 T
X5 F
X(frets) 216 640.33 T
X4 F
X( - - 0 0 3 -}) 246 640.33 T
X({) 72 628.33 T
X5 F
X(def) 78 628.33 T
X(ine) 96 628.33 T
X4 F
X(: E) 114 628.33 T
X5 F
X(base-fret) 138 628.33 T
X4 F
X( 1) 192 628.33 T
X5 F
X(frets) 210 628.33 T
X4 F
X( - 3 3 2 0 0}) 240 628.33 T
X([D]Intro [G] [D] [G]) 72 616.33 T
X([D]When your day is [G]long and the [D]night, the night is [G]yours a[D]lone) 72 592.33 T
X([D]When you\325re sure you\325ve had e[G]nough of this [D]life, well [G]hang on) 72 580.33 T
X({) 72 568.33 T
X5 F
X(start_of_tab) 78 568.33 T
X4 F
X(}) 150 568.33 T
X( E\050low\051-3-2-0-) 108 556.33 T
X({) 72 544.33 T
X5 F
X(end_of_tab) 78 544.33 T
X4 F
X(}) 138 544.33 T
X([E]Don\325t let yourself [A]go, [E]cause everybody [A]cries [E]and everybody[A]) 72 532.33 T
X(hurts some[D]times [G]) 72 520.33 T
X(Sometimes everything is [D]wrong, [G]now it\325s time to sing a[D]long) 72 508.33 T
X(When your day is night alone [G] \050hold [D]on, hold on\051) 72 496.33 T
X(If you feel like letting go [G] \050hold [D]on\051) 72 484.33 T
X(If you think you\325ve had too [G]much of this [D]life, well hang [G]on) 72 472.33 T
X([E]Cause everybody [A]hurts, [E]take comfort in your [A]friends) 72 448.33 T
X([E]Everybody [A]hurts, [E]don\325t throw your [A]hands, oh [E]now, don\325t throw) 72 436.33 T
X(your [A]hands) 72 424.33 T
X([C]If you feel like you\325re [D4]alone, no, no, no, you\325re not [A]alone) 72 412.33 T
X({) 72 400.33 T
X5 F
X(start_of_tab) 78 400.33 T
X4 F
X(}) 150 400.33 T
X( D4->) 216 388.33 T
X(E-0-----0-----0-----0--) 252 388.33 T
X(B---3-----3-----3------) 252 376.33 T
X(G-----0-----0-----0----) 252 364.33 T
X({) 72 352.33 T
X5 F
X(end_of_tab) 78 352.33 T
X4 F
X(}) 138 352.33 T
X([D]If you\325re on your [G]own in this [D]life, the days and nights are [G]long) 72 340.33 T
X([D]When you think you\325ve had too [G]much, with this [D]life, to hang [G]on) 72 328.33 T
X({) 72 304.33 T
X5 F
X(start_of_chorus) 78 304.33 T
X4 F
X(}) 168 304.33 T
X([E]Well everybody [A]hurts, some[E]times) 72 292.33 T
X(Everybody [A]cries, [E]and everybody [A]hurts,[N.C.] ... some[D]times [G]) 72 280.33 T
X({) 72 268.33 T
X5 F
X(end_of_chorus) 78 268.33 T
X4 F
X(}) 156 268.33 T
X(But everybody [D]hurts [G]sometimes so hold [D]on, hold [G]on, hold [D]on) 72 256.33 T
X(Hold on, [G]hold on, [D]hold on, [G]hold on, [D]hold on) 72 244.33 T
X([G]Everybody [D]hurts [G] [D] [G]) 72 232.33 T
X([D]You are not alone [G] [D] [G] [D] [G]) 72 220.33 T
X(#Picking pattern for the chords:) 72 208.33 T
X(# D G) 72 196.33 T
X(#E----------2-----------2-------------3-----------3-----------------------) 72 184.33 T
X(#B--------3---3-------3---3---------3---3-------3---3---------------------) 72 172.33 T
X(#G------2-------2---2-------2-----0-------0---0---------------------------) 72 160.33 T
X(#D----0-----------0-------------------------------------------------------) 72 148.33 T
X(#A------------------------------------------------------------------------) 72 136.33 T
X(#E------------------------------3-----------3-----------------------------) 72 124.33 T
X1 14 Q
X-0.12 (See the result on the next page. Look for the tablatures and the modi\336ed de\336nitions) 72 93.67 P
X(of chords G, D4 and E.) 72 77.67 T
XFMENDPAGE
X%%EndPage: "8" 8
X%%Page: "7" 9


X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T

X(-7-) 298.67 748 T


X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X3 14 Q

X(chordsize) 75.5 710.67 T
X1 F
X(: n) 132.27 710.67 T
X( Same as -c command option.) 108 694.67 T
X3 F
X(no_grid) 75.5 657.67 T
X1 F
X( or) 122.18 657.67 T
X3 F
X(ng) 140.84 657.67 T
X1 F
X( W) 108 641.67 T
X(ill disable printing of the chord grids for the current song.) 124.16 641.67 T
X3 F
X(grid) 75.5 604.67 T
X1 F
X( or) 100.39 604.67 T
X3 F
X(g) 119.05 604.67 T
X1 F
X-0.33 (W) 108 588.67 P
X-0.33 (ill enable the printing of the chord grids for the current song \050subject) 120.66 588.67 P
X(to the limitation caused by the usage of the -g option\051. This directive) 108 572.67 T
X(will override the runtime -G option for the current song.) 108 556.67 T
X3 F
X(new_page) 75.5 519.67 T
X1 F
X( or) 134.61 519.67 T
X3 F
X(np) 153.27 519.67 T
X1 F
X(W) 108 503.67 T
X(ill force a logical page break \050which will obviously turn out to be a) 120.66 503.67 T
X(physical page break if you are not in either 2-up or 4-up mode\051.) 108 487.67 T
X3 F
X(new_physical_page) 75.5 450.67 T
X1 F
X( or) 190.62 450.67 T
X3 F
X(npp) 209.28 450.67 T
X1 F
X( W) 108 434.67 T
X(ill force a physical page break \050in any mode\051.) 124.16 434.67 T
X3 F
X(start_of_tab) 75.5 397.67 T
X1 F
X( or) 148.59 397.67 T
X3 F
X(sot) 167.26 397.67 T
X1 F
X(W) 108 381.67 T
X(ill cause) 120.66 381.67 T
X2 12 Q
X(chord) 170.43 381.67 T
X1 14 Q
X( to use a monospace \050i.e.: non-proportional\051 font for) 200.44 381.67 T
X(the printing of text. This can be used to enter \324tab\325 information where) 108 365.67 T
X-0.34 (character positioning is crucial. The Courier font is used with the same) 108 349.67 P
X(point-size as the rest of the text.) 108 333.67 T
X3 F
X(end_of_tab) 75.5 296.67 T
X1 F
X( or) 142.39 296.67 T
X3 F
X(eot) 161.05 296.67 T
X1 F
X(W) 108 280.67 T
X(ill stop using monospace font. The ef) 120.66 280.67 T
X(fect is implicit at the end of a) 328.44 280.67 T
X(song.) 108 264.67 T
X3 F
X(columns:) 72 243.67 T
X1 F
X(n or) 129.95 243.67 T
X3 F
X( col:) 152.11 243.67 T
X1 F
X( n) 177.38 243.67 T
X(Speci\336es the number of columns on the pages of the current song.) 108 227.67 T
X3 F
X(column_br) 72 185.67 T
X(eak) 137.09 185.67 T
X1 F
X( or) 158.09 185.67 T
X3 F
X(colb) 176.75 185.67 T
X1 F
X-0.47 (Forces a column break. The next line of the song will appear in the) 108 169.67 P
X(next available column, at the same height as the last "columns" state-) 108 153.67 T
X(ment if still on the same page, or at the top of the page otherwise.) 108 137.67 T
XFMENDPAGE
X%%EndPage: "7" 9
X%%Page: "6" 10


X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T

X(-6-) 298.67 748 T


X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X3 14 Q

X(subtitle) 75.5 694.67 T
X1 F
X(: or) 119.84 694.67 T
X3 F
X(st) 142.39 694.67 T
X1 F
X(:) 152.5 694.67 T
X-0.29 (Speci\336es a string to be printed right below the title. Many subtitles can) 108 678.67 P
X(be speci\336ed.) 108 662.67 T
X3 F
X(de\336ne) 75.5 625.67 T
X1 F
X(: name) 111.28 625.67 T
X3 F
X(base-fr) 152.5 625.67 T
X(et) 194.23 625.67 T
X1 F
X( of) 205.11 625.67 T
X(fset) 220.02 625.67 T
X3 F
X(fr) 243.74 625.67 T
X(ets) 254.36 625.67 T
X1 F
X( str1...str6) 270.69 625.67 T
X-0.48 (De\336nes a new chord called \322name\323. The keyword \322base-fret\323 indicates) 108 609.67 P
X(that the number that follows \050\322of) 108 593.67 T
X(fset\323\051 is the \336rst fret that is to be dis-) 291.67 593.67 T
X(played when representing the way this chord is played.) 108 577.67 T
X(The keyword \322frets\323 then appears and is followed by 6 values. These) 108 556.67 T
X-0.38 (values are the fret number [ 1 to n ] for each string [str1 to str6] and are) 108 540.67 P
X(RELA) 108 524.67 T
X(TIVE to the of) 143 524.67 T
X(fset. A value of \322-\323, \322X\323 or \322x\323 indicates a string) 224.79 524.67 T
X(that is not played.) 108 508.67 T
X(Keywords) 108 487.67 T
X3 F
X(base-fr) 169.04 487.67 T
X(et) 210.77 487.67 T
X1 F
X( and) 221.65 487.67 T
X3 F
X(fr) 248.87 487.67 T
X(ets) 259.49 487.67 T
X1 F
X( are mandatory) 275.82 487.67 T
X(.) 358.88 487.67 T
X(A value of 0 for a given string means it is to be played open, and will) 108 466.67 T
X(be marked by a small open circle above the string in the grid. The) 108 450.67 T
X-0.33 (strings are numbered in ascending order of tonality) 108 434.67 P
X-0.33 (, starting on the low) 390.55 434.67 P
X-0.16 (E \050the top string\051. On output, a chord de\336ned in the user) 108 418.67 P
X-0.16 (\325) 420.51 418.67 P
X-0.16 (s .chordrc \336le) 424.4 418.67 P
X(will have a small asterisk near its grid, a chord de\336ned in a song will) 108 402.67 T
X(have two small asterix. At the beginning of every song, the default) 108 386.67 T
X(chords are reloaded and the user) 108 370.67 T
X(\325) 289.29 370.67 T
X(s .chordrc \336le is reread. Chord de\336ni-) 293.18 370.67 T
X-0.25 (tion of new chords inside the text of a song are only valid for that song.) 108 354.67 P
X(The syntax of a {de\336ne} directive has been modi\336ed in) 108 333.67 T
X2 12 Q
X(CHORD) 421.61 333.67 T
X1 14 Q
X( 3.5.) 465.61 333.67 T
X2 12 Q
X(CHORD) 108 317.67 T
X1 14 Q
X( will attempt to recognize an old-format) 151.99 317.67 T
X3 F
X({de\336ne}) 378.68 317.67 T
X1 F
X( and will) 425.5 317.67 T
X(accept it. It will, though, print a warning inviting you to modify your) 108 301.67 T
X(input \336le to use the new syntax \050the exact) 108 285.67 T
X3 F
X({de\336ne}) 344.03 285.67 T
X1 F
X( entry to use is pro-) 390.84 285.67 T
X(vided as an example\051.) 108 269.67 T
X3 F
X(textfont) 75.5 232.67 T
X1 F
X(: postscript_font) 122.15 232.67 T
X( Same as -T command option.) 108 216.67 T
X3 F
X(textsize) 75.5 179.67 T
X1 F
X(: n) 119.81 179.67 T
X( Same as -t command option.) 108 163.67 T
X3 F
X(chordfont) 75.5 126.67 T
X1 F
X(: postscript_font) 134.61 126.67 T
X( Same as -C command option.) 108 110.67 T
XFMENDPAGE
X%%EndPage: "6" 10
X%%Page: "5" 11


X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T

X(-5-) 298.67 748 T


X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X3 14 Q

X(Dir) 72 710.67 T
X(ectives) 91.96 710.67 T
X1 F
X-0.12 (A directive is a string of text that appears between french brackets \050\324{\324 and \324}\325\051 and) 72 673.67 P
X(has a special meaning to) 72 657.67 T
X2 12 Q
X(CHORD) 212.36 657.67 T
X1 14 Q
X(. It contains a message that will af) 256.36 657.67 T
X(fect the way) 446.63 657.67 T
X2 12 Q
X(CHORD) 72 641.67 T
X1 14 Q
X( processes your \336le. Examples of directive uses would be: changing the) 115.99 641.67 T
X(fonts, marking a chorus, and de\336ning a title.) 72 625.67 T
X(Directives must be alone on a line. Blanks before the opening bracket and after the) 72 609.67 T
X(closing bracket are not signi\336cant. Blanks inside a directive are ignored.) 72 593.67 T
X( Supported directives are:) 72 561.67 T
X3 F
X(start_of_chorus) 75.5 529.67 T
X1 F
X( or) 169.59 529.67 T
X3 F
X(soc) 188.26 529.67 T
X1 F
X(Which indicates the start of a chorus \050yep\051. The complete chorus will) 108 513.67 T
X(be highlighted by a change bar) 108 497.67 T
X(, to be easily located by the player) 279.68 497.67 T
X(.) 470.21 497.67 T
X3 F
X(end_of_chorus) 75.5 465.67 T
X1 F
X( or) 163.39 465.67 T
X3 F
X(eoc) 182.05 465.67 T
X1 F
X(Marks the end of the chorus.) 108 449.67 T
X3 F
X(comment) 75.5 412.67 T
X1 F
X(: or) 130.7 412.67 T
X3 F
X(c) 153.26 412.67 T
X1 F
X(:) 159.47 412.67 T
X(W) 108 396.67 T
X(ill call the printing of the rest of the line, highlighted by a grey box.) 120.66 396.67 T
X(\050Useful to call a chorus, for example\051) 108 380.67 T
X3 F
X(comment_italic) 75.5 343.67 T
X1 F
X(: or) 167.26 343.67 T
X3 F
X(ci) 189.81 343.67 T
X1 F
X(:) 199.92 343.67 T
X(W) 108 327.67 T
X(ill print the comment in an italic font... well not really) 120.66 327.67 T
X(, it will print) 421.12 327.67 T
X(the comment in the font used for printing the chord names \050which is) 108 311.67 T
X(normally italic unless you speci\336ed a dif) 108 295.67 T
X(ferent chord_font\051.) 334.84 295.67 T
X3 F
X(comment_box) 75.5 258.67 T
X1 F
X(: or) 159.49 258.67 T
X3 F
X(cb) 182.04 258.67 T
X1 F
X(:) 196.04 258.67 T
X( W) 108 242.67 T
X(ill print the comment inside a bounding box.) 124.16 242.67 T
X3 F
X(new_song) 75.5 205.67 T
X1 F
X( or) 133.84 205.67 T
X3 F
X(ns) 152.5 205.67 T
X1 F
X(Marks the beginning of a new song. It enables you to put multiple) 108 189.67 T
X(songs in one \336le. It is not required at the beginning of the \336le.) 108 173.67 T
X3 F
X(title) 75.5 136.67 T
X1 F
X(: or) 98.82 136.67 T
X3 F
X(t) 121.38 136.67 T
X1 F
X(:) 126.04 136.67 T
X(Speci\336es the title of the song. It will appear centered at the top of the) 108 120.67 T
X-0.43 (\336rst page, and at the bottom of every other page, accompanied there by) 108 104.67 P
X(the page number) 108 88.67 T
X(, within the current song.) 200.75 88.67 T
XFMENDPAGE
X%%EndPage: "5" 11
X%%Page: "4" 12


X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T

X(-4-) 298.67 748 T


X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X3 14 Q

X(How do I use) 72 710.67 T
X2 12 Q
X(CHORD) 153.68 710.67 T
X3 14 Q
X(?) 197.67 710.67 T
X1 F
X(Using) 72 689.67 T
X2 12 Q
X(CHORD) 108.95 689.67 T
X1 14 Q
X( is simple. four step are required:) 152.94 689.67 T
X(1. T) 72 657.67 T
X(ype in the lyrics of the songs: this can be done with any text editor) 93.57 657.67 T
X(.) 464.55 657.67 T
X4 12 Q
X(% edit loveme) 90 643 T
X(Love me tender love me sweet Never let me go) 90 629 T
X1 14 Q
X-0.1 (2. Insert the chord names between square brackets throughout the lyrics. The chord) 72 599.67 P
X(name will appear right above the letter that follows the closing bracket) 72 583.67 T
X4 12 Q
X(Love me tender [A7]love me sweet [D7]Never let me [G]go) 90 569 T
X1 14 Q
X-0.43 (3. Insert any directive you want to give to) 72 539.67 P
X2 12 Q
X-0.41 (CHORD) 305.29 539.67 P
X1 14 Q
X-0.43 (: titles, sub-titles, chorus markers,) 349.29 539.67 P
X(comments, etc.) 72 523.67 T
X4 12 Q
X({) 90 509 T
X5 F
X(title) 97.2 509 T
X4 F
X(:Love me tender}) 133.2 509 T
X({) 90 495 T
X5 F
X(subtitle) 97.2 495 T
X4 F
X(:Presley/Matson}) 154.8 495 T
X1 14 Q
X(4. Invoke) 72 465.67 T
X2 12 Q
X(CHORD) 128.38 465.67 T
X1 14 Q
X( with your \336le as an ar) 172.37 465.67 T
X(gument. This will produce the PostScript) 297.32 465.67 T
X(output. Y) 72 449.67 T
X(ou can save this in a \336le for future printing, or send the output directly to) 123.49 449.67 T
X(the printer) 72 433.67 T
X4 12 Q
X(% chord loveme >loveme.ps) 90 419 T
X1 14 Q
X(or) 72 403.67 T
X4 12 Q
X(% chord loveme | lp) 90 389 T
XFMENDPAGE
X%%EndPage: "4" 12
X%%Page: "3" 13


X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T

X(-3-) 298.67 748 T


X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN

X0 5 5 605 787 600 782 45 -44 FMBEGINEPSF
X%%BeginDocument: /home/martin/wrk/chord-martin/ex1.eps
X%!PS-Adobe-3.0 EPSF-3.0
X%%Title: A song
X%%Creator: Martin Leclerc & Mario Dorion
X%%BoundingBox: 5 5 605 787
X%%EndComments
X/inch {72 mul } def
X
X/CHORD_FONT { /Helvetica-Oblique findfont 9 scalefont } def
X/TEXT_FONT { /Times-Roman findfont 12 scalefont } def
X/MONO_FONT { /Courier findfont 10 scalefont } def
X% routines for the drawing of the chords
X/grid {
X currentpoint currentpoint
X 6 { 0 cagesizeX rlineto incr cagesize neg incr add rmoveto } repeat
X moveto
X 5 { cagesize 0 rlineto 0 cagesize sub incr rmoveto } repeat
X 1 setlinewidth stroke moveto
X currentpoint
X 0 cagesizeX rmoveto cagesize 0 rlineto
X cagesize 30 div setlinewidth stroke
X moveto
X} def
X
X/dot {
X /fret exch def /str exch def
X /x 5 fret abs sub incr mul half-incr sub def
X /y 6 str sub incr mul def
X currentpoint
X y x rmoveto
X 0 setgray
X fret -1 eq
X {
X 0 incr rmoveto
X check neg check neg rmoveto
X check check rlineto check check rlineto
X check neg check neg rmoveto check neg check rmoveto
X check check neg rlineto check check neg rlineto
X cagesize 50 div setlinewidth stroke
X }
X { fret 0 ne
X { currentpoint dot-size 0 360 arc fill}
X { currentpoint
X check 0 360 newpath arc
X cagesize 50 div setlinewidth
X }
X ifelse
X stroke
X }
X ifelse
X moveto
X} def
X
X/dots {
X grid
X /origin exch def
X /fret-displ exch def
X 1 1 6
X {
X /str exch def
X /fret exch def
X fret -2 ne {str fret dot} if
X } for
X
X fret-displ 1 ne
X {
X currentpoint displ-font setfont
X 0 cagesize fret-displ 10 ge {1.75} {3} ifelse div sub
X cagesizeX incr sub rmoveto
X /char 6 string def fret-displ char cvs show moveto
X } if
X
X /chord-name exch def
X currentpoint displ-font setfont
X 0 cagesizeX cagesizeX 15 div add dot-size 3 mul add rmoveto
X chord-name stringwidth pop 2 div cagesize 2 div exch sub 0 rmoveto
X chord-name show
X 0 cagesize 10 div rmoveto
X origin 1 eq { (*) show} if
X origin 2 eq { (**) show} if
X chord-font setfont moveto
X} def
X
X/cagesize 30 def
X/incr cagesize 5 div def
X/cagesizeX incr 4 mul def
X/half-incr incr 2 div def
X/dot-size cagesize 15 div def
X/check cagesize 20 div def
X
X/chord-font /Times-Roman findfont cagesize 5 div scalefont def
X/displ-font /Times-Roman findfont cagesize 3 div scalefont def
X% end of the routines for the drawing of the chords
X
X%%EndProlog
X/TEXT_FONT { /Times-Roman findfont 17 scalefont } def
X/MONO_FONT { /Courier findfont 15 scalefont } def
XTEXT_FONT setfont
X(Love me tender) dup stringwidth pop 2 div
X612 2 div exch sub 756 moveto
Xshow
X/TEXT_FONT { /Times-Roman findfont 12 scalefont } def
X/MONO_FONT { /Courier findfont 10 scalefont } def
XTEXT_FONT setfont
X(Presley/Matson) dup stringwidth pop 2 div
X612 2 div exch sub 739 moveto
Xshow
X/minhpos 0 def
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X697 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(Love me tender ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A7) stringwidth pop add def
X697 moveto
XCHORD_FONT setfont
X(A7) show
XTEXT_FONT setfont
X(Love me tender love me sweet ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D7) stringwidth pop add def
X697 moveto
XCHORD_FONT setfont
X(D7) show
XTEXT_FONT setfont
X(Love me tender love me sweet Never let me ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X697 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 686 moveto
X(Love me tender love me sweet Never let me go) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X676 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(You have made my ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A7) stringwidth pop add def
X676 moveto
XCHORD_FONT setfont
X(A7) show
XTEXT_FONT setfont
X(You have made my life complete ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D7) stringwidth pop add def
X676 moveto
XCHORD_FONT setfont
X(D7) show
XTEXT_FONT setfont
X(You have made my life complete and I love you ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X676 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 665 moveto
X(You have made my life complete and I love you so) show
X/minhpos 0 def
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X635 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(Love me ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (B7) stringwidth pop add def
X635 moveto
XCHORD_FONT setfont
X(B7) show
XTEXT_FONT setfont
X(Love me tender ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (Em) stringwidth pop add def
X635 moveto
XCHORD_FONT setfont
X(Em) show
XTEXT_FONT setfont
X(Love me tender love me ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G7) stringwidth pop add def
X635 moveto
XCHORD_FONT setfont
X(G7) show
XTEXT_FONT setfont
X72 624 moveto
X(Love me tender love me true ) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (C) stringwidth pop add def
X614 moveto
XCHORD_FONT setfont
X(C) show
XTEXT_FONT setfont
X(all my ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (Cm) stringwidth pop add def
X614 moveto
XCHORD_FONT setfont
X(Cm) show
XTEXT_FONT setfont
X(all my dreams ful) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X614 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 603 moveto
X(all my dreams fulfill) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X593 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(For ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (Dm) stringwidth pop add def
X593 moveto
XCHORD_FONT setfont
X(Dm) show
XTEXT_FONT setfont
X(For my ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E+) stringwidth pop add def
X593 moveto
XCHORD_FONT setfont
X(E+) show
XTEXT_FONT setfont
X(For my dar) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (E7) stringwidth pop add def
X593 moveto
XCHORD_FONT setfont
X(E7) show
XTEXT_FONT setfont
X(For my darling ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A7) stringwidth pop add def
X593 moveto
XCHORD_FONT setfont
X(A7) show
XTEXT_FONT setfont
X72 582 moveto
X(For my darling I love you) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D7) stringwidth pop add def
X572 moveto
XCHORD_FONT setfont
X(D7) show
XTEXT_FONT setfont
X(and I always ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X572 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(and I always will ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (Am7) stringwidth pop add def
X572 moveto
XCHORD_FONT setfont
X(Am7) show
XTEXT_FONT setfont
X(and I always will ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D7) stringwidth pop add def
X572 moveto
XCHORD_FONT setfont
X(D7) show
XTEXT_FONT setfont
X72 561 moveto
X(and I always will ) show
X1 setlinewidth
Xnewpath
X62 644 moveto
X0 -83 rlineto
Xclosepath
Xstroke
X/minhpos 0 def
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X531 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(Love me tender ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A7) stringwidth pop add def
X531 moveto
XCHORD_FONT setfont
X(A7) show
XTEXT_FONT setfont
X(Love me tender love me long ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D7) stringwidth pop add def
X531 moveto
XCHORD_FONT setfont
X(D7) show
XTEXT_FONT setfont
X(Love me tender love me long Take me to your ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X531 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 520 moveto
X(Love me tender love me long Take me to your heart) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X510 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(For it's there that ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A7) stringwidth pop add def
X510 moveto
XCHORD_FONT setfont
X(A7) show
XTEXT_FONT setfont
X(For it's there that I belong ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D7) stringwidth pop add def
X510 moveto
XCHORD_FONT setfont
X(D7) show
XTEXT_FONT setfont
X(For it's there that I belong and we'll never ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X510 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 499 moveto
X(For it's there that I belong and we'll never part) show
X/minhpos 0 def
XTEXT_FONT setfont
X.9 setgray
X12 setlinewidth
Xnewpath
X70 471 moveto
X(Chorus ) stringwidth rlineto
Xstroke
X72 467 moveto
X0 setgray
X1 setlinewidth
X(Chorus) show
X/minhpos 0 def
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X437 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(Love me tender ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A7) stringwidth pop add def
X437 moveto
XCHORD_FONT setfont
X(A7) show
XTEXT_FONT setfont
X(Love me tender Love me dear ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D7) stringwidth pop add def
X437 moveto
XCHORD_FONT setfont
X(D7) show
XTEXT_FONT setfont
X(Love me tender Love me dear Tell me you are ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X437 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 426 moveto
X(Love me tender Love me dear Tell me you are mine) show
X/minhpos 0 def
XTEXT_FONT setfont
X() stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X416 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X(I'll be yours through ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (A7) stringwidth pop add def
X416 moveto
XCHORD_FONT setfont
X(A7) show
XTEXT_FONT setfont
X(I'll be yours through all the years ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (D7) stringwidth pop add def
X416 moveto
XCHORD_FONT setfont
X(D7) show
XTEXT_FONT setfont
X(I'll be yours through all the years till the end of ) stringwidth pop 72 add
Xdup minhpos lt
X {pop minhpos} if
Xdup /minhpos exch (G) stringwidth pop add def
X416 moveto
XCHORD_FONT setfont
X(G) show
XTEXT_FONT setfont
X72 405 moveto
X(I'll be yours through all the years till the end of time) show
X/minhpos 0 def
XTEXT_FONT setfont
X.9 setgray
X12 setlinewidth
Xnewpath
X70 377 moveto
X(Chorus ) stringwidth rlineto
Xstroke
X72 373 moveto
X0 setgray
X1 setlinewidth
X(Chorus) show
X/minhpos 0 def
X480 363 moveto
X72 303 moveto
X(A7) -1 0 2 0 2 0 1 0 dots
X132 303 moveto
X(Am7) -1 0 2 2 1 3 1 0 dots
X192 303 moveto
X(B7) 0 2 1 2 0 2 1 0 dots
X252 303 moveto
X(C) -1 3 2 0 1 0 1 0 dots
X312 303 moveto
X(Cm) -1 1 3 3 2 1 3 0 dots
X372 303 moveto
X(D7) -1 -1 0 2 1 2 1 0 dots
X432 303 moveto
X(Dm) -1 -1 0 2 3 1 1 0 dots
X492 303 moveto
X(E+) -1 -1 2 1 1 0 1 0 dots
X72 243 moveto
X(E7) 0 2 2 1 3 0 1 0 dots
X132 243 moveto
X(Em) 0 2 2 0 0 0 1 0 dots
X192 243 moveto
X(G) 3 2 0 0 0 3 1 0 dots
X252 243 moveto
X(G7) 3 2 0 0 0 1 1 0 dots
X1 setlinewidth
X0 setgray
Xnewpath
X72 36 10 sub moveto
X468 0 rlineto
Xstroke
X%%Trailer
X%%EOF
X
X%%EndDocument
XFMENDEPSF
XFMENDPAGE
X%%EndPage: "3" 13
X%%Page: "2" 14


X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T

X(-2-) 298.67 748 T


X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN
X3 14 Q

X(An Example) 72 710.67 T
X1 F
X(This is an example of a \322source\323 \336le for) 72 689.67 T
X2 12 Q
X(CHORD) 299.44 689.67 T
X1 14 Q
X(, i.e. a \336le that is meant to be pro-) 343.44 689.67 T
X(cessed by) 72 673.67 T
END_OF_FILE
MISSING=""
if test 55014 -ne `wc -c <'chord/chord_guide.ps.02'`; then
echo shar: \"'chord/chord_guide.ps.02'\" unpacked with wrong size!
elif test -f 'chord/chord_guide.ps.01' && test -f 'chord/chord_guide.ps.03'; then


echo shar: Combining \"'chord/chord_guide.ps'\" \(121332 characters\)
cat 'chord/chord_guide.ps.01' 'chord/chord_guide.ps.02' 'chord/chord_guide.ps.03'> 'chord/chord_guide.ps'
if test 121332 -ne `wc -c <'chord/chord_guide.ps'`; then
echo shar: \"'chord/chord_guide.ps'\" combined with wrong size!
else
rm chord/chord_guide.ps.01 chord/chord_guide.ps.02 chord/chord_guide.ps.03
fi
fi

# end of 'chord/chord_guide.ps.02'
fi
if test -f 'chord/common.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/common.c'\"
else
echo shar: Extracting \"'chord/common.c'\" \(2506 characters\)
sed "s/^X//" >'chord/common.c' <<'END_OF_FILE'
Xstatic char SccsId[] = "@(#)common.c 3.6\t Mar. 1995";
Xstatic char copyright[] = "Copyright 1991-1995 by Martin Leclerc & Mario Dorion";
X
X#include <stdio.h>
X#include "chord.h"
X
Xextern char *current_file;
Xextern char *command_name;
Xextern char *mesg;
Xextern int in_chordrc;
Xextern int first_time_in_chordrc;
X
X/* --------------------------------------------------------------------------------*/
Xchar *tolower_str(str)
Xchar *str;
X{
X static char temp_str[MAXLINE];
X char *ptr;
X
X strcpy(temp_str, str);
X ptr=temp_str;
X
X while (*ptr=(char) tolower((int) *ptr))
X ptr++;
X
X return(temp_str);
X}
X
X/* --------------------------------------------------------------------------------*/
Xchar *toupper_str(str)
Xchar *str;
X{
X static char temp_str[MAXLINE];
X char *ptr;
X
X strcpy(temp_str, str);
X ptr=temp_str;
X
X while (*ptr=(char) toupper((int) *ptr))
X ptr++;
X
X return(temp_str);
X}
X
X
X/* --------------------------------------------------------------------------------*/
Xvoid error(err_str)
Xchar *err_str;
X{
X extern int n_lines;
X
X fprintf(stderr, "WARNING: %s\n",err_str);
X fprintf(stderr, " in file \"%s\", line %d\n\n", current_file,n_lines+1);
X}
X
X/* --------------------------------------------------------------------------------*/
Xvoid error_rt(err_str)
Xchar *err_str;
X{
X extern int n_lines;
X fprintf(stderr, "WARNING: %s defined as a run-time option\n\n",err_str);
X}
X
X/* --------------------------------------------------------------------------------*/
Xvoid debug(dbg_str)
Xchar *dbg_str;
X{
X extern int debug_mode;
X
X if ( debug_mode )
X fprintf (stderr, "Debug: %s\n", dbg_str);
X}
X
X/* --------------------------------------------------------------------------------*/
Xvoid print_version()
X{
X
X char *version = VERSION;
X char *patch_level = PATCH_LEVEL;
X
X printf ("%s version %s, patchlevel %s\n", command_name, version, patch_level);
X}
X
X/* --------------------------------------------------------------------------------*/
X/* read the file passed as argument */
Xvoid read_input_file(source, source_fd)
Xchar source[];
XFILE *source_fd;
X {
X sprintf (mesg , "start of read_input_file on [%s]", source);
X debug (mesg);
X current_file = source;
X
X source_fd = fopen (source, "r");
X
X if (source_fd == NULL)
X {
X fprintf(stderr, "Unable to open \"%s\"\n", source);
X exit (1);
X }
X
X process_file(source_fd);
X fclose(source_fd);
X }
X
END_OF_FILE
if test 2506 -ne `wc -c <'chord/common.c'`; then
echo shar: \"'chord/common.c'\" unpacked with wrong size!
fi
# end of 'chord/common.c'
fi
if test -f 'chord/patchlevel.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/patchlevel.h'\"
else
echo shar: Extracting \"'chord/patchlevel.h'\" \(46 characters\)
sed "s/^X//" >'chord/patchlevel.h' <<'END_OF_FILE'
X#define VERSION "3.6"
X#define PATCH_LEVEL "0"
END_OF_FILE
if test 46 -ne `wc -c <'chord/patchlevel.h'`; then
echo shar: \"'chord/patchlevel.h'\" unpacked with wrong size!
fi
# end of 'chord/patchlevel.h'
fi
echo shar: End of archive 2 \(of 6\).
cp /dev/null ark2isdone

Martin Leclerc - Sun Montreal SE

unread,
Apr 12, 1995, 3:00:00 AM4/12/95
to
Submitted-by: Martin....@canada.sun.com (Martin Leclerc - Sun Montreal SE)
Posting-number: Volume 47, Issue 117
Archive-name: chord/part03

Environment: UNIX, DOS, VMS, Amiga
Supersedes: chord: Volume 40, Issue 84-88

#! /bin/sh


# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".

# Contents: chord/chord_guide.ps.03 chord/grid.c
# chord/songs/space-oddity


# Wrapped by kent@ftp on Wed Apr 12 21:39:34 1995
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:

echo ' "shar: End of archive 3 (of 6)."'
if test -f 'chord/chord_guide.ps.03' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/chord_guide.ps.03'\"
else
echo shar: Extracting \"'chord/chord_guide.ps.03'\" \(11300 characters\)
sed "s/^X//" >'chord/chord_guide.ps.03' <<'END_OF_FILE'
X2 12 Q
X(CHORD) 129.54 673.67 T
X1 14 Q
X(.) 173.53 673.67 T
X4 12 Q
X({) 90 643 T
X5 F
X(title) 97.2 643 T
X4 F
X(:Love me tender}) 133.2 643 T
X({) 90 629 T
X5 F
X(subtitle) 97.2 629 T
X4 F
X(:Presley/Matson}) 154.8 629 T
X([G]Love me tender [A7]love me sweet [D7]Never let me [G]go) 90 601 T
X([G]You have made my [A7]life complete [D7]and I love you [G]so) 90 587 T
X({) 90 559 T
X5 F
X(start_of_chorus) 97.2 559 T
X4 F
X(}) 205.2 559 T
X([G]Love me [B7]tender [Em]love me [G7]true) 90 545 T
X([C]all my [Cm]dreams ful[G]f) 90 531 T
X(ill) 291.6 531 T
X([G]For [Dm6]my [E+]dar[E7]ling [A7]I love you) 90 517 T
X([D7]and I always [G]will [Am7] [D7]) 90 503 T
X({) 90 489 T
X5 F
X(end_of_chorus) 97.2 489 T
X4 F
X(}) 190.8 489 T
X-0.36 ([G]Love me tender [A7]love me long [D7]Take me to your [G]heart) 90 461 P
X-0.4 ([G]For it\325s there that [A7]I belong [D7]and we\325ll never [G]part) 90 447 P
X({) 90 419 T
X5 F
X(comment) 97.2 419 T
X4 F
X(:Chorus}) 147.6 419 T
X([G]Love me tender [A7]Love me dear [D7]Tell me you are [G]mine) 90 391 T
X-0.33 ([G]I\325ll be yours through [A7]all the years [D7]till the end of) 90 377 P
X([G]time) 90 363 T
X({) 90 335 T
X5 F
X(comment) 97.2 335 T
X4 F
X(:Chorus}) 147.6 335 T
X1 14 Q
X(Here are the important points about that \336le:) 72 303.67 T
X(It can be created using any text editor you like;) 108 287.67 T
X(All characters present in the ISO 8859-1 character set can be used.) 108 271.67 T
X(W) 72 239.67 T
X(e will explain the content of that \336le. But \336rst, let\325) 84.1 239.67 T
X(s look at the end result, on the) 364.1 239.67 T
X(next page.) 72 223.67 T
XFMENDPAGE
X%%EndPage: "2" 14
X%%Page: "1" 15


X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T

X(-1-) 298.67 748 T


X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN

X3 18 Q
X(W) 173.77 708 T
X(elcome to the) 190.78 708 T
X2 12 Q
X(CHORD) 296.24 708 T
X3 18 Q
X( User Guide!) 340.24 708 T
X2 12 Q
X-0.01 (CHORD) 72 658.67 P
X1 14 Q
X-0.01 ( is a share-ware utility that was \336rst created by lazy guitarists who got tired) 115.99 658.67 P
X(of turning pages in the middle of the songs they liked.) 72 642.67 T
X2 12 Q
X(CHORD) 72 610.67 T
X1 14 Q
X( takes a \336le containing the lyrics and chords of a song and produces a Post-) 115.99 610.67 T
X(Script version of that song. The song has now the following attributes:) 72 594.67 T
X(T) 144 578.67 T
X(itles and sub-titles have been centered;) 152.06 578.67 T
X(The lyrics appear in the font and size of your choice;) 144 562.67 T
X(All chords name appear right above the right lyrics;) 144 546.67 T
X(All chords used in your song appear as grids at the bottom of the page.) 144 530.67 T
X-0.42 (Optionally) 72 498.67 P
X-0.42 (, you can also generate an index of your songs, have the pages numbered,) 130.98 498.67 P
X-0.01 (have songs transposed up or down, print in 2-up or 4-up modes and insert tablature) 72 482.67 P
X(and comments) 72 466.67 T
X-0.52 (Y) 72 434.67 P
X-0.52 (ou have a great many options on the \336nal appearance of you songs. All of them are) 80.71 434.67 P
X(described in the section titled \322Options and Switches\323) 72 418.67 T
X(For now) 72 386.67 T
X(, please read on to better understand what) 118.14 386.67 T
X2 12 Q
X(CHORD) 354.14 386.67 T
X1 14 Q
X( can do for you.) 398.13 386.67 T
XFMENDPAGE
X%%EndPage: "1" 15
X%%Page: "0" 16


X612 792 0 FMBEGINPAGE
X[0 0 0 1 0 0 0]
X[ 0 1 1 0 1 0 0]
X[ 1 0 1 0 0 1 0]
X[ 1 1 0 0 0 0 1]
X[ 1 0 0 0 0 1 1]
X[ 0 1 0 0 1 0 1]
X[ 0 0 1 0 1 1 0]
X 7 FrameSetSepColors
XFrameNoSep
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 0 0 1 0 0 0 K
X0 12 Q
X0 X
X0 0 0 1 0 0 0 K
X(Version 3.6) 72 748 T

X(-0-) 298.67 748 T


X(The Chord User Guide) 412.64 748 T
X72 63 540 63 2 L
X0.5 H
X2 Z
XN

X63 54 549 774 R
X7 X
XV
X0 5 5 605 787 600 782 6 5 FMBEGINEPSF
X%%BeginDocument: /home/martin/wrk/chord-martin/cover.eps

X0.75 setgray
X72 696 moveto
X(BaddE/F#) 2 -1 4 4 0 0 1 0 dots
X132 696 moveto
X(Bdim) -1 -1 0 1 0 1 1 0 dots
X192 696 moveto
X(Bsus) -1 -1 3 3 4 1 2 0 dots
X252 696 moveto
X(Bsus4) -1 -1 3 3 4 1 2 0 dots
X312 696 moveto
X(Bm) -1 2 4 4 3 2 1 0 dots
X372 696 moveto
X(Bm\(maj7\)) -1 1 4 4 3 -1 1 0 dots
X432 696 moveto
X(Bm\(sus9\)) -1 -1 4 4 2 2 1 0 dots
X492 696 moveto
X(Bm6) -1 -1 4 4 3 4 1 0 dots
X72 636 moveto
X(Bm7) -1 1 3 1 2 1 2 0 dots
X132 636 moveto
X(Bm7b5) 1 2 4 2 3 1 1 0 dots
X192 636 moveto
X(Bmaj) -1 2 4 3 4 -1 1 0 dots
X252 636 moveto
X(Bmaj7) -1 2 4 3 4 -1 1 0 dots
X312 636 moveto
X(Bmin) -1 2 4 4 3 2 1 0 dots
X372 636 moveto
X(Bmsus9) -1 -1 4 4 2 2 1 0 dots
X432 636 moveto
X(Bmmaj7) -1 1 4 4 3 -1 1 0 dots
X492 636 moveto


X(C) -1 3 2 0 1 0 1 0 dots

X72 576 moveto
X(C\(add9\)) -1 3 2 0 3 0 1 0 dots
X132 576 moveto
X(C\(addD\)) -1 3 2 0 3 0 1 0 dots
X192 576 moveto
X(C+) -1 -1 2 1 1 0 1 0 dots
X252 576 moveto
X(C/B) -1 2 2 0 1 0 1 0 dots
X312 576 moveto
X(C11) -1 1 3 1 4 1 3 0 dots
X372 576 moveto
X(C4) -1 -1 3 0 1 3 1 0 dots
X432 576 moveto
X(C6) -1 0 2 2 1 3 1 0 dots
X492 576 moveto
X(C7) 0 3 2 3 1 0 1 0 dots
X72 516 moveto
X(C9) 1 3 1 2 1 3 8 0 dots
X132 516 moveto
X(C9\(11\)) -1 3 3 3 3 -1 1 0 dots
X192 516 moveto
X(Cadd2/B) -1 2 0 0 1 0 1 0 dots
X252 516 moveto
X(Cadd9) -1 3 2 0 3 0 1 0 dots
X312 516 moveto
X(CaddD) -1 3 2 0 3 0 1 0 dots
X372 516 moveto
X(Cdim) -1 -1 1 2 1 2 1 0 dots
X432 516 moveto
X(Csus) -1 -1 3 0 1 3 1 0 dots
X492 516 moveto
X(Csus2) -1 3 0 0 1 -1 1 0 dots
X72 456 moveto
X(Csus4) -1 -1 3 0 1 3 1 0 dots
X132 456 moveto
X(Csus9) -1 -1 4 1 2 4 7 0 dots
X192 456 moveto


X(Cm) -1 1 3 3 2 1 3 0 dots

X252 456 moveto
X(Cm11) -1 1 3 1 4 -1 3 0 dots
X312 456 moveto
X(Cm7) -1 1 3 1 2 1 3 0 dots
X372 456 moveto
X(Cmaj) 0 3 2 0 1 0 1 0 dots
X432 456 moveto
X(Cmaj7) -1 3 2 0 0 0 1 0 dots
X492 456 moveto
X(Cmin) -1 1 3 3 2 1 3 0 dots
X72 396 moveto
X(C#) -1 -1 3 1 2 1 1 0 dots
X132 396 moveto
X(C#\(add9\)) -1 1 3 3 1 1 4 0 dots
X192 396 moveto
X(C#+) -1 -1 3 2 2 1 1 0 dots
X252 396 moveto
X(C#4) -1 -1 3 3 4 1 4 0 dots
X312 396 moveto
X(C#7) -1 -1 3 4 2 4 1 0 dots
X372 396 moveto
X(C#7\(b5\)) -1 2 1 2 1 2 1 0 dots
X432 396 moveto
X(C#add9) -1 1 3 3 1 1 4 0 dots
X492 396 moveto
X(C#dim) -1 -1 2 3 2 3 1 0 dots
X72 336 moveto
X(C#sus) -1 -1 3 3 4 1 4 0 dots
X132 336 moveto
X(C#sus4) -1 -1 3 3 4 1 4 0 dots
X192 336 moveto
X(C#m) -1 -1 2 1 2 0 1 0 dots
X252 336 moveto
X(C#m7) -1 -1 2 4 2 4 1 0 dots
X312 336 moveto
X(C#maj) -1 4 3 1 1 1 1 0 dots
X372 336 moveto
X(C#maj7) -1 4 3 1 1 1 1 0 dots
X432 336 moveto
X(C#min) -1 -1 2 1 2 0 1 0 dots
X492 336 moveto
X(Db) -1 -1 3 1 2 1 1 0 dots
X72 276 moveto
X(Db+) -1 -1 3 2 2 1 1 0 dots
X132 276 moveto
X(Db7) -1 -1 3 4 2 4 1 0 dots
X192 276 moveto
X(Dbdim) -1 -1 2 3 2 3 1 0 dots
X252 276 moveto
X(Dbsus) -1 -1 3 3 4 1 4 0 dots
X312 276 moveto
X(Dbsus4) -1 -1 3 3 4 1 4 0 dots
X372 276 moveto
X(Dbm) -1 -1 2 1 2 0 1 0 dots
X432 276 moveto
X(Dbm7) -1 -1 2 4 2 4 1 0 dots
X492 276 moveto
X(Dbmaj) -1 -1 3 1 2 1 1 0 dots
X72 216 moveto
X(Dbmaj7) -1 4 3 1 1 1 1 0 dots
X132 216 moveto
X(Dbmin) -1 -1 2 1 2 0 1 0 dots
X192 216 moveto


X(D) -1 -1 0 2 3 2 1 0 dots

X252 216 moveto
X(D\(add9\)) 0 0 0 2 3 2 1 0 dots
X312 216 moveto
X(D+) -1 -1 0 3 3 2 1 0 dots
X372 216 moveto
X(D/A) -1 0 0 2 3 2 1 0 dots
X432 216 moveto
X(D/B) -1 2 0 2 3 2 1 0 dots
X492 216 moveto
X(D/C) -1 3 0 2 3 2 1 0 dots
X72 156 moveto
X(D/C#) -1 4 0 2 3 2 1 0 dots
X132 156 moveto
X(D/E) -1 1 1 1 1 -1 7 0 dots
X192 156 moveto
X(D/G) 3 -1 0 2 3 2 1 0 dots
X252 156 moveto
X(D11) 3 0 0 2 1 0 1 0 dots
X312 156 moveto
X(D4) -1 -1 0 2 3 3 1 0 dots
X372 156 moveto
X(D5/E) 0 1 1 1 -1 -1 7 0 dots
X432 156 moveto
X(D6) -1 0 0 2 0 2 1 0 dots
X492 156 moveto


X(D7) -1 -1 0 2 1 2 1 0 dots

X72 96 moveto
X(D7#9) -1 2 1 2 3 3 4 0 dots
X132 96 moveto
X(D7\(#9\)) -1 2 1 2 3 3 4 0 dots
X192 96 moveto
X(D7sus2) -1 0 0 2 1 0 1 0 dots
X252 96 moveto
X(D7sus4) -1 0 0 2 1 3 1 0 dots
X312 96 moveto
X(D9) 1 3 1 2 1 3 10 0 dots
X372 96 moveto
X(D9\(add6\)) 1 3 3 2 0 0 10 0 dots
X432 96 moveto
X(D9add6) 1 3 3 2 0 0 10 0 dots
X492 96 moveto
X(Dadd9) 0 0 0 2 3 2 1 0 dots
X72 36 moveto
X(Ddim) -1 -1 0 1 0 1 1 0 dots
X132 36 moveto
X(Dsus) -1 -1 0 2 3 3 1 0 dots
X192 36 moveto
X(Dsus2) 0 0 0 2 3 0 1 0 dots
X252 36 moveto
X(Dsus4) -1 -1 0 2 3 3 1 0 dots
X312 36 moveto


X(Dm) -1 -1 0 2 3 1 1 0 dots

X372 36 moveto
X(Dm\(#5\)) -1 -1 0 3 3 2 1 0 dots
X432 36 moveto
X(Dm\(#7\)) -1 -1 0 2 2 1 1 0 dots
X492 36 moveto
X(Dm/A) -1 0 0 2 3 1 1 0 dots
X1 setlinewidth
X% newpath
X% 72 36 10 sub moveto
X% 468 0 rlineto
X% stroke
X% (CHORD CHART) dup stringwidth pop 2 div
X% 612 2 div exch sub 36 3 div moveto
X% show
Xshowpage


X%%Trailer
X%%EOF
X
X%%EndDocument
XFMENDEPSF

X171 387 423 621 R
XV
X6 36 Q
X0 X
X(The CHORD) 185.04 583 T
X(User Guide) 195.12 545 T
X7 18 Q
X(Martin Lecler) 233.76 503 T
X(c) 350.88 503 T
X(Mario Dorion) 239.04 483 T
X7 14 Q
X(V) 258.44 445.67 T
X(ersion 3.6) 267.24 445.67 T
X(Mar) 264.19 429.67 T
X(ch 95) 291.45 429.67 T
XFMENDPAGE
X%%EndPage: "0" 16
X%%Trailer
X%%BoundingBox: 0 0 612 792
X%%PageOrder: Descend
X%%Pages: 16
X%%DocumentFonts: Helvetica-Bold
X%%+ Times-Roman
X%%+ Helvetica
X%%+ Times-Bold
X%%+ Courier
X%%+ Courier-Bold
X%%+ Bookman-Demi
X%%+ Bookman-Light
X%%EOF
END_OF_FILE
MISSING=""
if test 11300 -ne `wc -c <'chord/chord_guide.ps.03'`; then
echo shar: \"'chord/chord_guide.ps.03'\" unpacked with wrong size!
elif test -f 'chord/chord_guide.ps.01' && test -f 'chord/chord_guide.ps.02'


then
echo shar: Combining \"'chord/chord_guide.ps'\" \(121332 characters\)
cat 'chord/chord_guide.ps.01' 'chord/chord_guide.ps.02' 'chord/chord_guide.ps.03' > 'chord/chord_guide.ps'
if test 121332 -ne `wc -c <'chord/chord_guide.ps'`; then
echo shar: \"'chord/chord_guide.ps'\" combined with wrong size!
else
rm chord/chord_guide.ps.01 chord/chord_guide.ps.02 chord/chord_guide.ps.03
fi
fi

# end of 'chord/chord_guide.ps.03'
fi
if test -f 'chord/grid.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/grid.c'\"
else
echo shar: Extracting \"'chord/grid.c'\" \(42478 characters\)
sed "s/^X//" >'chord/grid.c' <<'END_OF_FILE'
Xstatic char SccsId[] = "@(#)grid.c 3.6\t Mar. 1995";


Xstatic char copyright[] = "Copyright 1991-1995 by Martin Leclerc & Mario Dorion";
X

X#include "chord.h"
X
Xstruct chord_struct *so_chordtab = NULL;
Xstruct kcs *so_known_chords = NULL;
X
Xint nb_chord = 0;
Xint first_ptr = 0;
Xint nb_known_chord = 0;
X
Xextern int hpos,vpos;
Xextern int grid_size, no_easy_grids, n_pages;
Xextern int first_time_in_chordrc;


Xextern char *mesg;
Xextern int in_chordrc;

Xextern int sort_type;
X
X/*--------------------------------------------------------------------------------*/
Xvoid do_init_grid_ps()
X{
X printf("%% routines for the drawing of the chords\n");
X printf("/grid { \n");
X printf(" currentpoint currentpoint\n");
X printf(" 6 { 0 cagesizeX rlineto incr cagesize neg incr add rmoveto } repeat\n");
X printf(" moveto\n");
X printf(" 5 { cagesize 0 rlineto 0 cagesize sub incr rmoveto } repeat\n");
X printf(" 1 setlinewidth stroke \n");
X printf(" moveto\n");
X printf(" currentpoint\n");
X printf(" 0 cagesizeX rmoveto cagesize 0 rlineto\n");
X printf(" cagesize 30 div setlinewidth stroke\n");
X printf(" moveto\n");
X printf("} def\n");
X printf("\n");
X printf("/dot {\n");
X printf(" /fret exch def /str exch def\n");
X printf(" /x 5 fret abs sub incr mul half-incr sub def\n");
X printf(" /y 6 str sub incr mul def\n");
X printf(" currentpoint\n");
X printf(" y x rmoveto\n");
X printf(" 0 setgray\n");
X printf(" fret -1 eq\n");
X printf(" {\n");
X printf(" 0 incr rmoveto\n");
X printf(" check neg check neg rmoveto\n");
X printf(" check check rlineto check check rlineto\n");
X printf(" check neg check neg rmoveto check neg check rmoveto\n");
X printf(" check check neg rlineto check check neg rlineto\n");
X printf(" cagesize 50 div setlinewidth stroke\n");
X printf(" }\n");
X printf(" { fret 0 ne\n");
X printf(" { currentpoint dot-size 0 360 arc fill}\n");
X printf(" { currentpoint\n");
X printf(" check 0 360 newpath arc\n");
X printf(" cagesize 50 div setlinewidth\n");
X printf(" }\n");
X printf(" ifelse \n");
X printf(" stroke \n");
X printf(" }\n");
X printf(" ifelse\n");
X printf(" moveto\n");
X printf("} def \n");
X printf("\n");
X printf("/dots {\n");
X printf(" grid\n");
X printf(" /origin exch def\n");
X printf(" /fret-displ exch def\n");
X printf(" 1 1 6\n");
X printf(" {\n");
X printf(" /str exch def\n");
X printf(" /fret exch def\n");
X printf(" fret %d ne {str fret dot} if\n", FRET_NONE);
X printf(" } for\n");
X printf("\n");
X printf(" fret-displ 1 ne\n");
X printf(" {\n");
X printf(" currentpoint displ-font setfont\n");
X/* printf(" 0 cagesize 3 div sub cagesizeX incr sub rmoveto\n"); */
X printf(" 0 cagesize fret-displ 10 ge {1.75} {3} ifelse div sub\n");
X printf(" cagesizeX incr sub rmoveto\n");
X printf(" /char 6 string def fret-displ char cvs show moveto \n");
X printf(" } if\n");
X printf("\n");
X printf(" /chord-name exch def\n");
X printf(" currentpoint displ-font setfont\n");
X printf(" 0 cagesizeX cagesizeX 15 div add dot-size 3 mul add rmoveto\n");
X printf(" chord-name stringwidth pop 2 div cagesize 2 div exch sub 0 rmoveto\n");
X printf(" chord-name show\n");
X printf(" 0 cagesize 10 div rmoveto\n");
X printf(" origin 2 eq { (*) show} if\n");
X printf(" origin 1 eq { (**) show} if\n");
X printf(" chord-font setfont moveto\n");
X printf("} def\n");
X printf("\n");
X printf("/cagesize %d def\n",grid_size);
X printf("/incr cagesize 5 div def\n");
X printf("/cagesizeX incr 4 mul def\n");
X printf("/half-incr incr 2 div def\n");
X printf("/dot-size cagesize 15 div def\n");
X printf("/check cagesize 20 div def\n");
X printf("\n");
X printf("/chord-font /Times-Roman findfont cagesize 5 div scalefont def\n");
X printf("/displ-font /Times-Roman findfont cagesize 3 div scalefont def\n");
X printf("%% end of the routines for the drawing of the chords\n");
X printf("\n");
X}
X
X/*--------------------------------------------------------------------------------*/
X
Xstruct chord_struct* add_to_chordtab(chord)
Xchar *chord;
X{
X struct chord_struct *ct_ptr, *new, **prev_ptr_handle;
X struct kcs *kc_ptr;
X char chord1[CHORD_NAME_SZ], chord2[CHORD_NAME_SZ];
X int n;
X
X ct_ptr = so_chordtab;
X prev_ptr_handle = &so_chordtab;
X
X strcpy(chord1, chord);
X while (( ct_ptr != NULL ) &&
X ((n=chordcompare(chord1, strcpy(chord2,ct_ptr->chord->chord_name))) > 0))
X {
X prev_ptr_handle = &(ct_ptr->next);
X ct_ptr = ct_ptr->next;
X }
X
X
X if ((ct_ptr != NULL) && (n == 0))
X {
X new=ct_ptr;
X }
X else
X {
X if ((kc_ptr=get_kc_entry (chord)) == NULL)
X {
X sprintf (mesg, "chord \'%s\' has never been defined", chord);
X error(mesg);
X learn_chord(chord, -2, -2, -2, -2, -2, -2, 0, CHORD_BUILTIN, CHORD_EASY);
X kc_ptr=get_kc_entry (chord);
X }
X
X new = (struct chord_struct *) malloc (sizeof (dummy_chord_struct));
X new->chord=kc_ptr;
X new->next = ct_ptr;
X *prev_ptr_handle = new;
X }
X
X return (new);
X}
X
X/*--------------------------------------------------------------------------------*/
X/* ChordCompare - provided by Leo Bicknell (ab...@freenet.acsu.buffalo.edu) */
Xint chordcompare(chord1, chord2)
Xchar *chord1, *chord2;
X{
X chord1[0]=tolower(chord1[0]);
X chord2[0]=tolower(chord2[0]);
X
X if (chord1[0] != chord2[0])
X {
X return(chord1[0] - chord2[0]);
X }
X else
X {
X switch (chord1[1]) {
X case 'b':
X switch (chord2[1]) {
X case 'b':
X return (chordcompare(&chord1[1], &chord2[1]));
X case '#':
X return (-1);
X case 'm':
X return (-1);
X default:
X return (-1);
X }
X case '#':
X switch (chord2[1]) {
X case 'b':
X return (1);
X case '#':
X return (chordcompare(&chord1[1], &chord2[1]));
X case 'm':
X return (1);
X default:
X return (1);
X }
X case 'm':
X switch (chord2[1]) {
X case 'b':
X return (1);
X case '#':
X return (-1);
X case 'm':
X return (chordcompare(&chord1[1], &chord2[1]));
X default:
X return (1);
X }
X default:
X switch(chord2[1]) {
X case 'b':
X return (1);
X case '#':
X return (-1);
X case 'm':
X return (-1);
X default:
X return (strcmp(chord1, chord2));
X }
X }
X }
X}
X
X
X/*--------------------------------------------------------------------------------*/
Xvoid moveto(new_hpos,new_vpos)
Xint new_hpos,new_vpos;
X{
X if (new_hpos + grid_size + L_MARGIN > WIDTH)
X {
X new_hpos = L_MARGIN;
X new_vpos -= 2*grid_size;
X }
X
X if (new_vpos < BOTTOM)
X {
X do_end_of_page(FALSE);
X do_start_of_page();
X new_vpos= TOP-2*grid_size;
X }
X
X printf ("%d %d moveto\n", new_hpos, new_vpos);
X hpos= new_hpos;vpos = new_vpos;
X}
X
X/*--------------------------------------------------------------------------------*/
Xvoid draw_known_chords()
X {
X struct kcs *kc_ptr;
X char error_msg[MAXLINE];
X
X moveto(WIDTH - grid_size - grid_size - L_MARGIN, vpos);
X
X kc_ptr = so_known_chords;
X while (kc_ptr != NULL)
X {
X moveto(hpos + 2 * grid_size, vpos);
X printf("(");
X ps_puts(kc_ptr->chord_name);
X printf(") %d %d %d %d %d %d %d %d dots\n",
X kc_ptr->s1,
X kc_ptr->s2,
X kc_ptr->s3,
X kc_ptr->s4,
X kc_ptr->s5,
X kc_ptr->s6,
X kc_ptr->displ,
X kc_ptr->origin);
X kc_ptr = kc_ptr->next;
X }
X }
X
X/*--------------------------------------------------------------------------------*/
Xvoid draw_chords()
X {
X struct chord_struct *ct_ptr;
X struct kcs *kc_ptr;
X char error_msg[MAXLINE];
X
X moveto(WIDTH - grid_size - grid_size - L_MARGIN, vpos);
X ct_ptr= so_chordtab;
X
X while (ct_ptr != NULL)
X {
X if (!no_easy_grids || no_easy_grids && ct_ptr->chord->difficult)
X {
X moveto(hpos + 2 * grid_size, vpos);
X printf("(");
X ps_puts(ct_ptr->chord->chord_name);
X printf(") %d %d %d %d %d %d %d %d dots\n",
X ct_ptr->chord->s1,
X ct_ptr->chord->s2,
X ct_ptr->chord->s3,
X ct_ptr->chord->s4,
X ct_ptr->chord->s5,
X ct_ptr->chord->s6,
X ct_ptr->chord->displ,
X ct_ptr->chord->origin);
X }
X ct_ptr = ct_ptr->next;
X }
X }
X
X/*--------------------------------------------------------------------------------*/
Xclean_chordtab()
X {
X struct chord_struct *ct_ptr, *ct_next;
X ct_ptr= so_chordtab;
X
X while (ct_ptr != NULL)
X {
X ct_next = ct_ptr->next;
X free(ct_ptr);
X ct_ptr=ct_next;
X }
X so_chordtab=NULL;
X }
X
X/*--------------------------------------------------------------------------------*/
Xclean_known_chords()
X {
X struct kcs *kc_ptr, **prev_kc_ptr;
X
X kc_ptr = so_known_chords;
X prev_kc_ptr = &so_known_chords;
X while (kc_ptr != NULL)
X {
X if (kc_ptr->origin == CHORD_DEFINED )
X /* remove from known chords */
X {
X *prev_kc_ptr = kc_ptr->next;
X free(kc_ptr);
X kc_ptr=*prev_kc_ptr;
X }
X else
X {
X prev_kc_ptr= &(kc_ptr->next);
X kc_ptr=kc_ptr->next;
X }
X }
X }
X/*--------------------------------------------------------------------------------*/
Xcount_known_chords() /* Debugging routines only */
X {
X struct kcs *kc_ptr;
X int int_count = 0;
X int rc_count = 0;
X int song_count = 0;
X
X kc_ptr = so_known_chords;
X while (kc_ptr != NULL)
X {
X if (kc_ptr->origin == CHORD_BUILTIN)
X int_count++;
X else if (kc_ptr->origin == CHORD_DEFINED)
X {
X song_count++;
X }
X else if (kc_ptr->origin == CHORD_IN_CHORDRC)
X {
X rc_count++;
X }
X kc_ptr=kc_ptr->next;
X }
X fprintf (stderr, "%d builtin, %d in chordrc, %d in song\n", int_count, rc_count, song_count);
X }
X/*--------------------------------------------------------------------------------*/
Xlearn_chord(chord, s1, s2, s3, s4, s5, s6, displ, origin, difficult)
Xchar *chord;
Xint displ;
Xint s1,s2,s3,s4,s5,s6;
Xint origin, difficult;
X {
X
X
X struct kcs *kc_ptr, **prev_kc_ptr, *new_kc_ptr;
X int cmp_ret=0;
X char chord1[CHORD_NAME_SZ], chord2[CHORD_NAME_SZ];
X
X kc_ptr = so_known_chords;
X prev_kc_ptr = &so_known_chords;
X strcpy(chord1, chord);
X
X while ((kc_ptr != NULL) && (chordcompare (chord1, strcpy(chord2,kc_ptr->chord_name)) > 0))
X {
X prev_kc_ptr= &(kc_ptr->next);
X kc_ptr=kc_ptr->next;
X }
X
X new_kc_ptr = (struct kcs *) malloc (sizeof dummy_kcs);
X new_kc_ptr->next = kc_ptr;
X *prev_kc_ptr = new_kc_ptr;
X
X if (displ == 0) displ = 1;
X strcpy(new_kc_ptr->chord_name,chord);
X new_kc_ptr->displ = displ;
X new_kc_ptr->s1 = s1;
X new_kc_ptr->s2 = s2;
X new_kc_ptr->s3 = s3;
X new_kc_ptr->s4 = s4;
X new_kc_ptr->s5 = s5;
X new_kc_ptr->s6 = s6;
X new_kc_ptr->origin = origin;
X new_kc_ptr->difficult = difficult;
X }
X
X/*--------------------------------------------------------------------------------*/
Xint check_old_define_syntax(temp_str, chord_name)
Xchar *temp_str;
Xchar *chord_name;
X {
X char *str;
X int n;
X int ok = TRUE;
X int fret_displ;
X int dot_array[6];
X int i;
X char error_str[MAXLINE];
X
X fret_displ=atoi(temp_str);
X
X for (n=0; n<=5; n++)
X {
X str=toupper_str(strtok(NULL, DELIM_STR));
X if (!strcmp(str,FRET_NONE_STR) || !strcmp(str, FRET_X_STR))
X dot_array[n]=FRET_X;
X else
X dot_array[n]=atoi(str);
X
X ok = ok && (str);
X }
X
X if (strtok(NULL, DELIM_STR))
X ok=FALSE;
X
X if (ok )
X {
X if (!in_chordrc || first_time_in_chordrc)
X {
X sprintf(error_str,
X "definition of chord '%s' uses obsolete format",
X chord_name);
X error(error_str);
X fprintf(stderr,
X " Please edit your input file and replace its %s",
X "definition by the following:\n");
X fprintf(stderr, " {define: %s base-fret %d frets ",
X chord_name, fret_displ);
X for (i=5; i>=0; i--)
X if (dot_array[i] < 0)
X fprintf (stderr, "x ");
X else
X fprintf (stderr, "%d ", dot_array[i]);
X fprintf (stderr, "}\n\n");
X }
X
X
X learn_chord(chord_name,
X dot_array[5],dot_array[4],dot_array[3],
X dot_array[2],dot_array[1],dot_array[0],
X fret_displ, in_chordrc ? CHORD_DEFINED : CHORD_IN_CHORDRC,
X CHORD_HARD);
X }
X
X return(ok);
X }
X
X
X/*--------------------------------------------------------------------------------*/
Xint do_define_chord()
X{
X int dot_array[6];
X char *chord_name;
X char *temp_str;
X int fret_displ;
X int n;
X int hardtoplay = 0;
X
X for ( n= 0; n<6; n++)
X dot_array[n] = 0;
X
X chord_name= strtok(NULL, DELIM_STR);
X if (chord_name== NULL) {
X error("syntax error in chord definition: no chord name");
X return(0);
X }
X
X temp_str= tolower_str(strtok(NULL, DELIM_STR));
X if (strcmp(temp_str, BASE_FRET_STR)) {
X if (!check_old_define_syntax(temp_str,chord_name))
X error("syntax error in chord definition: keyword <base-fret> missing");
X return(0);
X }
X
X temp_str= strtok(NULL, DELIM_STR);
X if (temp_str== NULL) {
X error("syntax error in chord definition: no base fret value");
X return(0);
X }
X fret_displ= atoi(temp_str);
X if (fret_displ == 0) fret_displ = 1;
X
X temp_str= tolower_str(strtok(NULL, DELIM_STR));
X if (strcmp(temp_str, FRETS_STR)) {
X error("syntax error in chord definition: keyword <frets> missing");
X return(0);
X }
X
X for (n= 0; n< 6; n++)
X {
X strcpy(temp_str, toupper_str(strtok(NULL, DELIM_STR)));
X
X if (temp_str!= NULL) {
X if (!strcmp(temp_str, FRET_NONE_STR) ||
X !strcmp(temp_str, FRET_X_STR))
X dot_array[n]= FRET_X;
X else {
X dot_array[n]= atoi(temp_str);
X if (dot_array[n] < 0) dot_array[n]= FRET_X;
X }
X hardtoplay= hardtoplay||(dot_array[n]>LONG_FINGERS);
X }
X else
X {
X error("syntax error in chord definition : too few arguments");
X return(0);
X }
X }
X
X temp_str= strtok(NULL, DELIM_STR);
X if (temp_str!=NULL) {
X error("syntax error in chord definition: too many arguments");
X return(0);
X }
X
X /* CHORD is OK */
X /*
X if (hardtoplay)
X {
X sprintf(mesg, "You'll need long fingers to play \"%s\" this way!", chord_name);
X error (mesg);
X }
X */
X
X learn_chord(chord_name,
X dot_array[0],dot_array[1],dot_array[2],
X dot_array[3],dot_array[4],dot_array[5],
X fret_displ, in_chordrc ? CHORD_IN_CHORDRC : CHORD_DEFINED,
X CHORD_HARD);
X
X return(0);
X}
X
X
X/*--------------------------------------------------------------------------------*/
Xvoid init_known_chords()
X{
X nb_known_chord= 0;
X
X#define N FRET_X
X
X learn_chord("Ab", 1, 3, 3, 2, 1, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ab+", N, N, 2, 1, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ab4", N, N, 1, 1, 2, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ab7", N, N, 1, 1, 1, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ab11", 1, 3, 1, 3, 1, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Absus", N, N, 1, 1, 2, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Absus4", N, N, 1, 1, 2, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Abdim", N, N, 0, 1, 0, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Abmaj", 1, 3, 3, 2, 1, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Abmaj7", N, N, 1, 1, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Abmin", 1, 3, 3, 1, 1, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Abm", 1, 3, 3, 1, 1, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Abm7", N, N, 1, 1, 1, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("A", N, 0, 2, 2, 2, 0, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("A+", N, 0, 3, 2, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A4", 0, 0, 2, 2, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A6", N, N, 2, 2, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A7", N, 0, 2, 0, 2, 0, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("A7+", N, N, 3, 2, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A7(9+)", N, 2, 2, 2, 2, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A9", N, 0, 2, 1, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A11", N, 4, 2, 4, 3, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A13", N, 0, 1, 2, 3, 1, 5, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A7sus4", 0, 0, 2, 0, 3, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A9sus", N, 0, 2, 1, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Asus", N, N, 2, 2, 3, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Asus2", 0, 0, 2, 2, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Asus4", N, N, 2, 2, 3, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Adim", N, N, 1, 2, 1, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Amaj", N, 0, 2, 2, 2, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Amaj7", N, 0, 2, 1, 2, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Adim", N, N, 1, 2, 1, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Amin", N, 0, 2, 2, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A/D", N, N, 0, 0, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A/F#", 2, 0, 2, 2, 2, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A/G#", 4, 0, 2, 2, 2, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("Am", N, 0, 2, 2, 1, 0, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Am#7", N, N, 2, 1, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Am(7#)", N, 0, 2, 2, 1, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Am6", N, 0, 2, 2, 1, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Am7", N, 0, 2, 2, 1, 3, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Am7sus4", 0, 0, 0, 0, 3, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Am9", N, 0, 1, 1, 1, 3, 5, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Am/G", 3, 0, 2, 2, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Amadd9", 0, 2, 2, 2, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Am(add9)", 0, 2, 2, 2, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("A#", N, 1, 3, 3, 3, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A#+", N, N, 0, 3, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A#4", N, N, 3, 3, 4, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A#7", N, N, 1, 1, 1, 2, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A#sus", N, N, 3, 3, 4, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A#sus4", N, N, 3, 3, 4, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A#maj", N, 1, 3, 3, 3, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A#maj7", N, 1, 3, 2, 3, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A#dim", N, N, 2, 3, 2, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A#min", N, 1, 3, 3, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A#m", N, 1, 3, 3, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("A#m7", N, 1, 3, 1, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("Bb", N, 1, 3, 3, 3, 1, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Bb+", N, N, 0, 3, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bb4", N, N, 3, 3, 4, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bb6", N, N, 3, 3, 3, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bb7", N, N, 1, 1, 1, 2, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bb9", 1, 3, 1, 2, 1, 3, 6, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bb11", 1, 3, 1, 3, 4, 1, 6, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bbsus", N, N, 3, 3, 4, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bbsus4", N, N, 3, 3, 4, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bbmaj", N, 1, 3, 3, 3, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bbmaj7", N, 1, 3, 2, 3, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bbdim", N, N, 2, 3, 2, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bbmin", N, 1, 3, 3, 2, 1, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Bbm", N, 1, 3, 3, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bbm7", N, 1, 3, 1, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bbm9", N, N, N, 1, 1, 3, 6, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("B", N, 2, 4, 4, 4, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("B+", N, N, 1, 0, 0, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("B4", N, N, 3, 3, 4, 1, 2, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("B7", 0, 2, 1, 2, 0, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("B7+", N, 2, 1, 2, 0, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("B7+5", N, 2, 1, 2, 0, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("B7#9", N, 2, 1, 2, 3, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("B7(#9)", N, 2, 1, 2, 3, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("B9", 1, 3, 1, 2, 1, 3, 7, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("B11", 1, 3, 3, 2, 0, 0, 7, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("B11/13", N, 1, 1, 1, 1, 3, 2, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("B13", N, 2, 1, 2, 0, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bsus", N, N, 3, 3, 4, 1, 2, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bsus4", N, N, 3, 3, 4, 1, 2, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bmaj", N, 2, 4, 3, 4, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bmaj7", N, 2, 4, 3, 4, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bdim", N, N, 0, 1, 0, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bmin", N, 2, 4, 4, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("B/F#", 0, 2, 2, 2, 0, 0, 2, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("BaddE", N, 2, 4, 4, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("B(addE)", N, 2, 4, 4, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("BaddE/F#", 2, N, 4, 4, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("Bm", N, 2, 4, 4, 3, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Bm6", N, N, 4, 4, 3, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bm7", N, 1, 3, 1, 2, 1, 2, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Bmmaj7", N, 1, 4, 4, 3, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bm(maj7)", N, 1, 4, 4, 3, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bmsus9", N, N, 4, 4, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bm(sus9)", N, N, 4, 4, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Bm7b5", 1, 2, 4, 2, 3, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("C", N, 3, 2, 0, 1, 0, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("C+", N, N, 2, 1, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C4", N, N, 3, 0, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C6", N, 0, 2, 2, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C7", 0, 3, 2, 3, 1, 0, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("C9", 1, 3, 1, 2, 1, 3, 8, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C9(11)", N, 3, 3, 3, 3, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C11", N, 1, 3, 1, 4, 1, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Csus", N, N, 3, 0, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Csus2", N, 3, 0, 0, 1, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Csus4", N, N, 3, 0, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Csus9", N, N, 4, 1, 2, 4, 7, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Cmaj", 0, 3, 2, 0, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Cmaj7", N, 3, 2, 0, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Cmin", N, 1, 3, 3, 2, 1, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Cdim", N, N, 1, 2, 1, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C/B", N, 2, 2, 0, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Cadd2/B", N, 2, 0, 0, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("CaddD", N, 3, 2, 0, 3, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C(addD)", N, 3, 2, 0, 3, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Cadd9", N, 3, 2, 0, 3, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C(add9)", N, 3, 2, 0, 3, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("Cm", N, 1, 3, 3, 2, 1, 3, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Cm7", N, 1, 3, 1, 2, 1, 3, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Cm11", N, 1, 3, 1, 4, N, 3, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("C#", N, N, 3, 1, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#+", N, N, 3, 2, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#4", N, N, 3, 3, 4, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#7", N, N, 3, 4, 2, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#7(b5)", N, 2, 1, 2, 1, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#sus", N, N, 3, 3, 4, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#sus4", N, N, 3, 3, 4, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#maj", N, 4, 3, 1, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#maj7", N, 4, 3, 1, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#dim", N, N, 2, 3, 2, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#min", N, N, 2, 1, 2, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#add9", N, 1, 3, 3, 1, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#(add9)", N, 1, 3, 3, 1, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#m", N, N, 2, 1, 2, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("C#m7", N, N, 2, 4, 2, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("Db", N, N, 3, 1, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Db+", N, N, 3, 2, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Db7", N, N, 3, 4, 2, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dbsus", N, N, 3, 3, 4, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dbsus4", N, N, 3, 3, 4, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dbmaj", N, N, 3, 1, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dbmaj7", N, 4, 3, 1, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dbdim", N, N, 2, 3, 2, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dbmin", N, N, 2, 1, 2, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dbm", N, N, 2, 1, 2, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dbm7", N, N, 2, 4, 2, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("D", N, N, 0, 2, 3, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("D+", N, N, 0, 3, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D4", N, N, 0, 2, 3, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D6", N, 0, 0, 2, 0, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D7", N, N, 0, 2, 1, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("D7#9", N, 2, 1, 2, 3, 3, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D7(#9)", N, 2, 1, 2, 3, 3, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D9", 1, 3, 1, 2, 1, 3, 10, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D11", 3, 0, 0, 2, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dsus", N, N, 0, 2, 3, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dsus2", 0, 0, 0, 2, 3, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dsus4", N, N, 0, 2, 3, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D7sus2", N, 0, 0, 2, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D7sus4", N, 0, 0, 2, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dmaj", N, N, 0, 2, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dmaj7", N, N, 0, 2, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ddim", N, N, 0, 1, 0, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dmin", N, N, 0, 2, 3, 1, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("D/A", N, 0, 0, 2, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D/B", N, 2, 0, 2, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D/C", N, 3, 0, 2, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D/C#", N, 4, 0, 2, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D/E", N, 1, 1, 1, 1, N, 7, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D/G", 3, N, 0, 2, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D5/E", 0, 1, 1, 1, N, N, 7, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dadd9", 0, 0, 0, 2, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D(add9)", 0, 0, 0, 2, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D9add6", 1, 3, 3, 2, 0, 0, 10, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D9(add6)", 1, 3, 3, 2, 0, 0, 10, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("Dm", N, N, 0, 2, 3, 1, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Dm6(5b)", N, N, 0, 1, 0, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dm7", N, N, 0, 2, 1, 1, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Dm#5", N, N, 0, 3, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dm(#5)", N, N, 0, 3, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dm#7", N, N, 0, 2, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dm(#7)", N, N, 0, 2, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dm/A", N, 0, 0, 2, 3, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dm/B", N, 2, 0, 2, 3, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dm/C", N, 3, 0, 2, 3, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dm/C#", N, 4, 0, 2, 3, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Dm9", N, N, 3, 2, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("D#", N, N, 3, 1, 2, 1, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D#+", N, N, 1, 0, 0, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D#4", N, N, 1, 3, 4, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D#7", N, N, 1, 3, 2, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D#sus", N, N, 1, 3, 4, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D#sus4", N, N, 1, 3, 4, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D#maj", N, N, 3, 1, 2, 1, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D#maj7", N, N, 1, 3, 3, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D#dim", N, N, 1, 2, 1, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D#min", N, N, 4, 3, 4, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D#m", N, N, 4, 3, 4, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("D#m7", N, N, 1, 3, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("Eb", N, N, 3, 1, 2, 1, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Eb+", N, N, 1, 0, 0, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Eb4", N, N, 1, 3, 4, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Eb7", N, N, 1, 3, 2, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ebsus", N, N, 1, 3, 4, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ebsus4", N, N, 1, 3, 4, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ebmaj", N, N, 1, 3, 3, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ebmaj7", N, N, 1, 3, 3, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ebdim", N, N, 1, 2, 1, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ebadd9", N, 1, 1, 3, 4, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Eb(add9)", N, 1, 1, 3, 4, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ebmin", N, N, 4, 3, 4, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ebm", N, N, 4, 3, 4, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Ebm7", N, N, 1, 3, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("E", 0, 2, 2, 1, 0, 0, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("E+", N, N, 2, 1, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("E5", 0, 1, 3, 3, N, N, 7, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("E6", N, N, 3, 3, 3, 3, 9, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("E7", 0, 2, 2, 1, 3, 0, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("E7#9", 0, 2, 2, 1, 3, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("E7(#9)", 0, 2, 2, 1, 3, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("E7(5b)", N, 1, 0, 1, 3, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("E7b9", 0, 2, 0, 1, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("E7(b9)", 0, 2, 0, 1, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("E7(11)", 0, 2, 2, 2, 3, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("E9", 1, 3, 1, 2, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("E11", 1, 1, 1, 1, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Esus", 0, 2, 2, 2, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Esus4", 0, 2, 2, 2, 0, 0, 0, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Emaj", 0, 2, 2, 1, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Emaj7", 0, 2, 1, 1, 0, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Edim", N, N, 2, 3, 2, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Emin", 0, 2, 2, 0, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("Em", 0, 2, 2, 0, 0, 0, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Em6", 0, 2, 2, 0, 2, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Em7", 0, 2, 2, 0, 3, 0, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Em/B", N, 2, 2, 0, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Em/D", N, N, 0, 0, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Em7/D", N, N, 0, 0, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Emsus4", 0, 0, 2, 0, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Em(sus4)", 0, 0, 2, 0, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Emadd9", 0, 2, 4, 0, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Em(add9)", 0, 2, 4, 0, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("F", 1, 3, 3, 2, 1, 1, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("F+", N, N, 3, 2, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F+7+11", 1, 3, 3, 2, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F4", N, N, 3, 3, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F6", N, 3, 3, 2, 3, N, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F7", 1, 3, 1, 2, 1, 1, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("F9", 2, 4, 2, 3, 2, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F11", 1, 3, 1, 3, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Fsus", N, N, 3, 3, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Fsus4", N, N, 3, 3, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Fmaj", 1, 3, 3, 2, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Fmaj7", N, 3, 3, 2, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Fdim", N, N, 0, 1, 0, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Fmin", 1, 3, 3, 1, 1, 1, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("F/A", N, 0, 3, 2, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F/C", N, N, 3, 2, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F/D", N, N, 0, 2, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F/G", 3, 3, 3, 2, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F7/A", N, 0, 3, 0, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Fmaj7/A", N, 0, 3, 2, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Fmaj7/C", N, 3, 3, 2, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Fmaj7(+5)", N, N, 3, 2, 2, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Fadd9", 3, 0, 3, 2, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F(add9)", 3, 0, 3, 2, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("FaddG", 1, N, 3, 2, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("FaddG", 1, N, 3, 2, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("Fm", 1, 3, 3, 1, 1, 1, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Fm6", N, N, 0, 1, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Fm7", 1, 3, 1, 1, 1, 1, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Fmmaj7", N, 3, 3, 1, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("F#", 2, 4, 4, 3, 2, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("F#+", N, N, 4, 3, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#7", N, N, 4, 3, 2, 0, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("F#9", N, 1, 2, 1, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#11", 2, 4, 2, 4, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#sus", N, N, 4, 4, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#sus4", N, N, 4, 4, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#maj", 2, 4, 4, 3, 2, 2, 0, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#maj7", N, N, 4, 3, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#dim", N, N, 1, 2, 1, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#min", 2, 4, 4, 2, 2, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("F#/E", 0, 4, 4, 3, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#4", N, N, 4, 4, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#m", 2, 4, 4, 2, 2, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("F#m6", N, N, 1, 2, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#m7", N, N, 2, 2, 2, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("F#m7-5", 1, 0, 2, 3, 3, 3, 2, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("F#m/C#m", N, N, 4, 2, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("Gb", 2, 4, 4, 3, 2, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Gb+", N, N, 4, 3, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gb7", N, N, 4, 3, 2, 0, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Gb9", N, 1, 2, 1, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gbsus", N, N, 4, 4, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gbsus4", N, N, 4, 4, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gbmaj", 2, 4, 4, 3, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gbmaj7", N, N, 4, 3, 2, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gbdim", N, N, 1, 2, 1, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gbmin", 2, 4, 4, 2, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gbm", 2, 4, 4, 2, 2, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Gbm7", N, N, 2, 2, 2, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("G", 3, 2, 0, 0, 0, 3, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("G+", N, N, 1, 0, 0, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G4", N, N, 0, 0, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G6", 3, N, 0, 0, 0, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G7", 3, 2, 0, 0, 0, 1, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("G7+", N, N, 4, 3, 3, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G7b9", N, N, 0, 1, 0, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G7(b9)", N, N, 0, 1, 0, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G7#9", 1, 3, N, 2, 4, 4, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G7(#9)", 1, 3, N, 2, 4, 4, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G9", 3, N, 0, 2, 0, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G9(11)", 1, 3, 1, 3, 1, 3, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G11", 3, N, 0, 2, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gsus", N, N, 0, 0, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gsus4", N, N, 0, 0, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G6sus4", 0, 2, 0, 0, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G6(sus4)", 0, 2, 0, 0, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G7sus4", 3, 3, 0, 0, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G7(sus4)", 3, 3, 0, 0, 1, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gmaj", 3, 2, 0, 0, 0, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gmaj7", N, N, 4, 3, 2, 1, 2, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gmaj7sus4", N, N, 0, 0, 1, 2, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gmaj9", 1, 1, 4, 1, 2, 1, 2, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gmin", 1, 3, 3, 1, 1, 1, 3, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Gdim", N, N, 2, 3, 2, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gadd9", 1, 3, N, 2, 1, 3, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G(add9)", 1, 3, N, 2, 1, 3, 3, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G/A", N, 0, 0, 0, 0, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G/B", N, 2, 0, 0, 0, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G/D", N, 2, 2, 1, 0, 0, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G/F#", 2, 2, 0, 0, 0, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("Gm", 1, 3, 3, 1, 1, 1, 3, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Gm6", N, N, 2, 3, 3, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("Gm7", 1, 3, 1, 1, 1, 1, 3, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("Gm/Bb", 3, 2, 2, 1, N, N, 4, CHORD_BUILTIN, CHORD_HARD);
X
X learn_chord("G#", 1, 3, 3, 2, 1, 1, 4, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("G#+", N, N, 2, 1, 1, 0, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G#4", 1, 3, 3, 1, 1, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G#7", N, N, 1, 1, 1, 2, 1, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("G#sus", N, N, 1, 1, 2, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G#sus4", N, N, 1, 1, 2, 4, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G#maj", 1, 3, 3, 2, 1, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G#maj7", N, N, 1, 1, 1, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G#dim", N, N, 0, 1, 0, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G#min", 1, 3, 3, 1, 1, 1, 4, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G#m", 1, 3, 3, 1, 1, 1, 4, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("G#m6", N, N, 1, 1, 0, 1, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G#m7", N, N, 1, 1, 1, 1, 4, CHORD_BUILTIN, CHORD_EASY);
X learn_chord("G#m9maj7", N, N, 1, 3, 0, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X learn_chord("G#m9(maj7)",N, N, 1, 3, 0, 3, 1, CHORD_BUILTIN, CHORD_HARD);
X
X#undef N
X}
X
X/*--------------------------------------------------------------------------------*/
Xstruct kcs *get_kc_entry(chord_name)
Xchar *chord_name;
X{
X struct kcs *kc_ptr;
X
X kc_ptr = so_known_chords;
X
X while ( (kc_ptr != NULL) && (strcmp(chord_name, kc_ptr->chord_name)))
X kc_ptr = kc_ptr->next;
X return(kc_ptr);
X}
X
X/*--------------------------------------------------------------------------------*/
Xvoid dump_fret(fretnum)
Xint fretnum;
X{
X if (fretnum == FRET_X) printf(" %2s", FRET_X_STR);
X else printf(" %2d", fretnum);
X}
X
X/*--------------------------------------------------------------------------------*/
Xvoid dump_chords(PostScript)
Xint PostScript;
X{
X int i;
X int idx;
X struct kcs *kc_ptr;
X struct chord_struct *ct_ptr;
X
X if (PostScript)
X {
X init_values();
X init_ps();
X init_known_chords();
X do_title("CHORD CHART");
X do_subtitle("Generated with the CHORD program");
X do_subtitle("Copyright Martin....@Sun.COM and Mario....@Sun.COM 1992-1993");
X }
X else
X {
X init_known_chords();
X printf("# CHORD CHART\n");
X printf("# Generated with the CHORD program\n");
X printf("# Copyright Martin....@Sun.COM and Mario....@Sun.COM 1992-1993\n");
X printf("#\n");
X printf("#\t\t\t\t\t '------ strings ------`\n");
X printf("#Chord\t\t\t\t\t E A D G B E\n");
X }
X
X read_chordrc();
X
X if (PostScript)
X {
X draw_known_chords();
X do_end_of_page(TRUE);
X printf ("%%%%Trailer\n");
X printf ("%%%%Pages: %d 1\n", n_pages);
X printf ("%%%%EOF\n");
X }
X else {
X kc_ptr = so_known_chords;
X debug ("starting dump");
X while (kc_ptr != NULL) {
X printf("{define %s:\t\tbase-fret %2d\tfrets",
X kc_ptr->chord_name, kc_ptr->displ);
X dump_fret(kc_ptr->s1);
X dump_fret(kc_ptr->s2);
X dump_fret(kc_ptr->s3);
X dump_fret(kc_ptr->s4);
X dump_fret(kc_ptr->s5);
X dump_fret(kc_ptr->s6);
X printf("}");
X printf("\t%s\n",
X kc_ptr->origin== CHORD_BUILTIN ? "" : "(local)");
X kc_ptr = kc_ptr->next;
X }
X }
X}
END_OF_FILE
if test 42478 -ne `wc -c <'chord/grid.c'`; then
echo shar: \"'chord/grid.c'\" unpacked with wrong size!
fi
# end of 'chord/grid.c'
fi
if test -f 'chord/songs/space-oddity' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/songs/space-oddity'\"
else
echo shar: Extracting \"'chord/songs/space-oddity'\" \(2193 characters\)
sed "s/^X//" >'chord/songs/space-oddity' <<'END_OF_FILE'
X{title: Space Oddity}
X{subtitle: David Bowie}
X# Typed in by Mario Dorion (Mario....@Canada.Sun.Com) from a songbook.
X#
X# Format is for the CHORD PostScript chord formatting utility.
X# Chord is a public domain utility developped by
X# Martin....@Canada.Sun.Com and Mario....@Canada.Sun.Com
X#
X# Syntax of "define" instructions is:
X# define: chord_name base-fret high-E-str B-str G-str D-str A-str low-E-str
X#
X{define Am7/G base-fret 1 frets - 0 3 0 2 1}
X{define C/E base-fret 1 frets 0 3 2 0 1 0}
X{define C/G base-fret 1 frets 3 3 2 0 1 0}
X[C]Ground control to Major [Em]Tom, [C]ground control to Major [Em]Tom:
X[Am]Take your [Am7/G]protein pills and [D7]put your helmet on
X[C]Ground control to Major [Em]Tom: [C]commencing countdown engine's [Em]on
X[Am]Check ig[Am7/G]nition and may [D7]God's love be with you
X
X[C]This is ground control to Major [E7]Tom, you've really made the [F]grade!
XAnd the [Fm]papers want to [C/E]know whose shirts you [F]wear, now it's [Fm]time to leave the [C/E]capsule if you [F]dare
X
X[C]This is Major Tom to ground con[E7]trol, I'm stepping through the [F]door
XAnd I'm [Fm]floating in the [C/E]most peculiar [F]way and the [Fm]stars look very [C/E]difeerent to[F]day
X
XFor [Fmaj7]here am I [Em7]sitting in a tin can, [Fmaj7]far above the [Em7]world
X[Bbmaj7]Planet Earth is [Am]blue and there's [G]nothing I can [F]do [C] [F] [G] [A] [C] [F] [G] [A]
X
X[Fmaj7] [Em7] [A] [C] [D] [E]
X[C]Though I'm passed one hundred thousand [E7]miles, I'm feeling very [F]still
XAnd I [Fm]think my spaceship [C/E]knows which way to [F]go, tell my [Fm]wife I love her [C/E]very much she [F]knows
X
X[G]Ground control to [E7]Major Tom: Your [Am]circuit's dead, there's [Am7/G]something wong.
XCan you [D7]hear me Major Tom? Can you [C/G]hear me Major Tom? Can you [G]hear me Major Tom? Can you ...
X
X[Fmaj7]Here am I [Em7]floating round my tin can, [Fmaj7]far above the [Em7]moon
X[Bbmaj7]Planet Earth is [Am]blue and there's [G]nothing I can [F]do [C] [F] [G] [A] [C] [F] [G] [A]
END_OF_FILE
if test 2193 -ne `wc -c <'chord/songs/space-oddity'`; then
echo shar: \"'chord/songs/space-oddity'\" unpacked with wrong size!
fi
# end of 'chord/songs/space-oddity'
fi
echo shar: End of archive 3 \(of 6\).
cp /dev/null ark3isdone

Martin Leclerc - Sun Montreal SE

unread,
Apr 12, 1995, 3:00:00 AM4/12/95
to
Submitted-by: Martin....@canada.sun.com (Martin Leclerc - Sun Montreal SE)
Posting-number: Volume 47, Issue 118
Archive-name: chord/part04

Environment: UNIX, DOS, VMS, Amiga
Supersedes: chord: Volume 40, Issue 84-88

#! /bin/sh


# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".

# Contents: chord/chord.c chord/getopt.c chord/songs/everybody-hurts


# Wrapped by kent@ftp on Wed Apr 12 21:39:34 1995
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:

echo ' "shar: End of archive 4 (of 6)."'
if test -f 'chord/chord.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/chord.c'\"
else
echo shar: Extracting \"'chord/chord.c'\" \(32769 characters\)
sed "s/^X//" >'chord/chord.c' <<'END_OF_FILE'
Xstatic char SccsId[] = "@(#)chord.c 3.6\t Mar. 1995";


Xstatic char copyright[] = "Copyright 1991-1995 by Martin Leclerc & Mario Dorion";
X
X

X#include "chord.h"
X
Xstatic FILE *source_fd;
X
Xchar
X text_line[MAXLINE], /* Lyrics Buffer */
X chord[MAXTOKEN], /* Buffer for the name of the chord */
X title1[MAXLINE]; /* Holds the first title line */
X
Xchar
X source[MAXTOKEN],
X directive[MAXLINE]; /* Buffer for the directive */
X
Xchar
X i_input; /* Input line pointer */
X
Xchar
X mesgbuf[MAXTOKEN],
X *mesg,
X *text_font, *rt_text_font, *rc_text_font, /* font for text */
X *chord_font, *rt_chord_font, *rc_chord_font, /* font for chord */
X *mono_font = MONOSPACED_FONT, /* non-proprotional font for tabs */
X *current_file,
X *chord_line[MAXLINE],
X *command_name;
X
Xint
X c, /* Current character in input file */
X i_chord, /* Index to 'chord' */
X i_directive, /* Index to 'directive' */
X i_text, /* Index to 'text_line' */
X in_chord, /* Booleans indicating parsing status */
X left_foot_even = -1, /* 0 for even page numbers on the right */
X /* 1 for even page numbers on the left */
X no_grid, rt_no_grid, rc_no_grid,
X page_label = 1, /* physical page number */
X lpage_label = 1, /* logical page number */
X i_chord_ov, /* Overflow Booleans */
X pagination = 1, /* virtual pages per physical pages */
X transpose = 0, /* transposition value */
X vpos, /* Current PostScript position, in points */
X col_vpos, /* Beginning height of column, in points */
X min_col_vpos = TOP, /* lowest colums ending */
X hpos,
X h_offset = 0, /* horizontal offset for multi-col output */
X start_of_chorus, /* Vertical positions of the chorus */
X end_of_chorus,
X chord_size, rt_chord_size, rc_chord_size, /* font size for 'chord_font' */
X cur_text_size = 0,
X text_size, rt_text_size, rc_text_size, /* font size for 'text_font' */
X grid_size, rt_grid_size, rc_grid_size,
X n_pages = 1, /* total physical page counter */
X v_pages = 1, /* virtual pages */
X n_lines = 1, /* line number in input file */
X max_columns = 1, /* number of columns */
X n_columns = 0, /* counter of columns */
X song_pages = 1, /* song page counter */
X blank_space = 0; /* consecutive blank line counter */
X
Xint /* BOOLEANS */
X number_all = FALSE, /* number the first page (set with -p 1) */
X lyrics_only = FALSE,
X dump_only = FALSE,
X in_tab = FALSE,
X postscript_dump = FALSE,
X auto_space = FALSE, /* applies lyrics_only when no chords */
X need_soc = FALSE,
X do_toc = FALSE,
X no_easy_grids = FALSE,
X i_directive_ov = FALSE,
X i_text_ov = FALSE,
X in_directive = FALSE,
X in_chordrc = FALSE,
X first_time_in_chordrc = TRUE,
X in_chorus = FALSE,
X has_directive = FALSE,
X has_chord = FALSE,
X title1_found = FALSE,
X number_logical = FALSE,
X debug_mode = FALSE;
X
Xfloat
X chord_inc,
X scale = 1.0, /* Current scale factor */
X rotation = 0.0, /* Current rotation */
X page_ratio = ((TOP+BOTTOM)/WIDTH);
X
Xextern int nb_chord, first_ptr;
Xextern struct chord_struct *so_chordtab;
Xextern struct toc_struct *so_toc ;
X
Xextern char *optarg;
Xextern int optind, opterr;
X
X
X/* --------------------------------------------------------------------------------*/
Xvoid ps_fputc(fd, c)
XFILE *fd;
Xint c;
X {
X if (c >128)
X {
X fprintf (fd, "\\%o", c);
X }
X else
X switch ((char)c)
X {
X case ')' :
X fprintf (fd, "\\%c", c); break;
X case '(' :
X fprintf (fd, "\\%c", c); break;
X case '\\' :
X fprintf (fd, "\\\\", c); break;
X default:
X fprintf (fd, "%c",c);
X }
X }
X/* --------------------------------------------------------------------------------*/
Xvoid ps_fputs(fd, string)
XFILE *fd;
Xchar *string;


X {
X int i;
X

X /* sprintf (mesg, "ps_fputs:%s ",string); debug(mesg); */
X
X for (i= 0; string[i] != '\0'; i++)
X ps_fputc (fd, string[i]);
X
X }
X
X
X/* --------------------------------------------------------------------------------*/
Xvoid ps_puts(string)
Xchar *string;
X {
X ps_fputs(stdout, string);
X }
X/* --------------------------------------------------------------------------------*/
Xvoid set_text_font(size)
Xint size;
X {
X#define MONO_SIZE_DECR 2 /* TABsize is smaller by this nb of points */
X if (( size != cur_text_size))
X {
X printf ("/TEXT_FONT { /%s findfont %d scalefont } def\n", text_font, size);
X re_encode (text_font);
X printf ("/MONO_FONT { /%s findfont %d scalefont } def\n",
X mono_font, size - MONO_SIZE_DECR);
X re_encode (mono_font);
X cur_text_size= size;
X /* sprintf(mesg, "Changing text size to %d", size); debug (mesg); */
X }
X#undef MONO_SIZE_DECR
X }
X
X/* --------------------------------------------------------------------------------*/
Xvoid use_text_font()
X {
X if (! in_tab) printf ("TEXT_FONT setfont\n");
X else printf ("MONO_FONT setfont\n");
X }
X/* --------------------------------------------------------------------------------*/
Xvoid use_mono_font()
X {
X printf ("MONO_FONT setfont\n");
X }
X/* --------------------------------------------------------------------------------*/
Xvoid do_translate(vert, horiz)
Xfloat vert, horiz;
X {
X printf ("%f %f translate\n", vert , horiz );
X debug ("changing translation");
X }
X/* --------------------------------------------------------------------------------*/
Xvoid do_start_of_page()
X/*logical page ! */
X {
X v_pages++;
X lpage_label++;
X
X if (v_pages == 1)
X {
X n_pages++;
X page_label++;
X printf ("%%%%Page: \"%d\" %d\n",n_pages, n_pages);
X printf ("%%%%BeginPageSetup\n");
X if (pagination > 1)
X {
X printf ("gsave\n");
X printf ("%f %f scale\n", scale, scale);
X printf ("%f rotate\n",rotation);
X }
X printf ("%%%%EndPageSetup\n");
X }
X
X if (pagination== 4)
X {
X if (v_pages== 1) do_translate(L_MARGIN, (TOP+BOTTOM)*1.05);
X else if (v_pages== 2) do_translate(WIDTH-L_MARGIN, 0.0);
X else if (v_pages== 3) do_translate(-(WIDTH-L_MARGIN), -TOP*1.05);
X else if (v_pages== 4) do_translate(WIDTH-L_MARGIN, 0.0);
X }
X
X if (pagination== 2)
X if (v_pages == 1)
X {
X do_translate (0.0, -(TOP+BOTTOM+L_MARGIN/scale));
X }
X else if (v_pages == 2)
X do_translate(WIDTH, 0.0);
X
X vpos = TOP;
X min_col_vpos = TOP;
X hpos= L_MARGIN;
X n_columns = 0;
X song_pages++;
X set_text_font(text_size); /*28/4/94 ML */
X if ( in_chorus )
X {
X start_of_chorus = vpos;


X }
X }
X
X/* --------------------------------------------------------------------------------*/

Xvoid use_chord_font()
X {
X printf ("CHORD_FONT setfont\n");
X }
X
X/* --------------------------------------------------------------------------------*/
Xvoid set_chord_font()
X {
X printf ("/CHORD_FONT { /%s findfont %d scalefont } def\n", chord_font, chord_size);
X re_encode (chord_font);
X }
X
X/* --------------------------------------------------------------------------------*/
Xvoid do_help (command)
Xchar *command;
X {
X fprintf (stderr, "Usage: %s [options] file [file ...]\n", command);
X fprintf (stderr, "Options:\n");
X fprintf (stderr, " -A : About CHORD...\n");
X fprintf (stderr, " -a : Automatic single space lines without chords\n");
X fprintf (stderr, " -c n : Set chord size [9]\n");
X fprintf (stderr, " -C postscript_font : Set chord font\n");
X fprintf (stderr, " -D : Dumps chords definitions (PostScript)\n");
X fprintf (stderr, " -d : Dumps chords definitions (Text)\n");
X fprintf (stderr, " -G : Disable printing of chord grids\n");
X fprintf (stderr, " -g : Don't print grids for builtin \"easy\" chords.\n");
X fprintf (stderr, " -h : This message\n");
X fprintf (stderr, " -i : Generates a table of contents\n");
X fprintf (stderr, " -L : Even pages numbers on left\n");
X fprintf (stderr, " -l : Only print lyrics\n");
X fprintf (stderr, " -n : Number logical pages, not physical\n");
X fprintf (stderr, " -o filename : Saves the output to file\n");
X fprintf (stderr, " -p n : Starting page number [1]\n");
X fprintf (stderr, " -s n : Set chord grid size [30]\n");
X fprintf (stderr, " -t n : Set text size [12]\n");
X fprintf (stderr, " -T postscript_font : Set text font\n");
X fprintf (stderr, " -V : Print version and patchlevel\n");
X fprintf (stderr, " -x n : Transpose by 'n' half-tones\n");
X fprintf (stderr, " -2 : 2 pages per sheet\n");
X fprintf (stderr, " -4 : 4 pages per sheet\n");
X
X exit(0);
X }
X
X/* --------------------------------------------------------------------------------*/
Xvoid do_about ()
X {
X printf("CHORD: A lyrics and chords formatting program.\n");
X printf("===== \n");
X printf("\n");;
X printf("CHORD will read an ASCII file containing the lyrics of one or many\n");
X printf("songs plus chord information. CHORD will then generate a photo-ready,\n");
X printf("professional looking, impress-your-friends sheet-music suitable for printing\n");
X printf("on your nearest PostScript printer.\n");
X printf("\n");
X printf("To learn more about CHORD, look for the man page or do \"chord -h\" for\n");
X printf("the list of options.\n");
X printf("\n");
X printf(" --0--\n");
X printf("\n");
X printf("Copyright (C) 1991-1993 by Martin Leclerc & Mario Dorion\n");
X printf("\n");
X printf("This program is free software; you can redistribute it and/or modify\n");
X printf("it under the terms of the GNU General Public License as published by\n");
X printf("the Free Software Foundation; either version 2 of the License, or\n");
X printf("(at your option) any later version.\n");
X printf("\n");
X printf("This program is distributed in the hope that it will be useful,\n");
X printf("but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
X printf("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n");
X printf("GNU General Public License for more details.\n");
X printf("\n");
X printf("You should have received a copy of the GNU General Public License\n");
X printf("along with this program; if not, write to the Free Software\n");
X printf("Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n");
X printf("\n");
X printf("Send all questions, comments and bug reports to the original authors:\n");
X
X printf(" Martin....@Sun.COM and Mario....@Sun.COM\n");


X printf("\n");
X }
X
X/* --------------------------------------------------------------------------------*/

Xvoid do_comment(comment, style)
Xchar *comment;
Xint style;
X {
X if (comment == NULL)
X {
X error ("Null comment.");
X return;
X }
X for (; *comment == ' '; comment++); /* strip leading blanks */
X advance(blank_space);
X blank_space = 0;
X advance(text_size);
X text_line[i_text] = '\0';
X use_text_font();
X
X if (style == 1) {
X printf (".9 setgray\n");
X printf ("%d setlinewidth\n", text_size);
X printf ("newpath\n");
X printf ("%d %d moveto\n", hpos - 2, vpos + text_size/2 - 2);
X printf ("(");
X ps_puts(comment);
X printf (" ) stringwidth rlineto\n");
X printf ("stroke\n");
X printf ("%d %d moveto\n", hpos, vpos);
X printf ("0 setgray\n");
X printf ("1 setlinewidth\n");
X printf ("(");
X ps_puts(comment);
X printf (") show\n");
X }
X else if (style == 2) {
X printf ("/");
X ps_puts (chord_font);
X printf (" findfont %d scalefont setfont\n",text_size);
X printf ("%d %d moveto\n", hpos, vpos);
X printf ("(");
X ps_puts(comment);
X printf (") show\n");
X use_text_font();
X }
X else if (style == 3) {
X printf ("newpath\n");
X printf ("%d %d moveto\n",hpos + 2, vpos - 2);
X printf ("(");
X ps_puts(comment);
X printf (") stringwidth /vdelta exch def /hdelta exch def\n");
X printf ("hdelta vdelta rlineto 0 %d rlineto hdelta neg 0 rlineto closepath\n",
X text_size);
X printf ("stroke\n");
X printf ("%d %d moveto\n", hpos, vpos);
X printf ("0 setgray\n");
X printf ("(");
X ps_puts(comment);
X printf (") show\n");
X }
X
X i_text = 0;
X }
X/* --------------------------------------------------------------------------------*/
Xvoid do_chorus_line()
X {
X printf ("1 setlinewidth\n");
X printf ("newpath\n");
X printf ("%d %d moveto\n", hpos - 10, start_of_chorus);
X printf ("0 %d rlineto\n", -(start_of_chorus - end_of_chorus));
X printf ("closepath\n");
X printf ("stroke\n");
X }
X/* --------------------------------------------------------------------------------*/
Xvoid do_chord (i_text, chord)
Xint i_text;
Xchar *chord;
X {
X int j;
X struct chord_struct *ct_ptr;
X if ((transpose != 0) && (strcmp(toupper_str(chord), NO_CHORD_STR)))
X if (do_transpose (chord) != 0)
X {
X sprintf (mesg, "Don't know how to transpose [%s]", chord);


X error (mesg);
X }
X

X for (j= i_text; chord_line[j] != NULL; j++);
X
X if (j < MAXLINE)
X if (strcmp(toupper_str(chord), NO_CHORD_STR))
X {
X ct_ptr = add_to_chordtab(chord);
X chord_line[j] = ct_ptr->chord->chord_name;
X }
X else chord_line[j] = NO_CHORD_STR;


X
X }
X
X/* --------------------------------------------------------------------------------*/

Xvoid print_chord_line ()
X {
X int i, j; /* Counter */
X
X printf ("/minhpos %d def\n", hpos);
X
X for (j= 0; j<MAXLINE; j++)
X {
X if (chord_line[j] != NULL )
X {
X use_text_font();
X
X printf ("(" );
X for (i= 0; (i<j) && (text_line[i] != '\0');
X ps_fputc (stdout,text_line[i++]));
X
X printf (") stringwidth pop %d add \n", hpos);
X printf ("dup minhpos lt\n");
X printf (" {pop minhpos} if\n");
X printf ("dup /minhpos exch (");
X ps_puts(chord_line[j]);
X printf (") stringwidth pop add def\n");
X printf ("%d moveto\n",vpos);
X
X
X use_chord_font();
X printf ("(");
X ps_puts(chord_line[j]);
X printf (") show\n");
X
X chord_line[j]= NULL;
X }


X }
X }
X
X/* --------------------------------------------------------------------------------*/

Xvoid init_ps()
X {
X printf ("%%!PS-Adobe-1.0\n");
X printf ("%%%%Title: A song\n");
X printf ("%%%%Creator: Martin Leclerc & Mario Dorion\n");
X printf ("%%%%Pages: (atend)\n");
X printf ("%%%%BoundingBox: 5 5 605 787\n");
X printf ("%%%%EndComments\n");
X printf ("/inch {72 mul } def\n");
X
X print_re_encode();
X set_chord_font();
X set_text_font(text_size);
X do_init_grid_ps();
X
X printf ("%%%%EndProlog\n");
X
X printf ("%%%%Page: \"%d\" %d\n",n_pages, n_pages);
X printf ("%%%%BeginPageSetup\n");
X if (pagination > 1)
X {
X printf ("gsave\n");
X printf ("%f %f scale\n", scale, scale);
X printf ("%f rotate\n", rotation);
X }
X printf ("%%%%EndPageSetup\n");
X
X vpos = TOP;
X hpos = L_MARGIN;
X n_columns=0;
X
X if (pagination== 4)
X do_translate ( L_MARGIN, TOP+BOTTOM);
X else if (pagination== 2)
X {
X do_translate (0.0, -(TOP+BOTTOM+L_MARGIN/scale));
X }


X }
X
X
X/* --------------------------------------------------------------------------------*/

Xvoid do_page_numbering(pnum)
Xint pnum;
X {
X printf ("1 setlinewidth\n");
X printf ("0 setgray\n");
X printf ("newpath\n");
X printf ("%f %f 10 sub moveto\n", L_MARGIN, BOTTOM);
X printf ("%f 0 rlineto\n", WIDTH - L_MARGIN * 2);
X printf ("stroke\n");
X
X set_text_font(DEF_TEXT_SIZE - 2);
X use_text_font();
X if (page_label % 2 == left_foot_even) /* left side */
X {
X printf ("1 inch %f 3 div moveto\n", BOTTOM);
X if (pagination == 2)
X printf ("-500 0 rmoveto\n");
X printf ("(Page %d)\n", pnum);
X }
X else /* right side */
X {
X printf ("(Page %d) dup stringwidth pop\n", pnum);
X printf ("%f exch sub 1 inch sub %f 3 div moveto\n",
X WIDTH, BOTTOM);
X }
X printf ("show\n");
X }
X/* --------------------------------------------------------------------------------*/
Xvoid do_end_of_phys_page()
X/* physical */
X {
X /*debug ("end_of_phys_page");*/
X
X /* restore full page mode if necessary */
X if (pagination > 1)
X printf ("grestore\n");
X
X if (! number_logical)
X {
X if (number_all)
X do_page_numbering(page_label);
X else if (song_pages > 1)
X do_page_numbering(song_pages);
X }
X
X printf ("showpage\n");
X printf ("%%%%EndPage: \"%d\" %d\n",n_pages, n_pages);
X
X lpage_label += pagination-v_pages;
X }
X
X/* --------------------------------------------------------------------------------*/
Xvoid do_end_of_page(force_physical)
Xint force_physical;
X/* Logical */
X {
X
X if ((song_pages > 1) && title1_found)
X {
X set_text_font(DEF_TEXT_SIZE - 2);
X use_text_font();
X printf ("(");
X ps_puts(&title1[0]);
X printf (") dup stringwidth pop 2 div\n");
X printf ("%f 2 div exch sub %f 3 div moveto\n",
X WIDTH, BOTTOM);
X printf ("show\n");
X set_text_font(text_size);
X }
X
X if (number_logical)
X {
X if (number_all)
X do_page_numbering(lpage_label);
X else if (song_pages > 1)
X do_page_numbering(song_pages);
X }
X
X if ( in_chorus )
X {
X end_of_chorus = vpos;
X do_chorus_line();
X }
X
X if ((v_pages == pagination) || force_physical)
X {
X do_end_of_phys_page();
X v_pages = 0;
X }
X n_columns = 0;
X min_col_vpos = TOP;
X col_vpos = TOP;
X }
X
X/* --------------------------------------------------------------------------------*/
Xvoid do_end_of_column()
X {
X if (n_columns == (max_columns-1))


X {
X do_end_of_page(FALSE);
X do_start_of_page();
X }

X else
X {
X n_columns++;
X if (vpos < min_col_vpos )
X min_col_vpos = vpos;
X vpos = col_vpos;
X hpos = L_MARGIN + (n_columns * h_offset);
X }
X }
X/* --------------------------------------------------------------------------------*/
Xvoid do_end_of_song()
X{
X if ((! lyrics_only && ! no_grid))
X {
X if (min_col_vpos < vpos )
X vpos = min_col_vpos;
X draw_chords();
X }
X do_end_of_page(FALSE);
X}
X
X/* --------------------------------------------------------------------------------*/
Xvoid set_sys_def()
X {
X text_size= DEF_TEXT_SIZE;
X chord_size= DEF_CHORD_SIZE;
X grid_size = DEF_GRID_SIZE;
X text_font = DEF_TEXT_FONT;
X chord_font = DEF_CHORD_FONT;
X text_font = DEF_TEXT_FONT;
X no_grid = FALSE;
X n_columns = 0;
X max_columns = 1;
X dummy_kcs.chord_name[0]='\0';
X }
X
X/* --------------------------------------------------------------------------------*/
Xvoid set_rc_def()
X {
X if (rc_text_size != 0) text_size = rc_text_size;
X if (rc_chord_size != 0) chord_size = rc_chord_size;
X if (rc_grid_size != 0) grid_size = rc_grid_size;
X if (rc_no_grid != 0) no_grid = rc_no_grid;
X if (rc_text_font != NULL) text_font = rc_text_font;
X if (rc_chord_font != NULL) chord_font = rc_chord_font;
X }
X
X/* --------------------------------------------------------------------------------*/
Xvoid set_rt_def()
X {
X if (rt_text_size != 0) text_size = rt_text_size;
X if (rt_chord_size != 0) chord_size = rt_chord_size;
X if (rt_grid_size != 0) grid_size = rt_grid_size;
X if (rt_no_grid != 0) no_grid = rt_no_grid;
X if (rt_text_font != NULL) text_font = rt_text_font;
X if (rt_chord_font != NULL) chord_font = rt_chord_font;
X }
X
X/* --------------------------------------------------------------------------------*/
Xvoid init_values()
X {
X set_sys_def();
X set_rc_def();
X set_rt_def();
X }
X
X/* --------------------------------------------------------------------------------*/
Xvoid do_new_song()
X {
X do_end_of_song();
X nb_chord= first_ptr= 0;
X song_pages = 0;
X in_tab = FALSE;
X strcpy (title1, "");
X do_start_of_page();
X
X /* reset default */
X init_values();
X clean_known_chords();
X clean_chordtab();
X
X set_text_font(text_size);
X }
X/* --------------------------------------------------------------------------------*/
Xvoid advance(amount)
Xint amount;
X {
X vpos = vpos - amount; /* Affect text positionning ! */
X if (vpos < BOTTOM )
X {
X /* do_end_of_page(FALSE); */
X do_end_of_column();
X /* do_start_of_page(); */


X }
X }
X
X/* --------------------------------------------------------------------------------*/

Xvoid print_text_line()


X {
X int i;
X

X text_line[i_text] = '\0';
X
X for (i= 0; text_line[i] == ' '; i++);
X
X if (!((auto_space || in_tab) && !has_chord))
X {
X advance(blank_space);
X blank_space = 0;
X advance (chord_size + 1);
X
X if ( ( text_line[i] != '\0' )
X && ( vpos - text_size <= BOTTOM))
X advance (text_size);
X
X if (need_soc)
X {
X start_of_chorus = vpos + chord_size;
X need_soc = FALSE;
X }
X if ((! lyrics_only) && has_chord)
X print_chord_line();
X }
X
X if ( text_line[i] == '\0')
X {
X blank_space += text_size - 2;
X }
X else
X {
X advance (blank_space);
X blank_space = 0;
X advance (text_size - 1);
X if (need_soc)
X {
X start_of_chorus = vpos + text_size;
X need_soc = FALSE;
X }
X use_text_font();
X printf ("%d %d moveto\n", hpos, vpos);
X printf ("(");
X ps_puts(&text_line[0]);
X printf (") show\n");
X }
X
X i_text = 0;
X i_text_ov = FALSE;
X /* hpos = L_MARGIN; */
X has_chord = FALSE;
X }
X
X/* --------------------------------------------------------------------------------*/
Xvoid do_title(title)
Xchar *title;
X {
X
X set_text_font (text_size+5);
X use_text_font();
X printf ("(");
X ps_puts(title);
X printf (") dup stringwidth pop 2 div\n");
X printf ("%f 2 div exch sub %d moveto\n", WIDTH, vpos);
X printf ("show\n");
X vpos = vpos - text_size - 5;
X /* skip blanks */
X while ( *title == ' ') title++;
X
X strcpy (&title1[0], title);
X title1_found = TRUE;
X set_text_font (text_size);
X if (do_toc && song_pages == 1) /* generate index entry */
X add_title_to_toc(title, number_logical ? lpage_label : page_label);
X }
X/* --------------------------------------------------------------------------------*/
Xvoid do_subtitle(sub_title)
Xchar *sub_title;
X {
X use_text_font();
X printf ("(");
X ps_puts(sub_title);
X printf (") dup stringwidth pop 2 div\n");
X printf ("%f 2 div exch sub %d moveto\n", WIDTH , vpos);
X printf ("show\n");
X vpos = vpos - text_size ;
X if (do_toc && song_pages == 1)
X add_subtitle_to_toc(sub_title);


X }
X
X
X/* --------------------------------------------------------------------------------*/

Xvoid do_directive(directive)
Xchar *directive;
X {
X int i;
X char *command, *comment;
X
X command= tolower_str(strtok(directive, ": "));
X
X if (!strcmp(command, "start_of_chorus") || !strcmp(command,"soc"))
X {
X /* start_of_chorus = vpos - blank_space; */
X need_soc = TRUE;
X in_chorus = TRUE;
X }
X else if (!strcmp (command, "end_of_chorus") || !strcmp(command, "eoc"))
X {
X if ( in_chorus )
X {
X end_of_chorus = vpos;
X do_chorus_line();
X in_chorus = FALSE;
X }
X else
X error ("Not in a chorus.");
X }
X else if (!strcmp (command, "textfont") || !strcmp (command, "tf"))
X {
X if (in_chordrc) rc_text_font = strtok(NULL, ": ");
X else text_font = strtok(NULL, ": ");
X }
X else if (!strcmp (command, "chordfont") || !strcmp (command, "cf"))
X {
X if (in_chordrc) rc_chord_font = strtok(NULL, ": ");
X else
X {
X chord_font = strtok(NULL, ": ");
X set_chord_font();
X }
X }
X else if (!strcmp (command, "chordsize") || !strcmp (command, "cs"))
X {
X i = atoi(strtok(NULL, ": "));
X if ( i == 0 )
X error ("invalid value for chord_size");
X else
X if (in_chordrc) rc_chord_size = i;
X else
X {
X chord_size = i;
X set_chord_font();
X }
X }
X else if (!strcmp (command, "textsize") || !strcmp (command, "ts"))
X {
X i = atoi(strtok(NULL, ": "));
X if ( i == 0 )
X error ("invalid value for text_size");
X else
X if (in_chordrc) rc_text_size = i;
X else
X {
X text_size = i;
X set_text_font (text_size);
X }
X }
X else if (!strcmp (command, "comment") || !strcmp (command, "c"))
X {
X comment = strtok(NULL, "\0");
X do_comment(comment, 1);
X }
X else if (!strcmp (command, "comment_italic") || !strcmp (command, "ci"))
X {
X comment = strtok(NULL, "\0");
X do_comment(comment, 2);
X }
X else if (!strcmp (command, "comment_box") || !strcmp (command, "cb"))
X {
X comment = strtok(NULL, "\0");
X do_comment(comment, 3);
X }
X else if (!strcmp(command, "new_song") || !strcmp(command,"ns"))
X {
X do_new_song();
X }
X else if (!strcmp(command, "title") || !strcmp(command,"t"))
X {
X do_title(strtok(NULL, "\0"));
X }
X else if (!strcmp(command, "subtitle") || !strcmp(command,"st"))
X {
X do_subtitle(strtok(NULL, "\0"));
X }
X else if (!strcmp(command, "define") || !strcmp(command,"d"))
X {
X do_define_chord();
X }
X else if (!strcmp(command, "no_grid") || !strcmp(command,"ng"))
X {
X if (in_chordrc) rc_no_grid = TRUE;
X else no_grid = TRUE;
X }
X else if (!strcmp(command, "grid") || !strcmp(command,"g"))
X {
X if (in_chordrc) rc_no_grid = FALSE;
X else no_grid = FALSE;
X }
X else if (!strcmp(command, "new_page") || !strcmp(command,"np"))


X {
X do_end_of_page(FALSE);
X do_start_of_page();
X }

X else if (!strcmp(command, "start_of_tab") || !strcmp(command,"sot"))
X {
X if ( in_tab )
X error ("Already in a tablature !");
X else
X in_tab = TRUE;
X }
X else if (!strcmp(command, "end_of_tab") || !strcmp(command,"eot"))
X {
X if (! in_tab )
X error ("Not in a tablature !") ;
X else
X in_tab = FALSE;
X }
X else if (!strcmp(command, "column_break") || !strcmp(command,"colb"))
X {
X do_end_of_column();
X }
X else if (!strcmp(command, "columns") || !strcmp(command,"col"))
X {
X i = atoi(strtok(NULL, ": "));
X if ( i <= 1 )
X error ("invalid value for number of columns");
X else
X {
X max_columns = i;
X n_columns = 0;
X col_vpos = vpos;
X h_offset = (int)(( WIDTH - L_MARGIN) / max_columns);
X }
X }
X else if (!strcmp(command, "new_physical_page") || !strcmp(command,"npp"))
X {
X do_end_of_page(TRUE);
X do_start_of_page();
X }
X else
X {
X sprintf (mesg, "Invalid Directive : [%s]", command);
X error(mesg);
X has_directive = FALSE;


X }
X }
X
X/* --------------------------------------------------------------------------------*/

Xvoid put_in_string(array, p_index, c, max_index, p_ov_flag)
Xchar array[MAXLINE];
Xint *p_index;
Xint c;
Xint max_index;
Xint *p_ov_flag;
X {
X if (*p_index < max_index)
X array[(*p_index)++] = (char) c;
X else
X {
X if (!*p_ov_flag)
X {
X error ("Buffer Overflow");
X *p_ov_flag = TRUE;


X }
X }
X }
X/* --------------------------------------------------------------------------------*/

Xvoid do_eol()
X {
X if ( in_directive )
X error ("Line ends while in a directive !");
X if ( in_chord)
X error ("Line ends while in a chord !");
X if (has_directive == FALSE)
X {
X if (in_chordrc)
X {
X if (strcmp(text_line, "\0"))
X error("line is NOT a directive");
X }
X else if (! in_tab || ! lyrics_only)
X print_text_line();
X }
X else
X has_directive = FALSE;
X n_lines++;
X i_input = 0;
X in_directive = FALSE;
X in_chord = FALSE;
X i_text = 0;
X i_text_ov = FALSE;
X text_line[0]='\0';
X }
X/* --------------------------------------------------------------------------------*/
Xvoid process_file(source_fd)
XFILE *source_fd;
X {
X /*debug("start of process_file");*/
X
X n_lines = 0;
X
X while ( (c= getc(source_fd)) != EOF)
X {
X i_input++;
X switch ((char)c) {
X
X case '[':
X if (! in_tab) {
X if ( in_chord )
X error("Opening a chord within a chord!");
X else
X in_chord = TRUE;
X i_chord = 0;
X }
X else put_in_string(text_line, &i_text, c, MAXLINE, &i_text_ov);
X break;
X
X case ']':
X if (! in_tab) {
X if ( in_chord )
X {
X in_chord = FALSE;
X chord[i_chord]= '\0';
X do_chord(i_text, &chord[0]);
X has_chord = TRUE;
X i_chord = 0;
X i_chord_ov = FALSE;
X }
X else
X error("']' found with no matching '['");
X }
X else put_in_string(text_line, &i_text, c, MAXLINE, &i_text_ov);
X break;
X
X case '{':
X in_directive = TRUE;
X i_directive = 0;
X has_directive = TRUE;
X break;
X
X case '}':
X if ( in_directive)
X {
X in_directive = FALSE;
X directive[i_directive]= '\0';
X for (; (c= getc(source_fd)) != '\n'; );
X i_input = 0;
X do_directive(&directive[0]);
X has_directive = FALSE;
X n_lines++;
X i_directive = 0;
X i_directive_ov = FALSE;
X }
X else
X error("'}' found with no matching '{'");
X break;
X
X case '\n':
X do_eol();
X break;
X case '(':
X case ')':
X if (in_directive)
X {
X put_in_string(directive, &i_directive, c, MAXTOKEN, &i_directive_ov);
X break;
X }
X else if (in_chord) /* allow parens in chord names */
X {
X put_in_string (chord, &i_chord, c, CHORD_NAME_SZ, &i_chord_ov);
X break;
X }
X else
X {
X put_in_string (text_line, &i_text, c, MAXLINE, &i_text_ov);
X break;
X }
X
X /* This case HAS to be the last before the default statement !!! */
X
X case '#':
X if (i_input == 1)
X {
X for (; (c= getc(source_fd)) != '\n'; );
X n_lines++;
X i_input = 0;
X break;
X }
X
X default :
X if (in_chord )
X {
X if ( c != ' ' )
X {
X put_in_string(chord, &i_chord, c, CHORD_NAME_SZ, &i_chord_ov);
X }
X }
X else if (in_directive)
X {
X put_in_string(directive, &i_directive, c, MAXTOKEN, &i_directive_ov);
X }
X else
X {
X put_in_string(text_line, &i_text, c, MAXLINE, &i_text_ov);
X }
X break;
X }
X }
X if (i_input != 0 ) do_eol();
X if (! in_chordrc) print_text_line();
X }
X
X/* --------------------------------------------------------------------------------*/
X/* read the file $HOME/.chordrc as a set of directive */
Xvoid read_chordrc()
X {
X char chordrc[MAXTOKEN];
X FILE *chordrc_fd;
X int n_lines_save;
X
X strcpy (chordrc, getenv ("HOME"));
X strcat (chordrc,"/.chordrc\0");
X current_file = chordrc;
X chordrc_fd = fopen (chordrc, "r");
X if (chordrc_fd != NULL)
X {
X n_lines_save= n_lines;
X n_lines= 1;
X in_chordrc = TRUE;
X process_file(chordrc_fd);
X in_chordrc = FALSE;
X n_lines= n_lines_save;
X fclose(chordrc_fd);
X }
X current_file = &source[0];
X first_time_in_chordrc = FALSE;


X }
X
X
X/* --------------------------------------------------------------------------------*/

Xmain(argc, argv)
Xint argc;
Xchar **argv;
X {
X int c,i;
X
X mesg = mesgbuf;
X/* Option Parsing */
X
X command_name= argv[0];
X
X while ((c = getopt(argc, argv, "aAc:C:dDgGhilLno:p:s:t:T:Vx:24")) != -1)
X switch (c) {
X
X case 'd':
X dump_only = TRUE;
X break;
X
X case 'D':
X dump_only = TRUE;
X postscript_dump = TRUE;
X break;
X
X case 'c':
X i = atoi (optarg);
X if ( i == 0 )
X error_rt("invalid value for chord_size");
X else
X rt_chord_size = i;
X break;
X
X case 'C':
X rt_chord_font = optarg;
X break;
X
X case 'h':
X do_help(argv[0]);
X break;
X
X case 't':
X i = atoi (optarg);
X if ( i == 0 )
X error_rt("invalid value for text_size");
X else
X rt_text_size= i;
X break;
X
X case 'T':
X rt_text_font = optarg;
X break;
X
X case 'x':
X i = atoi (optarg);
X if ( i == 0 )
X error_rt("invalid value for transposition");
X else
X transpose = i;
X break;
X
X case 's':
X i = atoi (optarg);
X if ( i == 0 )
X error_rt("invalid value for grid_size");
X else
X rt_grid_size = i;
X break;
X
X case 'g':
X no_easy_grids = TRUE;
X break;
X
X case 'G':
X rt_no_grid = TRUE;
X break;
X
X case 'l':
X lyrics_only= TRUE;
X break;
X
X case 'n':
X number_logical = TRUE;
X break;
X
X case 'V':
X print_version();
X exit(0);
X break;
X
X case '2':
X pagination= 2;
X scale = (WIDTH - L_MARGIN)/(TOP + BOTTOM);
X rotation= 90.0;
X break;
X
X case '4':
X pagination= 4;
X scale = ((WIDTH - L_MARGIN)/2.1)/(WIDTH - L_MARGIN);
X break;
X
X case 'i': /* generate in index */
X
X do_toc= TRUE;
X number_all = TRUE;
X break;
X
X case 'a':
X auto_space= TRUE;
X break;
X
X case 'p':
X i = atoi (optarg);
X if ( i == 0 )
X error_rt("invalid value for initial page number");
X else {
X page_label = i;
X number_all = TRUE;
X }
X break;
X
X case 'L':
X left_foot_even = 0;
X number_all= TRUE;
X break;
X
X case 'o':
X if ( freopen(optarg, "w", stdout) == NULL)
X {
X fprintf (stderr, "Unable to open \"%s\" for output\n", optarg);
X exit(1);
X }
X break;
X
X case 'A':
X do_about();
X exit(0);
X break;
X
X case '?':
X do_help(argv[0]);
X break;
X }
X
X/* Is there anything? */
X
X if (argc == 1)
X do_help(argv[0]);
X
X/* Is there input? */
X
X if ((optind == argc) && isatty(0) && !dump_only)
X {
X fprintf (stderr, "Error: CHORD does not expect you to type the song on your keyboard.\n");
X fprintf (stderr, "Please either specify an input filename on the command line\n");
X fprintf (stderr, "or have the input redirected or piped in.\n");
X fprintf (stderr, "Exemples:\n");
X fprintf (stderr, " %% chord my_song.cho > myfile.ps\n");
X fprintf (stderr, " %% chord < mysong.cho > myfile.ps\n");
X fprintf (stderr, "Do \"chord -h\" to learn about CHORD's options\n");
X exit(1);
X }
X
X/* Is there output? */
X
X if (isatty(1) && (!dump_only || postscript_dump)) /* 1 == stdout */
X {
X fprintf (stderr, "Error: CHORD will not send PostScript to your terminal.\n");
X fprintf (stderr, "Please either redirect (>) or pipe (|) the output.\n");
X fprintf (stderr, "Exemples:\n");
X fprintf (stderr, " %% chord my_song.cho > myfile.ps\n");
X fprintf (stderr, " %% chord my_song.cho | lpr\n");
X exit(1);
X }
X
X
X/* File Processing */
X
X if (dump_only)
X {
X dump_chords(postscript_dump);
X exit(0);
X }
X
X init_known_chords();
X read_chordrc();


X init_values();
X init_ps();
X

X chord_inc = chord_size * 1.5;
X
X for ( ; optind < argc; optind++ )
X {
X strcpy(source, argv[optind]);
X read_input_file(source, source_fd);
X if (optind < argc - 1)
X do_new_song();
X }
X
X
X do_end_of_song();
X
X if (do_toc) /* generate index page */
X {
X build_ps_toc();
X do_end_of_page(FALSE);
X }
X
X if (v_pages != 0)
X {
X do_end_of_phys_page();
X }
X
X


X printf ("%%%%Trailer\n");
X printf ("%%%%Pages: %d 1\n", n_pages);
X printf ("%%%%EOF\n");
X

X exit (0);
X return(0);
X }
END_OF_FILE
if test 32769 -ne `wc -c <'chord/chord.c'`; then
echo shar: \"'chord/chord.c'\" unpacked with wrong size!
fi
# end of 'chord/chord.c'
fi
if test -f 'chord/getopt.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/getopt.c'\"
else
echo shar: Extracting \"'chord/getopt.c'\" \(20915 characters\)
sed "s/^X//" >'chord/getopt.c' <<'END_OF_FILE'
X/* Getopt for GNU.
X NOTE: getopt is now part of the C library, so if you don't know what
X "Keep this file name-space clean" means, talk to rol...@gnu.ai.mit.edu
X before changing it!
X
X Copyright (C) 1987, 88, 89, 90, 91, 92, 1993
X Free Software Foundation, Inc.
X
X This program is free software; you can redistribute it and/or modify it
X under the terms of the GNU General Public License as published by the
X Free Software Foundation; either version 2, or (at your option) any
X later version.
X
X This program is distributed in the hope that it will be useful,
X but WITHOUT ANY WARRANTY; without even the implied warranty of
X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X GNU General Public License for more details.
X
X You should have received a copy of the GNU General Public License
X along with this program; if not, write to the Free Software
X Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
X
X/* NOTE!!! AIX requires this to be the first thing in the file.
X Do not put ANYTHING before it! */
X#if !defined (__GNUC__) && defined (_AIX)
X #pragma alloca
X#endif
X
X#ifdef HAVE_CONFIG_H
X#include "config.h"
X#endif
X
X#ifdef __GNUC__
X#define alloca __builtin_alloca
X#else /* not __GNUC__ */
X#if defined (HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__)))) || defined(__sgi)
X#include <alloca.h>
X#else
X#ifndef _AIX
Xchar *alloca ();
X#endif
X#endif /* alloca.h */
X#endif /* not __GNUC__ */
X
X/* #if !__STDC__ && !defined(const) && IN_GCC */
X#if !__STDC__
X#define const
X#endif
X
X/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. */
X#ifndef _NO_PROTO
X#define _NO_PROTO
X#endif
X
X#include <stdio.h>
X
X/* Comment out all this code if we are using the GNU C Library, and are not
X actually compiling the library itself. This code is part of the GNU C
X Library, but also included in many other GNU distributions. Compiling
X and linking in this code is a waste when using the GNU C library
X (especially if it is a shared library). Rather than having every GNU
X program understand `configure --with-gnu-libc' and omit the object files,
X it is simpler to just do this in the source for each such file. */
X
X#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
X
X
X/* This needs to come after some library #include
X to get __GNU_LIBRARY__ defined. */
X#ifdef __GNU_LIBRARY__
X#undef alloca
X/* Don't include stdlib.h for non-GNU C libraries because some of them
X contain conflicting prototypes for getopt. */
X#include <stdlib.h>
X#else /* Not GNU C library. */
X#define __alloca alloca
X#endif /* GNU C library. */
X
X/* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a
X long-named option. Because this is not POSIX.2 compliant, it is
X being phased out. */
X/* #define GETOPT_COMPAT */
X
X/* This version of `getopt' appears to the caller like standard Unix `getopt'
X but it behaves differently for the user, since it allows the user
X to intersperse the options with the other arguments.
X
X As `getopt' works, it permutes the elements of ARGV so that,
X when it is done, all the options precede everything else. Thus
X all application programs are extended to handle flexible argument order.
X
X Setting the environment variable POSIXLY_CORRECT disables permutation.
X Then the behavior is completely standard.
X
X GNU application programs can use a third alternative mode in which
X they can distinguish the relative order of options and other arguments. */
X
X#include "getopt.h"
X
X/* For communication from `getopt' to the caller.
X When `getopt' finds an option that takes an argument,
X the argument value is returned here.
X Also, when `ordering' is RETURN_IN_ORDER,
X each non-option ARGV-element is returned here. */
X
Xchar *optarg = 0;
X
X/* Index in ARGV of the next element to be scanned.
X This is used for communication to and from the caller
X and for communication between successive calls to `getopt'.
X
X On entry to `getopt', zero means this is the first call; initialize.
X
X When `getopt' returns EOF, this is the index of the first of the
X non-option elements that the caller should itself scan.
X
X Otherwise, `optind' communicates from one call to the next
X how much of ARGV has been scanned so far. */
X
X/* XXX 1003.2 says this must be 1 before any call. */
Xint optind = 0;
X
X/* The next char to be scanned in the option-element
X in which the last option character we returned was found.
X This allows us to pick up the scan where we left off.
X
X If this is zero, or a null string, it means resume the scan
X by advancing to the next ARGV-element. */
X
Xstatic char *nextchar;
X
X/* Callers store zero here to inhibit the error message
X for unrecognized options. */
X
Xint opterr = 1;
X
X/* Set to an option character which was unrecognized.
X This must be initialized on some systems to avoid linking in the
X system's own getopt implementation. */
X
Xint optopt = '?';
X
X/* Describe how to deal with options that follow non-option ARGV-elements.
X
X If the caller did not specify anything,
X the default is REQUIRE_ORDER if the environment variable
X POSIXLY_CORRECT is defined, PERMUTE otherwise.
X
X REQUIRE_ORDER means don't recognize them as options;
X stop option processing when the first non-option is seen.
X This is what Unix does.
X This mode of operation is selected by either setting the environment
X variable POSIXLY_CORRECT, or using `+' as the first character
X of the list of option characters.
X
X PERMUTE is the default. We permute the contents of ARGV as we scan,
X so that eventually all the non-options are at the end. This allows options
X to be given in any order, even with programs that were not written to
X expect this.
X
X RETURN_IN_ORDER is an option available to programs that were written
X to expect options and other ARGV-elements in any order and that care about
X the ordering of the two. We describe each non-option ARGV-element
X as if it were the argument of an option with character code 1.
X Using `-' as the first character of the list of option characters
X selects this mode of operation.
X
X The special argument `--' forces an end of option-scanning regardless
X of the value of `ordering'. In the case of RETURN_IN_ORDER, only
X `--' can cause `getopt' to return EOF with `optind' != ARGC. */
X
Xstatic enum
X{
X REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
X} ordering;
X
X#ifdef __GNU_LIBRARY__
X/* We want to avoid inclusion of string.h with non-GNU libraries
X because there are many ways it can cause trouble.
X On some systems, it contains special magic macros that don't work
X in GCC. */
X#include <string.h>
X#define my_index strchr
X#define my_bcopy(src, dst, n) memcpy ((dst), (src), (n))
X#else
X
X/* Avoid depending on library functions or files
X whose names are inconsistent. */
X
Xchar *getenv ();
X
Xstatic char *
Xmy_index (str, chr)
X const char *str;
X int chr;
X{
X while (*str)
X {
X if (*str == chr)
X return (char *) str;
X str++;
X }
X return 0;
X}
X
Xstatic void
Xmy_bcopy (from, to, size)
X const char *from;
X char *to;
X int size;
X{
X int i;
X for (i = 0; i < size; i++)
X to[i] = from[i];
X}
X#endif /* GNU C library. */
X
X/* Handle permutation of arguments. */
X
X/* Describe the part of ARGV that contains non-options that have
X been skipped. `first_nonopt' is the index in ARGV of the first of them;
X `last_nonopt' is the index after the last of them. */
X
Xstatic int first_nonopt;
Xstatic int last_nonopt;
X
X/* Exchange two adjacent subsequences of ARGV.
X One subsequence is elements [first_nonopt,last_nonopt)
X which contains all the non-options that have been skipped so far.
X The other is elements [last_nonopt,optind), which contains all
X the options processed since those non-options were skipped.
X
X `first_nonopt' and `last_nonopt' are relocated so that they describe
X the new indices of the non-options in ARGV after they are moved. */
X
Xstatic void
Xexchange (argv)
X char **argv;
X{
X int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *);
X char **temp = (char **) __alloca (nonopts_size);
X
X /* Interchange the two blocks of data in ARGV. */
X
X my_bcopy ((char *) &argv[first_nonopt], (char *) temp, nonopts_size);
X my_bcopy ((char *) &argv[last_nonopt], (char *) &argv[first_nonopt],
X (optind - last_nonopt) * sizeof (char *));
X my_bcopy ((char *) temp,
X (char *) &argv[first_nonopt + optind - last_nonopt],
X nonopts_size);
X
X /* Update records for the slots the non-options now occupy. */
X
X first_nonopt += (optind - last_nonopt);
X last_nonopt = optind;
X}
X
X/* Scan elements of ARGV (whose length is ARGC) for option characters
X given in OPTSTRING.
X
X If an element of ARGV starts with '-', and is not exactly "-" or "--",
X then it is an option element. The characters of this element
X (aside from the initial '-') are option characters. If `getopt'
X is called repeatedly, it returns successively each of the option characters
X from each of the option elements.
X
X If `getopt' finds another option character, it returns that character,
X updating `optind' and `nextchar' so that the next call to `getopt' can
X resume the scan with the following option character or ARGV-element.
X
X If there are no more option characters, `getopt' returns `EOF'.
X Then `optind' is the index in ARGV of the first ARGV-element
X that is not an option. (The ARGV-elements have been permuted
X so that those that are not options now come last.)
X
X OPTSTRING is a string containing the legitimate option characters.
X If an option character is seen that is not listed in OPTSTRING,
X return '?' after printing an error message. If you set `opterr' to
X zero, the error message is suppressed but we still return '?'.
X
X If a char in OPTSTRING is followed by a colon, that means it wants an arg,
X so the following text in the same ARGV-element, or the text of the following
X ARGV-element, is returned in `optarg'. Two colons mean an option that
X wants an optional arg; if there is text in the current ARGV-element,
X it is returned in `optarg', otherwise `optarg' is set to zero.
X
X If OPTSTRING starts with `-' or `+', it requests different methods of
X handling the non-option ARGV-elements.
X See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
X
X Long-named options begin with `--' instead of `-'.
X Their names may be abbreviated as long as the abbreviation is unique
X or is an exact match for some defined option. If they have an
X argument, it follows the option name in the same ARGV-element, separated
X from the option name by a `=', or else the in next ARGV-element.
X When `getopt' finds a long-named option, it returns 0 if that option's
X `flag' field is nonzero, the value of the option's `val' field
X if the `flag' field is zero.
X
X The elements of ARGV aren't really const, because we permute them.
X But we pretend they're const in the prototype to be compatible
X with other systems.
X
X LONGOPTS is a vector of `struct option' terminated by an
X element containing a name which is zero.
X
X LONGIND returns the index in LONGOPT of the long-named option found.
X It is only valid when a long-named option has been found by the most
X recent call.
X
X If LONG_ONLY is nonzero, '-' as well as '--' can introduce
X long-named options. */
X
Xint
X_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
X int argc;
X char *const *argv;
X const char *optstring;
X const struct option *longopts;
X int *longind;
X int long_only;
X{
X int option_index;
X
X optarg = 0;
X
X /* Initialize the internal data when the first call is made.
X Start processing options with ARGV-element 1 (since ARGV-element 0
X is the program name); the sequence of previously skipped
X non-option ARGV-elements is empty. */
X
X if (optind == 0)
X {
X first_nonopt = last_nonopt = optind = 1;
X
X nextchar = NULL;
X
X /* Determine how to handle the ordering of options and nonoptions. */
X
X if (optstring[0] == '-')
X {
X ordering = RETURN_IN_ORDER;
X ++optstring;
X }
X else if (optstring[0] == '+')
X {
X ordering = REQUIRE_ORDER;
X ++optstring;
X }
X else if (getenv ("POSIXLY_CORRECT") != NULL)
X ordering = REQUIRE_ORDER;
X else
X ordering = PERMUTE;
X }
X
X if (nextchar == NULL || *nextchar == '\0')
X {
X if (ordering == PERMUTE)
X {
X /* If we have just processed some options following some non-options,
X exchange them so that the options come first. */
X
X if (first_nonopt != last_nonopt && last_nonopt != optind)
X exchange ((char **) argv);
X else if (last_nonopt != optind)
X first_nonopt = optind;
X
X /* Now skip any additional non-options
X and extend the range of non-options previously skipped. */
X
X while (optind < argc
X && (argv[optind][0] != '-' || argv[optind][1] == '\0')
X#ifdef GETOPT_COMPAT
X && (longopts == NULL
X || argv[optind][0] != '+' || argv[optind][1] == '\0')
X#endif /* GETOPT_COMPAT */
X )
X optind++;
X last_nonopt = optind;
X }
X
X /* Special ARGV-element `--' means premature end of options.
X Skip it like a null option,
X then exchange with previous non-options as if it were an option,
X then skip everything else like a non-option. */
X
X if (optind != argc && !strcmp (argv[optind], "--"))
X {
X optind++;
X
X if (first_nonopt != last_nonopt && last_nonopt != optind)
X exchange ((char **) argv);
X else if (first_nonopt == last_nonopt)
X first_nonopt = optind;
X last_nonopt = argc;
X
X optind = argc;
X }
X
X /* If we have done all the ARGV-elements, stop the scan
X and back over any non-options that we skipped and permuted. */
X
X if (optind == argc)
X {
X /* Set the next-arg-index to point at the non-options
X that we previously skipped, so the caller will digest them. */
X if (first_nonopt != last_nonopt)
X optind = first_nonopt;
X return EOF;
X }
X
X /* If we have come to a non-option and did not permute it,
X either stop the scan or describe it to the caller and pass it by. */
X
X if ((argv[optind][0] != '-' || argv[optind][1] == '\0')
X#ifdef GETOPT_COMPAT
X && (longopts == NULL
X || argv[optind][0] != '+' || argv[optind][1] == '\0')
X#endif /* GETOPT_COMPAT */
X )
X {
X if (ordering == REQUIRE_ORDER)
X return EOF;
X optarg = argv[optind++];
X return 1;
X }
X
X /* We have found another option-ARGV-element.
X Start decoding its characters. */
X
X nextchar = (argv[optind] + 1
X + (longopts != NULL && argv[optind][1] == '-'));
X }
X
X if (longopts != NULL
X && ((argv[optind][0] == '-'
X && (argv[optind][1] == '-' || long_only))
X#ifdef GETOPT_COMPAT
X || argv[optind][0] == '+'
X#endif /* GETOPT_COMPAT */
X ))
X {
X const struct option *p;
X char *s = nextchar;
X int exact = 0;
X int ambig = 0;
X const struct option *pfound = NULL;
X int indfound;
X
X while (*s && *s != '=')
X s++;
X
X /* Test all options for either exact match or abbreviated matches. */
X for (p = longopts, option_index = 0; p->name;
X p++, option_index++)
X if (!strncmp (p->name, nextchar, s - nextchar))
X {
X if (s - nextchar == strlen (p->name))
X {
X /* Exact match found. */
X pfound = p;
X indfound = option_index;
X exact = 1;
X break;
X }
X else if (pfound == NULL)
X {
X /* First nonexact match found. */
X pfound = p;
X indfound = option_index;
X }
X else
X /* Second nonexact match found. */
X ambig = 1;
X }
X
X if (ambig && !exact)
X {
X if (opterr)
X fprintf (stderr, "%s: option `%s' is ambiguous\n",
X argv[0], argv[optind]);
X nextchar += strlen (nextchar);
X optind++;
X return '?';
X }
X
X if (pfound != NULL)
X {
X option_index = indfound;
X optind++;
X if (*s)
X {
X /* Don't test has_arg with >, because some C compilers don't
X allow it to be used on enums. */
X if (pfound->has_arg)
X optarg = s + 1;
X else
X {
X if (opterr)
X {
X if (argv[optind - 1][1] == '-')
X /* --option */
X fprintf (stderr,
X "%s: option `--%s' doesn't allow an argument\n",
X argv[0], pfound->name);
X else
X /* +option or -option */
X fprintf (stderr,
X "%s: option `%c%s' doesn't allow an argument\n",
X argv[0], argv[optind - 1][0], pfound->name);
X }
X nextchar += strlen (nextchar);
X return '?';
X }
X }
X else if (pfound->has_arg == 1)
X {
X if (optind < argc)
X optarg = argv[optind++];
X else
X {
X if (opterr)
X fprintf (stderr, "%s: option `%s' requires an argument\n",
X argv[0], argv[optind - 1]);
X nextchar += strlen (nextchar);
X return optstring[0] == ':' ? ':' : '?';
X }
X }
X nextchar += strlen (nextchar);
X if (longind != NULL)
X *longind = option_index;
X if (pfound->flag)
X {
X *(pfound->flag) = pfound->val;
X return 0;
X }
X return pfound->val;
X }
X /* Can't find it as a long option. If this is not getopt_long_only,
X or the option starts with '--' or is not a valid short
X option, then it's an error.
X Otherwise interpret it as a short option. */
X if (!long_only || argv[optind][1] == '-'
X#ifdef GETOPT_COMPAT
X || argv[optind][0] == '+'
X#endif /* GETOPT_COMPAT */
X || my_index (optstring, *nextchar) == NULL)
X {
X if (opterr)
X {
X if (argv[optind][1] == '-')
X /* --option */
X fprintf (stderr, "%s: unrecognized option `--%s'\n",
X argv[0], nextchar);
X else
X /* +option or -option */
X fprintf (stderr, "%s: unrecognized option `%c%s'\n",
X argv[0], argv[optind][0], nextchar);
X }
X nextchar = (char *) "";
X optind++;
X return '?';
X }
X }
X
X /* Look at and handle the next option-character. */
X
X {
X char c = *nextchar++;
X char *temp = my_index (optstring, c);
X
X /* Increment `optind' when we start to process its last character. */
X if (*nextchar == '\0')
X ++optind;
X
X if (temp == NULL || c == ':')
X {
X if (opterr)
X {
X#if 0
X if (c < 040 || c >= 0177)
X fprintf (stderr, "%s: unrecognized option, character code 0%o\n",
X argv[0], c);
X else
X fprintf (stderr, "%s: unrecognized option `-%c'\n", argv[0], c);
X#else
X /* 1003.2 specifies the format of this message. */
X fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c);
X#endif
X }
X optopt = c;
X return '?';
X }
X if (temp[1] == ':')
X {
X if (temp[2] == ':')
X {
X /* This is an option that accepts an argument optionally. */
X if (*nextchar != '\0')
X {
X optarg = nextchar;
X optind++;
X }
X else
X optarg = 0;
X nextchar = NULL;
X }
X else
X {
X /* This is an option that requires an argument. */
X if (*nextchar != '\0')
X {
X optarg = nextchar;
X /* If we end this ARGV-element by taking the rest as an arg,
X we must advance to the next element now. */
X optind++;
X }
X else if (optind == argc)
X {
X if (opterr)
X {
X#if 0
X fprintf (stderr, "%s: option `-%c' requires an argument\n",
X argv[0], c);
X#else
X /* 1003.2 specifies the format of this message. */
X fprintf (stderr, "%s: option requires an argument -- %c\n",
X argv[0], c);
X#endif
X }
X optopt = c;
X if (optstring[0] == ':')
X c = ':';
X else
X c = '?';
X }
X else
X /* We already incremented `optind' once;
X increment it again when taking next ARGV-elt as argument. */
X optarg = argv[optind++];
X nextchar = NULL;
X }
X }
X return c;
X }
X}
X
Xint
Xgetopt (argc, argv, optstring)
X int argc;
X char *const *argv;
X const char *optstring;
X{
X return _getopt_internal (argc, argv, optstring,
X (const struct option *) 0,
X (int *) 0,
X 0);
X}
X
X#endif /* _LIBC or not __GNU_LIBRARY__. */
X
X#ifdef TEST
X
X/* Compile with -DTEST to make an executable for use in testing
X the above definition of `getopt'. */
X
Xint
Xmain (argc, argv)
X int argc;
X char **argv;
X{
X int c;
X int digit_optind = 0;
X
X while (1)
X {
X int this_option_optind = optind ? optind : 1;
X
X c = getopt (argc, argv, "abc:d:0123456789");
X if (c == EOF)
X break;
X
X switch (c)
X {
X case '0':
X case '1':
X case '2':
X case '3':
X case '4':
X case '5':
X case '6':
X case '7':
X case '8':
X case '9':
X if (digit_optind != 0 && digit_optind != this_option_optind)
X printf ("digits occur in two different argv-elements.\n");
X digit_optind = this_option_optind;
X printf ("option %c\n", c);
X break;
X
X case 'a':
X printf ("option a\n");
X break;
X
X case 'b':
X printf ("option b\n");
X break;
X
X case 'c':
X printf ("option c with value `%s'\n", optarg);
X break;
X
X case '?':
X break;
X
X default:
X printf ("?? getopt returned character code 0%o ??\n", c);
X }
X }
X
X if (optind < argc)
X {
X printf ("non-option ARGV-elements: ");
X while (optind < argc)
X printf ("%s ", argv[optind++]);
X printf ("\n");
X }
X
X exit (0);
X}
X
X#endif /* TEST */
END_OF_FILE
if test 20915 -ne `wc -c <'chord/getopt.c'`; then
echo shar: \"'chord/getopt.c'\" unpacked with wrong size!
fi
# end of 'chord/getopt.c'
fi
if test -f 'chord/songs/everybody-hurts' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/songs/everybody-hurts'\"
else
echo shar: Extracting \"'chord/songs/everybody-hurts'\" \(2121 characters\)
sed "s/^X//" >'chord/songs/everybody-hurts' <<'END_OF_FILE'
X{title: Everybody Hurts}
X{subtitle: REM}
X{define G: base-fret 1 frets 3 2 0 0 3 3}
X{define D4: base-fret 0 frets - - 0 0 3 -}
X{define E: base-fret 0 frets - 3 3 2 0 0}
X{start_of_tab}
XIntro: E----------2-----------2-------------3-----------3-------
X B--------3---3-------3---3---------3---3-------3---3-----
X G------2-------2---2-------2-----0-------0---0-----------
X D----0-----------0---------------------------------------
X A--------------------------------------------------------
X E------------------------------3-----------3------------- (repeat)
X{end_of_tab}
X
X[D]When your day is [G]long and the [D]night, the night is [G]yours a[D]lone
X[D]When you're sure you've had e[G]nough of this [D]life, well [G]hang on
X{start_of_tab}
X E(low)-3-2-0-
X{end_of_tab}
X[E]Don't let yourself [A]go, [E]cause everybody [A]cries [E]and everybody[A] hurts some[D]times [G]
XSometimes everything is [D]wrong, [G]now it's time to sing a[D]long
XWhen your day is night alone [G] (hold [D]on, hold on)
XIf you feel like letting go [G] (hold [D]on)
XIf you think you've had too [G]much of this [D]life, well hang [G]on
X
X{start_of_tab}
X E(low)-3-2-0-
X{end_of_tab}
X[E]Cause everybody [A]hurts, [E]take comfort in your [A]friends
X[E]Everybody [A]hurts, [E]don't throw your [A]hands, oh [E]now, don't throw your [A]hands
X[C]If you feel like you're [D4]alone, no, no, no, you're not [A]alone
X{start_of_tab}
X D4 -> E-0-----0-----0-----0--
X B---3-----3-----3------
X G-----0-----0-----0----
X{end_of_tab}
X [D]If you're on your [G]own in this [D]life, the days and nights are [G]long
X[D]When you think you've had too [G]much, with this [D]life, to hang [G]on
X
X{start_of_tab}
X E(low)-3-2-0-
X{end_of_tab}
X[E]Well everybody [A]hurts, some[E]times
XEverybody [A]cries, [E]and everybody [A]hurts,[N.C.] ... some[D]times [G]
XBut everybody [D]hurts [G]sometimes so hold [D]on, hold [G]on, hold [D]on
XHold on, [G]hold on, [D]hold on, [G]hold on, [D]hold on
X[G]Everybody [D]hurts [G] [D] [G]
X[D]You are not alone [G] [D] [G] [D] [G]
END_OF_FILE
if test 2121 -ne `wc -c <'chord/songs/everybody-hurts'`; then
echo shar: \"'chord/songs/everybody-hurts'\" unpacked with wrong size!
fi
# end of 'chord/songs/everybody-hurts'
fi
echo shar: End of archive 4 \(of 6\).
cp /dev/null ark4isdone

Martin Leclerc - Sun Montreal SE

unread,
Apr 12, 1995, 3:00:00 AM4/12/95
to
Submitted-by: Martin....@canada.sun.com (Martin Leclerc - Sun Montreal SE)
Posting-number: Volume 47, Issue 119
Archive-name: chord/part05

Environment: UNIX, DOS, VMS, Amiga
Supersedes: chord: Volume 40, Issue 84-88

#! /bin/sh


# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".

# Contents: chord/README chord/a2crd.c chord/chord.h chord/chord.man
# chord/iso.c chord/license.txt chord/xpose.c
# Wrapped by kent@ftp on Wed Apr 12 21:39:35 1995


PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:

echo ' "shar: End of archive 5 (of 6)."'
if test -f 'chord/README' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/README'\"
else
echo shar: Extracting \"'chord/README'\" \(5569 characters\)
sed "s/^X//" >'chord/README' <<'END_OF_FILE'
XThis is a description of a utility called CHORD.
X
XIt's purpose is to provide guitar players with a tool to produce good
Xlooking, self-descriptive music sheet from a text file.
X
XCHORD read a text file containing the lyrics of a song, the chords to
Xbe played, their description and some other optional data to produce a
XPostScript document that includes:
X
X Centered titles
X Chord names above the words
X Graphical representation of the chords at the end of the songs
X
XCHORD also provides support for
X
X Multiple columns on a page
X Index of a songbook
X Multiple logical pages per physical pages ( 1, 2 or 4)
X Configurable fonts for the lyrics and the chord names
X Multiple songs inside one file
X The complete ISO 8859-1 character set
Xand
X Chorus marking
X
XThe authors spent a great deal of
Xtime making it as feature-full and usable as possible. If you like this
Xprogram, please take the time to send a postcard from your home town or
Xlocality to each of the two authors and let them know what you think of
XCHORD. Please send the cards to the following addresses:
X
X Martin Leclerc Mario Dorion
X 19 Browning 18 Georgia Crescent
X Dollard des Ormeaux Pointe Claire
X Quebec, H9G 2K5 Quebec, H9R 5V7
X CANADA CANADA
X
XNEW IN VERSION 3.6
X
Xo Song index is sorted
Xo .chordrc is read only once per execution
Xo Speed improvement by a factor of ~5
Xo support of multiple columns
Xo better (I hope...) support of A4 format
Xo inclusion of a2crd to convert ASCII files to chord format
Xo Chords defined multiples times ALL stay in the known chord structure, so
Xthat 'chord -D' shows them all, even if the names are duplicates.
Xo bug fixes
X
XNEW IN VERSION 3.5
X
Xo Generation of PostScript indexes.
Xo Generation of PostScript chord-charts.
Xo Additional 'comments' style (box and italic).
Xo Directive to set a monospace font (ie: not-proportional) suitable for
X tabs.
Xo Support for A4 paper format.
Xo Page numbers are now "physical page numbers".
Xo Chord-charts (-dump option) now include chords from .chordrc file.
Xo Option to print/not-print page numbers.
Xo Option to print/not-print chord grids.
Xo Option to print grids only for "difficult" chords.
Xo Directive to force a physical page break.
Xo Directive to force a virtual page break.
Xo Chords are printed in a logical order.
Xo Special chord [N.C.] (no-chord) without a chord grid.
Xo New (and improved!) {define} syntax.
Xo Chord names and directives are case-insensitive.
Xo Public domain getopt() routine (for portability).
Xo (almost) lint free (better portability)
Xo Ansi-C compliant
Xo ... and bug fixes
X
XNEW IN VERSION 1.2
X
Xo More flexible Page Numbering
X o Left/right
X o always-present
X o an option for simgle spacing on lines with no chords
Xo Distinction between an unplayed string and a buffed one
Xo TOC generation
Xo Some bug fixes
X
XNEW IN VERSION 1.1
X
Xo CHORD supports transposition. See the man page.
Xo miscellanious bug fixes, including dubious coding that kept IBM and
X SGI from executing CHORD properly
Xo the grids now indicate string played open
Xo Error messages noe correctly report the name of the file and
X the line number where the error was found
X
X===== PLATFORM =====
X
XCHORD has been developped on SPARCStations running Solaris 2.2 and
XOpenWindows 3.2. The PostScript previewer (PageView), SparcPrinters and
XLaserWriter II have had no problem with the output. Please report any
Xchanges your system requires.
X
XKnown port include VMS, DOS, U*IX, AMIGA-DOS.
X
X===== CREDITS =====
X
XCHORD has been developped and is still being maintained by Martin
XLeclerc and Mario Dorion.
X
XCHORD uses the GNU getopt() routine made available to the community by
Xthe Free Software Foundation.
X
XWe would like to thanks the following individuals:
X
XSteve Putz, who has kindly contributed a number of suggestions, bug
Xfixes and enhancements(?).
X
XJim Gerland (GER...@ubvms.cc.buffalo.edu), who has performed the initial
XVMS port.
X
XLeo Bicknell (ab...@freenet.acsu.buffalo.edu) has provided the chord sorting
Xroutine.
X
XAdditional thanks to Fred handloser (and his pal Duncan) and many
Xothers for providing many suggestions of features that were implemented
Xin CHORD 3.5.
X
X
X===== COMPILING =====
X
XCHORD is written in fairly portable C and should work on most UNIX
Xsystems with little or no change. Let us know of your problems.
X
XSimply edit the Makefile to meet your environment and 'make'.
X
XNote: If your environment does not offer a getopt() routine edit the
XMakefile to de-comment the lines (INCL, SRC and OBJ) that mention the
Xincluded getopt routine ... We reccomend using your system's getopt()
Xif it is available.
X
X
X===== ARCHIVES =====
X
XThe offical chord archive is maintained generously by Jan-Erik Schuch (f91...@nada.kth.se)
X
XCheck out the web page http://www.nada.kth.se/~f91-jsc/
X
XAnother great source is ftp://ftp.nevada.edu or http://www.nevada.edu
X
X===== COPYRIGHT =====
X
XCHORD is licensed following the conditions of the
Xgeneral GNU license. You are authorized to use this program free of
Xcharge. You are authorized to distribute this program freely as long as
Xthe full source is included. You are not allowed to remove the
X`copyright' notices from the authors nor are you allowed to pretend you
Xwrote it. You are not allowed to charge any money for CHORD. You are
Xnot allowed to distribute a modified version of CHORD without written
Xauthorizations from the authors. You are not allowed to use parts of
XCHORD in any other commercial or public-domain software. Sorry for all
Xthe negatives rules ... but we've been bitten once!
X
X
X
X
XMartin Leclerc (Martin....@canada.sun.com)
XMario Dorion (Mario....@canada.sun.com)
END_OF_FILE
if test 5569 -ne `wc -c <'chord/README'`; then
echo shar: \"'chord/README'\" unpacked with wrong size!
fi
# end of 'chord/README'
fi
if test -f 'chord/a2crd.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/a2crd.c'\"
else
echo shar: Extracting \"'chord/a2crd.c'\" \(6509 characters\)
sed "s/^X//" >'chord/a2crd.c' <<'END_OF_FILE'
Xstatic char SccsId[] = "@(#)a2crd.c 3.6\t Mar. 1995";


Xstatic char copyright[] = "Copyright 1991-1995 by Martin Leclerc & Mario Dorion";
X

X#include <stdio.h>
X#include "chord.h"
X
X

XFILE
X *source_fd;
X
Xint
X p_put,
X lchord,
X ltext,
X lbuf,
X c,
X debug_mode = 0,
X dirty_chord=0,
X dirty_text=0,
X in_header,
X in_title=0,
X in_subtitle=0,
X n_lines,
X in_chorus=0;
X
Xchar
X chord_line[MAXLINE],
X text_line[MAXLINE],
X buf[MAXLINE],
X *command_name,
X source[MAXTOKEN],
X *current_file,
X mesgbuf[MAXLINE],
X *mesg;
X
Xfloat
X spaces=0,
X not_space=0;
X
Xdouble
X ratio=1.0;


X
Xextern char *optarg;
Xextern int optind, opterr;
X

X/* --------------------------------------------------------------------------------*/
Xvoid print_2lines(chord_line, text_line)
Xchar chord_line[], text_line[];
X
X{
Xint i, mini=0, max=0;
Xint p_out=0;
X
Xmax = (ltext > lchord) ? ltext : lchord;
X
Xsprintf (mesg, " print_2lines text_line=[%s]", text_line); debug(mesg);
Xsprintf (mesg, " print_2lines chord_line=[%s]", chord_line); debug(mesg);
X
X
Xfor (i = 0; i < max ; i++)
X {
X if ( (i <= lchord) && ( chord_line[i] != ' ' )
X && (chord_line[i] != '\0') && ( i >= mini ) )
X {
X printf ("[");
X for (mini=i; (chord_line[mini] != ' ') && (mini<lchord); mini++)
X {
X printf("%c", chord_line[mini]);
X p_out++;
X }
X printf ("]");
X p_out += 2;
X }
X if (i < ltext)
X {
X printf ("%c", text_line[i]);
X p_out++;
X }
X }
X
Xprintf("\n");
Xp_out=0;
X
X
Xltext=0;
Xdirty_text=0;
Xfor (i=0;i<MAXLINE;i++)
X text_line[i]='\0';
X
Xlchord=0;
Xdirty_chord=0;
Xfor (i=0;i<MAXLINE;i++)
X chord_line[i]='\0';
X}
X
X/* --------------------------------------------------------------------------------*/


Xvoid do_help (command)
Xchar *command;
X {

X fprintf (stderr, "Usage: %s [options] file\n", command);


X fprintf (stderr, "Options:\n");

X fprintf (stderr, " -D : Debug mode\n");


X exit(0);
X }
X
X/* --------------------------------------------------------------------------------*/

Xvoid do_sig()
X {
X char sig_file[MAXTOKEN];
X FILE *sig_fd;
X
X strcpy (sig_file, getenv ("HOME"));
X strcat (sig_file,"/.a2crdsig\0");
X
X sig_fd = fopen (sig_file, "r");
X if (sig_fd != NULL)
X {
X while ((c=getc(sig_fd)) != EOF)
X printf("%c", c);
X fclose(sig_fd);


X }
X }
X
X/* --------------------------------------------------------------------------------*/

Xvoid process_file(source_fd)
XFILE *source_fd;
X{
X

Xint i;
X
Xdo_sig();
X
Xdebug ("start of process_file");
Xn_lines=0;
Xlbuf=0;
X
Xwhile ((c=getc(source_fd)) != EOF)
X {


X
X switch (c)
X {
X

X case '\n':
X
X n_lines++;
X buf[lbuf]='\0';
X
X /* Handle exceptions */
X if ( n_lines == 1)
X {
X if (! strncmp(text_line, "From ", 5))
X in_header = TRUE;
X else in_title = TRUE;
X }
X
X if ( in_header && lbuf == 0)
X in_header = FALSE;
X
X if (in_header )
X printf ("# %s\n", text_line);
X
X else if (not_space != 0)
X {
Xsprintf (mesg, " space=%d not_space=%d", (int)spaces,(int)not_space); debug(mesg);
X
X if ( ((spaces / not_space) > ratio) || ((spaces==0) && (lbuf<3)) )
X
X /* this must be a chord line */
X {
Xsprintf (mesg, "chord is \"%s\"",buf); debug(mesg);
X
X if (dirty_chord)
X {
X print_2lines (chord_line, text_line);
X }
X
X strcpy (chord_line, buf);
X lchord=lbuf;
X dirty_chord++;
X in_title=0; in_subtitle=0;
X }
X else
X /* so it is a text line ! */
X {
X
Xsprintf (mesg, "text is \"%s\"",buf); debug(mesg);
X
X if (dirty_text)
X {
X print_2lines (chord_line, text_line);
X }
X
X
X if (in_title)
X {
X printf("{title:%s}\n", buf);
X in_title=FALSE;
X in_subtitle=TRUE;
X }
X else
X if (in_subtitle)
X {
X printf("{subtitle:%s}\n", buf);
X }
X else
X {
X strcpy(text_line, buf);
X ltext=lbuf;
X dirty_text++;
X }
X
X }
X
X lbuf=0;
X spaces=0;
X not_space=0;
X }
X else
X {
X if (dirty_chord || dirty_text)
X print_2lines(chord_line, text_line);


X printf ("\n");

X if (in_chorus)
X {
X printf("{end_of_chorus}\n");
X in_chorus=0;
X }
X in_subtitle=FALSE;
X in_title=FALSE;
X }
X
X for (i=0;i<MAXLINE;i++)
X buf[i]='\0';
X break;
X
X case '{':
X if (lbuf == 0)
X /* directive */
X {
X debug("got a directive");
X if (dirty_chord || dirty_text)
X {
X debug("FLUSHING");
X print_2lines(chord_line, text_line);
X }
X buf[0]='{';
X for (lbuf=1; (c=getc(source_fd)) != '\n'; lbuf++)
X buf[lbuf]=c;
X strcpy(text_line, buf);
X ltext=lbuf;
X print_2lines(chord_line, text_line);
X lbuf=0;
X }
X break;
X
X case '#':
X if (lbuf == 0)
X /* comment */
X {
X debug("got a comment");
X if (dirty_chord || dirty_text)
X {
X debug("FLUSHING");
X print_2lines(chord_line, text_line);
X }
X buf[0]='#';
X for (lbuf=1; (c=getc(source_fd)) != '\n'; lbuf++)
X buf[lbuf]=c;
X strcpy(text_line, buf);
X ltext=lbuf;
X print_2lines(chord_line, text_line);
X lbuf=0;
X }
X break;
X
X case '\t':
X for (i=0; (i<8) && (lbuf % 8 != 0); i++)
X buf[lbuf++] = ' ';
X spaces += 8;
X break;
X
X
X case '|':
X case ' ':
X spaces++;
X buf[lbuf++] = ' ';


X break;
X
X default:

X not_space++;
X buf[lbuf++] = c;
X break;
X }
X }
Xif (dirty_chord || dirty_text)
X print_2lines(chord_line, text_line);
Xchord_line[0]='\0';
Xtext_line[0]='\0';
Xbuf[0]='\0';
X}
X/* --------------------------------------------------------------------------------*/
X
Xvoid main (argc, argv)


Xint argc;
Xchar **argv;
X

X{
Xdouble f;
X
Xcommand_name=argv[0];
Xmesg=&mesgbuf[0];
X
Xwhile (( c = getopt(argc, argv, "Dr:o:")) != -1)
X switch (c) {
X
X case 'D':
X debug_mode++;
X break;
X
X case 'r':
X f=atof(optarg);
X if (f ==0)
X error ("Invalid value for ratio");
X else
X ratio=f;


X break;
X
X case 'o':
X if ( freopen(optarg, "w", stdout) == NULL)
X {
X fprintf (stderr, "Unable to open \"%s\" for output\n", optarg);
X exit(1);
X }
X break;
X
X

X case '?':
X do_help (argv[0]);
X break;
X }
X

X
X if (optind == argc)
X {

X debug ("Reading stdin");
X strcpy(source, "stdin");
X process_file (stdin);
X }
X else
X {


X for ( ; optind < argc; optind++ )
X {

X sprintf (mesg, "Ready to process file \"%s\"\n", argv[optind]);
X debug (mesg);


X
X strcpy(source, argv[optind]);
X

X sprintf (mesg, "Calling read_input_file on \"%s\"\n", source);
X debug (mesg);
X
X read_input_file(source, source_fd);


X }
X }
X
X
X}

END_OF_FILE
if test 6509 -ne `wc -c <'chord/a2crd.c'`; then
echo shar: \"'chord/a2crd.c'\" unpacked with wrong size!
fi
# end of 'chord/a2crd.c'
fi
if test -f 'chord/chord.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/chord.h'\"
else
echo shar: Extracting \"'chord/chord.h'\" \(4601 characters\)
sed "s/^X//" >'chord/chord.h' <<'END_OF_FILE'
X#include <stdio.h>
X#include <string.h>
X#include <stdlib.h>
X
X#include "patchlevel.h"
X
X#define TRUE 1
X#define FALSE 0
X
X#define MAXLINE 256
X#define MAXFONTS 16 /* Maximum number of different fonts in one execution */
X#define MAXTOKEN 256
X#define MAX_CHORD 1024
X#define CHORD_NAME_SZ 10
X#define MAXNOTE 8
X
X#define LONG_FINGERS 4
X#define FRET_NONE_STR "-" /* fret value for unplayed strings */
X#define FRET_NONE -2 /* internal numeric value */
X#define FRET_X_STR "X" /* fret value for muted strings */
X#define FRET_X -1 /* internal value (must be -1) */
X#define NO_CHORD_STR "N.C." /* Indicates No-Chord */
X#define BASE_FRET_STR "base-fret"
X#define FRETS_STR "frets"
X
X#ifdef US
X#define TOP 756.0 /* 10.5 inches in points */
X#define BOTTOM 40.0 /* 0.5 inch in points */
X#define L_MARGIN 72.0 /* 1 inch in points */
X#define WIDTH 612.0 /* 8.5 inches in points */
X#else
X /* Note: Not having access to an actual A4 PostScript printer
X the CHORD authors had to rely on input from beta-testers
X on what were the proper values to use for these fields.
X We though 813 was the right value for TOP.
X Some beta testers agreed, some thought it was better
X to leave the US value (756). We left 756 in and commented
X out the 813 entry. If the A4 page does not look to good for
X your taste, you may want to recompile with the other value.
X Thanks for your co-operation ... The authors */
X
X#define TOP 756.0 /* 10.5 inches in points */
X/* #define TOP 813 */ /* 28.7 cm or 11.30 inches in points */
X#define BOTTOM 36.0 /* 1.25 cm or 0.5 inch in points */
X#define L_MARGIN 72.0 /* 2.5 cm or 1 inch in points */
X#define WIDTH 595.0 /* 21 cm or 8.27 inches in points */
X
X#endif /* US */
X
X#define DELIM_STR ": \t"
X
X#define DEF_TEXT_SIZE 12
X#define DEF_CHORD_SIZE 9
X#define DEF_GRID_SIZE 30
X#define DEF_TEXT_FONT "Times-Roman"
X#define DEF_CHORD_FONT "Helvetica-Oblique"
X#define MONOSPACED_FONT "Courier"
X
X#define CHORD_BUILTIN 0
X#define CHORD_DEFINED 1
X#define CHORD_IN_CHORDRC 2
X
X#define CHORD_EASY 0
X#define CHORD_HARD 1
X
Xstruct kcs {
X struct kcs *next;
X char chord_name[CHORD_NAME_SZ];
X int displ;
X int s1,s2,s3,s4,s5,s6;
X int origin;
X int difficult;
X } dummy_kcs;
X
Xstruct chord_struct {
X struct chord_struct *next;
X struct kcs *chord;
X } dummy_chord_struct;
X
Xstruct sub_title_struct {
X struct sub_title_struct *next_sub;
X char *sub_title;
X };
X
Xstruct toc_struct {
X struct toc_struct *next;
X struct sub_title_struct *sub_titles;
X char *title;
X int page_label;
X };
X
Xint do_define_chord();
Xvoid build_ps_toc();
Xvoid do_chorus_line();
Xvoid do_end_of_page();
Xvoid do_end_of_phys_page();
Xvoid do_end_of_song();
Xvoid do_init_grid_ps();
Xvoid do_new_song();
Xvoid do_start_of_page();
Xvoid do_subtitle();
Xvoid do_title();
Xvoid draw_chords();
Xvoid dump_chords();
Xvoid init_known_chords();
Xvoid init_ps();
Xvoid print_chord_line ();
Xvoid print_re_encode();
Xvoid print_text_line();
Xvoid print_version();
Xvoid read_chordrc();
Xvoid set_chord_font();
Xvoid use_chord_font();
Xvoid use_text_font();
X
X#ifdef __STDC__
Xstruct chord_struct *add_to_chordtab(char *chord);
Xvoid add_title_to_toc(char *title, int page_label);
Xvoid add_subtitle_to_toc(char *subtitle);
Xint do_transpose(char *chord);
Xstruct kcs *get_kc_entry (char *chord);
Xvoid advance(int amount);
Xvoid debug(char *dbg_str);
Xvoid do_chord (int i_text, char *chord);
Xvoid do_comment(char *comment, int style);
Xvoid do_directive(char *directive);
Xvoid do_help (char *command) ;
Xvoid dump_fret(int fretnum);
Xvoid error(char *error);
Xvoid error_rt(char *error);
Xvoid moveto(int new_hpos, int new_vpos);
Xvoid process_file(FILE *source_fd);
Xvoid ps_fputc(FILE *fd, int c);
Xvoid ps_fputs(FILE *fd, char *string);
Xvoid ps_puts(char *string);
Xvoid put_in_string(char array[], int *p_index, int c, int max_index, int *p_ov_flag);
Xvoid re_encode(char *font);
Xvoid read_input_file(char source[], FILE *source_fd);
Xvoid set_text_font(int size);
Xchar *tolower_str(char *string);
Xchar *toupper_str(char *string);
Xextern char *strtok(char *s1, const char *s2);
X#else /* __STDC__ */
Xstruct chord_struct *add_to_chordtab();
Xint do_transpose();
Xstruct kcs *get_kc_entry ();
Xvoid advance();
Xvoid debug();
Xvoid do_chord ();
Xvoid do_comment();
Xvoid do_directive();
Xvoid do_help ();
Xvoid do_translate();
Xvoid dump_fret();
Xvoid error();
Xvoid error_rt();
Xvoid moveto();
Xvoid process_file();
Xvoid ps_fputc();
Xvoid ps_fputs();
Xvoid ps_puts();
Xvoid put_in_string();
Xvoid re_encode();
Xvoid read_input_file();
Xvoid set_text_font();
Xchar *tolower_str();
Xchar *toupper_str();
Xextern char *strtok();
X
X#endif /* ANSI_C */
END_OF_FILE
if test 4601 -ne `wc -c <'chord/chord.h'`; then
echo shar: \"'chord/chord.h'\" unpacked with wrong size!
fi
# end of 'chord/chord.h'
fi
if test -f 'chord/chord.man' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/chord.man'\"
else
echo shar: Extracting \"'chord/chord.man'\" \(10127 characters\)
sed "s/^X//" >'chord/chord.man' <<'END_OF_FILE'
X.TH chord l "September 1993" "Utilities"
X.SH NAME
Xchord \- Produce a professional looking PostScript sheet-music from an ascii file containing lyrics and chords information.
X.SH SYNOPSIS
X.B chord
X[ option ...] [ filename... ]
X.SH DESCRIPTION
X.I chord
Xproduces a postscript document from a lyrics file containing chord
Xindications and chorus delimiters. The document produced contains the
Xlyrics of a song, with the guitar chords appearing above the right
Xwords. A representation of all chords used in the song is printed at
Xthe bottom of the last page.
X
X.SH OPTIONS
X.TP 8
X.B \-A
XWill print the "About CHORD..." message.
X.TP 8
X.B \-a
XAutomatically single spaces lines that have no chords.
X.TP 8
X.B \-c \fIchord_font_size\fB
XSets the size, in points, of the font used to display chords to the specified
Xinteger value.
X.TP 8
X.B \-C \fIChord_font\fB
XSets the font used to print chords to the specified name. That name must be
Xknown to your PostScript Interpreter.
X.TP 8
X.B \-d
XGenerates a text chord chart of all internally known chords as well as
Xchords defined in the $HOME/.chordrc file. Chords defined in the .chordrc file
Xare identified with the "(local)" caption. The printout is suitable for input
Xto the .chordrc file.
X.TP 8
X.B \-D
XGenerates a PostScript chord chart of all internally known chords as well as
Xchords defined in the $HOME/.chordrc file. Chords defined in the .chordrc file
Xare identified with a small asterisk after the chord grid.
X.TP 8
X.B \-G
XDisable printing of the chord grids for the whole input file(s). The effect can
Xbe disable for any particular song by the usage of the \fBgrid\fR or \fBg\fR
Xdirective.
X.TP 8
X.B \-g
XDisable printing of grids for "easy" chords. Whether a builtin chord is easy
Xor not has been arbitrarily decided by the authors. The general rule was that
Xany chord in its major, minor, 7th or minor 7th was "easy" while everything
Xelse (maj7, aug, dim, sus, etc...) was "difficult". All chords defined in the
X$HOME/.chordrc file or in the input file are defined as "difficult".
X.TP 8
X.B \-h
XPrints a short options summary.
X.TP
X.B \-i
XGenerates a table of contents with the song titles and page numbers.
XIt implies page numbering through the document. Index pages
Xare not numbered.
X.TP 8
X.B \-l
XPrints only the lyrics of the song.
X.TP 8
X.B \-L
XPlaces the odd and even page numbers in the lower right and left
Xcorners respectively (for two-sided output). The default is all page
Xnumbers on the right.
X.TP 8
X.B \-o \fIfilename\fB
XSends PostScript output to \fIfilename\fB
X.TP 8
X.B \-p " first_page"
XNumbers the pages consecutively starting with \fIfirst_page\fR (e.g.
X1). Without this option, each song restarts the page numbering at 1,
Xand page numbers are only put on subsequent pages of multiple page
Xsongs.
X.TP 8
X.B \-s \fIgrid_size\fB
XSets the size of the chord grids.
X.TP 8
X.B \-t \fItext_font size\fB
XSets the size, in points, of the font used to display the lyrics to the
Xspecified integer value. The title line is displayed using that point
Xsize + 5. The sub-tiltle is displayed using that point size -2. The
X\fItablature\fB is displayed using this point-size -2.
X.TP 8
X.B \-T \fIText_font\fB
XSets the font used to print text to the specified name. That name must be
Xknown to your PostScript Interpreter.
X.TP 8
X.B \-V
XPrints version and patch level.
X.TP 8
X.B \-x \fIhalf-tones\fB
XSets up transposition to that number of half-tones. Can not be zero. All
Xchord names must be build in the following way in order to be recognized:
X
X{note-name}[#|b][^/]* [ '/' {note-name}[#|b][^/]* ]
X
XThat is, a valid note name, possibly followed by '#' or 'b', followed by
Xother modifier ('7', 'm', etc...). Many such construct can make up a chord
Xname, as long as they are separated by '/'.
X
X{note-name} must appear in the list 'A','B','C','D','E','F','G'.
X.TP 8
X.B \-2
XPrints two logical pages per physical page.
X.TP 8
X.B \-4
XPrints four logical pages per physical page.
X
X.SH KEYWORDS
XA line starting with a '#' is interpreted as a comment, and generates no output.
X(although all your comments are automatically mailed to the authors, and we read them
Xat parties...)
X
XDirectives that appear between french brackets ('{' and '}') have a
Xspecial meaning. They must be alone on a line. Blanks before the
Xopening bracket and after the closing bracket are not significant.
X
XBlanks inside a directive are not significant (except inside one of the \fIcomments\fB directives).
X
XSupported directives are:
X.TP 8
X.B \fBstart_of_chorus\fR or \fBsoc\fR
Xwhich indicates the start of a chorus (yep). The complete chorus will
Xbe highlighted by a change bar, to be easily located by the player.
X.TP 8
X.B \fBend_of_chorus\fR or \fBeoc\fR
Xmarks the end of the chorus
X.TP 8
X.B \fBcomment:\fR or \fBc:\fR
Xwill call the printing of the rest of the line, highlighted by a grey box
X(Useful to call a chorus, for example)
X.TP 8
X.B \fBcomment_italic:\fR or \fBci:\fR
Xwill print the comment in an italic font ... well not really. It will print the comment in the font used for printing the CHORD names (which is normally italic unless you specified a different chord_font).
X.TP 8
X.B \fBcomment_box:\fR or \fBcb:\fR
Xwill print the comment inside a bounding box.
X.TP 8
X.B \fBnew_song\fR or \fBns\fR
Xmarks the beginning of a new song. It enables you to put multiple songs
Xin one file. It is not required at the beginning of the file.
X.TP 8
X.B \fBtitle:\fR or \fBt:\fR
Xspecifies the title of the song. It will appear centered at the top of the first
Xpage, and at the bottom of every other page, accompanied there by the
Xpage number, within the current song.
X.TP 8
X.B \fBsubtitle:\fR or \fBst:\fR
Xspecifies a string to be printed right below the title. Many subtitles can be
Xspecified
X.TP 8
X.B \fBdefine: \fRname \fBbase-fret \fRoffset \fBfrets \fRstr1...str6\f
Xdefines a new chord called "name". The keyword "base-fret"
Xindicates that the number that follows ("offset") is the first
Xfret that is to be displayed when representing the way this chord is played.
X
XThe keyword "frets" then appears and is followed by 6 values.
XThese values are the fret number [ 1 to n ] for each string
X[str1 to str6] and are RELATIVE to the offset. A value of "-", "X" or
X"x" indicates a string that is not played.
X
XKeywords \fBbase-fret\fR and \fBfrets\fR are mandatory.
X
XA value of 0 for a given string means it is to be played open, and will be marked
Xby a small
Xopen circle above the string in the grid. The strings are numbered in ascending
Xorder of tonality, starting on the low E (the top string). On
Xoutput, a chord defined in the user's .chordrc file will have a small
Xasterisk near its grid, a chord defined in a song will have two small
Xasterixes.
X
XAt the beginning of every song, the default chords are re-loaded and the
Xuser's .chordrc file is re-read. Chord definition of new chords inside
Xthe text of a song are only valid for that song.
X
XThe syntax of a {define} directive has been modified in CHORD 3.5.
XCHORD will attempt to recognize an old-formar {define} and will accept
Xit. It will, though, print a warning inviting you to modify your input
Xfile to use the new syntax (the exact {define} entry to use is provided
Xas an example).
X.TP 8
X.B textfont: postscript_font
Xsame as -T command option
X.TP 8
X.B textsize: n
Xsame as -t command option
X.TP 8
X.B chordfont: postscript_font
Xsame as -C command option
X.TP 8
X.B chordsize: n
Xsame as -c command option
X.TP 8
X.B \fBno_grid\fR or \fBng\fR
Xwill disable printing of the chord grids for the current song.
X.TP 8
X.B \fBgrid\fR or \fBg\fR
Xwill enable the printing of the chord grids for the current song (subject to
Xthe limitation caused by the usage of the \fB-g\fR option). This
Xdirective will overide the runtime \fB-G\fR option for the current song.
X.TP 8
X.B \fBnew_page\fR or \fBnp\fR
Xwill force a logical page break (which will obviously turn out to be a physical
Xpage break if you are not in either 2-up or 4-up mode.
X.TP 8
X.B \fBnew_physical_page\fR or \fBnpp\fR
Xwill force a physical page break (in any mode).
X.TP 8
X.B \fBstart_of_tab\fR or \fBsot\fR
Xwill cause chord to use a monospace (ie: non-proportional) font for the
Xprinting of text. This can be used to enter 'tab' information where character
Xpositioning is crucial. The \fBCourier\fR font is used with a smaller point-size
Xthan the rest of the text.
X.TP 8
X.B \fBend_of_tab\fR or \fBeot\fR
Xwill stop using monospace font. The effect is implicit at the end of a song.
X.TP 8
X.B \fBcolumns: n\fR or \fBcol: n\fR
Xspecifies the number of columns on the pages of the current song.
X.TP 8
X.B \fBcolumn_break\fR or \fBcolb\fR
Xforces a column break. The next line of the song will appear in the next available
Xcolumn, at the same height as the last "columns" statement if still
Xon the same page, or at the top of the page otherwise.
X.SH FILES
X.TP 8
X.B $HOME/.chordrc
XInitial directives re-read after each song.
X.SH NOTES
XRun time options override settings from your .chordrc file. So the assignement sequence
Xto, let's say, the text size will be: system default, .chordrc, run-time
Xoption, and finally from within the song itself.
X
XAll keywords are case independent.
X.SH BUGS
XCHORD will not wrap long lines around the right margin.
X.br
XWhite space is not inserted inside the text line, even if white space
Xis inserted in the "chord" line above the text. The net effect is that
Xchord names can appear further down the line than what was intended. This is
Xa side effect from fixing an old "bug" that caused the chord names to overlap.
XThis bug will only manifest itself if you have lots of chord but little text.
XInserting white space in the text is a good workaround.
X.br
XIn 2-up mode, if page-numbering is invoked on a document that has an
Xodd number of page, the page number for the last page will be printed
Xat the bottom right of the virtual page instead of the bottom right of
Xthe physical page.
X.SH COPYRIGHT
XCopyright 1990-91-92-93 by Martin Leclerc and Mario Dorion
X.SH AUTHORS
XMartin Leclerc (Martin....@Sun.COM)
X.br
Xand Mario Dorion (Mario....@Sun.COM)
X
X.SH CONTRIBUTORS
XSteve Putz (pu...@parc.xerox.com)
X.br
XJim Gerland (GER...@ubvms.cc.buffalo.edu)
X.br
XLeo Bicknell (ab...@freenet.acsu.buffalo.edu)
END_OF_FILE
if test 10127 -ne `wc -c <'chord/chord.man'`; then
echo shar: \"'chord/chord.man'\" unpacked with wrong size!
fi
# end of 'chord/chord.man'
fi
if test -f 'chord/iso.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/iso.c'\"
else
echo shar: Extracting \"'chord/iso.c'\" \(8481 characters\)
sed "s/^X//" >'chord/iso.c' <<'END_OF_FILE'
Xstatic char SccsId[] = "@(#)iso.c 3.6\t Mar. 1995";


Xstatic char copyright[] = "Copyright 1991-1995 by Martin Leclerc & Mario Dorion";
X

X#include <stdio.h>
X
Xvoid print_re_encode ()
X{
X printf("%% iso.ps reencodeing of ISO 8859-1 8-bit french characters\n");
X printf("%%\n");
X printf("/reencodedict 5 dict def\n");
X printf("/ReEncode\n");
X printf(" { reencodedict begin\n");
X printf(" /newencoding exch def\n");
X printf(" /newfontname exch def\n");
X printf(" /basefontname exch def\n");
X printf("\n");
X printf(" /basefontdict basefontname findfont def\n");
X printf("\n");
X printf(" /newfont basefontdict maxlength dict def\n");
X printf("\n");
X printf(" basefontdict\n");
X printf(" { exch dup dup /FID ne exch /Encoding ne and\n");
X printf(" { exch newfont 3 1 roll put }\n");
X printf(" { pop pop }\n");


X printf(" ifelse\n");

X printf(" } forall\n");
X printf(" newfont /FontName newfontname put\n");
X printf(" newfont /Encoding newencoding put\n");
X printf(" newfontname newfont definefont pop\n");
X printf(" end\n");
X printf(" } def\n");
X printf("\n");
X printf("/ISO 256 array def\n");
X printf("\n");
X printf("0 1 255 { ISO exch /.notdef put } for\n");
X printf("ISO\n");
X printf("\n");
X printf(" dup 8#040 /space put\n");
X printf(" dup 8#041 /exclam put\n");
X printf(" dup 8#042 /quotedbl put\n");
X printf(" dup 8#043 /numbersign put\n");
X printf(" dup 8#044 /dollar put\n");
X printf(" dup 8#045 /percent put\n");
X printf(" dup 8#046 /ampersand put\n");
X printf(" dup 8#047 /quotesingle put\n");
X printf(" dup 8#050 /parenleft put\n");
X printf(" dup 8#051 /parenright put\n");
X printf(" dup 8#052 /asterisk put\n");
X printf(" dup 8#053 /plus put\n");
X printf(" dup 8#054 /comma put\n");
X printf(" dup 8#055 /hyphen put\n");
X printf(" dup 8#056 /period put\n");
X printf(" dup 8#057 /slash put\n");
X printf(" dup 8#060 /zero put\n");
X printf(" dup 8#061 /one put\n");
X printf(" dup 8#062 /two put\n");
X printf(" dup 8#063 /three put\n");
X printf(" dup 8#064 /four put\n");
X printf(" dup 8#065 /five put\n");
X printf(" dup 8#066 /six put\n");
X printf(" dup 8#067 /seven put\n");
X printf(" dup 8#070 /eight put\n");
X printf(" dup 8#071 /nine put\n");
X printf(" dup 8#072 /colon put\n");
X printf(" dup 8#073 /semicolon put\n");
X printf(" dup 8#074 /less put\n");
X printf(" dup 8#075 /equal put\n");
X printf(" dup 8#076 /greater put\n");
X printf(" dup 8#077 /question put\n");
X printf(" dup 8#100 /at put\n");
X printf(" dup 8#101 /A put\n");
X printf(" dup 8#102 /B put\n");
X printf(" dup 8#103 /C put\n");
X printf(" dup 8#104 /D put\n");
X printf(" dup 8#105 /E put\n");
X printf(" dup 8#106 /F put\n");
X printf(" dup 8#107 /G put\n");
X printf(" dup 8#110 /H put\n");
X printf(" dup 8#111 /I put\n");
X printf(" dup 8#112 /J put\n");
X printf(" dup 8#113 /K put\n");
X printf(" dup 8#114 /L put\n");
X printf(" dup 8#115 /M put\n");
X printf(" dup 8#116 /N put\n");
X printf(" dup 8#117 /O put\n");
X printf(" dup 8#120 /P put\n");
X printf(" dup 8#121 /Q put\n");
X printf(" dup 8#122 /R put\n");
X printf(" dup 8#123 /S put\n");
X printf(" dup 8#124 /T put\n");
X printf(" dup 8#125 /U put\n");
X printf(" dup 8#126 /V put\n");
X printf(" dup 8#127 /W put\n");
X printf(" dup 8#130 /X put\n");
X printf(" dup 8#131 /Y put\n");
X printf(" dup 8#132 /Z put\n");
X printf(" dup 8#133 /bracketleft put\n");
X printf(" dup 8#134 /backslash put\n");
X printf(" dup 8#135 /bracketright put\n");
X printf(" dup 8#136 /asciicircum put\n");
X printf(" dup 8#137 /underscore put\n");
X printf(" dup 8#140 /grave put\n");
X printf(" dup 8#141 /a put\n");
X printf(" dup 8#142 /b put\n");
X printf(" dup 8#143 /c put\n");
X printf(" dup 8#144 /d put\n");
X printf(" dup 8#145 /e put\n");
X printf(" dup 8#146 /f put\n");
X printf(" dup 8#147 /g put\n");
X printf(" dup 8#150 /h put\n");
X printf(" dup 8#151 /i put\n");
X printf(" dup 8#152 /j put\n");
X printf(" dup 8#153 /k put\n");
X printf(" dup 8#154 /l put\n");
X printf(" dup 8#155 /m put\n");
X printf(" dup 8#156 /n put\n");
X printf(" dup 8#157 /o put\n");
X printf(" dup 8#160 /p put\n");
X printf(" dup 8#161 /q put\n");
X printf(" dup 8#162 /r put\n");
X printf(" dup 8#163 /s put\n");
X printf(" dup 8#164 /t put\n");
X printf(" dup 8#165 /u put\n");
X printf(" dup 8#166 /v put\n");
X printf(" dup 8#167 /w put\n");
X printf(" dup 8#170 /x put\n");
X printf(" dup 8#171 /y put\n");
X printf(" dup 8#172 /z put\n");
X printf(" dup 8#173 /braceleft put\n");
X printf(" dup 8#174 /bar put\n");
X printf(" dup 8#175 /braceright put\n");
X printf(" dup 8#176 /asciitilde put\n");
X printf(" dup 8#241 /exclamdown put\n");
X printf(" dup 8#242 /cent put\n");
X printf(" dup 8#243 /sterling put\n");
X printf(" dup 8#244 /currency put\n");
X printf(" dup 8#245 /yen put\n");
X printf(" dup 8#246 /bar put\n");
X printf(" dup 8#247 /section put\n");
X printf(" dup 8#250 /dieresis put\n");
X printf(" dup 8#251 /copyright put\n");
X printf(" dup 8#252 /ordfeminine put\n");
X printf(" dup 8#253 /guillemotleft put\n");
X printf(" dup 8#254 /.notdef put\n");
X printf(" dup 8#255 /endash put\n");
X printf(" dup 8#256 /registered put\n");
X printf(" dup 8#257 /tilde put\n");
X printf(" dup 8#260 /ring put\n");
X printf(" dup 8#261 /.notdef put\n");
X printf(" dup 8#262 /.notdef put\n");
X printf(" dup 8#263 /.notdef put\n");
X printf(" dup 8#264 /acute put\n");
X printf(" dup 8#265 /.notdef put\n");
X printf(" dup 8#266 /paragraph put\n");
X printf(" dup 8#267 /.notdef put\n");
X printf(" dup 8#270 /cedilla put\n");
X printf(" dup 8#271 /.notdef put\n");
X printf(" dup 8#272 /ordmasculine put\n");
X printf(" dup 8#273 /guillemotright put\n");
X printf(" dup 8#274 /.notdef put\n");
X printf(" dup 8#275 /circumflex put\n");
X printf(" dup 8#276 /dotlessi put\n");
X printf(" dup 8#277 /questiondown put\n");
X printf(" dup 8#300 /Agrave put\n");
X printf(" dup 8#301 /Aacute put\n");
X printf(" dup 8#302 /Acircumflex put\n");
X printf(" dup 8#303 /Atilde put\n");
X printf(" dup 8#304 /Adieresis put\n");
X printf(" dup 8#305 /Aring put\n");
X printf(" dup 8#306 /AE put\n");
X printf(" dup 8#307 /Ccedilla put\n");
X printf(" dup 8#310 /Egrave put\n");
X printf(" dup 8#311 /Eacute put\n");
X printf(" dup 8#312 /Ecircumflex put\n");
X printf(" dup 8#313 /Edieresis put\n");
X printf(" dup 8#314 /Igrave put\n");
X printf(" dup 8#315 /Iacute put\n");
X printf(" dup 8#316 /Icircumflex put\n");
X printf(" dup 8#317 /Idieresis put\n");
X printf(" dup 8#320 /.notdef put\n");
X printf(" dup 8#321 /Ntilde put\n");
X printf(" dup 8#322 /Ograve put\n");
X printf(" dup 8#323 /Oacute put\n");
X printf(" dup 8#324 /Ocircumflex put\n");
X printf(" dup 8#325 /Otilde put\n");
X printf(" dup 8#326 /Odieresis put\n");
X printf(" dup 8#327 /.notdef put\n");
X printf(" dup 8#330 /Oslash put\n");
X printf(" dup 8#331 /Ugrave put\n");
X printf(" dup 8#332 /Uacute put\n");
X printf(" dup 8#333 /Ucircumflex put\n");
X printf(" dup 8#334 /Udieresis put\n");
X printf(" dup 8#335 /.notdef put\n");
X printf(" dup 8#336 /.notdef put\n");
X printf(" dup 8#337 /germandbls put\n");
X printf(" dup 8#340 /agrave put\n");
X printf(" dup 8#341 /aacute put\n");
X printf(" dup 8#342 /acircumflex put\n");
X printf(" dup 8#343 /atilde put\n");
X printf(" dup 8#344 /adieresis put\n");
X printf(" dup 8#345 /aring put\n");
X printf(" dup 8#346 /ae put\n");
X printf(" dup 8#347 /ccedilla put\n");
X printf(" dup 8#350 /egrave put\n");
X printf(" dup 8#351 /eacute put\n");
X printf(" dup 8#352 /ecircumflex put\n");
X printf(" dup 8#353 /edieresis put\n");
X printf(" dup 8#354 /igrave put\n");
X printf(" dup 8#355 /iacute put\n");
X printf(" dup 8#356 /icircumflex put\n");
X printf(" dup 8#357 /idieresis put\n");
X printf(" dup 8#360 /.notdef put\n");
X printf(" dup 8#361 /ntilde put\n");
X printf(" dup 8#362 /ograve put\n");
X printf(" dup 8#363 /oacute put\n");
X printf(" dup 8#364 /ocircumflex put\n");
X printf(" dup 8#365 /otilde put\n");
X printf(" dup 8#366 /odieresis put\n");
X printf(" dup 8#367 /.notdef put\n");
X printf(" dup 8#370 /oslash put\n");
X printf(" dup 8#371 /ugrave put\n");
X printf(" dup 8#372 /uacute put\n");
X printf(" dup 8#373 /ucircumflex put\n");
X printf(" dup 8#374 /udieresis put\n");
X printf(" dup 8#375 /ydieresis put\n");
X printf(" dup 8#376 /.notdef put\n");
X printf(" pop\n");
X printf("\n");
X printf("\n");
X}
X
Xvoid re_encode (font)
Xchar *font;
X {
X printf("/%s /%s ISO ReEncode\n", font, font);
X }
END_OF_FILE
if test 8481 -ne `wc -c <'chord/iso.c'`; then
echo shar: \"'chord/iso.c'\" unpacked with wrong size!
fi
# end of 'chord/iso.c'
fi
if test -f 'chord/license.txt' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'chord/license.txt'\"
else
echo shar: Extracting \"'chord/license.txt'\" \(17982 characters\)
sed "s/^X//" >'chord/license.txt' <<'END_OF_FILE'
X GNU GENERAL PUBLIC LICENSE
X Version 2, June 1991
X
X Copyright (C) 1989, 1991 Free Software Foundation, Inc.
X 675 Mass Ave, Cambridge, MA 02139, USA
X Everyone is permitted to copy and distribute verbatim copies
X of this license document, but changing it is not allowed.
X
X Preamble
X
X The licenses for most software are designed to take away your
Xfreedom to share and change it. By contrast, the GNU General Public
XLicense is intended to guarantee your freedom to share and change free
Xsoftware--to make sure the software is free for all its users. This
XGeneral Public License applies to most of the Free Software
XFoundation's software and to any other program whose authors commit to
Xusing it. (Some other Free Software Foundation software is covered by
Xthe GNU Library General Public License instead.) You can apply it to
Xyour programs, too.
X
X When we speak of free software, we are referring to freedom, not
Xprice. Our General Public Licenses are designed to make sure that you
Xhave the freedom to distribute copies of free software (and charge for
Xthis service if you wish), that you receive source code or can get it
Xif you want it, that you can change the software or use pieces of it
Xin new free programs; and that you know you can do these things.
X
X To protect your rights, we need to make restrictions that forbid
Xanyone to deny you these rights or to ask you to surrender the rights.
XThese restrictions translate to certain responsibilities for you if you
Xdistribute copies of the software, or if you modify it.
X
X For example, if you distribute copies of such a program, whether
Xgratis or for a fee, you must give the recipients all the rights that
Xyou have. You must make sure that they, too, receive or can get the
Xsource code. And you must show them these terms so they know their
Xrights.
X
X We protect your rights with two steps: (1) copyright the software, and
X(2) offer you this license which gives you legal permission to copy,
Xdistribute and/or modify the software.
X
X Also, for each author's protection and ours, we want to make certain
Xthat everyone understands that there is no warranty for this free
Xsoftware. If the software is modified by someone else and passed on, we
Xwant its recipients to know that what they have is not the original, so
Xthat any problems introduced by others will not reflect on the original
Xauthors' reputations.
X
X Finally, any free program is threatened constantly by software
Xpatents. We wish to avoid the danger that redistributors of a free
Xprogram will individually obtain patent licenses, in effect making the
Xprogram proprietary. To prevent this, we have made it clear that any
Xpatent must be licensed for everyone's free use or not licensed at all.
X
X The precise terms and conditions for copying, distribution and
Xmodification follow.
X
X GNU GENERAL PUBLIC LICENSE
X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
X
X 0. This License applies to any program or other work which contains
Xa notice placed by the copyright holder saying it may be distributed
Xunder the terms of this General Public License. The "Program", below,
Xrefers to any such program or work, and a "work based on the Program"
Xmeans either the Program or any derivative work under copyright law:
Xthat is to say, a work containing the Program or a portion of it,
Xeither verbatim or with modifications and/or translated into another
Xlanguage. (Hereinafter, translation is included without limitation in
Xthe term "modification".) Each licensee is addressed as "you".
X
XActivities other than copying, distribution and modification are not
Xcovered by this License; they are outside its scope. The act of
Xrunning the Program is not restricted, and the output from the Program
Xis covered only if its contents constitute a work based on the
XProgram (independent of having been made by running the Program).
XWhether that is true depends on what the Program does.
X
X 1. You may copy and distribute verbatim copies of the Program's
Xsource code as you receive it, in any medium, provided that you
Xconspicuously and appropriately publish on each copy an appropriate
Xcopyright notice and disclaimer of warranty; keep intact all the
Xnotices that refer to this License and to the absence of any warranty;
Xand give any other recipients of the Program a copy of this License
Xalong with the Program.
X
XYou may charge a fee for the physical act of transferring a copy, and
Xyou may at your option offer warranty protection in exchange for a fee.
X
X 2. You may modify your copy or copies of the Program or any portion
Xof it, thus forming a work based on the Program, and copy and
Xdistribute such modifications or work under the terms of Section 1
Xabove, provided that you also meet all of these conditions:
X
X a) You must cause the modified files to carry prominent notices
X stating that you changed the files and the date of any change.
X
X b) You must cause any work that you distribute or publish, that in
X whole or in part contains or is derived from the Program or any
X part thereof, to be licensed as a whole at no charge to all third
X parties under the terms of this License.
X
X c) If the modified program normally reads commands interactively
X when run, you must cause it, when started running for such
X interactive use in the most ordinary way, to print or display an
X announcement including an appropriate copyright notice and a
X notice that there is no warranty (or else, saying that you provide
X a warranty) and that users may redistribute the program under
X these conditions, and telling the user how to view a copy of this
X License. (Exception: if the Program itself is interactive but
X does not normally print such an announcement, your work based on
X the Program is not required to print an announcement.)
X
XThese requirements apply to the modified work as a whole. If
Xidentifiable sections of that work are not derived from the Program,
Xand can be reasonably considered independent and separate works in
Xthemselves, then this License, and its terms, do not apply to those
Xsections when you distribute them as separate works. But when you
Xdistribute the same sections as part of a whole which is a work based
Xon the Program, the distribution of the whole must be on the terms of
Xthis License, whose permissions for other licensees extend to the
Xentire whole, and thus to each and every part regardless of who wrote it.
X
XThus, it is not the intent of this section to claim rights or contest
Xyour rights to work written entirely by you; rather, the intent is to
Xexercise the right to control the distribution of derivative or
Xcollective works based on the Program.
X
XIn addition, mere aggregation