---------------------------------------------------------------------------*/ * This operation allocates and initializes a new adapted * class data structure and returns a ptr to it. * * @return Ptr to new class data structure. * * @note Globals: none * @note Exceptions: none * @note History: Thu Mar 14 12:58:13 1991, DSJ, Created. */
| 111 | * @note History: Thu Mar 14 12:58:13 1991, DSJ, Created. |
| 112 | */ |
| 113 | ADAPT_CLASS NewAdaptedClass() { |
| 114 | ADAPT_CLASS Class; |
| 115 | int i; |
| 116 | |
| 117 | Class = (ADAPT_CLASS) Emalloc (sizeof (ADAPT_CLASS_STRUCT)); |
| 118 | Class->NumPermConfigs = 0; |
| 119 | Class->MaxNumTimesSeen = 0; |
| 120 | Class->TempProtos = NIL_LIST; |
| 121 | |
| 122 | Class->PermProtos = NewBitVector (MAX_NUM_PROTOS); |
| 123 | Class->PermConfigs = NewBitVector (MAX_NUM_CONFIGS); |
| 124 | zero_all_bits (Class->PermProtos, WordsInVectorOfSize (MAX_NUM_PROTOS)); |
| 125 | zero_all_bits (Class->PermConfigs, WordsInVectorOfSize (MAX_NUM_CONFIGS)); |
| 126 | |
| 127 | for (i = 0; i < MAX_NUM_CONFIGS; i++) |
| 128 | TempConfigFor (Class, i) = NULL; |
| 129 | |
| 130 | return (Class); |
| 131 | |
| 132 | } /* NewAdaptedClass */ |
| 133 | |
| 134 | |
| 135 | /*-------------------------------------------------------------------------*/ |
no test coverage detected