Outc() public abstract méthode

public abstract Outc ( int c ) : void
c int
Résultat void
Exemple #1
0
        public virtual void FlushLine(Out fout, int indent)
        {
            if (_linelen > 0)
            {
                if (indent + _linelen >= _options.WrapLen)
                {
                    WrapLine(fout, indent);
                }

                int i;
                if (!_inAttVal || _options.IndentAttributes)
                {
                    for (i = 0; i < indent; ++i)
                    {
                        fout.Outc(' ');
                    }
                }

                for (i = 0; i < _linelen; ++i)
                {
                    fout.Outc(_linebuf[i]);
                }
            }

            fout.Newline();
            _linelen = 0;
            _wraphere = 0;
            _inAttVal = false;
        }
Exemple #2
0
        private void WrapLine(Out fout, int indent)
        {
            int i;

            if (_wraphere == 0)
            {
                return;
            }

            for (i = 0; i < indent; ++i)
            {
                fout.Outc(' ');
            }

            for (i = 0; i < _wraphere; ++i)
            {
                fout.Outc(_linebuf[i]);
            }

            if (_inString)
            {
                fout.Outc(' ');
                fout.Outc('\\');
            }

            fout.Newline();

            if (_linelen > _wraphere)
            {
                int p = 0;

                if (_linebuf[_wraphere] == ' ')
                {
                    ++_wraphere;
                }

                int q = _wraphere;
                AddC('\x0000', _linelen);

                while (true)
                {
                    _linebuf[p] = _linebuf[q];
                    if (_linebuf[q] == 0)
                    {
                        break;
                    }
                    p++;
                    q++;
                }
                _linelen -= _wraphere;
            }
            else
            {
                _linelen = 0;
            }

            _wraphere = 0;
        }