Subversion Repositories Kolibri OS

Rev

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

  1. struct _tag {
  2.         dword start;
  3.         dword name;
  4.         dword param[10];
  5.         dword value[10];
  6.         void parce();
  7.         int nameis();
  8.         void clear();
  9. };
  10.  
  11. void _tag::parce()
  12. {
  13.         dword o = name = start;
  14.         while (ESBYTE[o]!=' ') && (ESBYTE[o]) o++; //searching for a space after tag name
  15.         ESBYTE[o] = '\0';
  16.         strlwr(name);
  17. }
  18.  
  19. int _tag::nameis(dword _in_tag_name)
  20. {
  21.         if (name) && (strcmp(_in_tag_name, name)==0) return true;
  22.         return false;
  23. }
  24.  
  25. void _tag::clear()
  26. {
  27.         start=name=0;
  28. }
  29.  
  30.  
  31. /*
  32. unsigned int GetNextParam()
  33. {
  34.         byte    kavichki=0;
  35.         int             i = strlen(#tagparam) - 1;
  36.        
  37.         if (!tagparam) return 0;
  38.        
  39.         WHILE((i > 0) && ((tagparam[i] == '"') || (tagparam[i] == ' ') || (tagparam[i] == '\'') || (tagparam[i] == '/')))
  40.         {
  41.                 IF (tagparam[i] == '"') || (tagparam[i] == '\'') kavichki=tagparam[i];
  42.                 tagparam[i] = 0x00;
  43.                 i--;
  44.         }
  45.  
  46.         if (kavichki)
  47.         {
  48.                 i=strrchr(#tagparam, kavichki);
  49.                 strlcpy(#val, #tagparam + i, sizeof(val));
  50.         }
  51.         else
  52.         {
  53.                 WHILE((i > 0) && (tagparam[i] <>'=')) i--; //i=strrchr(#tagparam, '=')+1;
  54.                 i++;
  55.                 strlcpy(#val, #tagparam + i, sizeof(val));
  56.  
  57.                 WHILE (val[0] == ' ') strcpy(#val, #val+1);
  58.         }
  59.         tagparam[i] = 0x00;
  60.  
  61.         FOR ( ; ((tagparam[i] <>' ') && (i > 0); i--)
  62.         {
  63.                 IF (tagparam[i] == '=') //äåðçêàÿ çàãëóøêà
  64.                         tagparam[i + 1] = 0x00;
  65.         }
  66.         strlcpy(#attr, #tagparam + i + 1, sizeof(attr));
  67.         tagparam[i] = 0x00;
  68.         strlwr(#attr);
  69.         return 1;
  70. }
  71. */
  72.  
  73. //
  74. //   STYLE
  75. //
  76.  
  77. struct _style {
  78.         bool b, u, i, s;
  79.         bool h1, h2, h3, h4, h5, h6;
  80.         bool a;
  81.         bool pre;
  82.         bool ignore;
  83.         dword color;
  84.         void clear();
  85. } style;
  86.  
  87. void _style::clear()
  88. {
  89.         b=u=i=s=0;
  90.         h1=h2=h3=h4=h5=h6=0;
  91.         a=0;
  92.         pre=0;
  93.         ignore=0;
  94.         color=0;
  95. }
  96.  
  97.  
  98. //
  99. //   TEXT
  100. //
  101.  
  102. struct _text {
  103.         dword start;
  104.         int x, y;
  105. };