Ejemplo n.º 1
0
        public byte [] GetStringBytes(TermInfoStrings tstr)
        {
            int x = (int)tstr;

            if (x < 0 || tstr >= TermInfoStrings.Last || x > strOffsets)
            {
                return(null);
            }

            int offset = booleansOffset + boolSize;

            if ((offset % 2) == 1)
            {
                offset++;
            }

            offset += numSize * 2;
            int off2 = GetInt16(buffer, offset + (int)tstr * 2);

            if (off2 == -1)
            {
                return(null);
            }

            return(GetStringBytes(buffer, offset + strOffsets * 2 + off2));
        }
Ejemplo n.º 2
0
        public void AddMapping(TermInfoStrings key, byte [] val)
        {
            if (val.Length == 0)
            {
                return;
            }

            map [val]             = key;
            starts [(int)val [0]] = true;
        }
Ejemplo n.º 3
0
        void AddStringMapping(TermInfoStrings s)
        {
            byte [] bytes = reader.GetStringBytes(s);
            if (bytes == null)
            {
                return;
            }

            rootmap.AddMapping(s, bytes);
        }
Ejemplo n.º 4
0
        object GetKeyFromBuffer(bool cooked)
        {
            if (readpos >= writepos)
            {
                return(null);
            }

            int next = buffer [readpos];

            if (!cooked || !rootmap.StartsWith(next))
            {
                readpos++;
                AdjustBuffer();
                return(CreateKeyInfoFromInt(next));
            }

            int             used;
            TermInfoStrings str = rootmap.Match(buffer, readpos, writepos - readpos, out used);

            if ((int)str == -1)
            {
                return(null);
            }

            ConsoleKeyInfo key;

            if (keymap [str] != null)
            {
                key = (ConsoleKeyInfo)keymap [str];
            }
            else
            {
                readpos++;
                AdjustBuffer();
                return(CreateKeyInfoFromInt(next));
            }

            readpos += used;
            AdjustBuffer();
            return(key);
        }
Ejemplo n.º 5
0
		public void AddMapping (TermInfoStrings key, byte [] val)
		{
			if (val.Length == 0)
				return;

			map [val] = key;
			starts [(int) val [0]] = true;
		}
Ejemplo n.º 6
0
		void AddStringMapping (TermInfoStrings s)
		{
			byte [] bytes = reader.GetStringBytes (s);
			if (bytes == null)
				return;

			rootmap.AddMapping (s, bytes);
		}
Ejemplo n.º 7
0
		public byte [] GetStringBytes (TermInfoStrings tstr)
		{
			int x = (int) tstr;
			if (x < 0 || tstr >= TermInfoStrings.Last || x > strOffsets)
				return null;

			int offset = booleansOffset + boolSize;
			if ((offset % 2) == 1)
				offset++;

			offset += numSize * 2;
			int off2 = GetInt16 (buffer, offset + (int) tstr * 2);
			if (off2 == -1)
				return null;

			return GetStringBytes (buffer, offset + strOffsets * 2 + off2);
		}
Ejemplo n.º 8
0
        public string Get(TermInfoStrings tstr) => default;                  // 0x00000001808D06B0-0x00000001808D07C0

        public byte[] GetStringBytes(TermInfoStrings tstr) => default;       // 0x00000001808D0470-0x00000001808D0620
Ejemplo n.º 9
0
 public int Get(TermInfoNumbers number) => default;                   // 0x00000001808D07C0-0x00000001808D0820
 public string Get(TermInfoStrings tstr) => default;                  // 0x00000001808D06B0-0x00000001808D07C0
Ejemplo n.º 10
0
        }                               // 0x000000018070EED0-0x000000018070F0E0

        // Methods
        public void AddMapping(TermInfoStrings key, byte[] val)
        {
        }                                                                  // 0x000000018070EA50-0x000000018070EB70