home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / aplusplus-1.01-src.lha / GNU / src / amiga / APlusPlus-1.01 / libsource / PriorityList.cxx < prev    next >
C/C++ Source or Header  |  1994-04-23  |  1KB  |  39 lines

  1. /******************************************************************************
  2.  **
  3.  **    C++ Class Library for the Amiga© system software.
  4.  **
  5.  **    Copyright (C) 1994 by Armin Vogt  **  EMail: armin@uni-paderborn.de
  6.  **    All Rights Reserved.
  7.  **
  8.  **    $Source: apphome:APlusPlus/RCS/libsource/PriorityList.cxx,v $
  9.  **    $Revision: 1.3 $
  10.  **    $Date: 1994/04/23 21:02:16 $
  11.  **    $Author: Armin_Vogt $
  12.  **
  13.  ******************************************************************************/
  14.  
  15.  
  16. #include <APlusPlus/exec/PriorityList.h>
  17.  
  18.  
  19. volatile static char rcs_id[] = "$Id: PriorityList.cxx,v 1.3 1994/04/23 21:02:16 Armin_Vogt Exp Armin_Vogt $";
  20.  
  21.  
  22. BYTE PriorityList::internalEnqueue(PriorityNode *node,BYTE pri)
  23. {
  24.    BYTE old_pri;
  25.  
  26.    old_pri = node->priority();
  27.    ((NodeC*)node)->setPriority(pri); // GCC 2.5.4. understands setPriority() to be private!?
  28.    ListC::enqueue(node);
  29.  
  30.    return old_pri;
  31. }
  32. BYTE PriorityList::internalChangePri(PriorityNode *node,BYTE pri)
  33. {
  34.    // be carefull, membership of the node is not checked here, therefore this is internal only!
  35.    Remove((struct Node*)node);
  36.    return internalEnqueue(node,pri);
  37. }
  38.  
  39.