User Tools

Site Tools


cdc:nos2.source:nam5871:kupvtab

KUPVTAB

Table Of Contents

  • [00005] PROC KUPVTAB
  • [00063] PROC XTRACE

Source Code

KUPVTAB.txt
  1. *DECK KUPVTAB
  2. USETEXT NIPDEF
  3. USETEXT KDIS
  4. USETEXT KSTTAB
  5. PROC KUPVTAB; # UPDATE VIEW TABLE #
  6. STARTIMS;
  7. #
  8. *1DC KUPVTAB
  9. *
  10. * 1.PROC NAME AUTHOR DATE
  11. * KUPVTAB M.GIBIAN 84/01/20
  12. *
  13. * 2.FUNCTIONAL DESCRIPTION
  14. *
  15. * UPDATE VIEW TABLE TO REFLECT KDVWLN DISPLAY STARTING FROM
  16. * FIRST NON-ZERO STARTING INDEX.
  17. *
  18. * 3.METHOD USED
  19. *
  20. * FOR EACH TYPE OF STRUCTURE IN THE DISPLAY (APP, EST, LGL),
  21. * SET THE END INDEX TO THE MIN(REMAINING LINES IN VIEW WINDOW,
  22. * MAXIMUM LINES FOR THIS TYPE)
  23. * IF MORE LINES IN VIEW THEN SET NEXT START INDEX TO 1
  24. * ELSE SET NEXT START INDEX TO 0
  25. * IF STRUCTURE NOT BEING DISPLAYED, SET END INDEX TO 0.
  26. *
  27. *
  28. * 4.ENTRY PARAMETERS.
  29. *
  30. * 5.OUTPUT PARAMETERS.
  31. *
  32. * 6.COMDECKS AND TEXTS USED.
  33. *
  34. * NIPDEF KDIS KSTTAB
  35. *
  36. * 7.ROUTINES CALLED
  37. *
  38. * XTRACE RECORD PROCESSOR CALLS
  39. *
  40. * 8.DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  41. *
  42. #
  43. STOPIMS;
  44. #
  45.   EXTERNAL CALLS
  46. #
  47.  
  48. #
  49.   INTERNAL VARIABLES
  50. #
  51. ITEM KREM I=0; # WORKING REMAINING LENGTH IN VIEW BUFFER #
  52. ITEM I I;
  53. ITEM J I;
  54.  
  55. BASED ARRAY INDEXES S(1);
  56. BEGIN
  57. ITEM ISTART U(0,9,9); # START INDEX FIELD IN VIEW TABLE ARRAY #
  58. ITEM IEND U(0,18,9); # END INDEX FIELD IN VIEW TABLE ARRAY #
  59. ITEM IMAX U(0,27,9); # MAX INDEX FIELD IN VIEW TABLE ARRAY #
  60. END
  61.  
  62. XREF BEGIN
  63. PROC XTRACE;
  64. END
  65.  
  66.  
  67. BEGIN
  68. CONTROL IFEQ DEBUG,1;
  69. XTRACE("KUPVT");
  70. CONTROL FI;
  71.  
  72. #
  73.   ADJUST THE VIEW TABLE, USING THE FIRST NONZERO START LOCATION AS THE
  74.   BASE (FIRST) LINE OF THE DISPLAY
  75. #
  76. P<INDEXES>=LOC(KDAPPST[0])-1;
  77. KREM = KDVWLN[0];
  78. FOR I=KST"APP" STEP 1 UNTIL KST"LLK" DO IF ISTART[I] GR 0 THEN
  79. BEGIN
  80. IF ISTART[I] GR IMAX[I] THEN
  81. ISTART[I]=IMAX[I];
  82. IF IMAX[I] LQ KREM+ISTART[I]-1 THEN
  83. IEND[I]=IMAX[I];
  84. ELSE
  85. IEND[I]=KREM+ISTART[I]-1;
  86. KREM=KREM-(IEND[I]-ISTART[I]+1);
  87. IF KREM GR 0 AND I LS KST"LLK" THEN
  88. ISTART[I+1] = 1;
  89. ELSE
  90. FOR J=I+1 STEP 1 UNTIL KST"LLK" DO ISTART[J]=0;
  91. END
  92. ELSE
  93. IEND[I]= 0;
  94.  
  95. END
  96. TERM
cdc/nos2.source/nam5871/kupvtab.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator