%N grsyds %F $MIR/src/grsyds.f
%D Decode character string into list of symbol numbers
%B
      SUBROUTINE GRSYDS (SYMBOL, NSYMBS, TEXT, FONT)
      INTEGER SYMBOL(*), NSYMBS, FONT
      CHARACTER*(*) TEXT

 Given a character string, this routine returns a list of symbol
 numbers to be used to plot it. It is responsible for interpreting
 all escape sequences.  Negative `symbol numbers' are inserted in the
 list to represent pen movement. The following escape sequences are
 defined (the letter following the  may be either upper or lower 
 case):

 u       :      up one level (returns -1)
 d       :      down one level (returns -2)
 b       :      backspace (returns -3)
 A       :      (upper case only) Angstrom symbol, roman font
 x       :      multiplication sign
 .       :      centered dot
 \       :      , returns the code for backslash
 gx      :      greek letter corresponding to roman letter x
 fn      :      switch to Normal font
 fr      :      switch to Roman font
 fi      :      switch to Italic font
 fs      :      switch to Script font
 mn or mnn :   graph marker number n or nn (1 or 2 digits)
 (nnn)   :      Hershey symbol number nnn (any number of digits)

 Arguments:
  SYMBOL (output) : receives the list of symbol numers.
  NSYMBS (output) : receives the actual number of symbols specified
                    by the string; it is assumed that the dimension of
                    SYMBOL is big enough (not less than LEN(TEXT)).
  TEXT   (input)  : the text string to be decoded.
  FONT   (input)  : the font number (1..4) to be used for decoding the
                    string (this can be overridden by an escape
                    sequence within the string).
