%N pgncur %F $MIR/src/pgncur.f
%D Mark a set of points using the cursor
%B
      SUBROUTINE PGNCUR (MAXPT, NPT, X, Y, SYMBOL)
      INTEGER MAXPT, NPT
      REAL    X(*), Y(*)
      INTEGER SYMBOL

 Interactive routine for user to enter data points by use of
 the cursor.  Routine allows user to Add and Delete points.  The
 points are returned in order of increasing x-coordinate, not in the
 order they were entered.

 Arguments:
  MAXPT  (input)  : maximum number of points that may be accepted.
  NPT    (in/out) : number of points entered; should be zero on
                    first call.
  X      (in/out) : array of x-coordinates.
  Y      (in/out) : array of y-coordinates.
  SYMBOL (input)  : code number of symbol to use for marking
                    entered points (see PGPT).

 Note (1): The dimension of arrays X and Y must be greater than or
 equal to MAXPT.

 Note (2): On return from the program, cursor points are returned in
 increasing order of X. Routine may be (re-)called with points
 already defined in X,Y (number in NPT), and they will be plotted
 first, before editing.

 Note (3): User commands: the user types single-character commands
 after positioning the cursor: the following are accepted:
 A (Add)    - add point at current cursor location.
 D (Delete) - delete nearest point to cursor.
 X (eXit)   - leave subroutine.
