Subversion Repositories Kolibri OS

Rev

Rev 7752 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1.  
  2. struct _anchors {
  3.         collection anchor_name;
  4.         collection anchor_position;
  5.         void add();
  6.         int get_pos_by_name();
  7.         void clear();
  8. } anchors;
  9.  
  10. void _anchors::add(dword _name, _pos)
  11. {
  12.         anchor_name.add(_name);
  13.         anchor_position.add(itoa(_pos));
  14. }
  15.  
  16. int _anchors::get_pos_by_name(dword _get_name)
  17. {
  18.         dword pos_name = anchor_name.get_pos_by_name(_get_name);
  19.         if (ESBYTE[_get_name]==NULL) return 0;
  20.         if (pos_name==-1) {
  21.                 return -1;
  22.         } else {
  23.                 return atoi(anchor_position.get(pos_name));
  24.         }
  25. }
  26.  
  27. void _anchors::clear()
  28. {
  29.         anchor_name.drop();
  30.         anchor_position.drop();
  31. }
  32.  
  33.