User Tools

Site Tools


cdc:nos2.source:nam5871:krightd

KRIGHTD

Table Of Contents

  • [00007] PRGM KRIGHTD
  • [00088] PROC MGETS
  • [00089] PROC XTRACE

Source Code

KRIGHTD.txt
  1. *DECK KRIGHTD
  2. USETEXT NIPDEF
  3. USETEXT DRHDR
  4. USETEXT KDIS
  5. USETEXT KINITBF
  6. USETEXT KSTTAB
  7. PRGM KRIGHTD;
  8. STARTIMS;
  9. #
  10. *1DC KRIGHTD
  11. *
  12. * 1.PROC NAME AUTHOR DATE
  13. * KRIGHTD M.GIBIAN 84/01/26
  14. *
  15. * 2.FUNCTIONAL DESCRIPTION
  16. * DISPLAY NEXT PAGE OF NIPS RIGHT KDISPLAY
  17. *
  18. * 3.METHOD USED
  19. * IF BUFFER IS NOT IN PLACE YET, GENERATE IT.
  20. * IF HELP WAS ENTERED, COPY DETAILED HELP TO BUFFER
  21. * ELSE COPY SUMMARY HELP TO BUFFER
  22. * INCREMENT NEXT RIGHT LINE TO DISPLAY BY RIGHT PAGE LENGTH
  23. *
  24. * 4.ENTRY PARAMETERS
  25. *
  26. * 5.OUTPUT PARAMETERS
  27. *
  28. * 6.COMDECKS AND TEXTS USED.
  29. * NIPDEF KDIS
  30. *
  31. * 7.ROUTINES CALLED.
  32. *
  33. * 8.DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  34. * MUST FIT IN SECONDARY OVERLAY
  35. *
  36. #
  37. STOPIMS;
  38.  
  39. ITEM KADDR U; # ADDRESS OF NEW BUFFER #
  40. ITEM I I; # LOOP VARIABLE #
  41. ITEM J I;
  42. ITEM K I;
  43.  
  44. BASED ARRAY MOVEIT S(1);
  45. BEGIN
  46. ITEM MOVEWRD C(0,0,10);
  47. END
  48.  
  49. BASED ARRAY GETIT S(1);
  50. BEGIN
  51. ITEM GETWRD C(0,0,10);
  52. END
  53.  
  54. DEF KHELPSZ#22#;
  55.  
  56. ARRAY KHELPARY [1:KHELPSZ] S(6);
  57. BEGIN
  58. ITEM KHELP C(0,0,58)=
  59. [" NAM COMMAND LIST",
  60. " ",
  61. "AP ASSIGN DISPLAY TO FIRST APPLICATION ON ALERT LIST.",
  62. "AP=APPL ASSIGN DISPLAY TO APPLICATION APPL.",
  63. "DB=APPL/NAM/ALL TURN ON INLINE DEBUG CODE IN APPLICATION",
  64. " APPL, OR NAM, OR ALL APPLICATIONS AND NAM.",
  65. "DE=APPL/NAM/ALL TURN OFF INLINE DEBUG CODE.",
  66. "DU=APPL/NAM/ALL DUMP FIELD LENGTH.",
  67. "IG IGNORE ALERT FROM THE FIRST APPLICATION OF ALERT LIST",
  68. "IG=APPL IGNORE ALERT FROM APPLICATION APPL",
  69. "FL=NNNNNN CHANGE NAMS MAXIMUM FIELD LENGTH TO NNNNNN.",
  70. "END TERMINATE K-DISPLAY USAGE",
  71. "LB=APPL/NAM/ALL START LOGGING NETWORK TRAFFIC ON DEBUG",
  72. " FILE.",
  73. "LE=APPL/NAM/ALL END LOGGING NETWORK TRAFFIC ON DEBUG FILE.",
  74. "LR=APPL/NAM/ALL RELEASE THE DEBUG LOG FILE.",
  75. "MO=FAST/SLOW REFRESH THE NAM STATUS DISPLAY FAST",
  76. " (DYNAMICALLY) OR SLOW (EVERY 10 SECONDS).",
  77. " DEFAULT IS SLOW.",
  78. "SEND,DN,MSG SEND A MESSAGE MSG (1-40 CHARACTERS) TO",
  79. " DESTINATION HOST NODE NUMBER DN.",
  80. "ST DISPLAY THE NAM STATUS DISPLAY."];
  81. END
  82.  
  83. #
  84.   EXTERNAL REFERENCES
  85. #
  86. XREF
  87. BEGIN
  88. PROC MGETS;
  89. PROC XTRACE;
  90. LABEL RJMAIN;
  91. END
  92.  
  93. BEGIN
  94. CONTROL IFEQ DEBUG,1;
  95. XTRACE("KRIGD");
  96. CONTROL FI;
  97.  
  98. IF KDRFP[0] EQ 0 THEN # ALLOCATE RIGHT DISPLAY BUFFER #
  99. BEGIN
  100.  
  101. MGETS((KRSIZE[0]*KSTBLK)+1+BLKHSIZE+KHDRSIZE,KADDR,TRUE);
  102.  
  103. KDRFP[0]=KADDR;
  104. KDRBP[0]=KADDR;
  105. P<DRHDRWD> = KADDR;
  106. BLKID[0] = KDISIDVALUE;
  107. BACKPTR[0] = LOC(KDRBP[0]);
  108. NEXTPTR[0] = LOC(KDRFP[0]);
  109.  
  110. P<KINITBF> = 0;
  111. KDTYPE[KADDR+BLKHSIZE] = KDISTYPE;
  112. KDSTAIL[KADDR+BLKBS[0]-1]=0;
  113. K7777[KADDR+BLKBS[0]-1]=0;
  114. P<KSTTAB> = KADDR+BLKHSIZE+KHDRSIZE;
  115. KDRSTOP[0] = P<KSTTAB>;
  116. END
  117. ELSE
  118. P<KSTTAB> = KDRSTOP[0];
  119.  
  120. #
  121.   NOW DISPLAY NEXT PAGE OF RIGHT DISPLAY LINES
  122. #
  123. FOR I=0 STEP 1 WHILE (I LQ KRSIZE[0]-1) AND (KDRNXT+I LQ KHELPSZ)
  124. DO
  125. BEGIN
  126. P<GETIT>=LOC(KHELP[KDRNXT+I]);
  127. P<MOVEIT>=LOC(KSTDATA[I]);
  128. FOR J=0 STEP 1 UNTIL 5 DO
  129. MOVEWRD[J]=GETWRD[J];
  130. KSTEND[I] = 0;
  131. END
  132. #
  133.   COMPUTE FIRST LINE OF NEXT PAGE
  134. #
  135. KDRNXT[0]=KDRNXT[0]+KRSIZE[0]-1;
  136. IF KDRNXT[0] GQ KHELPSZ THEN
  137. KDRNXT[0]=1;
  138. ELSE
  139. BEGIN
  140. KDRNXT[0]=KDRNXT[0]-2;
  141. I=I-2;
  142. END
  143. #
  144.   BLANK REMAINING PART OF PAGE
  145. #
  146. FOR J=I STEP 1 UNTIL KRSIZE[0]-1 DO
  147. BEGIN
  148. P<MOVEIT>=LOC(KSTDATA[J]);
  149. FOR K=0 STEP 1 UNTIL 5 DO
  150. MOVEWRD[K]=" ";
  151. KSTEND[J]=0;
  152. END
  153.  
  154. #
  155.   DISPLAY -MORE- AT BOTTOM RIGHT IF NOT LAST PAGET
  156. #
  157. IF KDRNXT[0] NQ 1 THEN
  158. BEGIN
  159. P<MOVEIT>=LOC(KSTDATA[KRSIZE[0]-1]);
  160. MOVEWRD[5]="MORE";
  161. KSTEND[KRSIZE[0]-1]=0;
  162. END
  163.  
  164. KSHOW[0]=FALSE;
  165. GOTO RJMAIN;
  166. END
  167. TERM
cdc/nos2.source/nam5871/krightd.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator