instruct.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /****************************************************************************
  2. *
  3. * MODULE: r.digit
  4. *
  5. * AUTHOR(S): Michael Shapiro - CERL
  6. *
  7. * PURPOSE: Interactive tool used to draw and save vector features
  8. * on a graphics monitor using a pointing device (mouse)
  9. * and save to a raster map.
  10. *
  11. * COPYRIGHT: (C) 2006 by the GRASS Development Team
  12. *
  13. * This program is free software under the GNU General Public
  14. * License (>=v2). Read the file COPYING that comes with GRASS
  15. * for details.
  16. *
  17. ***************************************************************************/
  18. #include <stdio.h>
  19. #include "local_proto.h"
  20. #define MAXLINES 18
  21. #define TITLE (char *) 0
  22. static char *Title = TITLE;
  23. static int nlines = 0;
  24. int instructions(int n)
  25. {
  26. if (n == 0)
  27. nlines = MAXLINES;
  28. if (nlines >= MAXLINES) {
  29. if (Title)
  30. fprintf(stdout, "%s\n", Title);
  31. fprintf(stdout, " Buttons:\n");
  32. fprintf(stdout, " Left: where am i\n");
  33. fprintf(stdout, " Middle: mark point\n");
  34. fprintf(stdout, " Right: done\n\n");
  35. nlines = 0;
  36. }
  37. nlines += n;
  38. return 0;
  39. }