User Tools

Site Tools


cdc:nos2.source:nam5871:np_xlch

NP$XLCH

Table Of Contents

  • [00012] PROC NP$XLCH(NPCHKMARK,CHENTRY)

Source Code

NP$XLCH.txt
  1. *DECK NP$XLCH
  2. *IF,DEF,XFR
  3. USETEXT NX$ACBF
  4. USETEXT AIPDEF
  5. USETEXT HEADER
  6. USETEXT NP$STAT
  7. USETEXT NP$DB
  8. USETEXT NP$NWL
  9. USETEXT NP$MODE
  10. USETEXT NP$GETS
  11. USETEXT NX$ACBX
  12. PROC NP$XLCH(NPCHKMARK,CHENTRY);
  13. BEGIN
  14. #
  15. **
  16. * 1. PROC NAME AUTHOR DATE
  17. *
  18. * NP$XLCH Y. C. YIP 02/16/1984
  19. *
  20. * 2. FUNCTIONAL DESCRIPTION.
  21. *
  22. * NP$XLCH USES THE CHECKMARK NUMBER AND SEARCHES THE
  23. * CHECKMARK TABLE, RETURNING THE ENTRY OF THE CHECKMARK TABLE
  24. * IN THE RETURN PARAMETER CHENTRY.
  25. *
  26. * 3. METHOD USED.
  27. *
  28. * NP$XLCH SCANS THROUGH THE CHECKMARK TABLE AND EITHER
  29. * RETURN THE ENTRY NUMBER OF THE TABLE WHEN IT FINDS A
  30. * MATCH WITH CHECKMARK NUMBER IN THE TABLE OR IF NO MATCH
  31. * IS FOUND OR IF THE TABLE IS EMPTY THEN IT RETURNS ENTRY 0
  32. * TO THE CALLER. THE RETURN PARAMETER IN ALL CASES IS CHENTRY.
  33. *
  34. * 4. ENTRY CONDITIONS:
  35. *
  36. * NPCHKMARK = CHECK MARK NUMBER TO BE SEARCHED.
  37. * CHENTRY = RETURN PARAMETER.
  38. *
  39. *
  40. * 5. EXIT CONDITIONS:
  41. *
  42. * NPCHKMARK IS UNCHANGED.
  43. * CHENTRY = ENTRY OF THE MATCHED CHECKMARK.
  44. * IF CHENTRY IS ZERO THEN NO MATCH IS FOUND.
  45. #
  46. #
  47. ****
  48. #
  49. XREF
  50. BEGIN
  51. END
  52. #
  53. ****
  54. #
  55. ITEM NPCHKMARK; # CHECK MARK TO BE MATCHED #
  56. ITEM CHENTRY; # RETURN PARAMETER #
  57. ITEM INDEX; # LOOP INDEX #
  58. ITEM FOUND B; # FLAG FOR LOCATING THE ENTRY #
  59. CONTROL EJECT;
  60. #
  61. ************************************************************************
  62. * *
  63. * CODE OF PROC NP$XLCH BEGINS HERE *
  64. * *
  65. ************************************************************************
  66. #
  67. P<CHK> = FTTCKTBL[FTTINDEX]; # PULL CHECKMARK TABLE TEMPLAT#
  68. # TO ITS ADDRESS IN FTT #
  69. CHENTRY = 1; # INITIALIZE ENTRY TO DEFAULT #
  70. # CHECKMARK ENTRY #
  71. FOUND = FALSE; # SET FLAG TO FALSE #
  72. IF CHK$IDX[0] GQ CHK$START # IF CHECK MARK TABLE NOT #
  73. # EMPTY #
  74. THEN
  75. BEGIN
  76. FOR INDEX = CHK$START STEP 1 WHILE NOT FOUND
  77. DO
  78. BEGIN
  79. IF NPCHKMARK EQ CHK$MARK[INDEX] # MATCH FOUND #
  80. THEN
  81. BEGIN
  82. FOUND = TRUE; # SET FLAG #
  83. CHENTRY = INDEX; # SAVE ENTRY IN RETURN #
  84. END # PARAMETER #
  85. ELSE
  86. BEGIN
  87. IF INDEX EQ CHK$IDX[0] # LAST ENTRY ALREADY #
  88. THEN
  89. BEGIN
  90. FOUND = TRUE; # SET FLAG TO EXIT #
  91. END
  92. END
  93. END # END WHILE #
  94. END # END IF #
  95. RETURN; # RETURN TO CALLER #
  96. END # END OF PROC NP$XLCH #
  97. TERM
  98. *ENDIF
cdc/nos2.source/nam5871/np_xlch.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator