home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 287.lha / TY_v1.3 / src / help.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-07  |  5.1 KB  |  118 lines

  1. /*************************************************************************
  2.  ***                        help.c                       (JJB TEMPLAR) ***
  3.  *** Date modifications begun: 7/8/89.                                 ***
  4.  *** Last modified: 27/8/89.                                           ***
  5.  *************************************************************************/
  6. /*** Help stuff. Compile with -cs                                      ***
  7.  *************************************************************************/
  8.  
  9. #include "less.h"
  10. #include "screen.h"
  11.  
  12. extern int  has_resized;
  13.  
  14. char    *help0data[] = {
  15. "\n    Ty 1.3 Commands:\n\n",
  16. "    qQxX{ESC} ............... Quit.\n",
  17. "    tT< ..................... Top of file.\n",
  18. "    bB> ..................... Bottom of file.\n",
  19. "    {BACKSPC}{SHIFT UP} ..... Back page.\n",
  20. "    {SPACE}{SHIFT DOWN} ..... Forward page.\n",
  21. "    {UP} .................... Back one line.\n",
  22. "    {DOWN}{RETURN} .......... Forward one line.\n",
  23. "    nN ...................... Next file.\n",
  24. "    pP ...................... Previous file.\n",
  25. "    .sS ..................... Search forward.\n",
  26. "    ,rR ..................... Search backward.\n",
  27. "    / ....................... Search forward for last pattern.\n",
  28. "    ? ....................... Search backward for last pattern.\n",
  29. "    iI ...................... Iconify (by Leo Schwab, Fish126).\n",
  30. "    % ....................... Go a percentage into the file.\n",
  31. "    cC{NK *} ................ NewCLI.\n",
  32. "    eE ...................... Invoke ENV:EDITOR on current file.\n",
  33. "    aA ...................... Add new file.\n",
  34. "                           (press RETURN)",
  35. NULL};          /* Use NULL to end data, so output is size independent. */
  36. char    *help1data[] = {
  37. "\n    Ty 1.3 Commands: (page 2)\n\n",
  38. "    {LEFT} .................. Move left.\n",
  39. "    {RIGHT} ................. Move right.\n",
  40. "    {SHIFT LEFT} ............ Move to left edge.\n",
  41. "    {SHIFT RIGHT} ........... Move to right edge.\n",
  42. "    mM ...................... Set mark [0-9].\n",
  43. "    `gG ..................... Go to mark [0-9].\n",
  44. "    {CTRL-L} ................ Repaint.\n",
  45. "    {F1} .................... Print file to PRT:\n",
  46. "    + ....................... Turn mode on.\n",
  47. "    - ....................... Turn mode off.\n",
  48. "    hH{HELP} ................ This info.\n",
  49. "    {SHIFT HELP} ............ About info.\n",
  50. "    vV ...................... Version.\n",
  51. "    = ....................... Summary information.\n\n\n",
  52. "    Some of the command keys have been added for compatibility with\n",
  53. "    \"more\" v3.23 (the help screen of which is the basis of this one).\n",
  54. "                           (press RETURN)",
  55. NULL};          /* Use NULL to end data, so output is size independent. */
  56.  
  57. char    *aboutdata[] = {
  58. "\n    About Ty 1.3:\n\n",
  59. "    Ty is the text display program used by the 1st NZAmigaUG (Wgtn).\n",
  60. "    It was converted from \"less\" by our president for use on the\n",
  61. "    Newsdisks, and has seen continual improvement (until now :-).\n\n",
  62. "    History:\n",
  63. "    Originally was \"less\", a program based on \"more\", and © 1984, 1985\n",
  64. "    by Mark Nudelman. \"Less\" was designed to be machine independent.\n\n",
  65. "    In 1986 Tony Wills hacked \"less\" into a form suitable for the Amiga,\n",
  66. "    particularly regarding use from WorkBench. Since then (ty 1.0), he\n",
  67. "    has modified it further to suit the WorkBench environment as set up\n",
  68. "    by our Newsdisks, up till ty 1.2.\n\n",
  69. "    Now (Aug 1989) the program has fallen into my hands (JJB TEMPLAR), in\n",
  70. "    order to add Intuition support. In the process, ty has lost a number\n",
  71. "    of features, as well as the machine independent nature of the original\n",
  72. "    source code.\n\n",
  73. "                           (press RETURN)",
  74. NULL};
  75.  
  76. char    *aboutdata2[] = {
  77. "\n    About Ty 1.3: (page 2)\n\n",
  78. "    Iconify is by Leo Schwab, and may be found on Fish126.\n\n",
  79. "    And... if anyone would like to improve ty, contact me for the source:\n",
  80. "                    J Bickers,\n",
  81. "                    214 Rata St,\n",
  82. "                    Naenae.\n",
  83. "                    PH: (04) 672-085.\n\n",
  84. "    Suggestions, complaints or questions should be directed to the above\n",
  85. "    address for the moment. Questions relating to the use of this program\n",
  86. "    outside the 1st NZAmigaUG (Wgtn) should be directed to:\n",
  87. "                    Tony Wills,\n",
  88. "                    156c Queens Dr,\n",
  89. "                    Lyall Bay,\n",
  90. "                    Wellington.\n",
  91. "                    PH: (04) 877-258.\n\n\n",
  92. "                           (press RETURN)",
  93. NULL};
  94.  
  95. static void page(ch,cp) /*===============================================*/
  96. register char   **ch,*cp;
  97. {
  98.     clear();
  99.     while (*ch) puts(*ch++);
  100.     error(cp,1);
  101.     if (has_resized) {
  102.         resize();
  103.         has_resized = 0;
  104.     }
  105. }
  106.  
  107. void    help() /*========================================================*/
  108. {
  109.     page(help0data,"More ...");
  110.     page(help1data,"To continue ...");
  111. }
  112.  
  113. void    about() /*=======================================================*/
  114. {
  115.     page(aboutdata,"More ...");
  116.     page(aboutdata2,"To continue ...");
  117. }
  118.