Subversion Repositories Kolibri OS

Rev

Rev 7738 | Blame | Last modification | View Log | Download | RSS feed

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