Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

622 lines
19 KiB

  1. // vector standard header
  2. #if _MSC_VER > 1000
  3. #pragma once
  4. #endif
  5. #ifndef _VECTOR_
  6. #define _VECTOR_
  7. #include <climits>
  8. #include <memory>
  9. #include <stdexcept>
  10. #include <xutility>
  11. #ifdef _MSC_VER
  12. #pragma pack(push,8)
  13. #endif /* _MSC_VER */
  14. _STD_BEGIN
  15. // TEMPLATE CLASS vector
  16. template<class _Ty, class _A = allocator<_Ty> >
  17. class vector {
  18. public:
  19. typedef vector<_Ty, _A> _Myt;
  20. typedef _A allocator_type;
  21. typedef _A::size_type size_type;
  22. typedef _A::difference_type difference_type;
  23. typedef _A::pointer _Tptr;
  24. typedef _A::const_pointer _Ctptr;
  25. typedef _A::reference reference;
  26. typedef _A::const_reference const_reference;
  27. typedef _A::value_type value_type;
  28. typedef _Tptr iterator;
  29. typedef _Ctptr const_iterator;
  30. typedef reverse_iterator<const_iterator, value_type,
  31. const_reference, _Ctptr, difference_type>
  32. const_reverse_iterator;
  33. typedef reverse_iterator<iterator, value_type,
  34. reference, _Tptr, difference_type>
  35. reverse_iterator;
  36. explicit vector(const _A& _Al = _A())
  37. : allocator(_Al), _First(0), _Last(0), _End(0) {}
  38. explicit vector(size_type _N, const _Ty& _V = _Ty(),
  39. const _A& _Al = _A())
  40. : allocator(_Al)
  41. {_First = allocator.allocate(_N, (void *)0);
  42. _Ufill(_First, _N, _V);
  43. _Last = _First + _N;
  44. _End = _Last; }
  45. vector(const _Myt& _X)
  46. : allocator(_X.allocator)
  47. {_First = allocator.allocate(_X.size(), (void *)0);
  48. _Last = _Ucopy(_X.begin(), _X.end(), _First);
  49. _End = _Last; }
  50. typedef const_iterator _It;
  51. vector(_It _F, _It _L, const _A& _Al = _A())
  52. : allocator(_Al), _First(0), _Last(0), _End(0)
  53. {insert(begin(), _F, _L); }
  54. ~vector()
  55. {_Destroy(_First, _Last);
  56. allocator.deallocate(_First, _End - _First);
  57. _First = 0, _Last = 0, _End = 0; }
  58. _Myt& operator=(const _Myt& _X)
  59. {if (this == &_X)
  60. ;
  61. else if (_X.size() <= size())
  62. {iterator _S = copy(_X.begin(), _X.end(), _First);
  63. _Destroy(_S, _Last);
  64. _Last = _First + _X.size(); }
  65. else if (_X.size() <= capacity())
  66. {const_iterator _S = _X.begin() + size();
  67. copy(_X.begin(), _S, _First);
  68. _Ucopy(_S, _X.end(), _Last);
  69. _Last = _First + _X.size(); }
  70. else
  71. {_Destroy(_First, _Last);
  72. allocator.deallocate(_First, _End - _First);
  73. _First = allocator.allocate(_X.size(), (void *)0);
  74. _Last = _Ucopy(_X.begin(), _X.end(),
  75. _First);
  76. _End = _Last; }
  77. return (*this); }
  78. void reserve(size_type _N)
  79. {if (capacity() < _N)
  80. {iterator _S = allocator.allocate(_N, (void *)0);
  81. _Ucopy(_First, _Last, _S);
  82. _Destroy(_First, _Last);
  83. allocator.deallocate(_First, _End - _First);
  84. _End = _S + _N;
  85. _Last = _S + size();
  86. _First = _S; }}
  87. size_type capacity() const
  88. {return (_First == 0 ? 0 : _End - _First); }
  89. iterator begin()
  90. {return (_First); }
  91. const_iterator begin() const
  92. {return ((const_iterator)_First); }
  93. iterator end()
  94. {return (_Last); }
  95. const_iterator end() const
  96. {return ((const_iterator)_Last); }
  97. reverse_iterator rbegin()
  98. {return (reverse_iterator(end())); }
  99. const_reverse_iterator rbegin() const
  100. {return (const_reverse_iterator(end())); }
  101. reverse_iterator rend()
  102. {return (reverse_iterator(begin())); }
  103. const_reverse_iterator rend() const
  104. {return (const_reverse_iterator(begin())); }
  105. void resize(size_type _N, const _Ty& _X = _Ty())
  106. {if (size() < _N)
  107. insert(end(), _N - size(), _X);
  108. else if (_N < size())
  109. erase(begin() + _N, end()); }
  110. size_type size() const
  111. {return (_First == 0 ? 0 : _Last - _First); }
  112. size_type max_size() const
  113. {return (allocator.max_size()); }
  114. bool empty() const
  115. {return (size() == 0); }
  116. _A get_allocator() const
  117. {return (allocator); }
  118. const_reference at(size_type _P) const
  119. {if (size() <= _P)
  120. _Xran();
  121. return (*(begin() + _P)); }
  122. reference at(size_type _P)
  123. {if (size() <= _P)
  124. _Xran();
  125. return (*(begin() + _P)); }
  126. const_reference operator[](size_type _P) const
  127. {return (*(begin() + _P)); }
  128. reference operator[](size_type _P)
  129. {return (*(begin() + _P)); }
  130. reference front()
  131. {return (*begin()); }
  132. const_reference front() const
  133. {return (*begin()); }
  134. reference back()
  135. {return (*(end() - 1)); }
  136. const_reference back() const
  137. {return (*(end() - 1)); }
  138. void push_back(const _Ty& _X)
  139. {insert(end(), _X); }
  140. void pop_back()
  141. {erase(end() - 1); }
  142. void assign(_It _F, _It _L)
  143. {erase(begin(), end());
  144. insert(begin(), _F, _L); }
  145. void assign(size_type _N, const _Ty& _X = _Ty())
  146. {erase(begin(), end());
  147. insert(begin(), _N, _X); }
  148. iterator insert(iterator _P, const _Ty& _X = _Ty())
  149. {size_type _O = _P - begin();
  150. insert(_P, 1, _X);
  151. return (begin() + _O); }
  152. void insert(iterator _P, size_type _M, const _Ty& _X)
  153. {if (_End - _Last < _M)
  154. {size_type _N = size() + (_M < size() ? size() : _M);
  155. iterator _S = allocator.allocate(_N, (void *)0);
  156. iterator _Q = _Ucopy(_First, _P, _S);
  157. _Ufill(_Q, _M, _X);
  158. _Ucopy(_P, _Last, _Q + _M);
  159. _Destroy(_First, _Last);
  160. allocator.deallocate(_First, _End - _First);
  161. _End = _S + _N;
  162. _Last = _S + size() + _M;
  163. _First = _S; }
  164. else if (_Last - _P < _M)
  165. {_Ucopy(_P, _Last, _P + _M);
  166. _Ufill(_Last, _M - (_Last - _P), _X);
  167. fill(_P, _Last, _X);
  168. _Last += _M; }
  169. else if (0 < _M)
  170. {_Ucopy(_Last - _M, _Last, _Last);
  171. copy_backward(_P, _Last - _M, _Last);
  172. fill(_P, _P + _M, _X);
  173. _Last += _M; }}
  174. void insert(iterator _P, _It _F, _It _L)
  175. {size_type _M = 0;
  176. _Distance(_F, _L, _M);
  177. if (_End - _Last < _M)
  178. {size_type _N = size() + (_M < size() ? size() : _M);
  179. iterator _S = allocator.allocate(_N, (void *)0);
  180. iterator _Q = _Ucopy(_First, _P, _S);
  181. _Q = _Ucopy(_F, _L, _Q);
  182. _Ucopy(_P, _Last, _Q);
  183. _Destroy(_First, _Last);
  184. allocator.deallocate(_First, _End - _First);
  185. _End = _S + _N;
  186. _Last = _S + size() + _M;
  187. _First = _S; }
  188. else if (_Last - _P < _M)
  189. {_Ucopy(_P, _Last, _P + _M);
  190. _Ucopy(_F + (_Last - _P), _L, _Last);
  191. copy(_F, _F + (_Last - _P), _P);
  192. _Last += _M; }
  193. else if (0 < _M)
  194. {_Ucopy(_Last - _M, _Last, _Last);
  195. copy_backward(_P, _Last - _M, _Last);
  196. copy(_F, _L, _P);
  197. _Last += _M; }}
  198. iterator erase(iterator _P)
  199. {copy(_P + 1, end(), _P);
  200. _Destroy(_Last - 1, _Last);
  201. --_Last;
  202. return (_P); }
  203. iterator erase(iterator _F, iterator _L)
  204. {iterator _S = copy(_L, end(), _F);
  205. _Destroy(_S, end());
  206. _Last = _S;
  207. return (_F); }
  208. void clear()
  209. {erase(begin(), end()); }
  210. bool _Eq(const _Myt& _X) const
  211. {return (size() == _X.size()
  212. && equal(begin(), end(), _X.begin())); }
  213. bool _Lt(const _Myt& _X) const
  214. {return (lexicographical_compare(begin(), end(),
  215. _X.begin(), _X.end())); }
  216. void swap(_Myt& _X)
  217. {if (allocator == _X.allocator)
  218. {std::swap(_First, _X._First);
  219. std::swap(_Last, _X._Last);
  220. std::swap(_End, _X._End); }
  221. else
  222. {_Myt _Ts = *this; *this = _X, _X = _Ts; }}
  223. friend void swap(_Myt& _X, _Myt& _Y)
  224. {_X.swap(_Y); }
  225. protected:
  226. void _Destroy(iterator _F, iterator _L)
  227. {for (; _F != _L; ++_F)
  228. allocator.destroy(_F); }
  229. iterator _Ucopy(const_iterator _F, const_iterator _L,
  230. iterator _P)
  231. {for (; _F != _L; ++_P, ++_F)
  232. allocator.construct(_P, *_F);
  233. return (_P); }
  234. void _Ufill(iterator _F, size_type _N, const _Ty &_X)
  235. {for (; 0 < _N; --_N, ++_F)
  236. allocator.construct(_F, _X); }
  237. void _Xran() const
  238. {_THROW(out_of_range, "invalid vector<T> subscript"); }
  239. _A allocator;
  240. iterator _First, _Last, _End;
  241. };
  242. // CLASS vector<_Bool, allocator>
  243. typedef unsigned int _Vbase;
  244. const int _VBITS = CHAR_BIT * sizeof (_Vbase);
  245. typedef allocator<_Vbase> _Bool_allocator;
  246. class vector<_Bool, _Bool_allocator> {
  247. public:
  248. typedef _Bool_allocator _A;
  249. typedef _Bool _Ty;
  250. typedef vector<_Ty, _A> _Myt;
  251. typedef vector<_Vbase, _A> _Vbtype;
  252. typedef _A allocator_type;
  253. typedef _A::size_type size_type;
  254. typedef _A::difference_type difference_type;
  255. // CLASS reference
  256. class reference {
  257. public:
  258. reference()
  259. : _Mask(0), _Ptr(0) {}
  260. reference(size_t _O, _Vbase *_P)
  261. : _Mask((_Vbase)1 << _O), _Ptr(_P) {}
  262. reference& operator=(const reference& _X)
  263. {return (*this = bool(_X)); }
  264. reference& operator=(bool _V)
  265. {if (_V)
  266. *_Ptr |= _Mask;
  267. else
  268. *_Ptr &= ~_Mask;
  269. return (*this); }
  270. void flip()
  271. {*_Ptr ^= _Mask; }
  272. bool operator~() const
  273. {return (!bool(*this)); }
  274. operator bool() const
  275. {return ((*_Ptr & _Mask) != 0); }
  276. protected:
  277. _Vbase _Mask, *_Ptr;
  278. };
  279. typedef const reference const_reference;
  280. typedef bool value_type;
  281. // CLASS const_iterator
  282. class iterator;
  283. class const_iterator : public _Ranit<_Bool, difference_type> {
  284. public:
  285. const_iterator()
  286. : _Off(0), _Ptr(0) {}
  287. const_iterator(size_t _O, const _Vbase *_P)
  288. : _Off(_O), _Ptr((_Vbase*)_P) {}
  289. const_iterator(const iterator& _X)
  290. : _Off(_X._Off), _Ptr(_X._Ptr) {}
  291. const_reference operator*() const
  292. {return (const_reference(_Off, _Ptr)); }
  293. const_iterator& operator++()
  294. {_Inc();
  295. return (*this); }
  296. const_iterator operator++(int)
  297. {const_iterator _Tmp = *this;
  298. _Inc();
  299. return (_Tmp); }
  300. const_iterator& operator--()
  301. {_Dec();
  302. return (*this); }
  303. const_iterator operator--(int)
  304. {const_iterator _Tmp = *this;
  305. _Dec();
  306. return (_Tmp); }
  307. const_iterator& operator+=(difference_type _N)
  308. {_Off += _N;
  309. _Ptr += _Off / _VBITS;
  310. _Off %= _VBITS;
  311. return (*this); }
  312. const_iterator& operator-=(difference_type _N)
  313. {return (*this += -_N); }
  314. const_iterator operator+(difference_type _N) const
  315. {const_iterator _Tmp = *this;
  316. return (_Tmp += _N); }
  317. const_iterator operator-(difference_type _N) const
  318. {const_iterator _Tmp = *this;
  319. return (_Tmp -= _N); }
  320. difference_type operator-(const const_iterator _X) const
  321. {return (_VBITS * (_Ptr - _X._Ptr)
  322. + (difference_type)_Off
  323. - (difference_type)_X._Off); }
  324. const_reference operator[](difference_type _N) const
  325. {return (*(*this + _N)); }
  326. bool operator==(const const_iterator& _X) const
  327. {return (_Ptr == _X._Ptr && _Off == _X._Off); }
  328. bool operator!=(const const_iterator& _X) const
  329. {return (!(*this == _X)); }
  330. bool operator<(const const_iterator& _X) const
  331. {return (_Ptr < _X._Ptr
  332. || _Ptr == _X._Ptr && _Off < _X._Off); }
  333. bool operator>(const const_iterator& _X) const
  334. {return (_X < *this); }
  335. bool operator<=(const const_iterator& _X) const
  336. {return (!(_X < *this)); }
  337. bool operator>=(const const_iterator& _X) const
  338. {return (!(*this < _X)); }
  339. protected:
  340. void _Dec()
  341. {if (_Off != 0)
  342. --_Off;
  343. else
  344. _Off = _VBITS - 1, --_Ptr; }
  345. void _Inc()
  346. {if (_Off < _VBITS - 1)
  347. ++_Off;
  348. else
  349. _Off = 0, ++_Ptr; }
  350. size_t _Off;
  351. _Vbase *_Ptr;
  352. };
  353. // CLASS iterator
  354. class iterator : public const_iterator {
  355. public:
  356. iterator()
  357. : const_iterator() {}
  358. iterator(size_t _O, _Vbase *_P)
  359. : const_iterator(_O, _P) {}
  360. reference operator*() const
  361. {return (reference(_Off, _Ptr)); }
  362. iterator& operator++()
  363. {_Inc();
  364. return (*this); }
  365. iterator operator++(int)
  366. {iterator _Tmp = *this;
  367. _Inc();
  368. return (_Tmp); }
  369. iterator& operator--()
  370. {_Dec();
  371. return (*this); }
  372. iterator operator--(int)
  373. {iterator _Tmp = *this;
  374. _Dec();
  375. return (_Tmp); }
  376. iterator& operator+=(difference_type _N)
  377. {_Off += _N;
  378. _Ptr += _Off / _VBITS;
  379. _Off %= _VBITS;
  380. return (*this); }
  381. iterator& operator-=(difference_type _N)
  382. {return (*this += -_N); }
  383. iterator operator+(difference_type _N) const
  384. {iterator _Tmp = *this;
  385. return (_Tmp += _N); }
  386. iterator operator-(difference_type _N) const
  387. {iterator _Tmp = *this;
  388. return (_Tmp -= _N); }
  389. difference_type operator-(const iterator _X) const
  390. {return (_VBITS * (_Ptr - _X._Ptr)
  391. + (difference_type)_Off
  392. - (difference_type)_X._Off); }
  393. reference operator[](difference_type _N) const
  394. {return (*(*this + _N)); }
  395. bool operator==(const iterator& _X) const
  396. {return (_Ptr == _X._Ptr && _Off == _X._Off); }
  397. bool operator!=(const iterator& _X) const
  398. {return (!(*this == _X)); }
  399. bool operator<(const iterator& _X) const
  400. {return (_Ptr < _X._Ptr
  401. || _Ptr == _X._Ptr && _Off < _X._Off); }
  402. bool operator>(const iterator& _X) const
  403. {return (_X < *this); }
  404. bool operator<=(const iterator& _X) const
  405. {return (!(_X < *this)); }
  406. bool operator>=(const iterator& _X) const
  407. {return (!(*this < _X)); }
  408. };
  409. typedef reverse_iterator<const_iterator, value_type,
  410. const_reference, const_reference *, difference_type>
  411. const_reverse_iterator;
  412. typedef reverse_iterator<iterator, value_type,
  413. reference, reference *, difference_type>
  414. reverse_iterator;
  415. explicit vector(const _A& _Al = _A())
  416. : _Size(0), _Vec(_Al) {}
  417. explicit vector(size_type _N, const bool _V = false,
  418. const _A& _Al = _A())
  419. : _Vec(_Nw(_N), _V ? -1 : 0, _Al) {_Trim(_N); }
  420. typedef const_iterator _It;
  421. vector(_It _F, _It _L, const _A& _Al = _A())
  422. : _Size(0), _Vec(_Al)
  423. {insert(begin(), _F, _L); }
  424. ~vector()
  425. {_Size = 0; }
  426. void reserve(size_type _N)
  427. {_Vec.reserve(_Nw(_N)); }
  428. size_type capacity() const
  429. {return (_Vec.capacity() * _VBITS); }
  430. iterator begin()
  431. {return (iterator(0, _Vec.begin())); }
  432. const_iterator begin() const
  433. {return (const_iterator(0, _Vec.begin())); }
  434. iterator end()
  435. {iterator _Tmp = begin();
  436. if (0 < _Size)
  437. _Tmp += _Size;
  438. return (_Tmp); }
  439. const_iterator end() const
  440. {const_iterator _Tmp = begin();
  441. if (0 < _Size)
  442. _Tmp += _Size;
  443. return (_Tmp); }
  444. reverse_iterator rbegin()
  445. {return (reverse_iterator(end())); }
  446. const_reverse_iterator rbegin() const
  447. {return (const_reverse_iterator(end())); }
  448. reverse_iterator rend()
  449. {return (reverse_iterator(begin())); }
  450. const_reverse_iterator rend() const
  451. {return (const_reverse_iterator(begin())); }
  452. void resize(size_type _N, bool _X = false)
  453. {if (size() < _N)
  454. insert(end(), _N - size(), _X);
  455. else if (_N < size())
  456. erase(begin() + _N, end()); }
  457. size_type size() const
  458. {return (_Size); }
  459. size_type max_size() const
  460. {return (_Vec.max_size() * _VBITS); }
  461. bool empty() const
  462. {return (size() == 0); }
  463. _A get_allocator() const
  464. {return (_Vec.get_allocator()); }
  465. const_reference at(size_type _P) const
  466. {if (size() <= _P)
  467. _Xran();
  468. return (*(begin() + _P)); }
  469. reference at(size_type _P)
  470. {if (size() <= _P)
  471. _Xran();
  472. return (*(begin() + _P)); }
  473. const_reference operator[](size_type _P) const
  474. {return (*(begin() + _P)); }
  475. reference operator[](size_type _P)
  476. {return (*(begin() + _P)); }
  477. reference front()
  478. {return (*begin()); }
  479. const_reference front() const
  480. {return (*begin()); }
  481. reference back()
  482. {return (*(end() - 1)); }
  483. const_reference back() const
  484. {return (*(end() - 1)); }
  485. void push_back(const bool _X)
  486. {insert(end(), _X); }
  487. void pop_back()
  488. {erase(end() - 1); }
  489. void assign(_It _F, _It _L)
  490. {erase(begin(), end());
  491. insert(begin(), _F, _L); }
  492. void assign(size_type _N, const bool _X = false)
  493. {erase(begin(), end());
  494. insert(begin(), _N, _X); }
  495. iterator insert(iterator _P, const bool _X = false)
  496. {size_type _O = _P - begin();
  497. insert(_P, 1, _X);
  498. return (begin() + _O); }
  499. void insert(iterator _P, size_type _M, const bool _X)
  500. {if (0 < _M)
  501. {if (capacity() - size() < _M)
  502. {size_type _O = _P - begin();
  503. _Vec.resize(_Nw(size() + _M), 0);
  504. _P = begin() + _O; }
  505. copy_backward(_P, end(), end() + _M);
  506. fill(_P, _P + _M, _X);
  507. _Size += _M; }}
  508. void insert(iterator _P, _It _F, _It _L)
  509. {size_type _M = 0;
  510. _Distance(_F, _L, _M);
  511. if (0 < _M)
  512. {if (capacity() - size() < _M)
  513. {size_type _O = _P - begin();
  514. _Vec.resize(_Nw(size() + _M), 0);
  515. _P = begin() + _O; }
  516. copy_backward(_P, end(), end() + _M);
  517. copy(_F, _L, _P);
  518. _Size += _M; }}
  519. iterator erase(iterator _P)
  520. {copy(_P + 1, end(), _P);
  521. _Trim(_Size - 1);
  522. return (_P); }
  523. iterator erase(iterator _F, iterator _L)
  524. {iterator _S = copy(_L, end(), _F);
  525. _Trim(_S - begin());
  526. return (_F); }
  527. void clear()
  528. {erase(begin(), end()); }
  529. void flip()
  530. {for (_Vbtype::iterator _S = _Vec.begin();
  531. _S != _Vec.end(); ++_S)
  532. *_S = ~*_S;
  533. _Trim(_Size); }
  534. bool _Eq(const _Myt& _X) const
  535. {return (_Size == _X._Size && _Vec._Eq(_X._Vec)); }
  536. bool _Lt(const _Myt& _X) const
  537. {return (_Size < _X._Size
  538. || _Size == _X._Size && _Vec._Lt(_X._Vec)); }
  539. void swap(_Myt& _X)
  540. {std::swap(_Size, _X._Size);
  541. _Vec.swap(_X._Vec); }
  542. friend void swap(_Myt& _X, _Myt& _Y)
  543. {_X.swap(_Y); }
  544. static void swap(reference _X, reference _Y)
  545. {bool _V = _X;
  546. _X = _Y;
  547. _Y = _V; }
  548. protected:
  549. static size_type _Nw(size_type _N)
  550. {return ((_N + _VBITS - 1) / _VBITS); }
  551. void _Trim(size_type _N)
  552. {size_type _M = _Nw(_N);
  553. if (_M < _Vec.size())
  554. _Vec.erase(_Vec.begin() + _M, _Vec.end());
  555. _Size = _N;
  556. _N %= _VBITS;
  557. if (0 < _N)
  558. _Vec[_M - 1] &= ((_Vbase)1 << _N) - 1; }
  559. void _Xran() const
  560. {_THROW(out_of_range, "invalid vector<bool> subscript"); }
  561. size_type _Size;
  562. _Vbtype _Vec;
  563. };
  564. typedef vector<_Bool, _Bool_allocator> _Bvector;
  565. // vector TEMPLATE OPERATORS
  566. template<class _Ty, class _A> inline
  567. bool operator==(const vector<_Ty, _A>& _X,
  568. const vector<_Ty, _A>& _Y)
  569. {return (_X._Eq(_Y)); }
  570. template<class _Ty, class _A> inline
  571. bool operator!=(const vector<_Ty, _A>& _X,
  572. const vector<_Ty, _A>& _Y)
  573. {return (!(_X == _Y)); }
  574. template<class _Ty, class _A> inline
  575. bool operator<(const vector<_Ty, _A>& _X,
  576. const vector<_Ty, _A>& _Y)
  577. {return (_X._Lt(_Y)); }
  578. template<class _Ty, class _A> inline
  579. bool operator>(const vector<_Ty, _A>& _X,
  580. const vector<_Ty, _A>& _Y)
  581. {return (_Y < _X); }
  582. template<class _Ty, class _A> inline
  583. bool operator<=(const vector<_Ty, _A>& _X,
  584. const vector<_Ty, _A>& _Y)
  585. {return (!(_Y < _X)); }
  586. template<class _Ty, class _A> inline
  587. bool operator>=(const vector<_Ty, _A>& _X,
  588. const vector<_Ty, _A>& _Y)
  589. {return (!(_X < _Y)); }
  590. _STD_END
  591. #ifdef _MSC_VER
  592. #pragma pack(pop)
  593. #endif /* _MSC_VER */
  594. #endif /* _VECTOR_ */
  595. /*
  596. * Copyright (c) 1995 by P.J. Plauger. ALL RIGHTS RESERVED.
  597. * Consult your license regarding permissions and restrictions.
  598. */
  599. /*
  600. * This file is derived from software bearing the following
  601. * restrictions:
  602. *
  603. * Copyright (c) 1994
  604. * Hewlett-Packard Company
  605. *
  606. * Permission to use, copy, modify, distribute and sell this
  607. * software and its documentation for any purpose is hereby
  608. * granted without fee, provided that the above copyright notice
  609. * appear in all copies and that both that copyright notice and
  610. * this permission notice appear in supporting documentation.
  611. * Hewlett-Packard Company makes no representations about the
  612. * suitability of this software for any purpose. It is provided
  613. * "as is" without express or implied warranty.
  614. */