
  PROCEDURE [INLINE] clp$search_command_table
    (    name: clt$command_name;
         command_table: ^clt$command_table;
     VAR entry_index: clt$command_table_index;
     VAR entry_found: boolean);

?? PUSH (LISTEXT := ON) ??

    VAR
      low_index: 1 .. clc$max_command_table_size + 1,
      temp: integer,
      high_index: 0 .. clc$max_command_table_size;


    entry_found := FALSE;

    IF command_table <> NIL THEN
      low_index := 1;
      high_index := UPPERBOUND (command_table^);
      REPEAT
        temp := low_index + high_index;
        entry_index := temp DIV 2;
        IF name = command_table^ [entry_index].name THEN
          entry_found := TRUE;
        ELSEIF name > command_table^ [entry_index].name THEN
          low_index := entry_index + 1;
        ELSE
          high_index := entry_index - 1;
        IFEND;
      UNTIL entry_found OR (low_index > high_index);
    IFEND;

  PROCEND clp$search_command_table;

*copyc clt$command_name
*copyc clt$command_table
*copyc clt$command_table_index
?? POP ??
